sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_queryEx) function_name_queryEx (parameters (identifier_self) identifier_self (identifier_viewcls) identifier_viewcls (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 (subscript (identifier_kwargs) identifier_kwargs (string_'itercls') string_'itercls' )subscript (identifier_viewcls) identifier_viewcls )assignment )expression_statement (expression_statement (assignment (identifier_o) identifier_o (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_AsyncBucket) identifier_AsyncBucket (identifier_self) identifier_self )argument_list )call (identifier_query) identifier_query )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 (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_connected) identifier_connected )attribute )not_operator (block (expression_statement (call (attribute (call (attribute (identifier_self) identifier_self (identifier_connect) identifier_connect )attribute (argument_list )argument_list )call (identifier_addCallback) identifier_addCallback )attribute (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (call (attribute (identifier_o) identifier_o (identifier_start) identifier_start )attribute (argument_list )argument_list )call )lambda )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_o) identifier_o (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (identifier_o) identifier_o )return_statement )block )function_definition )module
Query a view, with the ``viewcls`` instance receiving events of the query as they arrive. :param type viewcls: A class (derived from :class:`AsyncViewBase`) to instantiate Other arguments are passed to the standard `query` method. This functions exactly like the :meth:`~couchbase.asynchronous.AsyncBucket.query` method, except it automatically schedules operations if the connection has not yet been negotiated.
(module (function_definition (function_name_import_name) function_name_import_name (parameters (identifier_mod_name) identifier_mod_name )parameters (block (try_statement (block (expression_statement (assignment (identifier_mod_obj_old) identifier_mod_obj_old (subscript (attribute (identifier_sys) identifier_sys (identifier_modules) identifier_modules )attribute (identifier_mod_name) identifier_mod_name )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_mod_obj_old) identifier_mod_obj_old (None) None )assignment )expression_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_mod_obj_old) identifier_mod_obj_old (None) None )comparison_operator (block (return_statement (identifier_mod_obj_old) identifier_mod_obj_old )return_statement )block )if_statement (expression_statement (call (identifier___import__) identifier___import__ (argument_list (identifier_mod_name) identifier_mod_name )argument_list )call )expression_statement (expression_statement (assignment (identifier_mod_obj) identifier_mod_obj (subscript (attribute (identifier_sys) identifier_sys (identifier_modules) identifier_modules )attribute (identifier_mod_name) identifier_mod_name )subscript )assignment )expression_statement (return_statement (identifier_mod_obj) identifier_mod_obj )return_statement )block )function_definition )module
Import a module by module name. @param mod_name: module name.
(module (function_definition (function_name_login) function_name_login (parameters (identifier_self) identifier_self (identifier_username) identifier_username (keyword_separator )keyword_separator (default_parameter (identifier_token) identifier_token (None) None )default_parameter )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__username) identifier__username )attribute (identifier_username) identifier_username )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__oauth) identifier__oauth )attribute (argument_list (identifier_username) identifier_username (keyword_argument (identifier_token) identifier_token (identifier_token) identifier_token )keyword_argument )argument_list )call )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier_is_authenticated) identifier_is_authenticated )attribute )return_statement )block )function_definition )module
Log in to Google Music. Parameters: username (str, Optional): Your Google Music username. Used for keeping stored OAuth tokens for multiple accounts separate. device_id (str, Optional): A mobile device ID or music manager uploader ID. Default: MAC address is used. token (dict, Optional): An OAuth token compatible with ``requests-oauthlib``. Returns: bool: ``True`` if successfully authenticated, ``False`` if not.
(module (function_definition (function_name_move) function_name_move (parameters (identifier_self) identifier_self (identifier_target) identifier_target (default_parameter (identifier_pos) identifier_pos (None) None )default_parameter )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_outline) identifier_outline )attribute (attribute (identifier_target) identifier_target (identifier_outline) identifier_outline )attribute )comparison_operator (block (raise_statement (call (identifier_IntegrityError) identifier_IntegrityError (argument_list (string_'Elements must be from the same outline!') string_'Elements must be from the same outline!' )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_tree_manipulation) identifier_tree_manipulation (identifier_send) identifier_send )attribute (argument_list (keyword_argument (identifier_sender) identifier_sender (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute )keyword_argument (keyword_argument (identifier_instance) identifier_instance (identifier_self) identifier_self )keyword_argument (keyword_argument (identifier_action) identifier_action (string_'move') string_'move' )keyword_argument (keyword_argument (identifier_target_node_type) identifier_target_node_type (None) None )keyword_argument (keyword_argument (identifier_target_node) identifier_target_node (identifier_target) identifier_target )keyword_argument (keyword_argument (identifier_pos) identifier_pos (identifier_pos) identifier_pos )keyword_argument )argument_list )call )expression_statement (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list )argument_list )call (identifier_move) identifier_move )attribute (argument_list (identifier_target) identifier_target (identifier_pos) identifier_pos )argument_list )call )return_statement )block )function_definition )module
An override of the treebeard api in order to send a signal in advance.
(module (function_definition (function_name_createmergerequest) function_name_createmergerequest (parameters (identifier_self) identifier_self (identifier_project_id) identifier_project_id (identifier_sourcebranch) identifier_sourcebranch (identifier_targetbranch) identifier_targetbranch (identifier_title) identifier_title (default_parameter (identifier_target_project_id) identifier_target_project_id (None) None )default_parameter (default_parameter (identifier_assignee_id) identifier_assignee_id (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_'source_branch') string_'source_branch' (identifier_sourcebranch) identifier_sourcebranch )pair (pair (string_'target_branch') string_'target_branch' (identifier_targetbranch) identifier_targetbranch )pair (pair (string_'title') string_'title' (identifier_title) identifier_title )pair (pair (string_'assignee_id') string_'assignee_id' (identifier_assignee_id) identifier_assignee_id )pair (pair (string_'target_project_id') string_'target_project_id' (identifier_target_project_id) identifier_target_project_id )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_request) identifier_request (call (attribute (identifier_requests) identifier_requests (identifier_post) identifier_post )attribute (argument_list (call (attribute (string_'{0}/{1}/merge_requests') string_'{0}/{1}/merge_requests' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_projects_url) identifier_projects_url )attribute (identifier_project_id) identifier_project_id )argument_list )call (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_headers) identifier_headers (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute )keyword_argument (keyword_argument (identifier_verify) identifier_verify (attribute (identifier_self) identifier_self (identifier_verify_ssl) identifier_verify_ssl )attribute )keyword_argument (keyword_argument (identifier_auth) identifier_auth (attribute (identifier_self) identifier_self (identifier_auth) identifier_auth )attribute )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (attribute (identifier_self) identifier_self (identifier_timeout) identifier_timeout )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_request) identifier_request (identifier_status_code) identifier_status_code )attribute (integer_201) integer_201 )comparison_operator (block (return_statement (call (attribute (identifier_request) identifier_request (identifier_json) identifier_json )attribute (argument_list )argument_list )call )return_statement )block (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block )function_definition )module
Create a new merge request. :param project_id: ID of the project originating the merge request :param sourcebranch: name of the branch to merge from :param targetbranch: name of the branch to merge to :param title: Title of the merge request :param assignee_id: Assignee user ID :return: dict of the new merge request
(module (function_definition (function_name_fopenat_rw) function_name_fopenat_rw (parameters (identifier_base_fd) identifier_base_fd (identifier_path) identifier_path )parameters (block (return_statement (call (attribute (identifier_os) identifier_os (identifier_fdopen) identifier_fdopen )attribute (argument_list (call (identifier_openat) identifier_openat (argument_list (identifier_base_fd) identifier_base_fd (identifier_path) identifier_path (attribute (identifier_os) identifier_os (identifier_O_RDWR) identifier_O_RDWR )attribute )argument_list )call (string_'rb+') string_'rb+' )argument_list )call )return_statement )block )function_definition )module
Does openat read-write, then does fdopen to get a file object
(module (function_definition (function_name_db_create) function_name_db_create (parameters (identifier_name) identifier_name (default_parameter (identifier_character_set) identifier_character_set (None) None )default_parameter (default_parameter (identifier_collate) identifier_collate (None) None )default_parameter (dictionary_splat_pattern (identifier_connection_args) identifier_connection_args )dictionary_splat_pattern )parameters (block (if_statement (call (identifier_db_exists) identifier_db_exists (argument_list (identifier_name) identifier_name (dictionary_splat (identifier_connection_args) identifier_connection_args )dictionary_splat )argument_list )call (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'DB \'%s\' already exists') string_'DB \'%s\' already exists' (identifier_name) identifier_name )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_dbc) identifier_dbc (call (identifier__connect) identifier__connect (argument_list (dictionary_splat (identifier_connection_args) identifier_connection_args )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_dbc) identifier_dbc (None) None )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_cur) identifier_cur (call (attribute (identifier_dbc) identifier_dbc (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_s_name) identifier_s_name (call (identifier_quote_identifier) identifier_quote_identifier (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_qry) identifier_qry (call (attribute (string_'CREATE DATABASE IF NOT EXISTS {0}') string_'CREATE DATABASE IF NOT EXISTS {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_s_name) identifier_s_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_args) identifier_args (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_character_set) identifier_character_set (None) None )comparison_operator (block (expression_statement (augmented_assignment (identifier_qry) identifier_qry (string_' CHARACTER SET %(character_set)s') string_' CHARACTER SET %(character_set)s' )augmented_assignment )expression_statement (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'character_set') string_'character_set' )subscript (identifier_character_set) identifier_character_set )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_collate) identifier_collate (None) None )comparison_operator (block (expression_statement (augmented_assignment (identifier_qry) identifier_qry (string_' COLLATE %(collate)s') string_' COLLATE %(collate)s' )augmented_assignment )expression_statement (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'collate') string_'collate' )subscript (identifier_collate) identifier_collate )assignment )expression_statement )block )if_statement (expression_statement (augmented_assignment (identifier_qry) identifier_qry (string_';') string_';' )augmented_assignment )expression_statement (try_statement (block (if_statement (call (identifier__execute) identifier__execute (argument_list (identifier_cur) identifier_cur (identifier_qry) identifier_qry (identifier_args) identifier_args )argument_list )call (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'DB \'%s\' created') string_'DB \'%s\' created' (identifier_name) identifier_name )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )if_statement )block (except_clause (as_pattern (attribute (identifier_MySQLdb) identifier_MySQLdb (identifier_OperationalError) identifier_OperationalError )attribute (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_err) identifier_err (call (attribute (string_'MySQL Error {0}: {1}') string_'MySQL Error {0}: {1}' (identifier_format) identifier_format )attribute (argument_list (list_splat (attribute (identifier_exc) identifier_exc (identifier_args) identifier_args )attribute )list_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier___context__) identifier___context__ (string_'mysql.error') string_'mysql.error' )subscript (identifier_err) identifier_err )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (identifier_err) identifier_err )argument_list )call )expression_statement )block )except_clause )try_statement (return_statement (False) False )return_statement )block )function_definition )module
Adds a databases to the MySQL server. name The name of the database to manage character_set The character set, if left empty the MySQL default will be used collate The collation, if left empty the MySQL default will be used CLI Example: .. code-block:: bash salt '*' mysql.db_create 'dbname' salt '*' mysql.db_create 'dbname' 'utf8' 'utf8_general_ci'
(module (function_definition (function_name_from_tree) function_name_from_tree (parameters (identifier_cls) identifier_cls (identifier_repo) identifier_repo (list_splat_pattern (identifier_treeish) identifier_treeish )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_treeish) identifier_treeish )argument_list )call (integer_0) integer_0 )comparison_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_treeish) identifier_treeish )argument_list )call (integer_3) integer_3 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Please specify between 1 and 3 treeish, got %i") string_"Please specify between 1 and 3 treeish, got %i" (call (identifier_len) identifier_len (argument_list (identifier_treeish) identifier_treeish )argument_list )call )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_arg_list) identifier_arg_list (list )list )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_treeish) identifier_treeish )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (call (attribute (identifier_arg_list) identifier_arg_list (identifier_append) identifier_append )attribute (argument_list (string_"--reset") string_"--reset" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_arg_list) identifier_arg_list (identifier_append) identifier_append )attribute (argument_list (string_"--aggressive") string_"--aggressive" )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_tmp_index) identifier_tmp_index (call (attribute (identifier_tempfile) identifier_tempfile (identifier_mktemp) identifier_mktemp )attribute (argument_list (string_'') string_'' (string_'') string_'' (attribute (identifier_repo) identifier_repo (identifier_git_dir) identifier_git_dir )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_arg_list) identifier_arg_list (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_"--index-output=%s") string_"--index-output=%s" (identifier_tmp_index) identifier_tmp_index )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_arg_list) identifier_arg_list (identifier_extend) identifier_extend )attribute (argument_list (identifier_treeish) identifier_treeish )argument_list )call )expression_statement (expression_statement (assignment (identifier_index_handler) identifier_index_handler (call (identifier_TemporaryFileSwap) identifier_TemporaryFileSwap (argument_list (call (identifier_join_path_native) identifier_join_path_native (argument_list (attribute (identifier_repo) identifier_repo (identifier_git_dir) identifier_git_dir )attribute (string_'index') string_'index' )argument_list )call )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_repo) identifier_repo (identifier_git) identifier_git )attribute (identifier_read_tree) identifier_read_tree )attribute (argument_list (list_splat (identifier_arg_list) identifier_arg_list )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (assignment (identifier_index) identifier_index (call (identifier_cls) identifier_cls (argument_list (identifier_repo) identifier_repo (identifier_tmp_index) identifier_tmp_index )argument_list )call )assignment )expression_statement (expression_statement (attribute (identifier_index) identifier_index (identifier_entries) identifier_entries )attribute )expression_statement (delete_statement (parenthesized_expression (identifier_index_handler) identifier_index_handler )parenthesized_expression )delete_statement )block (finally_clause (block (if_statement (call (attribute (identifier_osp) identifier_osp (identifier_exists) identifier_exists )attribute (argument_list (identifier_tmp_index) identifier_tmp_index )argument_list )call (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_tmp_index) identifier_tmp_index )argument_list )call )expression_statement )block )if_statement )block )finally_clause )try_statement (return_statement (identifier_index) identifier_index )return_statement )block )function_definition )module
Merge the given treeish revisions into a new index which is returned. The original index will remain unaltered :param repo: The repository treeish are located in. :param treeish: One, two or three Tree Objects, Commits or 40 byte hexshas. The result changes according to the amount of trees. If 1 Tree is given, it will just be read into a new index If 2 Trees are given, they will be merged into a new index using a two way merge algorithm. Tree 1 is the 'current' tree, tree 2 is the 'other' one. It behaves like a fast-forward. If 3 Trees are given, a 3-way merge will be performed with the first tree being the common ancestor of tree 2 and tree 3. Tree 2 is the 'current' tree, tree 3 is the 'other' one :param kwargs: Additional arguments passed to git-read-tree :return: New IndexFile instance. It will point to a temporary index location which does not exist anymore. If you intend to write such a merged Index, supply an alternate file_path to its 'write' method. :note: In the three-way merge case, --aggressive will be specified to automatically resolve more cases in a commonly correct manner. Specify trivial=True as kwarg to override that. As the underlying git-read-tree command takes into account the current index, it will be temporarily moved out of the way to assure there are no unsuspected interferences.
(module (function_definition (function_name_create) function_name_create (parameters (identifier_self) identifier_self (identifier_Name) identifier_Name (identifier_Subject) identifier_Subject (default_parameter (identifier_HtmlBody) identifier_HtmlBody (None) None )default_parameter (default_parameter (identifier_TextBody) identifier_TextBody (None) None )default_parameter (default_parameter (identifier_Alias) identifier_Alias (None) None )default_parameter )parameters (block (assert_statement (boolean_operator (identifier_TextBody) identifier_TextBody (identifier_HtmlBody) identifier_HtmlBody )boolean_operator (string_"Provide either email TextBody or HtmlBody or both") string_"Provide either email TextBody or HtmlBody or both" )assert_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_"Name") string_"Name" (identifier_Name) identifier_Name )pair (pair (string_"Subject") string_"Subject" (identifier_Subject) identifier_Subject )pair (pair (string_"HtmlBody") string_"HtmlBody" (identifier_HtmlBody) identifier_HtmlBody )pair (pair (string_"TextBody") string_"TextBody" (identifier_TextBody) identifier_TextBody )pair (pair (string_"Alias") string_"Alias" (identifier_Alias) identifier_Alias )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__init_instance) identifier__init_instance )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_call) identifier_call )attribute (argument_list (string_"POST") string_"POST" (string_"/templates") string_"/templates" (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Creates a template. :param Name: Name of template :param Subject: The content to use for the Subject when this template is used to send email. :param HtmlBody: The content to use for the HtmlBody when this template is used to send email. :param TextBody: The content to use for the HtmlBody when this template is used to send email. :return:
(module (function_definition (function_name__process_change) function_name__process_change (parameters (identifier_self) identifier_self (identifier_server_description) identifier_server_description )parameters (block (expression_statement (assignment (identifier_td_old) identifier_td_old (attribute (identifier_self) identifier_self (identifier__description) identifier__description )attribute )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__publish_server) identifier__publish_server )attribute (block (expression_statement (assignment (identifier_old_server_description) identifier_old_server_description (subscript (attribute (identifier_td_old) identifier_td_old (identifier__server_descriptions) identifier__server_descriptions )attribute (attribute (identifier_server_description) identifier_server_description (identifier_address) identifier_address )attribute )subscript )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__events) identifier__events )attribute (identifier_put) identifier_put )attribute (argument_list (tuple (attribute (attribute (identifier_self) identifier_self (identifier__listeners) identifier__listeners )attribute (identifier_publish_server_description_changed) identifier_publish_server_description_changed )attribute (tuple (identifier_old_server_description) identifier_old_server_description (identifier_server_description) identifier_server_description (attribute (identifier_server_description) identifier_server_description (identifier_address) identifier_address )attribute (attribute (identifier_self) identifier_self (identifier__topology_id) identifier__topology_id )attribute )tuple )tuple )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__description) identifier__description )attribute (call (identifier_updated_topology_description) identifier_updated_topology_description (argument_list (attribute (identifier_self) identifier_self (identifier__description) identifier__description )attribute (identifier_server_description) identifier_server_description )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__update_servers) identifier__update_servers )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__receive_cluster_time_no_lock) identifier__receive_cluster_time_no_lock )attribute (argument_list (attribute (identifier_server_description) identifier_server_description (identifier_cluster_time) identifier_cluster_time )attribute )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__publish_tp) identifier__publish_tp )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__events) identifier__events )attribute (identifier_put) identifier_put )attribute (argument_list (tuple (attribute (attribute (identifier_self) identifier_self (identifier__listeners) identifier__listeners )attribute (identifier_publish_topology_description_changed) identifier_publish_topology_description_changed )attribute (tuple (identifier_td_old) identifier_td_old (attribute (identifier_self) identifier_self (identifier__description) identifier__description )attribute (attribute (identifier_self) identifier_self (identifier__topology_id) identifier__topology_id )attribute )tuple )tuple )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__condition) identifier__condition )attribute (identifier_notify_all) identifier_notify_all )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Process a new ServerDescription on an opened topology. Hold the lock when calling this.
(module (function_definition (function_name_stop) function_name_stop (parameters (identifier_self) identifier_self )parameters (block (expression_statement (yield (call (attribute (identifier_self) identifier_self (identifier__stop_ubridge) identifier__stop_ubridge )attribute (argument_list )argument_list )call )yield )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__nvram_watcher) identifier__nvram_watcher )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__nvram_watcher) identifier__nvram_watcher )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__nvram_watcher) identifier__nvram_watcher )attribute (None) None )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier__telnet_server) identifier__telnet_server )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__telnet_server) identifier__telnet_server )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__telnet_server) identifier__telnet_server )attribute (None) None )assignment )expression_statement )block )if_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier_is_running) identifier_is_running )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__terminate_process_iou) identifier__terminate_process_iou )attribute (argument_list )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier__iou_process) identifier__iou_process )attribute (identifier_returncode) identifier_returncode )attribute (None) None )comparison_operator (block (try_statement (block (expression_statement (yield (call (attribute (attribute (attribute (identifier_gns3server) identifier_gns3server (identifier_utils) identifier_utils )attribute (identifier_asyncio) identifier_asyncio )attribute (identifier_wait_for_process_termination) identifier_wait_for_process_termination )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__iou_process) identifier__iou_process )attribute (keyword_argument (identifier_timeout) identifier_timeout (integer_3) integer_3 )keyword_argument )argument_list )call )yield )expression_statement )block (except_clause (attribute (identifier_asyncio) identifier_asyncio (identifier_TimeoutError) identifier_TimeoutError )attribute (block (if_statement (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier__iou_process) identifier__iou_process )attribute (identifier_returncode) identifier_returncode )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warning) identifier_warning )attribute (argument_list (call (attribute (string_"IOU process {} is still running... killing it") string_"IOU process {} is still running... killing it" (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier__iou_process) identifier__iou_process )attribute (identifier_pid) identifier_pid )attribute )argument_list )call )argument_list )call )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__iou_process) identifier__iou_process )attribute (identifier_kill) identifier_kill )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (identifier_ProcessLookupError) identifier_ProcessLookupError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement )block )except_clause )try_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__iou_process) identifier__iou_process )attribute (None) None )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__started) identifier__started )attribute (False) False )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_save_configs) identifier_save_configs )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Stops the IOU process.
(module (function_definition (function_name_mul) function_name_mul (parameters (identifier_name) identifier_name (identifier_num) identifier_num (default_parameter (identifier_minimum) identifier_minimum (integer_0) integer_0 )default_parameter (default_parameter (identifier_maximum) identifier_maximum (integer_0) integer_0 )default_parameter (default_parameter (identifier_ref) identifier_ref (None) None )default_parameter )parameters (block (return_statement (call (identifier_calc) identifier_calc (argument_list (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_num) identifier_num (identifier_num) identifier_num )keyword_argument (keyword_argument (identifier_oper) identifier_oper (string_'mul') string_'mul' )keyword_argument (keyword_argument (identifier_minimum) identifier_minimum (identifier_minimum) identifier_minimum )keyword_argument (keyword_argument (identifier_maximum) identifier_maximum (identifier_maximum) identifier_maximum )keyword_argument (keyword_argument (identifier_ref) identifier_ref (identifier_ref) identifier_ref )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Multiplies together the ``num`` most recent values. Requires a list. USAGE: .. code-block:: yaml foo: calc.mul: - name: myregentry - num: 5
(module (function_definition (function_name_get_activity_comments) function_name_get_activity_comments (parameters (identifier_self) identifier_self (identifier_activity_id) identifier_activity_id (default_parameter (identifier_markdown) identifier_markdown (False) False )default_parameter (default_parameter (identifier_limit) identifier_limit (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_result_fetcher) identifier_result_fetcher (call (attribute (identifier_functools) identifier_functools (identifier_partial) identifier_partial )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_protocol) identifier_protocol )attribute (identifier_get) identifier_get )attribute (string_'/activities/{id}/comments') string_'/activities/{id}/comments' (keyword_argument (identifier_id) identifier_id (identifier_activity_id) identifier_activity_id )keyword_argument (keyword_argument (identifier_markdown) identifier_markdown (call (identifier_int) identifier_int (argument_list (identifier_markdown) identifier_markdown )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_BatchedResultsIterator) identifier_BatchedResultsIterator (argument_list (keyword_argument (identifier_entity) identifier_entity (attribute (identifier_model) identifier_model (identifier_ActivityComment) identifier_ActivityComment )attribute )keyword_argument (keyword_argument (identifier_bind_client) identifier_bind_client (identifier_self) identifier_self )keyword_argument (keyword_argument (identifier_result_fetcher) identifier_result_fetcher (identifier_result_fetcher) identifier_result_fetcher )keyword_argument (keyword_argument (identifier_limit) identifier_limit (identifier_limit) identifier_limit )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Gets the comments for an activity. http://strava.github.io/api/v3/comments/#list :param activity_id: The activity for which to fetch comments. :type activity_id: int :param markdown: Whether to include markdown in comments (default is false/filterout). :type markdown: bool :param limit: Max rows to return (default unlimited). :type limit: int :return: An iterator of :class:`stravalib.model.ActivityComment` objects. :rtype: :class:`BatchedResultsIterator`
(module (function_definition (function_name_destroy_list) function_name_destroy_list (parameters (identifier_self) identifier_self (identifier_list_id) identifier_list_id )parameters (block (return_statement (call (identifier_List) identifier_List (argument_list (call (identifier_tweepy_list_to_json) identifier_tweepy_list_to_json (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_destroy_list) identifier_destroy_list )attribute (argument_list (keyword_argument (identifier_list_id) identifier_list_id (identifier_list_id) identifier_list_id )keyword_argument )argument_list )call )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Destroy a list :param list_id: list ID number :return: The destroyed list object :rtype: :class:`~responsebot.models.List`
(module (function_definition (function_name_set_stripe_api_version) function_name_set_stripe_api_version (parameters (default_parameter (identifier_version) identifier_version (None) None )default_parameter (default_parameter (identifier_validate) identifier_validate (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_version) identifier_version (boolean_operator (identifier_version) identifier_version (call (identifier_get_stripe_api_version) identifier_get_stripe_api_version (argument_list )argument_list )call )boolean_operator )assignment )expression_statement (if_statement (identifier_validate) identifier_validate (block (expression_statement (assignment (identifier_valid) identifier_valid (call (identifier_validate_stripe_api_version) identifier_validate_stripe_api_version (argument_list (identifier_version) identifier_version )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_valid) identifier_valid )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Bad stripe API version: {}") string_"Bad stripe API version: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_version) identifier_version )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )if_statement (expression_statement (assignment (attribute (identifier_stripe) identifier_stripe (identifier_api_version) identifier_api_version )attribute (identifier_version) identifier_version )assignment )expression_statement )block )function_definition )module
Set the desired API version to use for Stripe requests. :param version: The version to set for the Stripe API. :type version: ``str`` :param validate: If True validate the value for the specified version). :type validate: ``bool``
(module (function_definition (function_name_which) function_name_which (parameters (identifier_path) identifier_path (default_parameter (identifier_jail) identifier_jail (None) None )default_parameter (default_parameter (identifier_chroot) identifier_chroot (None) None )default_parameter (default_parameter (identifier_root) identifier_root (None) None )default_parameter (default_parameter (identifier_origin) identifier_origin (False) False )default_parameter (default_parameter (identifier_quiet) identifier_quiet (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_opts) identifier_opts (string_'') string_'' )assignment )expression_statement (if_statement (identifier_quiet) identifier_quiet (block (expression_statement (augmented_assignment (identifier_opts) identifier_opts (string_'q') string_'q' )augmented_assignment )expression_statement )block )if_statement (if_statement (identifier_origin) identifier_origin (block (expression_statement (augmented_assignment (identifier_opts) identifier_opts (string_'o') string_'o' )augmented_assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (call (identifier__pkg) identifier__pkg (argument_list (identifier_jail) identifier_jail (identifier_chroot) identifier_chroot (identifier_root) identifier_root )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_append) identifier_append )attribute (argument_list (string_'which') string_'which' )argument_list )call )expression_statement (if_statement (identifier_opts) identifier_opts (block (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_'-') string_'-' (identifier_opts) identifier_opts )binary_operator )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_append) identifier_append )attribute (argument_list (identifier_path) identifier_path )argument_list )call )expression_statement (return_statement (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run') string_'cmd.run' )subscript (argument_list (identifier_cmd) identifier_cmd (keyword_argument (identifier_output_loglevel) identifier_output_loglevel (string_'trace') string_'trace' )keyword_argument (keyword_argument (identifier_python_shell) identifier_python_shell (False) False )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Displays which package installed a specific file CLI Example: .. code-block:: bash salt '*' pkg.which <file name> jail Perform the check in the specified jail CLI Example: .. code-block:: bash salt '*' pkg.which <file name> jail=<jail name or id> chroot Perform the check in the specified chroot (ignored if ``jail`` is specified) root Perform the check in the specified root (ignored if ``jail`` is specified) CLI Example: .. code-block:: bash salt '*' pkg.which <file name> chroot=/path/to/chroot origin Shows the origin of the package instead of name-version. CLI Example: .. code-block:: bash salt '*' pkg.which <file name> origin=True quiet Quiet output. CLI Example: .. code-block:: bash salt '*' pkg.which <file name> quiet=True
(module (function_definition (function_name_set_shutter_level) function_name_set_shutter_level (parameters (identifier_self) identifier_self (default_parameter (identifier_level) identifier_level (float_0.0) float_0.0 )default_parameter )parameters (block (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_"channelIndex") string_"channelIndex" (integer_1) integer_1 )pair (pair (string_"deviceId") string_"deviceId" (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )pair (pair (string_"shutterLevel") string_"shutterLevel" (identifier_level) identifier_level )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__restCall) identifier__restCall )attribute (argument_list (string_"device/control/setShutterLevel") string_"device/control/setShutterLevel" (keyword_argument (identifier_body) identifier_body (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_data) identifier_data )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
sets the shutter level Args: level(float): the new level of the shutter. 0.0 = open, 1.0 = closed Returns: the result of the _restCall
(module (function_definition (function_name_fq_merge) function_name_fq_merge (parameters (identifier_R1) identifier_R1 (identifier_R2) identifier_R2 )parameters (block (expression_statement (assignment (identifier_c) identifier_c (call (attribute (identifier_itertools) identifier_itertools (identifier_cycle) identifier_cycle )attribute (argument_list (list (integer_1) integer_1 (integer_2) integer_2 (integer_3) integer_3 (integer_4) integer_4 )list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_r1) identifier_r1 (identifier_r2) identifier_r2 )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_R1) identifier_R1 (identifier_R2) identifier_R2 )argument_list )call (block (expression_statement (assignment (identifier_n) identifier_n (call (identifier_next) identifier_next (argument_list (identifier_c) identifier_c )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_n) identifier_n (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_pair) identifier_pair (list (list )list (list )list )list )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (subscript (identifier_pair) identifier_pair (integer_0) integer_0 )subscript (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_r1) identifier_r1 (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (subscript (identifier_pair) identifier_pair (integer_1) integer_1 )subscript (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_r2) identifier_r2 (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_n) identifier_n (integer_4) integer_4 )comparison_operator (block (expression_statement (yield (identifier_pair) identifier_pair )yield )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
merge separate fastq files
(module (function_definition (function_name_cut_from_chain) function_name_cut_from_chain (parameters (identifier_sciobj_model) identifier_sciobj_model )parameters (block (if_statement (call (identifier__is_head) identifier__is_head (argument_list (identifier_sciobj_model) identifier_sciobj_model )argument_list )call (block (expression_statement (assignment (identifier_old_pid) identifier_old_pid (attribute (attribute (identifier_sciobj_model) identifier_sciobj_model (identifier_obsoletes) identifier_obsoletes )attribute (identifier_did) identifier_did )attribute )assignment )expression_statement (expression_statement (call (identifier__cut_head_from_chain) identifier__cut_head_from_chain (argument_list (identifier_sciobj_model) identifier_sciobj_model )argument_list )call )expression_statement )block (elif_clause (call (identifier__is_tail) identifier__is_tail (argument_list (identifier_sciobj_model) identifier_sciobj_model )argument_list )call (block (expression_statement (assignment (identifier_old_pid) identifier_old_pid (attribute (attribute (identifier_sciobj_model) identifier_sciobj_model (identifier_obsoleted_by) identifier_obsoleted_by )attribute (identifier_did) identifier_did )attribute )assignment )expression_statement (expression_statement (call (identifier__cut_tail_from_chain) identifier__cut_tail_from_chain (argument_list (identifier_sciobj_model) identifier_sciobj_model )argument_list )call )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_old_pid) identifier_old_pid (attribute (attribute (identifier_sciobj_model) identifier_sciobj_model (identifier_obsoleted_by) identifier_obsoleted_by )attribute (identifier_did) identifier_did )attribute )assignment )expression_statement (expression_statement (call (identifier__cut_embedded_from_chain) identifier__cut_embedded_from_chain (argument_list (identifier_sciobj_model) identifier_sciobj_model )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (identifier__update_sid_to_last_existing_pid_map) identifier__update_sid_to_last_existing_pid_map (argument_list (identifier_old_pid) identifier_old_pid )argument_list )call )expression_statement )block )function_definition )module
Remove an object from a revision chain. The object can be at any location in the chain, including the head or tail. Preconditions: - The object with the pid is verified to exist and to be a member of an revision chain. E.g., with: d1_gmn.app.views.asserts.is_existing_object(pid) d1_gmn.app.views.asserts.is_in_revision_chain(pid) Postconditions: - The given object is a standalone object with empty obsoletes, obsoletedBy and seriesId fields. - The previously adjacent objects in the chain are adjusted to close any gap that was created or remove dangling reference at the head or tail. - If the object was the last object in the chain and the chain has a SID, the SID reference is shifted over to the new last object in the chain.
(module (function_definition (function_name_getTriples) function_name_getTriples (parameters (identifier_pointing) identifier_pointing )parameters (block (expression_statement (assignment (identifier_sql) identifier_sql (string_"SELECT id FROM triples t join triple_members m ON t.id=m.triple") string_"SELECT id FROM triples t join triple_members m ON t.id=m.triple" )assignment )expression_statement (expression_statement (augmented_assignment (identifier_sql) identifier_sql (string_" join bucket.exposure e on e.expnum=m.expnum ") string_" join bucket.exposure e on e.expnum=m.expnum " )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_sql) identifier_sql (string_" WHERE pointing=%s group by id order by e.expnum ") string_" WHERE pointing=%s group by id order by e.expnum " )augmented_assignment )expression_statement (expression_statement (call (attribute (identifier_cfeps) identifier_cfeps (identifier_execute) identifier_execute )attribute (argument_list (identifier_sql) identifier_sql (tuple (identifier_pointing) identifier_pointing )tuple )argument_list )call )expression_statement (return_statement (parenthesized_expression (call (attribute (identifier_cfeps) identifier_cfeps (identifier_fetchall) identifier_fetchall )attribute (argument_list )argument_list )call )parenthesized_expression )return_statement )block )function_definition )module
Get all triples of a specified pointing ID. Defaults is to return a complete list triples.
(module (function_definition (function_name__from_python_type) function_name__from_python_type (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj (identifier_field) identifier_field (identifier_pytype) identifier_pytype )parameters (block (expression_statement (assignment (identifier_json_schema) identifier_json_schema (dictionary (pair (string_'title') string_'title' (boolean_operator (attribute (identifier_field) identifier_field (identifier_attribute) identifier_attribute )attribute (attribute (identifier_field) identifier_field (identifier_name) identifier_name )attribute )boolean_operator )pair )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_val) identifier_val )pattern_list (call (attribute (subscript (identifier_TYPE_MAP) identifier_TYPE_MAP (identifier_pytype) identifier_pytype )subscript (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_json_schema) identifier_json_schema (identifier_key) identifier_key )subscript (identifier_val) identifier_val )assignment )expression_statement )block )for_statement (if_statement (attribute (identifier_field) identifier_field (identifier_dump_only) identifier_dump_only )attribute (block (expression_statement (assignment (subscript (identifier_json_schema) identifier_json_schema (string_'readonly') string_'readonly' )subscript (True) True )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_field) identifier_field (identifier_default) identifier_default )attribute (identifier_missing) identifier_missing )comparison_operator (block (expression_statement (assignment (subscript (identifier_json_schema) identifier_json_schema (string_'default') string_'default' )subscript (attribute (identifier_field) identifier_field (identifier_default) identifier_default )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_metadata) identifier_metadata (call (attribute (attribute (identifier_field) identifier_field (identifier_metadata) identifier_metadata )attribute (identifier_get) identifier_get )attribute (argument_list (string_'metadata') string_'metadata' (dictionary )dictionary )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_metadata) identifier_metadata (identifier_update) identifier_update )attribute (argument_list (attribute (identifier_field) identifier_field (identifier_metadata) identifier_metadata )attribute )argument_list )call )expression_statement (for_statement (pattern_list (identifier_md_key) identifier_md_key (identifier_md_val) identifier_md_val )pattern_list (call (attribute (identifier_metadata) identifier_metadata (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_md_key) identifier_md_key (string_'metadata') string_'metadata' )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (subscript (identifier_json_schema) identifier_json_schema (identifier_md_key) identifier_md_key )subscript (identifier_md_val) identifier_md_val )assignment )expression_statement )block )for_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_field) identifier_field (attribute (identifier_fields) identifier_fields (identifier_List) identifier_List )attribute )argument_list )call (block (expression_statement (assignment (subscript (identifier_json_schema) identifier_json_schema (string_'items') string_'items' )subscript (call (attribute (identifier_self) identifier_self (identifier__get_schema_for_field) identifier__get_schema_for_field )attribute (argument_list (identifier_obj) identifier_obj (attribute (identifier_field) identifier_field (identifier_container) identifier_container )attribute )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_json_schema) identifier_json_schema )return_statement )block )function_definition )module
Get schema definition from python type.
(module (function_definition (function_name_load_model) function_name_load_model (parameters (identifier_model_name) identifier_model_name (identifier_epoch_num) identifier_epoch_num (identifier_data_shapes) identifier_data_shapes (identifier_label_shapes) identifier_label_shapes (identifier_label_names) identifier_label_names (default_parameter (identifier_gpus) identifier_gpus (string_'') string_'' )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_sym) identifier_sym (identifier_arg_params) identifier_arg_params (identifier_aux_params) identifier_aux_params )pattern_list (call (attribute (attribute (identifier_mx) identifier_mx (identifier_model) identifier_model )attribute (identifier_load_checkpoint) identifier_load_checkpoint )attribute (argument_list (identifier_model_name) identifier_model_name (identifier_epoch_num) identifier_epoch_num )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mod) identifier_mod (call (identifier_create_module) identifier_create_module (argument_list (identifier_sym) identifier_sym (identifier_data_shapes) identifier_data_shapes (identifier_label_shapes) identifier_label_shapes (identifier_label_names) identifier_label_names (identifier_gpus) identifier_gpus )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_mod) identifier_mod (identifier_set_params) identifier_set_params )attribute (argument_list (keyword_argument (identifier_arg_params) identifier_arg_params (identifier_arg_params) identifier_arg_params )keyword_argument (keyword_argument (identifier_aux_params) identifier_aux_params (identifier_aux_params) identifier_aux_params )keyword_argument (keyword_argument (identifier_allow_missing) identifier_allow_missing (True) True )keyword_argument )argument_list )call )expression_statement (return_statement (identifier_mod) identifier_mod )return_statement )block )function_definition )module
Returns a module loaded with the provided model. Parameters ---------- model_name: str Prefix of the MXNet model name as stored on the local directory. epoch_num : int Epoch number of model we would like to load. input_shape: tuple The shape of the input data in the form of (batch_size, channels, height, width) files: list of strings List of URLs pertaining to files that need to be downloaded in order to use the model. data_shapes: list of tuples. List of tuples where each tuple is a pair of input variable name and its shape. label_shapes: list of (str, tuple) Typically is ``data_iter.provide_label``. label_names: list of str Name of the output labels in the MXNet symbolic graph. gpus: str Comma separated string of gpu ids on which inferences are executed. E.g. 3,5,6 would refer to GPUs 3, 5 and 6. If empty, we use CPU. Returns ------- MXNet module
(module (function_definition (function_name_prttex_summary_cnts_all) function_name_prttex_summary_cnts_all (parameters (identifier_self) identifier_self (default_parameter (identifier_prt) identifier_prt (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute )default_parameter )parameters (block (expression_statement (assignment (identifier_cnts) identifier_cnts (call (attribute (identifier_self) identifier_self (identifier_get_cnts_levels_depths_recs) identifier_get_cnts_levels_depths_recs )attribute (argument_list (call (identifier_set) identifier_set (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_obo) identifier_obo )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__prttex_summary_cnts) identifier__prttex_summary_cnts )attribute (argument_list (identifier_prt) identifier_prt (identifier_cnts) identifier_cnts )argument_list )call )expression_statement )block )function_definition )module
Print LaTeX format summary of level and depth counts for all active GO Terms.
(module (function_definition (function_name_createUsageReport) function_name_createUsageReport (parameters (identifier_self) identifier_self (identifier_reportname) identifier_reportname (identifier_queries) identifier_queries (identifier_metadata) identifier_metadata (default_parameter (identifier_since) identifier_since (string_"LAST_DAY") string_"LAST_DAY" )default_parameter (default_parameter (identifier_fromValue) identifier_fromValue (None) None )default_parameter (default_parameter (identifier_toValue) identifier_toValue (None) None )default_parameter (default_parameter (identifier_aggregationInterval) identifier_aggregationInterval (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier__url) identifier__url )attribute (string_"/add") string_"/add" )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_"f") string_"f" (string_"json") string_"json" )pair (pair (string_"usagereport") string_"usagereport" (dictionary (pair (string_"reportname") string_"reportname" (identifier_reportname) identifier_reportname )pair (pair (string_"since") string_"since" (identifier_since) identifier_since )pair (pair (string_"metadata") string_"metadata" (identifier_metadata) identifier_metadata )pair )dictionary )pair )dictionary )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_queries) identifier_queries (identifier_dict) identifier_dict )argument_list )call (block (expression_statement (assignment (subscript (subscript (identifier_params) identifier_params (string_"usagereport") string_"usagereport" )subscript (string_"queries") string_"queries" )subscript (list (identifier_queries) identifier_queries )list )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_queries) identifier_queries (identifier_list) identifier_list )argument_list )call (block (expression_statement (assignment (subscript (subscript (identifier_params) identifier_params (string_"usagereport") string_"usagereport" )subscript (string_"queries") string_"queries" )subscript (identifier_queries) identifier_queries )assignment )expression_statement )block )elif_clause )if_statement (if_statement (comparison_operator (identifier_aggregationInterval) identifier_aggregationInterval (None) None )comparison_operator (block (expression_statement (assignment (subscript (subscript (identifier_params) identifier_params (string_"usagereport") string_"usagereport" )subscript (string_'aggregationInterval') string_'aggregationInterval' )subscript (identifier_aggregationInterval) identifier_aggregationInterval )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (call (attribute (identifier_since) identifier_since (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (string_"custom") string_"custom" )comparison_operator (block (expression_statement (assignment (subscript (subscript (identifier_params) identifier_params (string_"usagereport") string_"usagereport" )subscript (string_'to') string_'to' )subscript (identifier_toValue) identifier_toValue )assignment )expression_statement (expression_statement (assignment (subscript (subscript (identifier_params) identifier_params (string_"usagereport") string_"usagereport" )subscript (string_'from') string_'from' )subscript (identifier_fromValue) identifier_fromValue )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_self) identifier_self (identifier__post) identifier__post )attribute (argument_list (keyword_argument (identifier_url) identifier_url (identifier_url) identifier_url )keyword_argument (keyword_argument (identifier_param_dict) identifier_param_dict (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_securityHandler) identifier_securityHandler (attribute (identifier_self) identifier_self (identifier__securityHandler) identifier__securityHandler )attribute )keyword_argument (keyword_argument (identifier_proxy_port) identifier_proxy_port (attribute (identifier_self) identifier_self (identifier__proxy_port) identifier__proxy_port )attribute )keyword_argument (keyword_argument (identifier_proxy_url) identifier_proxy_url (attribute (identifier_self) identifier_self (identifier__proxy_url) identifier__proxy_url )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier___init) identifier___init )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Creates a new usage report. A usage report is created by submitting a JSON representation of the usage report to this operation. Inputs: reportname - the unique name of the report since - the time duration of the report. The supported values are: LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_YEAR, CUSTOM LAST_DAY represents a time range spanning the previous 24 hours. LAST_WEEK represents a time range spanning the previous 7 days. LAST_MONTH represents a time range spanning the previous 30 days. LAST_YEAR represents a time range spanning the previous 365 days. CUSTOM represents a time range that is specified using the from and to parameters. fromValue - optional value - The timestamp (milliseconds since UNIX epoch, namely January 1, 1970, 00:00:00 GMT) for the beginning period of the report. Only valid when since is CUSTOM toValue - optional value - The timestamp (milliseconds since UNIX epoch, namely January 1, 1970, 00:00:00 GMT) for the ending period of the report.Only valid when since is CUSTOM. aggregationInterval - Optional. Aggregation interval in minutes. Server metrics are aggregated and returned for time slices aggregated using the specified aggregation interval. The time range for the report, specified using the since parameter (and from and to when since is CUSTOM) is split into multiple slices, each covering an aggregation interval. Server metrics are then aggregated for each time slice and returned as data points in the report data. When the aggregationInterval is not specified, the following defaults are used: LAST_DAY: 30 minutes LAST_WEEK: 4 hours LAST_MONTH: 24 hours LAST_YEAR: 1 week CUSTOM: 30 minutes up to 1 day, 4 hours up to 1 week, 1 day up to 30 days, and 1 week for longer periods. If the samplingInterval specified in Usage Reports Settings is more than the aggregationInterval, the samplingInterval is used instead. queries - A list of queries for which to generate the report. You need to specify the list as an array of JSON objects representing the queries. Each query specifies the list of metrics to be queries for a given set of resourceURIs. The queries parameter has the following sub-parameters: resourceURIs - Comma separated list of resource URIs for which to report metrics. Specifies services or folders for which to gather metrics. The resourceURI is formatted as below: services/ - Entire Site services/Folder/ - Folder within a Site. Reports metrics aggregated across all services within that Folder and Sub-Folders. services/Folder/ServiceName.ServiceType - Service in a specified folder, for example: services/Map_bv_999.MapServer. services/ServiceName.ServiceType - Service in the root folder, for example: Map_bv_999.MapServer. metrics - Comma separated list of metrics to be reported. Supported metrics are: RequestCount - the number of requests received RequestsFailed - the number of requests that failed RequestsTimedOut - the number of requests that timed out RequestMaxResponseTime - the maximum response time RequestAvgResponseTime - the average response time ServiceActiveInstances - the maximum number of active (running) service instances sampled at 1 minute intervals, for a specified service metadata - Can be any JSON Object. Typically used for storing presentation tier data for the usage report, such as report title, colors, line-styles, etc. Also used to denote visibility in ArcGIS Server Manager for reports created with the Administrator Directory. To make any report created in the Administrator Directory visible to Manager, include "managerReport":true in the metadata JSON object. When this value is not set (default), reports are not visible in Manager. This behavior can be extended to any client that wants to interact with the Administrator Directory. Any user-created value will need to be processed by the client. Example: >>> queryObj = [{ "resourceURIs": ["services/Map_bv_999.MapServer"], "metrics": ["RequestCount"] }] >>> obj.createReport( reportname="SampleReport", queries=queryObj, metadata="This could be any String or JSON Object.", since="LAST_DAY" )
(module (function_definition (function_name_wsgi) function_name_wsgi (parameters (identifier_self) identifier_self (identifier_environ) identifier_environ (identifier_start_response) identifier_start_response )parameters (block (expression_statement (assignment (identifier_request) identifier_request (call (identifier_Request) identifier_Request (argument_list (identifier_environ) identifier_environ )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ctx) identifier_ctx (call (identifier_Context) identifier_Context (argument_list (identifier_request) identifier_request )argument_list )call )assignment )expression_statement (try_statement (block (try_statement (block (expression_statement (assignment (identifier_response) identifier_response (call (identifier_self) identifier_self (argument_list (identifier_request) identifier_request (identifier_ctx) identifier_ctx )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_ctx) identifier_ctx (identifier__run_callbacks) identifier__run_callbacks )attribute (argument_list (string_'finalize') string_'finalize' (tuple (identifier_request) identifier_request (identifier_response) identifier_response )tuple )argument_list )call )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_response) identifier_response (identifier_conditional_to) identifier_conditional_to )attribute (argument_list (identifier_request) identifier_request )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_HTTPException) identifier_HTTPException (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_response) identifier_response (attribute (identifier_e) identifier_e (identifier_response) identifier_response )attribute )assignment )expression_statement )block )except_clause (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_handle_error) identifier_handle_error )attribute (argument_list (identifier_request) identifier_request (identifier_ctx) identifier_ctx )argument_list )call )expression_statement (expression_statement (assignment (identifier_response) identifier_response (attribute (call (identifier_InternalServerError) identifier_InternalServerError (argument_list )argument_list )call (identifier_response) identifier_response )attribute )assignment )expression_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_response) identifier_response (identifier_add_callback) identifier_add_callback )attribute (argument_list (lambda (call (attribute (identifier_ctx) identifier_ctx (identifier__run_callbacks) identifier__run_callbacks )attribute (argument_list (string_'close') string_'close' )argument_list )call )lambda )argument_list )call )expression_statement (return_statement (call (identifier_response) identifier_response (argument_list (identifier_environ) identifier_environ (identifier_start_response) identifier_start_response )argument_list )call )return_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_ctx) identifier_ctx (identifier__run_callbacks) identifier__run_callbacks )attribute (argument_list (string_'teardown') string_'teardown' (keyword_argument (identifier_log_errors) identifier_log_errors (True) True )keyword_argument )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Implements the mapper's WSGI interface.
(module (function_definition (function_name_save_boolean_setting) function_name_save_boolean_setting (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_check_box) identifier_check_box )parameters (block (expression_statement (call (identifier_set_setting) identifier_set_setting (argument_list (identifier_key) identifier_key (call (attribute (identifier_check_box) identifier_check_box (identifier_isChecked) identifier_isChecked )attribute (argument_list )argument_list )call (keyword_argument (identifier_qsettings) identifier_qsettings (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Save boolean setting according to check_box state. :param key: Key to retrieve setting value. :type key: str :param check_box: Check box to show and set the setting. :type check_box: PyQt5.QtWidgets.QCheckBox.QCheckBox
(module (function_definition (function_name_do_create_tool_item) function_name_do_create_tool_item (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_proxy) identifier_proxy (call (identifier_SpinToolItem) identifier_SpinToolItem (argument_list (list_splat (attribute (identifier_self) identifier_self (identifier__args_for_toolitem) identifier__args_for_toolitem )attribute )list_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_connect_proxy) identifier_connect_proxy )attribute (argument_list (identifier_proxy) identifier_proxy )argument_list )call )expression_statement (return_statement (identifier_proxy) identifier_proxy )return_statement )block )function_definition )module
This is called by the UIManager when it is time to instantiate the proxy
(module (function_definition (function_name_set_locs) function_name_set_locs (parameters (identifier_self) identifier_self (identifier_locs) identifier_locs )parameters (block (expression_statement (string_'Sets the locations of the ticks') string_'Sets the locations of the ticks' )expression_statement (expression_statement (call (identifier__check_implicitly_registered) identifier__check_implicitly_registered (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_locs) identifier_locs )attribute (identifier_locs) identifier_locs )assignment )expression_statement (expression_statement (assignment (tuple_pattern (identifier_vmin) identifier_vmin (identifier_vmax) identifier_vmax )tuple_pattern (assignment (identifier_vi) identifier_vi (call (identifier_tuple) identifier_tuple (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_axis) identifier_axis )attribute (identifier_get_view_interval) identifier_get_view_interval )attribute (argument_list )argument_list )call )argument_list )call )assignment )assignment )expression_statement (if_statement (comparison_operator (identifier_vi) identifier_vi (attribute (attribute (identifier_self) identifier_self (identifier_plot_obj) identifier_plot_obj )attribute (identifier_view_interval) identifier_view_interval )attribute )comparison_operator (block (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_plot_obj) identifier_plot_obj )attribute (identifier_date_axis_info) identifier_date_axis_info )attribute (None) None )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_plot_obj) identifier_plot_obj )attribute (identifier_view_interval) identifier_view_interval )attribute (identifier_vi) identifier_vi )assignment )expression_statement (if_statement (comparison_operator (identifier_vmax) identifier_vmax (identifier_vmin) identifier_vmin )comparison_operator (block (expression_statement (assignment (tuple_pattern (identifier_vmin) identifier_vmin (identifier_vmax) identifier_vmax )tuple_pattern (tuple (identifier_vmax) identifier_vmax (identifier_vmin) identifier_vmin )tuple )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set_default_format) identifier__set_default_format )attribute (argument_list (identifier_vmin) identifier_vmin (identifier_vmax) identifier_vmax )argument_list )call )expression_statement )block )function_definition )module
Sets the locations of the ticks
(module (function_definition (function_name_location) function_name_location (parameters (identifier_args) identifier_args )parameters (block (expression_statement (assignment (identifier_fastafile) identifier_fastafile (attribute (identifier_args) identifier_args (identifier_fastafile) identifier_fastafile )attribute )assignment )expression_statement (expression_statement (assignment (identifier_pwmfile) identifier_pwmfile (attribute (identifier_args) identifier_args (identifier_pwmfile) identifier_pwmfile )attribute )assignment )expression_statement (expression_statement (assignment (identifier_lwidth) identifier_lwidth (attribute (identifier_args) identifier_args (identifier_width) identifier_width )attribute )assignment )expression_statement (if_statement (not_operator (identifier_lwidth) identifier_lwidth )not_operator (block (expression_statement (assignment (identifier_f) identifier_f (call (identifier_Fasta) identifier_Fasta (argument_list (identifier_fastafile) identifier_fastafile )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_lwidth) identifier_lwidth (call (identifier_len) identifier_len (argument_list (subscript (subscript (call (attribute (identifier_f) identifier_f (identifier_items) identifier_items )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript (integer_1) integer_1 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_f) identifier_f (None) None )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_jobs) identifier_jobs (list )list )assignment )expression_statement (expression_statement (assignment (identifier_motifs) identifier_motifs (call (identifier_pwmfile_to_motifs) identifier_pwmfile_to_motifs (argument_list (identifier_pwmfile) identifier_pwmfile )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ids) identifier_ids (list_comprehension (attribute (identifier_motif) identifier_motif (identifier_id) identifier_id )attribute (for_in_clause (identifier_motif) identifier_motif (identifier_motifs) identifier_motifs )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (attribute (identifier_args) identifier_args (identifier_ids) identifier_ids )attribute (block (expression_statement (assignment (identifier_ids) identifier_ids (call (attribute (attribute (identifier_args) identifier_args (identifier_ids) identifier_ids )attribute (identifier_split) identifier_split )attribute (argument_list (string_",") string_"," )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_n_cpus) identifier_n_cpus (call (identifier_int) identifier_int (argument_list (subscript (call (attribute (call (identifier_MotifConfig) identifier_MotifConfig (argument_list )argument_list )call (identifier_get_default_params) identifier_get_default_params )attribute (argument_list )argument_list )call (string_"ncpus") string_"ncpus" )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pool) identifier_pool (call (identifier_Pool) identifier_Pool (argument_list (keyword_argument (identifier_processes) identifier_processes (identifier_n_cpus) identifier_n_cpus )keyword_argument (keyword_argument (identifier_maxtasksperchild) identifier_maxtasksperchild (integer_1000) integer_1000 )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_motif) identifier_motif (identifier_motifs) identifier_motifs (block (if_statement (comparison_operator (attribute (identifier_motif) identifier_motif (identifier_id) identifier_id )attribute (identifier_ids) identifier_ids )comparison_operator (block (expression_statement (assignment (identifier_outfile) identifier_outfile (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (binary_operator (string_"%s_histogram") string_"%s_histogram" (attribute (identifier_motif) identifier_motif (identifier_id) identifier_id )attribute )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_jobs) identifier_jobs (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_pool) identifier_pool (identifier_apply_async) identifier_apply_async )attribute (argument_list (identifier_motif_localization) identifier_motif_localization (tuple (identifier_fastafile) identifier_fastafile (identifier_motif) identifier_motif (identifier_lwidth) identifier_lwidth (identifier_outfile) identifier_outfile (attribute (identifier_args) identifier_args (identifier_cutoff) identifier_cutoff )attribute )tuple )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )for_statement (for_statement (identifier_job) identifier_job (identifier_jobs) identifier_jobs (block (expression_statement (call (attribute (identifier_job) identifier_job (identifier_get) identifier_get )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Creates histrogram of motif location. Parameters ---------- args : argparse object Command line arguments.
(module (function_definition (function_name_getFileObjects) function_name_getFileObjects (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_files) identifier_files (dictionary (pair (string_'project-file') string_'project-file' (identifier_self) identifier_self )pair (pair (string_'mapping-table-file') string_'mapping-table-file' (attribute (identifier_self) identifier_self (identifier_mapTableFile) identifier_mapTableFile )attribute )pair (pair (string_'channel-input-file') string_'channel-input-file' (attribute (identifier_self) identifier_self (identifier_channelInputFile) identifier_channelInputFile )attribute )pair (pair (string_'precipitation-file') string_'precipitation-file' (attribute (identifier_self) identifier_self (identifier_precipFile) identifier_precipFile )attribute )pair (pair (string_'storm-pipe-network-file') string_'storm-pipe-network-file' (attribute (identifier_self) identifier_self (identifier_stormPipeNetworkFile) identifier_stormPipeNetworkFile )attribute )pair (pair (string_'hmet-file') string_'hmet-file' (attribute (identifier_self) identifier_self (identifier_hmetFile) identifier_hmetFile )attribute )pair (pair (string_'nwsrfs-file') string_'nwsrfs-file' (attribute (identifier_self) identifier_self (identifier_nwsrfsFile) identifier_nwsrfsFile )attribute )pair (pair (string_'orographic-gage-file') string_'orographic-gage-file' (attribute (identifier_self) identifier_self (identifier_orographicGageFile) identifier_orographicGageFile )attribute )pair (pair (string_'grid-pipe-file') string_'grid-pipe-file' (attribute (identifier_self) identifier_self (identifier_gridPipeFile) identifier_gridPipeFile )attribute )pair (pair (string_'grid-stream-file') string_'grid-stream-file' (attribute (identifier_self) identifier_self (identifier_gridStreamFile) identifier_gridStreamFile )attribute )pair (pair (string_'time-series-file') string_'time-series-file' (attribute (identifier_self) identifier_self (identifier_timeSeriesFiles) identifier_timeSeriesFiles )attribute )pair (pair (string_'projection-file') string_'projection-file' (attribute (identifier_self) identifier_self (identifier_projectionFile) identifier_projectionFile )attribute )pair (pair (string_'replace-parameters-file') string_'replace-parameters-file' (attribute (identifier_self) identifier_self (identifier_replaceParamFile) identifier_replaceParamFile )attribute )pair (pair (string_'replace-value-file') string_'replace-value-file' (attribute (identifier_self) identifier_self (identifier_replaceValFile) identifier_replaceValFile )attribute )pair (pair (string_'output-location-file') string_'output-location-file' (attribute (identifier_self) identifier_self (identifier_outputLocationFiles) identifier_outputLocationFiles )attribute )pair (pair (string_'maps') string_'maps' (attribute (identifier_self) identifier_self (identifier_maps) identifier_maps )attribute )pair (pair (string_'link-node-datasets-file') string_'link-node-datasets-file' (attribute (identifier_self) identifier_self (identifier_linkNodeDatasets) identifier_linkNodeDatasets )attribute )pair )dictionary )assignment )expression_statement (return_statement (identifier_files) identifier_files )return_statement )block )function_definition )module
Retrieve a dictionary of file objects. This is a utility method that can be used to programmatically access the GsshaPy file objects. Use this method in conjunction with the getFileKeys method to access only files that have been read into the database. Returns: dict: Dictionary with human readable keys and values of GsshaPy file object instances. Files that have not been read into the database will have a value of None.
(module (function_definition (function_name_convert_to_match_query) function_name_convert_to_match_query (parameters (identifier_ir_blocks) identifier_ir_blocks )parameters (block (expression_statement (assignment (identifier_output_block) identifier_output_block (subscript (identifier_ir_blocks) identifier_ir_blocks (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_output_block) identifier_output_block (identifier_ConstructResult) identifier_ConstructResult )argument_list )call )not_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (call (attribute (concatenated_string (string_u'Expected last IR block to be ConstructResult, found: ') string_u'Expected last IR block to be ConstructResult, found: ' (string_u'{} {}') string_u'{} {}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_output_block) identifier_output_block (identifier_ir_blocks) identifier_ir_blocks )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_ir_except_output) identifier_ir_except_output (subscript (identifier_ir_blocks) identifier_ir_blocks (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_folds) identifier_folds (identifier_ir_except_output_and_folds) identifier_ir_except_output_and_folds )pattern_list (call (identifier_extract_folds_from_ir_blocks) identifier_extract_folds_from_ir_blocks (argument_list (identifier_ir_except_output) identifier_ir_except_output )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_global_operation_ir_blocks_tuple) identifier_global_operation_ir_blocks_tuple (call (identifier__extract_global_operations) identifier__extract_global_operations (argument_list (identifier_ir_except_output_and_folds) identifier_ir_except_output_and_folds )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_global_operation_blocks) identifier_global_operation_blocks (identifier_pruned_ir_blocks) identifier_pruned_ir_blocks )pattern_list (identifier_global_operation_ir_blocks_tuple) identifier_global_operation_ir_blocks_tuple )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_global_operation_blocks) identifier_global_operation_blocks )argument_list )call (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (call (attribute (concatenated_string (string_u'Received IR blocks with multiple global operation blocks. Only one ') string_u'Received IR blocks with multiple global operation blocks. Only one ' (string_u'is allowed: {} {}') string_u'is allowed: {} {}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_global_operation_blocks) identifier_global_operation_blocks (identifier_ir_blocks) identifier_ir_blocks )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_global_operation_blocks) identifier_global_operation_blocks )argument_list )call (integer_1) integer_1 )comparison_operator (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_global_operation_blocks) identifier_global_operation_blocks (integer_0) integer_0 )subscript (identifier_Filter) identifier_Filter )argument_list )call )not_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (call (attribute (string_u'Received non-Filter global operation block. {}') string_u'Received non-Filter global operation block. {}' (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_global_operation_blocks) identifier_global_operation_blocks (integer_0) integer_0 )subscript )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_where_block) identifier_where_block (subscript (identifier_global_operation_blocks) identifier_global_operation_blocks (integer_0) integer_0 )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_where_block) identifier_where_block (None) None )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_match_steps) identifier_match_steps (call (identifier__split_ir_into_match_steps) identifier__split_ir_into_match_steps (argument_list (identifier_pruned_ir_blocks) identifier_pruned_ir_blocks )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_match_traversals) identifier_match_traversals (call (identifier__split_match_steps_into_match_traversals) identifier__split_match_steps_into_match_traversals (argument_list (identifier_match_steps) identifier_match_steps )argument_list )call )assignment )expression_statement (return_statement (call (identifier_MatchQuery) identifier_MatchQuery (argument_list (keyword_argument (identifier_match_traversals) identifier_match_traversals (identifier_match_traversals) identifier_match_traversals )keyword_argument (keyword_argument (identifier_folds) identifier_folds (identifier_folds) identifier_folds )keyword_argument (keyword_argument (identifier_output_block) identifier_output_block (identifier_output_block) identifier_output_block )keyword_argument (keyword_argument (identifier_where_block) identifier_where_block (identifier_where_block) identifier_where_block )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Convert the list of IR blocks into a MatchQuery object, for easier manipulation.
(module (function_definition (function_name_AddPorts) function_name_AddPorts (parameters (identifier_self) identifier_self (identifier_ports) identifier_ports )parameters (block (for_statement (identifier_port) identifier_port (identifier_ports) identifier_ports (block (if_statement (comparison_operator (string_'port_to') string_'port_to' (identifier_port) identifier_port )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ports) identifier_ports )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_Port) identifier_Port (argument_list (identifier_self) identifier_self (subscript (identifier_port) identifier_port (string_'protocol') string_'protocol' )subscript (subscript (identifier_port) identifier_port (string_'port') string_'port' )subscript (subscript (identifier_port) identifier_port (string_'port_to') string_'port_to' )subscript )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ports) identifier_ports )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_Port) identifier_Port (argument_list (identifier_self) identifier_self (subscript (identifier_port) identifier_port (string_'protocol') string_'protocol' )subscript (subscript (identifier_port) identifier_port (string_'port') string_'port' )subscript )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (parenthesized_expression (call (attribute (identifier_self) identifier_self (identifier_Update) identifier_Update )attribute (argument_list )argument_list )call )parenthesized_expression )return_statement )block )function_definition )module
Create one or more port access policies. Include a list of dicts with protocol, port, and port_to (optional - for range) keys. >>> clc.v2.Server("WA1BTDIX01").PublicIPs().public_ips[0] .AddPorts([{'protocol': 'TCP', 'port': '80' }, {'protocol': 'UDP', 'port': '10000', 'port_to': '15000'}]).WaitUntilComplete() 0
(module (function_definition (function_name_remove_all_cts_records_by) function_name_remove_all_cts_records_by (parameters (identifier_file_name) identifier_file_name (identifier_crypto_idfp) identifier_crypto_idfp )parameters (block (expression_statement (assignment (identifier_db) identifier_db (call (attribute (identifier_XonoticDB) identifier_XonoticDB (identifier_load_path) identifier_load_path )attribute (argument_list (identifier_file_name) identifier_file_name )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_db) identifier_db (identifier_remove_all_cts_records_by) identifier_remove_all_cts_records_by )attribute (argument_list (identifier_crypto_idfp) identifier_crypto_idfp )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_db) identifier_db (identifier_save) identifier_save )attribute (argument_list (identifier_file_name) identifier_file_name )argument_list )call )expression_statement )block )function_definition )module
Remove all cts records set by player with CRYPTO_IDFP
(module (function_definition (function_name_CreateNetworkConnectivityTauDEMTree) function_name_CreateNetworkConnectivityTauDEMTree (parameters (identifier_network_connectivity_tree_file) identifier_network_connectivity_tree_file (identifier_out_csv_file) identifier_out_csv_file )parameters (block (expression_statement (assignment (identifier_stream_id_array) identifier_stream_id_array (list )list )assignment )expression_statement (expression_statement (assignment (identifier_next_down_id_array) identifier_next_down_id_array (list )list )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open_csv) identifier_open_csv (argument_list (identifier_network_connectivity_tree_file) identifier_network_connectivity_tree_file (string_"r") string_"r" )argument_list )call (as_pattern_target (identifier_csvfile) identifier_csvfile )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_row) identifier_row (identifier_csvfile) identifier_csvfile (block (expression_statement (assignment (identifier_split_row) identifier_split_row (call (attribute (identifier_row) identifier_row (identifier_split) identifier_split )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_stream_id_array) identifier_stream_id_array (identifier_append) identifier_append )attribute (argument_list (call (attribute (subscript (identifier_split_row) identifier_split_row (integer_0) integer_0 )subscript (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_next_down_id_array) identifier_next_down_id_array (identifier_append) identifier_append )attribute (argument_list (call (attribute (subscript (identifier_split_row) identifier_split_row (integer_3) integer_3 )subscript (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )with_statement (expression_statement (assignment (identifier_stream_id_array) identifier_stream_id_array (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_stream_id_array) identifier_stream_id_array (keyword_argument (identifier_dtype) identifier_dtype (attribute (identifier_np) identifier_np (identifier_int32) identifier_int32 )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_next_down_id_array) identifier_next_down_id_array (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_next_down_id_array) identifier_next_down_id_array (keyword_argument (identifier_dtype) identifier_dtype (attribute (identifier_np) identifier_np (identifier_int32) identifier_int32 )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_StreamIDNextDownIDToConnectivity) identifier_StreamIDNextDownIDToConnectivity (argument_list (identifier_stream_id_array) identifier_stream_id_array (identifier_next_down_id_array) identifier_next_down_id_array (identifier_out_csv_file) identifier_out_csv_file )argument_list )call )expression_statement )block )function_definition )module
Creates Network Connectivity input CSV file for RAPID based on the TauDEM network connectivity tree file
(module (function_definition (function_name_get_region_for_chip) function_name_get_region_for_chip (parameters (identifier_x) identifier_x (identifier_y) identifier_y (default_parameter (identifier_level) identifier_level (integer_3) integer_3 )default_parameter )parameters (block (expression_statement (assignment (identifier_shift) identifier_shift (binary_operator (integer_6) integer_6 (binary_operator (integer_2) integer_2 (identifier_level) identifier_level )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_bit) identifier_bit (binary_operator (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (identifier_x) identifier_x (identifier_shift) identifier_shift )binary_operator )parenthesized_expression (integer_3) integer_3 )binary_operator )parenthesized_expression (binary_operator (integer_4) integer_4 (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (identifier_y) identifier_y (identifier_shift) identifier_shift )binary_operator )parenthesized_expression (integer_3) integer_3 )binary_operator )parenthesized_expression )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_mask) identifier_mask (binary_operator (integer_0xffff) integer_0xffff (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (integer_4) integer_4 (identifier_shift) identifier_shift )binary_operator )parenthesized_expression (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_nx) identifier_nx (binary_operator (identifier_x) identifier_x (identifier_mask) identifier_mask )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_ny) identifier_ny (binary_operator (identifier_y) identifier_y (identifier_mask) identifier_mask )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_region) identifier_region (binary_operator (binary_operator (binary_operator (parenthesized_expression (binary_operator (identifier_nx) identifier_nx (integer_24) integer_24 )binary_operator )parenthesized_expression (parenthesized_expression (binary_operator (identifier_ny) identifier_ny (integer_16) integer_16 )binary_operator )parenthesized_expression )binary_operator (parenthesized_expression (binary_operator (identifier_level) identifier_level (integer_16) integer_16 )binary_operator )parenthesized_expression )binary_operator (parenthesized_expression (binary_operator (integer_1) integer_1 (identifier_bit) identifier_bit )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (return_statement (identifier_region) identifier_region )return_statement )block )function_definition )module
Get the region word for the given chip co-ordinates. Parameters ---------- x : int x co-ordinate y : int y co-ordinate level : int Level of region to build. 0 is the most coarse and 3 is the finest. When 3 is used the specified region will ONLY select the given chip, for other regions surrounding chips will also be selected. Returns ------- int A 32-bit value representing the co-ordinates of the chunk of SpiNNaker chips that should be selected and the blocks within this chunk that are selected. As long as bits (31:16) are the same these values may be OR-ed together to increase the number of sub-blocks selected.
(module (function_definition (function_name__run) function_name__run (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_node) identifier_node (attribute (attribute (identifier_self) identifier_self (identifier_node) identifier_node )attribute (identifier_relatives) identifier_relatives )attribute (block (expression_statement (call (identifier_launch_node_task) identifier_launch_node_task (argument_list (identifier_node) identifier_node )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_node) identifier_node (attribute (attribute (identifier_self) identifier_self (identifier_node) identifier_node )attribute (identifier_relatives) identifier_relatives )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_wait_and_join) identifier_wait_and_join )attribute (argument_list (attribute (identifier_node) identifier_node (identifier_task) identifier_task )attribute )argument_list )call )expression_statement )block )for_statement (if_statement (attribute (attribute (identifier_self) identifier_self (identifier_node) identifier_node )attribute (identifier_parent) identifier_parent )attribute (block (while_statement (not_operator (attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_node) identifier_node )attribute (identifier_parent) identifier_parent )attribute (identifier_task) identifier_task )attribute (identifier_siblings_permission) identifier_siblings_permission )attribute )not_operator (block (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__polling_time) identifier__polling_time )attribute )argument_list )call )expression_statement )block )while_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_has_started) identifier_has_started )attribute (True) True )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_main) identifier_main )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_siblings_permission) identifier_siblings_permission )attribute (True) True )assignment )expression_statement (for_statement (identifier_node) identifier_node (attribute (attribute (identifier_self) identifier_self (identifier_node) identifier_node )attribute (identifier_siblings) identifier_siblings )attribute (block (expression_statement (call (identifier_launch_node_task) identifier_launch_node_task (argument_list (identifier_node) identifier_node )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_node) identifier_node (attribute (attribute (identifier_self) identifier_self (identifier_node) identifier_node )attribute (identifier_siblings) identifier_siblings )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_wait_and_join) identifier_wait_and_join )attribute (argument_list (attribute (identifier_node) identifier_node (identifier_task) identifier_task )attribute )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_finished_at) identifier_finished_at )attribute (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_scheduler) identifier_scheduler )attribute (identifier_notify_execution) identifier_notify_execution )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_has_finished) identifier_has_finished )attribute (True) True )assignment )expression_statement )block )function_definition )module
Run the task respecting dependencies
(module (function_definition (function_name_print_item_callback) function_name_print_item_callback (parameters (identifier_item) identifier_item )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'&listen [{}, {}={}]') string_'&listen [{}, {}={}]' (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_item) identifier_item (identifier_get) identifier_get )attribute (argument_list (string_'cmd') string_'cmd' (string_'') string_'' )argument_list )call (call (attribute (identifier_item) identifier_item (identifier_get) identifier_get )attribute (argument_list (string_'id') string_'id' (string_'') string_'' )argument_list )call (call (attribute (identifier_item) identifier_item (identifier_get) identifier_get )attribute (argument_list (string_'data') string_'data' (string_'') string_'' )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Print an item callback, used by &listen.
(module (function_definition (function_name_crypto_box_keypair) function_name_crypto_box_keypair (parameters )parameters (block (expression_statement (assignment (identifier_pk) identifier_pk (call (attribute (identifier_ffi) identifier_ffi (identifier_new) identifier_new )attribute (argument_list (string_"unsigned char[]") string_"unsigned char[]" (identifier_crypto_box_PUBLICKEYBYTES) identifier_crypto_box_PUBLICKEYBYTES )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sk) identifier_sk (call (attribute (identifier_ffi) identifier_ffi (identifier_new) identifier_new )attribute (argument_list (string_"unsigned char[]") string_"unsigned char[]" (identifier_crypto_box_SECRETKEYBYTES) identifier_crypto_box_SECRETKEYBYTES )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rc) identifier_rc (call (attribute (identifier_lib) identifier_lib (identifier_crypto_box_keypair) identifier_crypto_box_keypair )attribute (argument_list (identifier_pk) identifier_pk (identifier_sk) identifier_sk )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_ensure) identifier_ensure (argument_list (comparison_operator (identifier_rc) identifier_rc (integer_0) integer_0 )comparison_operator (string_'Unexpected library error') string_'Unexpected library error' (keyword_argument (identifier_raising) identifier_raising (attribute (identifier_exc) identifier_exc (identifier_RuntimeError) identifier_RuntimeError )attribute )keyword_argument )argument_list )call )expression_statement (return_statement (tuple (subscript (call (attribute (identifier_ffi) identifier_ffi (identifier_buffer) identifier_buffer )attribute (argument_list (identifier_pk) identifier_pk (identifier_crypto_box_PUBLICKEYBYTES) identifier_crypto_box_PUBLICKEYBYTES )argument_list )call (slice (colon) colon )slice )subscript (subscript (call (attribute (identifier_ffi) identifier_ffi (identifier_buffer) identifier_buffer )attribute (argument_list (identifier_sk) identifier_sk (identifier_crypto_box_SECRETKEYBYTES) identifier_crypto_box_SECRETKEYBYTES )argument_list )call (slice (colon) colon )slice )subscript )tuple )return_statement )block )function_definition )module
Returns a randomly generated public and secret key. :rtype: (bytes(public_key), bytes(secret_key))
(module (function_definition (function_name__get_property_values_with_defaults) function_name__get_property_values_with_defaults (parameters (identifier_self) identifier_self (identifier_classname) identifier_classname (identifier_property_values) identifier_property_values )parameters (block (expression_statement (assignment (identifier_final_values) identifier_final_values (call (attribute (identifier_self) identifier_self (identifier_get_default_property_values) identifier_get_default_property_values )attribute (argument_list (identifier_classname) identifier_classname )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_final_values) identifier_final_values (identifier_update) identifier_update )attribute (argument_list (identifier_property_values) identifier_property_values )argument_list )call )expression_statement (return_statement (identifier_final_values) identifier_final_values )return_statement )block )function_definition )module
Return the property values for the class, with default values applied where needed.
(module (function_definition (function_name__sanity_check_registered_locations_parent_locations) function_name__sanity_check_registered_locations_parent_locations (parameters (identifier_query_metadata_table) identifier_query_metadata_table )parameters (block (for_statement (pattern_list (identifier_location) identifier_location (identifier_location_info) identifier_location_info )pattern_list (attribute (identifier_query_metadata_table) identifier_query_metadata_table (identifier_registered_locations) identifier_registered_locations )attribute (block (if_statement (parenthesized_expression (boolean_operator (comparison_operator (identifier_location) identifier_location (attribute (identifier_query_metadata_table) identifier_query_metadata_table (identifier_root_location) identifier_root_location )attribute )comparison_operator (not_operator (call (attribute (attribute (identifier_query_metadata_table) identifier_query_metadata_table (identifier_root_location) identifier_root_location )attribute (identifier_is_revisited_at) identifier_is_revisited_at )attribute (argument_list (identifier_location) identifier_location )argument_list )call )not_operator )boolean_operator )parenthesized_expression (block (if_statement (comparison_operator (attribute (identifier_location_info) identifier_location_info (identifier_parent_location) identifier_parent_location )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (call (attribute (concatenated_string (string_u'Found a location that is not the root location of the query ') string_u'Found a location that is not the root location of the query ' (string_u'or a revisit of the root, but does not have a parent: ') string_u'or a revisit of the root, but does not have a parent: ' (string_u'{} {}') string_u'{} {}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_location) identifier_location (identifier_location_info) identifier_location_info )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_location_info) identifier_location_info (identifier_parent_location) identifier_parent_location )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_query_metadata_table) identifier_query_metadata_table (identifier_get_location_info) identifier_get_location_info )attribute (argument_list (attribute (identifier_location_info) identifier_location_info (identifier_parent_location) identifier_parent_location )attribute )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Assert that all registered locations' parent locations are also registered.
(module (function_definition (function_name_log) function_name_log (parameters (identifier_msg) identifier_msg (default_parameter (identifier_level) identifier_level (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_red) identifier_red (string_'\033[91m') string_'\033[91m' )assignment )expression_statement (expression_statement (assignment (identifier_endc) identifier_endc (string_'\033[0m') string_'\033[0m' )assignment )expression_statement (expression_statement (assignment (identifier_cfg) identifier_cfg (dictionary (pair (string_'version') string_'version' (integer_1) integer_1 )pair (pair (string_'disable_existing_loggers') string_'disable_existing_loggers' (False) False )pair (pair (string_'formatters') string_'formatters' (dictionary (pair (string_'stdout') string_'stdout' (dictionary (pair (string_'format') string_'format' (string_'[%(levelname)s]: %(asctime)s - %(message)s') string_'[%(levelname)s]: %(asctime)s - %(message)s' )pair (pair (string_'datefmt') string_'datefmt' (string_'%x %X') string_'%x %X' )pair )dictionary )pair (pair (string_'stderr') string_'stderr' (dictionary (pair (string_'format') string_'format' (binary_operator (binary_operator (identifier_red) identifier_red (string_'[%(levelname)s]: %(asctime)s - %(message)s') string_'[%(levelname)s]: %(asctime)s - %(message)s' )binary_operator (identifier_endc) identifier_endc )binary_operator )pair (pair (string_'datefmt') string_'datefmt' (string_'%x %X') string_'%x %X' )pair )dictionary )pair )dictionary )pair (pair (string_'handlers') string_'handlers' (dictionary (pair (string_'stdout') string_'stdout' (dictionary (pair (string_'class') string_'class' (string_'logging.StreamHandler') string_'logging.StreamHandler' )pair (pair (string_'level') string_'level' (string_'DEBUG') string_'DEBUG' )pair (pair (string_'formatter') string_'formatter' (string_'stdout') string_'stdout' )pair )dictionary )pair (pair (string_'stderr') string_'stderr' (dictionary (pair (string_'class') string_'class' (string_'logging.StreamHandler') string_'logging.StreamHandler' )pair (pair (string_'level') string_'level' (string_'ERROR') string_'ERROR' )pair (pair (string_'formatter') string_'formatter' (string_'stderr') string_'stderr' )pair )dictionary )pair )dictionary )pair (pair (string_'loggers') string_'loggers' (dictionary (pair (string_'info') string_'info' (dictionary (pair (string_'handlers') string_'handlers' (list (string_'stdout') string_'stdout' )list )pair (pair (string_'level') string_'level' (string_'INFO') string_'INFO' )pair (pair (string_'propagate') string_'propagate' (True) True )pair )dictionary )pair (pair (string_'error') string_'error' (dictionary (pair (string_'handlers') string_'handlers' (list (string_'stderr') string_'stderr' )list )pair (pair (string_'level') string_'level' (string_'ERROR') string_'ERROR' )pair (pair (string_'propagate') string_'propagate' (False) False )pair )dictionary )pair )dictionary )pair )dictionary )assignment )expression_statement (expression_statement (call (identifier_dictConfig) identifier_dictConfig (argument_list (identifier_cfg) identifier_cfg )argument_list )call )expression_statement (expression_statement (assignment (identifier_lg) identifier_lg (conditional_expression (string_'info') string_'info' (comparison_operator (identifier_level) identifier_level (integer_0) integer_0 )comparison_operator (string_'error') string_'error' )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_lvl) identifier_lvl (conditional_expression (integer_20) integer_20 (comparison_operator (identifier_level) identifier_level (integer_0) integer_0 )comparison_operator (integer_40) integer_40 )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_logger) identifier_logger (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (identifier_lg) identifier_lg )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_log) identifier_log )attribute (argument_list (identifier_lvl) identifier_lvl (identifier_msg) identifier_msg )argument_list )call )expression_statement )block )function_definition )module
Logs a message to the console, with optional level paramater Args: - msg (str): message to send to console - level (int): log level; 0 for info, 1 for error (default = 0)
(module (function_definition (function_name__cutout) function_name__cutout (parameters (identifier_x) identifier_x (typed_default_parameter (identifier_n_holes) identifier_n_holes (type (identifier_uniform_int) identifier_uniform_int )type (integer_1) integer_1 )typed_default_parameter (typed_default_parameter (identifier_length) identifier_length (type (identifier_uniform_int) identifier_uniform_int )type (integer_40) integer_40 )typed_default_parameter )parameters (block (expression_statement (string_"Cut out `n_holes` number of square holes of size `length` in image at random locations.") string_"Cut out `n_holes` number of square holes of size `length` in image at random locations." )expression_statement (expression_statement (assignment (pattern_list (identifier_h) identifier_h (identifier_w) identifier_w )pattern_list (subscript (attribute (identifier_x) identifier_x (identifier_shape) identifier_shape )attribute (slice (integer_1) integer_1 (colon) colon )slice )subscript )assignment )expression_statement (for_statement (identifier_n) identifier_n (call (identifier_range) identifier_range (argument_list (identifier_n_holes) identifier_n_holes )argument_list )call (block (expression_statement (assignment (identifier_h_y) identifier_h_y (call (attribute (attribute (identifier_np) identifier_np (identifier_random) identifier_random )attribute (identifier_randint) identifier_randint )attribute (argument_list (integer_0) integer_0 (identifier_h) identifier_h )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_h_x) identifier_h_x (call (attribute (attribute (identifier_np) identifier_np (identifier_random) identifier_random )attribute (identifier_randint) identifier_randint )attribute (argument_list (integer_0) integer_0 (identifier_w) identifier_w )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_y1) identifier_y1 (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_np) identifier_np (identifier_clip) identifier_clip )attribute (argument_list (binary_operator (identifier_h_y) identifier_h_y (binary_operator (identifier_length) identifier_length (integer_2) integer_2 )binary_operator )binary_operator (integer_0) integer_0 (identifier_h) identifier_h )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_y2) identifier_y2 (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_np) identifier_np (identifier_clip) identifier_clip )attribute (argument_list (binary_operator (identifier_h_y) identifier_h_y (binary_operator (identifier_length) identifier_length (integer_2) integer_2 )binary_operator )binary_operator (integer_0) integer_0 (identifier_h) identifier_h )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_x1) identifier_x1 (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_np) identifier_np (identifier_clip) identifier_clip )attribute (argument_list (binary_operator (identifier_h_x) identifier_h_x (binary_operator (identifier_length) identifier_length (integer_2) integer_2 )binary_operator )binary_operator (integer_0) integer_0 (identifier_w) identifier_w )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_x2) identifier_x2 (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_np) identifier_np (identifier_clip) identifier_clip )attribute (argument_list (binary_operator (identifier_h_x) identifier_h_x (binary_operator (identifier_length) identifier_length (integer_2) integer_2 )binary_operator )binary_operator (integer_0) integer_0 (identifier_w) identifier_w )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_x) identifier_x (slice (colon) colon )slice (slice (identifier_y1) identifier_y1 (colon) colon (identifier_y2) identifier_y2 )slice (slice (identifier_x1) identifier_x1 (colon) colon (identifier_x2) identifier_x2 )slice )subscript (integer_0) integer_0 )assignment )expression_statement )block )for_statement (return_statement (identifier_x) identifier_x )return_statement )block )function_definition )module
Cut out `n_holes` number of square holes of size `length` in image at random locations.
(module (function_definition (function_name_describe) function_name_describe (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (identifier_OrderedDict) identifier_OrderedDict (argument_list (list_comprehension (tuple (identifier_name) identifier_name (call (attribute (identifier_field) identifier_field (identifier_describe) identifier_describe )attribute (argument_list )argument_list )call )tuple (for_in_clause (pattern_list (identifier_name) identifier_name (identifier_field) identifier_field )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_fields) identifier_fields )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )argument_list )call )return_statement )block )function_definition )module
Describe all serialized fields. It returns dictionary of all fields description defined for this serializer using their own ``describe()`` methods with respect to order in which they are defined as class attributes. Returns: OrderedDict: serializer description
(module (function_definition (function_name_endpoint_create) function_name_endpoint_create (parameters (identifier_service) identifier_service (default_parameter (identifier_publicurl) identifier_publicurl (None) None )default_parameter (default_parameter (identifier_internalurl) identifier_internalurl (None) None )default_parameter (default_parameter (identifier_adminurl) identifier_adminurl (None) None )default_parameter (default_parameter (identifier_region) identifier_region (None) None )default_parameter (default_parameter (identifier_profile) identifier_profile (None) None )default_parameter (default_parameter (identifier_url) identifier_url (None) None )default_parameter (default_parameter (identifier_interface) identifier_interface (None) None )default_parameter (dictionary_splat_pattern (identifier_connection_args) identifier_connection_args )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_kstone) identifier_kstone (call (identifier_auth) identifier_auth (argument_list (identifier_profile) identifier_profile (dictionary_splat (identifier_connection_args) identifier_connection_args )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_keystone_service) identifier_keystone_service (call (identifier_service_get) identifier_service_get (argument_list (keyword_argument (identifier_name) identifier_name (identifier_service) identifier_service )keyword_argument (keyword_argument (identifier_profile) identifier_profile (identifier_profile) identifier_profile )keyword_argument (dictionary_splat (identifier_connection_args) identifier_connection_args )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_keystone_service) identifier_keystone_service )not_operator (comparison_operator (string_'Error') string_'Error' (identifier_keystone_service) identifier_keystone_service )comparison_operator )boolean_operator (block (return_statement (dictionary (pair (string_'Error') string_'Error' (string_'Could not find the specified service') string_'Could not find the specified service' )pair )dictionary )return_statement )block )if_statement (if_statement (comparison_operator (identifier__OS_IDENTITY_API_VERSION) identifier__OS_IDENTITY_API_VERSION (integer_2) integer_2 )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_kstone) identifier_kstone (identifier_endpoints) identifier_endpoints )attribute (identifier_create) identifier_create )attribute (argument_list (keyword_argument (identifier_service) identifier_service (subscript (subscript (identifier_keystone_service) identifier_keystone_service (identifier_service) identifier_service )subscript (string_'id') string_'id' )subscript )keyword_argument (keyword_argument (identifier_region_id) identifier_region_id (identifier_region) identifier_region )keyword_argument (keyword_argument (identifier_url) identifier_url (identifier_url) identifier_url )keyword_argument (keyword_argument (identifier_interface) identifier_interface (identifier_interface) identifier_interface )keyword_argument )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_kstone) identifier_kstone (identifier_endpoints) identifier_endpoints )attribute (identifier_create) identifier_create )attribute (argument_list (keyword_argument (identifier_region) identifier_region (identifier_region) identifier_region )keyword_argument (keyword_argument (identifier_service_id) identifier_service_id (subscript (subscript (identifier_keystone_service) identifier_keystone_service (identifier_service) identifier_service )subscript (string_'id') string_'id' )subscript )keyword_argument (keyword_argument (identifier_publicurl) identifier_publicurl (identifier_publicurl) identifier_publicurl )keyword_argument (keyword_argument (identifier_adminurl) identifier_adminurl (identifier_adminurl) identifier_adminurl )keyword_argument (keyword_argument (identifier_internalurl) identifier_internalurl (identifier_internalurl) identifier_internalurl )keyword_argument )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_endpoint_get) identifier_endpoint_get (argument_list (identifier_service) identifier_service (identifier_region) identifier_region (identifier_profile) identifier_profile (identifier_interface) identifier_interface (dictionary_splat (identifier_connection_args) identifier_connection_args )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Create an endpoint for an Openstack service CLI Examples: .. code-block:: bash salt 'v2' keystone.endpoint_create nova 'http://public/url' 'http://internal/url' 'http://adminurl/url' region salt 'v3' keystone.endpoint_create nova url='http://public/url' interface='public' region='RegionOne'
(module (function_definition (function_name_ScanForVolumeSystem) function_name_ScanForVolumeSystem (parameters (identifier_self) identifier_self (identifier_source_path_spec) identifier_source_path_spec )parameters (block (if_statement (comparison_operator (attribute (identifier_source_path_spec) identifier_source_path_spec (identifier_type_indicator) identifier_type_indicator )attribute (attribute (identifier_definitions) identifier_definitions (identifier_TYPE_INDICATOR_VSHADOW) identifier_TYPE_INDICATOR_VSHADOW )attribute )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (if_statement (call (attribute (identifier_source_path_spec) identifier_source_path_spec (identifier_IsVolumeSystemRoot) identifier_IsVolumeSystemRoot )attribute (argument_list )argument_list )call (block (return_statement (identifier_source_path_spec) identifier_source_path_spec )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_source_path_spec) identifier_source_path_spec (identifier_type_indicator) identifier_type_indicator )attribute (parenthesized_expression (attribute (identifier_definitions) identifier_definitions (identifier_TYPE_INDICATOR_APFS_CONTAINER) identifier_TYPE_INDICATOR_APFS_CONTAINER )attribute )parenthesized_expression )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_type_indicators) identifier_type_indicators (call (attribute (attribute (identifier_analyzer) identifier_analyzer (identifier_Analyzer) identifier_Analyzer )attribute (identifier_GetVolumeSystemTypeIndicators) identifier_GetVolumeSystemTypeIndicators )attribute (argument_list (identifier_source_path_spec) identifier_source_path_spec (keyword_argument (identifier_resolver_context) identifier_resolver_context (attribute (identifier_self) identifier_self (identifier__resolver_context) identifier__resolver_context )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (tuple (identifier_IOError) identifier_IOError (identifier_RuntimeError) identifier_RuntimeError )tuple (as_pattern_target (identifier_exception) identifier_exception )as_pattern_target )as_pattern (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_BackEndError) identifier_BackEndError )attribute (argument_list (call (attribute (parenthesized_expression (concatenated_string (string_'Unable to process source path specification with error: ') string_'Unable to process source path specification with error: ' (string_'{0!s}') string_'{0!s}' )concatenated_string )parenthesized_expression (identifier_format) identifier_format )attribute (argument_list (identifier_exception) identifier_exception )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (not_operator (identifier_type_indicators) identifier_type_indicators )not_operator (block (return_statement (None) None )return_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_type_indicators) identifier_type_indicators )argument_list )call (integer_1) integer_1 )comparison_operator (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_BackEndError) identifier_BackEndError )attribute (argument_list (string_'Unsupported source found more than one volume system types.') string_'Unsupported source found more than one volume system types.' )argument_list )call )raise_statement )block )if_statement (if_statement (parenthesized_expression (boolean_operator (comparison_operator (subscript (identifier_type_indicators) identifier_type_indicators (integer_0) integer_0 )subscript (attribute (identifier_definitions) identifier_definitions (identifier_TYPE_INDICATOR_TSK_PARTITION) identifier_TYPE_INDICATOR_TSK_PARTITION )attribute )comparison_operator (comparison_operator (attribute (identifier_source_path_spec) identifier_source_path_spec (identifier_type_indicator) identifier_type_indicator )attribute (list (attribute (identifier_definitions) identifier_definitions (identifier_TYPE_INDICATOR_TSK_PARTITION) identifier_TYPE_INDICATOR_TSK_PARTITION )attribute )list )comparison_operator )boolean_operator )parenthesized_expression (block (return_statement (None) None )return_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_type_indicators) identifier_type_indicators (integer_0) integer_0 )subscript (attribute (identifier_definitions) identifier_definitions (identifier_VOLUME_SYSTEM_TYPE_INDICATORS) identifier_VOLUME_SYSTEM_TYPE_INDICATORS )attribute )comparison_operator (block (return_statement (call (attribute (attribute (identifier_path_spec_factory) identifier_path_spec_factory (identifier_Factory) identifier_Factory )attribute (identifier_NewPathSpec) identifier_NewPathSpec )attribute (argument_list (subscript (identifier_type_indicators) identifier_type_indicators (integer_0) integer_0 )subscript (keyword_argument (identifier_location) identifier_location (string_'/') string_'/' )keyword_argument (keyword_argument (identifier_parent) identifier_parent (identifier_source_path_spec) identifier_source_path_spec )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_path_spec_factory) identifier_path_spec_factory (identifier_Factory) identifier_Factory )attribute (identifier_NewPathSpec) identifier_NewPathSpec )attribute (argument_list (subscript (identifier_type_indicators) identifier_type_indicators (integer_0) integer_0 )subscript (keyword_argument (identifier_parent) identifier_parent (identifier_source_path_spec) identifier_source_path_spec )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Scans the path specification for a supported volume system format. Args: source_path_spec (PathSpec): source path specification. Returns: PathSpec: volume system path specification or None if no supported volume system type was found. Raises: BackEndError: if the source cannot be scanned or more than one volume system type is found.
(module (function_definition (function_name_AddMethod) function_name_AddMethod (parameters (identifier_self) identifier_self (identifier_interface) identifier_interface (identifier_name) identifier_name (identifier_in_sig) identifier_in_sig (identifier_out_sig) identifier_out_sig (identifier_code) identifier_code )parameters (block (if_statement (not_operator (identifier_interface) identifier_interface )not_operator (block (expression_statement (assignment (identifier_interface) identifier_interface (attribute (identifier_self) identifier_self (identifier_interface) identifier_interface )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_n_args) identifier_n_args (call (identifier_len) identifier_len (argument_list (call (attribute (identifier_dbus) identifier_dbus (identifier_Signature) identifier_Signature )attribute (argument_list (identifier_in_sig) identifier_in_sig )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_method) identifier_method (lambda (lambda_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 )lambda_parameters (call (attribute (identifier_DBusMockObject) identifier_DBusMockObject (identifier_mock_method) identifier_mock_method )attribute (argument_list (identifier_self) identifier_self (identifier_interface) identifier_interface (identifier_name) identifier_name (identifier_in_sig) identifier_in_sig (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )lambda )assignment )expression_statement (expression_statement (assignment (identifier_dbus_method) identifier_dbus_method (call (call (attribute (attribute (identifier_dbus) identifier_dbus (identifier_service) identifier_service )attribute (identifier_method) identifier_method )attribute (argument_list (identifier_interface) identifier_interface (keyword_argument (identifier_out_signature) identifier_out_signature (identifier_out_sig) identifier_out_sig )keyword_argument )argument_list )call (argument_list (identifier_method) identifier_method )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_dbus_method) identifier_dbus_method (identifier___name__) identifier___name__ )attribute (call (identifier_str) identifier_str (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_dbus_method) identifier_dbus_method (identifier__dbus_in_signature) identifier__dbus_in_signature )attribute (identifier_in_sig) identifier_in_sig )assignment )expression_statement (expression_statement (assignment (attribute (identifier_dbus_method) identifier_dbus_method (identifier__dbus_args) identifier__dbus_args )attribute (list_comprehension (binary_operator (string_'arg%i') string_'arg%i' (identifier_i) identifier_i )binary_operator (for_in_clause (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_1) integer_1 (binary_operator (identifier_n_args) identifier_n_args (integer_1) integer_1 )binary_operator )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (identifier_interface) identifier_interface (attribute (identifier_self) identifier_self (identifier_interface) identifier_interface )attribute )comparison_operator (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier_name) identifier_name (identifier_dbus_method) identifier_dbus_method )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_methods) identifier_methods )attribute (identifier_setdefault) identifier_setdefault )attribute (argument_list (identifier_interface) identifier_interface (dictionary )dictionary )argument_list )call (call (identifier_str) identifier_str (argument_list (identifier_name) identifier_name )argument_list )call )subscript (tuple (identifier_in_sig) identifier_in_sig (identifier_out_sig) identifier_out_sig (identifier_code) identifier_code (identifier_dbus_method) identifier_dbus_method )tuple )assignment )expression_statement )block )function_definition )module
Add a method to this object interface: D-Bus interface to add this to. For convenience you can specify '' here to add the method to the object's main interface (as specified on construction). name: Name of the method in_sig: Signature of input arguments; for example "ias" for a method that takes an int32 and a string array as arguments; see http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures out_sig: Signature of output arguments; for example "s" for a method that returns a string; use '' for methods that do not return anything. code: Python 3 code to run in the method call; you have access to the arguments through the "args" list, and can set the return value by assigning a value to the "ret" variable. You can also read the global "objects" variable, which is a dictionary mapping object paths to DBusMockObject instances. For keeping state across method calls, you are free to use normal Python members of the "self" object, which will be persistent for the whole mock's life time. E. g. you can have a method with "self.my_state = True", and another method that returns it with "ret = self.my_state". When specifying '', the method will not do anything (except logging) and return None.
(module (function_definition (function_name_decrypt_seal) function_name_decrypt_seal (parameters (identifier_self) identifier_self (typed_parameter (identifier_data) identifier_data (type (identifier_bytes) identifier_bytes )type )typed_parameter )parameters (type (identifier_bytes) identifier_bytes )type (block (expression_statement (assignment (identifier_curve25519_public_key) identifier_curve25519_public_key (call (attribute (identifier_libnacl) identifier_libnacl (identifier_crypto_sign_ed25519_pk_to_curve25519) identifier_crypto_sign_ed25519_pk_to_curve25519 )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_vk) identifier_vk )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_curve25519_secret_key) identifier_curve25519_secret_key (call (attribute (identifier_libnacl) identifier_libnacl (identifier_crypto_sign_ed25519_sk_to_curve25519) identifier_crypto_sign_ed25519_sk_to_curve25519 )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_sk) identifier_sk )attribute )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_libnacl) identifier_libnacl (identifier_crypto_box_seal_open) identifier_crypto_box_seal_open )attribute (argument_list (identifier_data) identifier_data (identifier_curve25519_public_key) identifier_curve25519_public_key (identifier_curve25519_secret_key) identifier_curve25519_secret_key )argument_list )call )return_statement )block )function_definition )module
Decrypt bytes data with a curve25519 version of the ed25519 key pair :param data: Encrypted data :return:
(module (function_definition (function_name_get_context_arguments) function_name_get_context_arguments (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_cargs) identifier_cargs (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_context) identifier_context (attribute (identifier_self) identifier_self (identifier___context_stack) identifier___context_stack )attribute (block (expression_statement (call (attribute (identifier_cargs) identifier_cargs (identifier_update) identifier_update )attribute (argument_list (attribute (identifier_context) identifier_context (identifier_context_arguments) identifier_context_arguments )attribute )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_cargs) identifier_cargs )return_statement )block )function_definition )module
Return a dictionary containing the current context arguments.
(module (function_definition (function_name__get_toc_reference) function_name__get_toc_reference (parameters (identifier_app) identifier_app (identifier_node) identifier_node (identifier_toc) identifier_toc (identifier_docname) identifier_docname )parameters (block (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_node) identifier_node (attribute (identifier_nodes) identifier_nodes (identifier_section) identifier_section )attribute )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_node) identifier_node (identifier_parent) identifier_parent )attribute (attribute (identifier_nodes) identifier_nodes (identifier_document) identifier_document )attribute )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_ref_id) identifier_ref_id (identifier_docname) identifier_docname )assignment )expression_statement (expression_statement (assignment (identifier_toc_reference) identifier_toc_reference (call (identifier__find_toc_node) identifier__find_toc_node (argument_list (identifier_toc) identifier_toc (identifier_ref_id) identifier_ref_id (attribute (identifier_nodes) identifier_nodes (identifier_section) identifier_section )attribute )argument_list )call )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_node) identifier_node (attribute (identifier_nodes) identifier_nodes (identifier_section) identifier_section )attribute )argument_list )call (block (expression_statement (assignment (identifier_ref_id) identifier_ref_id (subscript (subscript (attribute (identifier_node) identifier_node (identifier_attributes) identifier_attributes )attribute (string_"ids") string_"ids" )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_toc_reference) identifier_toc_reference (call (identifier__find_toc_node) identifier__find_toc_node (argument_list (identifier_toc) identifier_toc (identifier_ref_id) identifier_ref_id (attribute (identifier_nodes) identifier_nodes (identifier_section) identifier_section )attribute )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (try_statement (block (expression_statement (assignment (identifier_ref_id) identifier_ref_id (subscript (subscript (attribute (subscript (attribute (identifier_node) identifier_node (identifier_children) identifier_children )attribute (integer_0) integer_0 )subscript (identifier_attributes) identifier_attributes )attribute (string_"ids") string_"ids" )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_toc_reference) identifier_toc_reference (call (identifier__find_toc_node) identifier__find_toc_node (argument_list (identifier_toc) identifier_toc (identifier_ref_id) identifier_ref_id (attribute (identifier_addnodes) identifier_addnodes (identifier_desc) identifier_desc )attribute )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (tuple (identifier_KeyError) identifier_KeyError (identifier_IndexError) identifier_IndexError )tuple (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_warning) identifier_warning )attribute (argument_list (binary_operator (string_"Invalid desc node: %s") string_"Invalid desc node: %s" (identifier_e) identifier_e )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_toc_reference) identifier_toc_reference (None) None )assignment )expression_statement )block )except_clause )try_statement )block )else_clause )if_statement (return_statement (identifier_toc_reference) identifier_toc_reference )return_statement )block )function_definition )module
Logic that understands maps a specific node to it's part of the toctree. It takes a specific incoming ``node``, and returns the actual TOC Tree node that is said reference.
(module (function_definition (function_name_shutdown) function_name_shutdown (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_inputQueue) identifier_inputQueue (attribute (identifier_self) identifier_self (identifier_inputQueue) identifier_inputQueue )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_inputQueue) identifier_inputQueue )attribute (None) None )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (attribute (identifier_self) identifier_self (identifier_numWorkers) identifier_numWorkers )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_inputQueue) identifier_inputQueue (identifier_put) identifier_put )attribute (argument_list (None) None )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_thread) identifier_thread (attribute (identifier_self) identifier_self (identifier_workerThreads) identifier_workerThreads )attribute (block (expression_statement (call (attribute (identifier_thread) identifier_thread (identifier_join) identifier_join )attribute (argument_list )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_BatchSystemSupport) identifier_BatchSystemSupport (identifier_workerCleanup) identifier_workerCleanup )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_workerCleanupInfo) identifier_workerCleanupInfo )attribute )argument_list )call )expression_statement )block )function_definition )module
Cleanly terminate worker threads. Add sentinels to inputQueue equal to maxThreads. Join all worker threads.
(module (function_definition (function_name__calf) function_name__calf (parameters (identifier_self) identifier_self (identifier_spec) identifier_spec )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_prepare) identifier_prepare )attribute (argument_list (identifier_spec) identifier_spec )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_compile) identifier_compile )attribute (argument_list (identifier_spec) identifier_spec )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_assemble) identifier_assemble )attribute (argument_list (identifier_spec) identifier_spec )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_link) identifier_link )attribute (argument_list (identifier_spec) identifier_spec )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_finalize) identifier_finalize )attribute (argument_list (identifier_spec) identifier_spec )argument_list )call )expression_statement )block )function_definition )module
The main call, assuming the base spec is prepared. Also, no advices will be triggered.
(module (function_definition (function_name_reorient_wf) function_name_reorient_wf (parameters (default_parameter (identifier_name) identifier_name (string_'ReorientWorkflow') string_'ReorientWorkflow' )default_parameter )parameters (block (expression_statement (assignment (identifier_workflow) identifier_workflow (call (attribute (identifier_pe) identifier_pe (identifier_Workflow) identifier_Workflow )attribute (argument_list (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_inputnode) identifier_inputnode (call (attribute (identifier_pe) identifier_pe (identifier_Node) identifier_Node )attribute (argument_list (call (attribute (identifier_niu) identifier_niu (identifier_IdentityInterface) identifier_IdentityInterface )attribute (argument_list (keyword_argument (identifier_fields) identifier_fields (list (string_'in_file') string_'in_file' )list )keyword_argument )argument_list )call (keyword_argument (identifier_name) identifier_name (string_'inputnode') string_'inputnode' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_outputnode) identifier_outputnode (call (attribute (identifier_pe) identifier_pe (identifier_Node) identifier_Node )attribute (argument_list (call (attribute (identifier_niu) identifier_niu (identifier_IdentityInterface) identifier_IdentityInterface )attribute (argument_list (keyword_argument (identifier_fields) identifier_fields (list (string_'out_file') string_'out_file' )list )keyword_argument )argument_list )call (keyword_argument (identifier_name) identifier_name (string_'outputnode') string_'outputnode' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_deoblique) identifier_deoblique (call (attribute (identifier_pe) identifier_pe (identifier_Node) identifier_Node )attribute (argument_list (call (attribute (identifier_afni) identifier_afni (identifier_Refit) identifier_Refit )attribute (argument_list (keyword_argument (identifier_deoblique) identifier_deoblique (True) True )keyword_argument )argument_list )call (keyword_argument (identifier_name) identifier_name (string_'deoblique') string_'deoblique' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_reorient) identifier_reorient (call (attribute (identifier_pe) identifier_pe (identifier_Node) identifier_Node )attribute (argument_list (call (attribute (identifier_afni) identifier_afni (identifier_Resample) identifier_Resample )attribute (argument_list (keyword_argument (identifier_orientation) identifier_orientation (string_'RPI') string_'RPI' )keyword_argument (keyword_argument (identifier_outputtype) identifier_outputtype (string_'NIFTI_GZ') string_'NIFTI_GZ' )keyword_argument )argument_list )call (keyword_argument (identifier_name) identifier_name (string_'reorient') string_'reorient' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_workflow) identifier_workflow (identifier_connect) identifier_connect )attribute (argument_list (list (tuple (identifier_inputnode) identifier_inputnode (identifier_deoblique) identifier_deoblique (list (tuple (string_'in_file') string_'in_file' (string_'in_file') string_'in_file' )tuple )list )tuple (tuple (identifier_deoblique) identifier_deoblique (identifier_reorient) identifier_reorient (list (tuple (string_'out_file') string_'out_file' (string_'in_file') string_'in_file' )tuple )list )tuple (tuple (identifier_reorient) identifier_reorient (identifier_outputnode) identifier_outputnode (list (tuple (string_'out_file') string_'out_file' (string_'out_file') string_'out_file' )tuple )list )tuple )list )argument_list )call )expression_statement (return_statement (identifier_workflow) identifier_workflow )return_statement )block )function_definition )module
A workflow to reorient images to 'RPI' orientation
(module (function_definition (function_name_convert) function_name_convert (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_downloaded) identifier_downloaded )attribute (False) False )comparison_operator (block (raise_statement (call (identifier_serror) identifier_serror (argument_list (string_"Track not downloaded, can't convert file..") string_"Track not downloaded, can't convert file.." )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_filetype) identifier_filetype (call (attribute (identifier_magic) identifier_magic (identifier_from_file) identifier_from_file )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_filepath) identifier_filepath )attribute (keyword_argument (identifier_mime) identifier_mime (True) True )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_filetype) identifier_filetype (string_"audio/mpeg") string_"audio/mpeg" )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"File is already in mp3 format. Skipping convert.") string_"File is already in mp3 format. Skipping convert." )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_rootpath) identifier_rootpath (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_filepath) identifier_filepath )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_backupdir) identifier_backupdir (binary_operator (binary_operator (identifier_rootpath) identifier_rootpath (string_"/backups/") string_"/backups/" )binary_operator (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (string_"username") string_"username" )argument_list )call )binary_operator )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_backupdir) identifier_backupdir )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_backupdir) identifier_backupdir )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_backupfile) identifier_backupfile (binary_operator (string_"%s/%s%s") string_"%s/%s%s" (tuple (identifier_backupdir) identifier_backupdir (call (attribute (identifier_self) identifier_self (identifier_gen_filename) identifier_gen_filename )attribute (argument_list )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_get_file_extension) identifier_get_file_extension )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_filepath) identifier_filepath )attribute )argument_list )call )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_newfile) identifier_newfile (binary_operator (string_"%s.mp3") string_"%s.mp3" (call (attribute (identifier_self) identifier_self (identifier_filename_without_extension) identifier_filename_without_extension )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_rename) identifier_rename )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_filepath) identifier_filepath )attribute (identifier_backupfile) identifier_backupfile )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_filepath) identifier_filepath )attribute (identifier_newfile) identifier_newfile )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"Converting to %s..") string_"Converting to %s.." (identifier_newfile) identifier_newfile )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_song) identifier_song (call (attribute (identifier_AudioSegment) identifier_AudioSegment (identifier_from_file) identifier_from_file )attribute (argument_list (identifier_backupfile) identifier_backupfile )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_song) identifier_song (identifier_export) identifier_export )attribute (argument_list (identifier_newfile) identifier_newfile (keyword_argument (identifier_format) identifier_format (string_"mp3") string_"mp3" )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Convert file in mp3 format.
(module (function_definition (function_name_readFromFile) function_name_readFromFile (parameters (identifier_self) identifier_self (identifier_filename) identifier_filename )parameters (block (expression_statement (assignment (identifier_s) identifier_s (call (identifier_dict) identifier_dict (argument_list (call (attribute (identifier_np) identifier_np (identifier_load) identifier_load )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_coeffs) identifier_coeffs )attribute (subscript (subscript (identifier_s) identifier_s (string_'coeffs') string_'coeffs' )subscript (tuple )tuple )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_coeffs) identifier_coeffs )attribute (identifier_s) identifier_s )assignment )expression_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_opts) identifier_opts )attribute (subscript (subscript (identifier_s) identifier_s (string_'opts') string_'opts' )subscript (tuple )tuple )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement (attribute (identifier_self) identifier_self (identifier_coeffs) identifier_coeffs )attribute )return_statement )block )function_definition )module
read the distortion coeffs from file
(module (function_definition (function_name_dollars_to_math) function_name_dollars_to_math (parameters (identifier_source) identifier_source )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_s) identifier_s (call (attribute (string_"\n") string_"\n" (identifier_join) identifier_join )attribute (argument_list (identifier_source) identifier_source )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_s) identifier_s (identifier_find) identifier_find )attribute (argument_list (string_"$") string_"$" )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (return_statement )return_statement )block )if_statement (global_statement (identifier__data) identifier__data )global_statement (expression_statement (assignment (identifier__data) identifier__data (dictionary )dictionary )assignment )expression_statement (function_definition (function_name_repl) function_name_repl (parameters (identifier_matchobj) identifier_matchobj )parameters (block (global_statement (identifier__data) identifier__data )global_statement (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_matchobj) identifier_matchobj (identifier_group) identifier_group )attribute (argument_list (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_t) identifier_t (binary_operator (string_"___XXX_REPL_%d___") string_"___XXX_REPL_%d___" (call (identifier_len) identifier_len (argument_list (identifier__data) identifier__data )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (subscript (identifier__data) identifier__data (identifier_t) identifier_t )subscript (identifier_s) identifier_s )assignment )expression_statement (return_statement (identifier_t) identifier_t )return_statement )block )function_definition (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_r"({[^{}$]*\$[^{}$]*\$[^{}]*})") string_r"({[^{}$]*\$[^{}$]*\$[^{}]*})" (identifier_repl) identifier_repl (identifier_s) identifier_s )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dollars) identifier_dollars (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (string_r"(?<!\$)(?<!\\)\$([^\$]+?)\$") string_r"(?<!\$)(?<!\\)\$([^\$]+?)\$" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_slashdollar) identifier_slashdollar (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (string_r"\\\$") string_r"\\\$" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_dollars) identifier_dollars (identifier_sub) identifier_sub )attribute (argument_list (string_r":math:`\1`") string_r":math:`\1`" (identifier_s) identifier_s )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_slashdollar) identifier_slashdollar (identifier_sub) identifier_sub )attribute (argument_list (string_r"$") string_r"$" (identifier_s) identifier_s )argument_list )call )assignment )expression_statement (for_statement (identifier_r) identifier_r (identifier__data) identifier__data (block (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_s) identifier_s (identifier_replace) identifier_replace )attribute (argument_list (identifier_r) identifier_r (subscript (identifier__data) identifier__data (identifier_r) identifier_r )subscript )argument_list )call )assignment )expression_statement )block )for_statement (expression_statement (assignment (subscript (identifier_source) identifier_source (slice (colon) colon )slice )subscript (list (identifier_s) identifier_s )list )assignment )expression_statement )block )function_definition )module
r""" Replace dollar signs with backticks. More precisely, do a regular expression search. Replace a plain dollar sign ($) by a backtick (`). Replace an escaped dollar sign (\$) by a dollar sign ($). Don't change a dollar sign preceded or followed by a backtick (`$ or $`), because of strings like "``$HOME``". Don't make any changes on lines starting with spaces, because those are indented and hence part of a block of code or examples. This also doesn't replaces dollar signs enclosed in curly braces, to avoid nested math environments, such as :: $f(n) = 0 \text{ if $n$ is prime}$ Thus the above line would get changed to `f(n) = 0 \text{ if $n$ is prime}`
(module (function_definition (function_name__merge_map) function_name__merge_map (parameters (identifier_key) identifier_key (identifier_values) identifier_values (identifier_partial) identifier_partial )parameters (block (expression_statement (assignment (identifier_proto) identifier_proto (call (attribute (identifier_kv_pb) identifier_kv_pb (identifier_KeyValues) identifier_KeyValues )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_proto) identifier_proto (identifier_set_key) identifier_set_key )attribute (argument_list (identifier_key) identifier_key )argument_list )call )expression_statement (expression_statement (call (attribute (call (attribute (identifier_proto) identifier_proto (identifier_value_list) identifier_value_list )attribute (argument_list )argument_list )call (identifier_extend) identifier_extend )attribute (argument_list (identifier_values) identifier_values )argument_list )call )expression_statement (expression_statement (yield (call (attribute (identifier_proto) identifier_proto (identifier_Encode) identifier_Encode )attribute (argument_list )argument_list )call )yield )expression_statement )block )function_definition )module
A map function used in merge phase. Stores (key, values) into KeyValues proto and yields its serialization. Args: key: values key. values: values themselves. partial: True if more values for this key will follow. False otherwise. Yields: The proto.
(module (function_definition (function_name_get_distributed_seismicity_source_nodes) function_name_get_distributed_seismicity_source_nodes (parameters (identifier_source) identifier_source )parameters (block (expression_statement (assignment (identifier_source_nodes) identifier_source_nodes (list )list )assignment )expression_statement (expression_statement (call (attribute (identifier_source_nodes) identifier_source_nodes (identifier_append) identifier_append )attribute (argument_list (call (identifier_Node) identifier_Node (argument_list (string_"magScaleRel") string_"magScaleRel" (keyword_argument (identifier_text) identifier_text (attribute (attribute (attribute (identifier_source) identifier_source (identifier_magnitude_scaling_relationship) identifier_magnitude_scaling_relationship )attribute (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )keyword_argument )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_source_nodes) identifier_source_nodes (identifier_append) identifier_append )attribute (argument_list (call (identifier_Node) identifier_Node (argument_list (string_"ruptAspectRatio") string_"ruptAspectRatio" (keyword_argument (identifier_text) identifier_text (attribute (identifier_source) identifier_source (identifier_rupture_aspect_ratio) identifier_rupture_aspect_ratio )attribute )keyword_argument )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_source_nodes) identifier_source_nodes (identifier_append) identifier_append )attribute (argument_list (call (identifier_obj_to_node) identifier_obj_to_node (argument_list (attribute (identifier_source) identifier_source (identifier_mfd) identifier_mfd )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_source_nodes) identifier_source_nodes (identifier_append) identifier_append )attribute (argument_list (call (identifier_build_nodal_plane_dist) identifier_build_nodal_plane_dist (argument_list (attribute (identifier_source) identifier_source (identifier_nodal_plane_distribution) identifier_nodal_plane_distribution )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_source_nodes) identifier_source_nodes (identifier_append) identifier_append )attribute (argument_list (call (identifier_build_hypo_depth_dist) identifier_build_hypo_depth_dist (argument_list (attribute (identifier_source) identifier_source (identifier_hypocenter_distribution) identifier_hypocenter_distribution )attribute )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_source_nodes) identifier_source_nodes )return_statement )block )function_definition )module
Returns list of nodes of attributes common to all distributed seismicity source classes :param source: Seismic source as instance of :class: `openquake.hazardlib.source.area.AreaSource` or :class: `openquake.hazardlib.source.point.PointSource` :returns: List of instances of :class:`openquake.baselib.node.Node`
(module (function_definition (function_name_classname) function_name_classname (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_cls) identifier_cls (call (attribute (identifier_javabridge) identifier_javabridge (identifier_call) identifier_call )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_jobject) identifier_jobject )attribute (string_"getClass") string_"getClass" (string_"()Ljava/lang/Class;") string_"()Ljava/lang/Class;" )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_javabridge) identifier_javabridge (identifier_call) identifier_call )attribute (argument_list (identifier_cls) identifier_cls (string_"getName") string_"getName" (string_"()Ljava/lang/String;") string_"()Ljava/lang/String;" )argument_list )call )return_statement )block )function_definition )module
Returns the Java classname in dot-notation. :return: the Java classname :rtype: str
(module (function_definition (function_name_find_module) function_name_find_module (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_defmodule) identifier_defmodule (call (attribute (identifier_lib) identifier_lib (identifier_EnvFindDefmodule) identifier_EnvFindDefmodule )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__env) identifier__env )attribute (call (attribute (identifier_name) identifier_name (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_defmodule) identifier_defmodule (attribute (identifier_ffi) identifier_ffi (identifier_NULL) identifier_NULL )attribute )comparison_operator (block (raise_statement (call (identifier_LookupError) identifier_LookupError (argument_list (binary_operator (string_"Module '%s' not found") string_"Module '%s' not found" (identifier_name) identifier_name )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_Module) identifier_Module (argument_list (attribute (identifier_self) identifier_self (identifier__env) identifier__env )attribute (identifier_defmodule) identifier_defmodule )argument_list )call )return_statement )block )function_definition )module
Find the Module by its name.
(module (function_definition (function_name_StrikeDip) function_name_StrikeDip (parameters (identifier_n) identifier_n (identifier_e) identifier_e (identifier_u) identifier_u )parameters (block (expression_statement (assignment (identifier_r2d) identifier_r2d (binary_operator (integer_180) integer_180 (attribute (identifier_np) identifier_np (identifier_pi) identifier_pi )attribute )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_u) identifier_u (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_n) identifier_n (unary_operator (identifier_n) identifier_n )unary_operator )assignment )expression_statement (expression_statement (assignment (identifier_e) identifier_e (unary_operator (identifier_e) identifier_e )unary_operator )assignment )expression_statement (expression_statement (assignment (identifier_u) identifier_u (unary_operator (identifier_u) identifier_u )unary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_strike) identifier_strike (binary_operator (call (attribute (identifier_np) identifier_np (identifier_arctan2) identifier_arctan2 )attribute (argument_list (identifier_e) identifier_e (identifier_n) identifier_n )argument_list )call (identifier_r2d) identifier_r2d )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_strike) identifier_strike (binary_operator (identifier_strike) identifier_strike (integer_90) integer_90 )binary_operator )assignment )expression_statement (while_statement (comparison_operator (identifier_strike) identifier_strike (integer_360) integer_360 )comparison_operator (block (expression_statement (assignment (identifier_strike) identifier_strike (binary_operator (identifier_strike) identifier_strike (integer_360) integer_360 )binary_operator )assignment )expression_statement )block )while_statement (while_statement (comparison_operator (identifier_strike) identifier_strike (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_strike) identifier_strike (binary_operator (identifier_strike) identifier_strike (integer_360) integer_360 )binary_operator )assignment )expression_statement )block )while_statement (expression_statement (assignment (identifier_x) identifier_x (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (binary_operator (call (attribute (identifier_np) identifier_np (identifier_power) identifier_power )attribute (argument_list (identifier_n) identifier_n (integer_2) integer_2 )argument_list )call (call (attribute (identifier_np) identifier_np (identifier_power) identifier_power )attribute (argument_list (identifier_e) identifier_e (integer_2) integer_2 )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dip) identifier_dip (binary_operator (call (attribute (identifier_np) identifier_np (identifier_arctan2) identifier_arctan2 )attribute (argument_list (identifier_x) identifier_x (identifier_u) identifier_u )argument_list )call (identifier_r2d) identifier_r2d )binary_operator )assignment )expression_statement (return_statement (tuple (identifier_strike) identifier_strike (identifier_dip) identifier_dip )tuple )return_statement )block )function_definition )module
Finds strike and dip of plane given normal vector having components n, e, and u. Adapted from MATLAB script `bb.m <http://www.ceri.memphis.edu/people/olboyd/Software/Software.html>`_ written by Andy Michael and Oliver Boyd.
(module (function_definition (function_name_synergy_to_datetime) function_name_synergy_to_datetime (parameters (identifier_time_qualifier) identifier_time_qualifier (identifier_timeperiod) identifier_timeperiod )parameters (block (if_statement (comparison_operator (identifier_time_qualifier) identifier_time_qualifier (identifier_QUALIFIER_HOURLY) identifier_QUALIFIER_HOURLY )comparison_operator (block (expression_statement (assignment (identifier_date_format) identifier_date_format (identifier_SYNERGY_HOURLY_PATTERN) identifier_SYNERGY_HOURLY_PATTERN )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_time_qualifier) identifier_time_qualifier (identifier_QUALIFIER_DAILY) identifier_QUALIFIER_DAILY )comparison_operator (block (expression_statement (assignment (identifier_date_format) identifier_date_format (identifier_SYNERGY_DAILY_PATTERN) identifier_SYNERGY_DAILY_PATTERN )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_time_qualifier) identifier_time_qualifier (identifier_QUALIFIER_MONTHLY) identifier_QUALIFIER_MONTHLY )comparison_operator (block (expression_statement (assignment (identifier_date_format) identifier_date_format (identifier_SYNERGY_MONTHLY_PATTERN) identifier_SYNERGY_MONTHLY_PATTERN )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_time_qualifier) identifier_time_qualifier (identifier_QUALIFIER_YEARLY) identifier_QUALIFIER_YEARLY )comparison_operator (block (expression_statement (assignment (identifier_date_format) identifier_date_format (identifier_SYNERGY_YEARLY_PATTERN) identifier_SYNERGY_YEARLY_PATTERN )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_time_qualifier) identifier_time_qualifier (identifier_QUALIFIER_REAL_TIME) identifier_QUALIFIER_REAL_TIME )comparison_operator (block (expression_statement (assignment (identifier_date_format) identifier_date_format (identifier_SYNERGY_SESSION_PATTERN) identifier_SYNERGY_SESSION_PATTERN )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_'unknown time qualifier: {0}') string_'unknown time qualifier: {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_time_qualifier) identifier_time_qualifier )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (call (attribute (call (attribute (identifier_datetime) identifier_datetime (identifier_strptime) identifier_strptime )attribute (argument_list (identifier_timeperiod) identifier_timeperiod (identifier_date_format) identifier_date_format )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (keyword_argument (identifier_tzinfo) identifier_tzinfo (None) None )keyword_argument )argument_list )call )return_statement )block )function_definition )module
method receives timeperiod in Synergy format YYYYMMDDHH and convert it to UTC _naive_ datetime
(module (function_definition (function_name_verify_login) function_name_verify_login (parameters (identifier_user) identifier_user (default_parameter (identifier_password) identifier_password (None) None )default_parameter (dictionary_splat_pattern (identifier_connection_args) identifier_connection_args )dictionary_splat_pattern )parameters (block (expression_statement (assignment (subscript (identifier_connection_args) identifier_connection_args (string_'connection_user') string_'connection_user' )subscript (identifier_user) identifier_user )assignment )expression_statement (expression_statement (assignment (subscript (identifier_connection_args) identifier_connection_args (string_'connection_pass') string_'connection_pass' )subscript (identifier_password) identifier_password )assignment )expression_statement (expression_statement (assignment (identifier_dbc) identifier_dbc (call (identifier__connect) identifier__connect (argument_list (dictionary_splat (identifier_connection_args) identifier_connection_args )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_dbc) identifier_dbc (None) None )comparison_operator (block (if_statement (comparison_operator (string_'mysql.error') string_'mysql.error' (identifier___context__) identifier___context__ )comparison_operator (block (delete_statement (subscript (identifier___context__) identifier___context__ (string_'mysql.error') string_'mysql.error' )subscript )delete_statement )block )if_statement (return_statement (False) False )return_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Attempt to login using the provided credentials. If successful, return true. Otherwise, return False. CLI Example: .. code-block:: bash salt '*' mysql.verify_login root password
(module (function_definition (function_name_state_counts) function_name_state_counts (parameters (identifier_gamma) identifier_gamma (identifier_T) identifier_T (default_parameter (identifier_out) identifier_out (None) None )default_parameter )parameters (block (return_statement (call (attribute (identifier_np) identifier_np (identifier_sum) identifier_sum )attribute (argument_list (subscript (identifier_gamma) identifier_gamma (slice (integer_0) integer_0 (colon) colon (identifier_T) identifier_T )slice )subscript (keyword_argument (identifier_axis) identifier_axis (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_out) identifier_out (identifier_out) identifier_out )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Sum the probabilities of being in state i to time t Parameters ---------- gamma : ndarray((T,N), dtype = float), optional, default = None gamma[t,i] is the probabilty at time t to be in state i ! T : int number of time steps Returns ------- count : numpy.array shape (N) count[i] is the summed probabilty to be in state i ! See Also -------- state_probabilities : to calculate `gamma`
(module (function_definition (function_name_moments) function_name_moments (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_moment1) identifier_moment1 (call (attribute (identifier_statstools) identifier_statstools (identifier_calc_mean_time) identifier_calc_mean_time )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_delays) identifier_delays )attribute (attribute (identifier_self) identifier_self (identifier_coefs) identifier_coefs )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_moment2) identifier_moment2 (call (attribute (identifier_statstools) identifier_statstools (identifier_calc_mean_time_deviation) identifier_calc_mean_time_deviation )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_delays) identifier_delays )attribute (attribute (identifier_self) identifier_self (identifier_coefs) identifier_coefs )attribute (identifier_moment1) identifier_moment1 )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_numpy) identifier_numpy (identifier_array) identifier_array )attribute (argument_list (list (identifier_moment1) identifier_moment1 (identifier_moment2) identifier_moment2 )list )argument_list )call )return_statement )block )function_definition )module
The first two time delay weighted statistical moments of the MA coefficients.
(module (function_definition (function_name_is_tagged) function_name_is_tagged (parameters (identifier_required_tags) identifier_required_tags (identifier_has_tags) identifier_has_tags )parameters (block (if_statement (boolean_operator (not_operator (identifier_required_tags) identifier_required_tags )not_operator (not_operator (identifier_has_tags) identifier_has_tags )not_operator )boolean_operator (block (return_statement (True) True )return_statement )block (elif_clause (not_operator (identifier_required_tags) identifier_required_tags )not_operator (block (return_statement (False) False )return_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_found_tags) identifier_found_tags (list )list )assignment )expression_statement (for_statement (identifier_tag) identifier_tag (identifier_required_tags) identifier_required_tags (block (if_statement (comparison_operator (identifier_tag) identifier_tag (identifier_has_tags) identifier_has_tags )comparison_operator (block (expression_statement (call (attribute (identifier_found_tags) identifier_found_tags (identifier_append) identifier_append )attribute (argument_list (identifier_tag) identifier_tag )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_found_tags) identifier_found_tags )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_required_tags) identifier_required_tags )argument_list )call )comparison_operator )return_statement )block )function_definition )module
Checks if tags match
(module (function_definition (function_name_dist) function_name_dist (parameters (identifier_self) identifier_self (identifier_other) identifier_other )parameters (block (expression_statement (assignment (identifier_dx) identifier_dx (binary_operator (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute (attribute (identifier_other) identifier_other (identifier_x) identifier_x )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_dy) identifier_dy (binary_operator (attribute (identifier_self) identifier_self (identifier_y) identifier_y )attribute (attribute (identifier_other) identifier_other (identifier_y) identifier_y )attribute )binary_operator )assignment )expression_statement (return_statement (call (attribute (identifier_math) identifier_math (identifier_sqrt) identifier_sqrt )attribute (argument_list (binary_operator (binary_operator (identifier_dx) identifier_dx (integer_2) integer_2 )binary_operator (binary_operator (identifier_dy) identifier_dy (integer_2) integer_2 )binary_operator )binary_operator )argument_list )call )return_statement )block )function_definition )module
Distance to some other point.
(module (function_definition (function_name__check_not_empty) function_name__check_not_empty (parameters (identifier_string) identifier_string )parameters (block (expression_statement (assignment (identifier_string) identifier_string (call (attribute (identifier_string) identifier_string (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_string) identifier_string )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_message) identifier_message (string_'The string should not be empty') string_'The string should not be empty' )assignment )expression_statement (raise_statement (call (attribute (identifier_pp) identifier_pp (identifier_ParseException) identifier_ParseException )attribute (argument_list (identifier_message) identifier_message )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Checks that the string is not empty. If it is empty an exception is raised, stopping the validation. This is used for compulsory alphanumeric fields. :param string: the field value
(module (function_definition (function_name_activate) function_name_activate (parameters (default_parameter (identifier_lang) identifier_lang (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_lang) identifier_lang (None) None )comparison_operator (block (expression_statement (assignment (identifier_lang) identifier_lang (subscript (call (attribute (identifier_locale) identifier_locale (identifier_getlocale) identifier_getlocale )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_tr) identifier_tr (call (attribute (identifier_gettext) identifier_gettext (identifier_translation) identifier_translation )attribute (argument_list (string_"argparse") string_"argparse" (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_locpath) identifier_locpath (string_"locale") string_"locale" )argument_list )call (list (identifier_lang) identifier_lang )list (keyword_argument (identifier_fallback) identifier_fallback (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_argparse) identifier_argparse (identifier__) identifier__ )attribute (attribute (identifier_tr) identifier_tr (identifier_gettext) identifier_gettext )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_argparse) identifier_argparse (identifier_ngettext) identifier_ngettext )attribute (attribute (identifier_tr) identifier_tr (identifier_ngettext) identifier_ngettext )attribute )assignment )expression_statement )block )function_definition )module
Activate a translation for lang. If lang is None, then the language of locale.getdefaultlocale() is used. If the translation file does not exist, the original messages will be used.
(module (function_definition (function_name_getOutputName) function_name_getOutputName (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_val) identifier_val (subscript (attribute (identifier_self) identifier_self (identifier_outputNames) identifier_outputNames )attribute (identifier_name) identifier_name )subscript )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_inmemory) identifier_inmemory )attribute (block (expression_statement (assignment (identifier_val) identifier_val (subscript (attribute (identifier_self) identifier_self (identifier_virtualOutputs) identifier_virtualOutputs )attribute (identifier_val) identifier_val )subscript )assignment )expression_statement )block )if_statement (return_statement (identifier_val) identifier_val )return_statement )block )function_definition )module
Return the name of the file or PyFITS object associated with that name, depending on the setting of self.inmemory.
(module (function_definition (function_name_delete_policy) function_name_delete_policy (parameters (identifier_self) identifier_self (identifier_pol_id) identifier_pol_id )parameters (block (if_statement (comparison_operator (identifier_pol_id) identifier_pol_id (attribute (identifier_self) identifier_self (identifier_policies) identifier_policies )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_error) identifier_error )attribute (argument_list (string_"Invalid policy %s") string_"Invalid policy %s" (identifier_pol_id) identifier_pol_id )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier_policies) identifier_policies )attribute (identifier_pol_id) identifier_pol_id )subscript )delete_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_policy_cnt) identifier_policy_cnt )attribute (integer_1) integer_1 )augmented_assignment )expression_statement )block )function_definition )module
Deletes the policy from the local dictionary.
(module (function_definition (function_name__get_system) function_name__get_system (parameters (identifier_model_folder) identifier_model_folder )parameters (block (expression_statement (assignment (identifier_model_description_file) identifier_model_description_file (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_model_folder) identifier_model_folder (string_"info.yml") string_"info.yml" )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_model_description_file) identifier_model_description_file )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_error) identifier_error )attribute (argument_list (concatenated_string (string_"You are probably not in the folder of a model, because ") string_"You are probably not in the folder of a model, because " (string_"%s is not a file. (-m argument)") string_"%s is not a file. (-m argument)" )concatenated_string (identifier_model_description_file) identifier_model_description_file )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call )expression_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_model_description_file) identifier_model_description_file (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_ymlfile) identifier_ymlfile )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_model_desc) identifier_model_desc (call (attribute (identifier_yaml) identifier_yaml (identifier_load) identifier_load )attribute (argument_list (identifier_ymlfile) identifier_ymlfile )argument_list )call )assignment )expression_statement )block )with_statement (expression_statement (assignment (identifier_feature_desc) identifier_feature_desc (call (identifier__get_description) identifier__get_description (argument_list (identifier_model_desc) identifier_model_desc )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_preprocessing_desc) identifier_preprocessing_desc (call (identifier__get_description) identifier__get_description (argument_list (identifier_feature_desc) identifier_feature_desc )argument_list )call )assignment )expression_statement (return_statement (tuple (identifier_preprocessing_desc) identifier_preprocessing_desc (identifier_feature_desc) identifier_feature_desc (identifier_model_desc) identifier_model_desc )tuple )return_statement )block )function_definition )module
Return the preprocessing description, the feature description and the model description.
(module (function_definition (function_name_elapsed) function_name_elapsed (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_dt) identifier_dt (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_ss) identifier_ss (subscript (attribute (identifier_self) identifier_self (identifier_starts_and_stops) identifier_starts_and_stops )attribute (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript (block (expression_statement (augmented_assignment (identifier_dt) identifier_dt (call (attribute (parenthesized_expression (binary_operator (subscript (identifier_ss) identifier_ss (string_'stop') string_'stop' )subscript (subscript (identifier_ss) identifier_ss (string_'start') string_'start' )subscript )binary_operator )parenthesized_expression (identifier_total_seconds) identifier_total_seconds )attribute (argument_list )argument_list )call )augmented_assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_ss) identifier_ss (subscript (attribute (identifier_self) identifier_self (identifier_starts_and_stops) identifier_starts_and_stops )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement (if_statement (subscript (identifier_ss) identifier_ss (string_'stop') string_'stop' )subscript (block (expression_statement (augmented_assignment (identifier_dt) identifier_dt (call (attribute (parenthesized_expression (binary_operator (subscript (identifier_ss) identifier_ss (string_'stop') string_'stop' )subscript (subscript (identifier_ss) identifier_ss (string_'start') string_'start' )subscript )binary_operator )parenthesized_expression (identifier_total_seconds) identifier_total_seconds )attribute (argument_list )argument_list )call )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (identifier_dt) identifier_dt (call (attribute (parenthesized_expression (binary_operator (call (attribute (identifier_doublethink) identifier_doublethink (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call (subscript (identifier_ss) identifier_ss (string_'start') string_'start' )subscript )binary_operator )parenthesized_expression (identifier_total_seconds) identifier_total_seconds )attribute (argument_list )argument_list )call )augmented_assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_dt) identifier_dt )return_statement )block )function_definition )module
Returns elapsed crawl time as a float in seconds. This metric includes all the time that a site was in active rotation, including any time it spent waiting for its turn to be brozzled. In contrast `Site.active_brozzling_time` only counts time when a brozzler worker claimed the site and was actively brozzling it.
(module (function_definition (function_name_smartread) function_name_smartread (parameters (identifier_path) identifier_path )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_path) identifier_path (string_"rb") string_"rb" )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_content) identifier_content (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_chardet) identifier_chardet (identifier_detect) identifier_detect )attribute (argument_list (identifier_content) identifier_content )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_content) identifier_content (identifier_decode) identifier_decode )attribute (argument_list (subscript (identifier_result) identifier_result (string_"encoding") string_"encoding" )subscript )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Read text from file, automatically detect encoding. ``chardet`` required.
(module (function_definition (function_name_powerDown) function_name_powerDown (parameters (identifier_self) identifier_self (identifier_powerup) identifier_powerup (default_parameter (identifier_interface) identifier_interface (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_interface) identifier_interface (None) None )comparison_operator (block (for_statement (pattern_list (identifier_interface) identifier_interface (identifier_priority) identifier_priority )pattern_list (call (attribute (identifier_powerup) identifier_powerup (identifier__getPowerupInterfaces) identifier__getPowerupInterfaces )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_powerDown) identifier_powerDown )attribute (argument_list (identifier_powerup) identifier_powerup (identifier_interface) identifier_interface )argument_list )call )expression_statement )block )for_statement )block (else_clause (block (for_statement (identifier_cable) identifier_cable (call (attribute (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute (identifier_query) identifier_query )attribute (argument_list (identifier__PowerupConnector) identifier__PowerupConnector (call (identifier_AND) identifier_AND (argument_list (comparison_operator (attribute (identifier__PowerupConnector) identifier__PowerupConnector (identifier_item) identifier_item )attribute (identifier_self) identifier_self )comparison_operator (comparison_operator (attribute (identifier__PowerupConnector) identifier__PowerupConnector (identifier_interface) identifier_interface )attribute (call (identifier_unicode) identifier_unicode (argument_list (call (identifier_qual) identifier_qual (argument_list (identifier_interface) identifier_interface )argument_list )call )argument_list )call )comparison_operator (comparison_operator (attribute (identifier__PowerupConnector) identifier__PowerupConnector (identifier_powerup) identifier_powerup )attribute (identifier_powerup) identifier_powerup )comparison_operator )argument_list )call )argument_list )call (block (expression_statement (call (attribute (identifier_cable) identifier_cable (identifier_deleteFromStore) identifier_deleteFromStore )attribute (argument_list )argument_list )call )expression_statement (return_statement )return_statement )block )for_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Not powered up for %r with %r") string_"Not powered up for %r with %r" (tuple (identifier_interface) identifier_interface (identifier_powerup) identifier_powerup )tuple )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Remove a powerup. If no interface is specified, and the type of the object being installed has a "powerupInterfaces" attribute (containing either a sequence of interfaces, or a sequence of (interface, priority) tuples), the target will be powered down with this object on those interfaces. If this object has a "__getPowerupInterfaces__" method, it will be called with an iterable of (interface, priority) tuples. The iterable of (interface, priority) tuples it returns will then be uninstalled. (Note particularly that if powerups are added or removed to the collection described above between calls to powerUp and powerDown, more powerups or less will be removed than were installed.)
(module (function_definition (function_name_remove_file_data) function_name_remove_file_data (parameters (identifier_file_id) identifier_file_id (default_parameter (identifier_silent) identifier_silent (True) True )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_f) identifier_f (call (attribute (identifier_FileInstance) identifier_FileInstance (identifier_get) identifier_get )attribute (argument_list (identifier_file_id) identifier_file_id )argument_list )call )assignment )expression_statement (if_statement (not_operator (attribute (identifier_f) identifier_f (identifier_writable) identifier_writable )attribute )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_delete) identifier_delete )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_db) identifier_db (identifier_session) identifier_session )attribute (identifier_commit) identifier_commit )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (call (attribute (identifier_f) identifier_f (identifier_storage) identifier_storage )attribute (argument_list )argument_list )call (identifier_delete) identifier_delete )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (identifier_IntegrityError) identifier_IntegrityError (block (if_statement (not_operator (identifier_silent) identifier_silent )not_operator (block (raise_statement )raise_statement )block )if_statement )block )except_clause )try_statement )block )function_definition )module
Remove file instance and associated data. :param file_id: The :class:`invenio_files_rest.models.FileInstance` ID. :param silent: It stops propagation of a possible arised IntegrityError exception. (Default: ``True``) :raises sqlalchemy.exc.IntegrityError: Raised if the database removal goes wrong and silent is set to ``False``.
(module (function_definition (function_name_validate_properties) function_name_validate_properties (parameters (identifier_self) identifier_self )parameters (block (for_statement (pattern_list (identifier_name) identifier_name (identifier_property_type) identifier_property_type )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_property_types) identifier_property_types )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (attribute (identifier_property_type) identifier_property_type (identifier_supports_intrinsics) identifier_supports_intrinsics )attribute (call (attribute (identifier_self) identifier_self (identifier__is_intrinsic_function) identifier__is_intrinsic_function )attribute (argument_list (identifier_value) identifier_value )argument_list )call )boolean_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (if_statement (attribute (identifier_property_type) identifier_property_type (identifier_required) identifier_required )attribute (block (raise_statement (call (identifier_InvalidResourceException) identifier_InvalidResourceException (argument_list (attribute (identifier_self) identifier_self (identifier_logical_id) identifier_logical_id )attribute (call (attribute (string_"Missing required property '{property_name}'.") string_"Missing required property '{property_name}'." (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_property_name) identifier_property_name (identifier_name) identifier_name )keyword_argument )argument_list )call )argument_list )call )raise_statement )block )if_statement )block (elif_clause (not_operator (call (attribute (identifier_property_type) identifier_property_type (identifier_validate) identifier_validate )attribute (argument_list (identifier_value) identifier_value (keyword_argument (identifier_should_raise) identifier_should_raise (False) False )keyword_argument )argument_list )call )not_operator (block (raise_statement (call (identifier_InvalidResourceException) identifier_InvalidResourceException (argument_list (attribute (identifier_self) identifier_self (identifier_logical_id) identifier_logical_id )attribute (call (attribute (string_"Type of property '{property_name}' is invalid.") string_"Type of property '{property_name}' is invalid." (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_property_name) identifier_property_name (identifier_name) identifier_name )keyword_argument )argument_list )call )argument_list )call )raise_statement )block )elif_clause )if_statement )block )for_statement )block )function_definition )module
Validates that the required properties for this Resource have been populated, and that all properties have valid values. :returns: True if all properties are valid :rtype: bool :raises TypeError: if any properties are invalid
(module (function_definition (function_name_shape) function_name_shape (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__shape) identifier__shape )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__populate_from_rasterio_object) identifier__populate_from_rasterio_object )attribute (argument_list (keyword_argument (identifier_read_image) identifier_read_image (False) False )keyword_argument )argument_list )call )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__shape) identifier__shape )attribute )return_statement )block )function_definition )module
Raster shape.
(module (function_definition (function_name_getInfoMutator) function_name_getInfoMutator (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__infoMutator) identifier__infoMutator )attribute (block (return_statement (attribute (identifier_self) identifier_self (identifier__infoMutator) identifier__infoMutator )attribute )return_statement )block )if_statement (expression_statement (assignment (identifier_infoItems) identifier_infoItems (list )list )assignment )expression_statement (for_statement (identifier_sourceDescriptor) identifier_sourceDescriptor (attribute (identifier_self) identifier_self (identifier_sources) identifier_sources )attribute (block (if_statement (comparison_operator (attribute (identifier_sourceDescriptor) identifier_sourceDescriptor (identifier_layerName) identifier_layerName )attribute (None) None )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_loc) identifier_loc (call (identifier_Location) identifier_Location (argument_list (attribute (identifier_sourceDescriptor) identifier_sourceDescriptor (identifier_location) identifier_location )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sourceFont) identifier_sourceFont (subscript (attribute (identifier_self) identifier_self (identifier_fonts) identifier_fonts )attribute (attribute (identifier_sourceDescriptor) identifier_sourceDescriptor (identifier_name) identifier_name )attribute )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_sourceFont) identifier_sourceFont (None) None )comparison_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (attribute (identifier_sourceFont) identifier_sourceFont (identifier_info) identifier_info )attribute (string_"toMathInfo") string_"toMathInfo" )argument_list )call (block (expression_statement (call (attribute (identifier_infoItems) identifier_infoItems (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_loc) identifier_loc (call (attribute (attribute (identifier_sourceFont) identifier_sourceFont (identifier_info) identifier_info )attribute (identifier_toMathInfo) identifier_toMathInfo )attribute (argument_list )argument_list )call )tuple )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_infoItems) identifier_infoItems (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_loc) identifier_loc (call (attribute (identifier_self) identifier_self (identifier_mathInfoClass) identifier_mathInfoClass )attribute (argument_list (attribute (identifier_sourceFont) identifier_sourceFont (identifier_info) identifier_info )attribute )argument_list )call )tuple )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (assignment (pattern_list (identifier_bias) identifier_bias (attribute (identifier_self) identifier_self (identifier__infoMutator) identifier__infoMutator )attribute )pattern_list (call (attribute (identifier_self) identifier_self (identifier_getVariationModel) identifier_getVariationModel )attribute (argument_list (identifier_infoItems) identifier_infoItems (keyword_argument (identifier_axes) identifier_axes (attribute (identifier_self) identifier_self (identifier_serializedAxes) identifier_serializedAxes )attribute )keyword_argument (keyword_argument (identifier_bias) identifier_bias (call (attribute (identifier_self) identifier_self (identifier_newDefaultLocation) identifier_newDefaultLocation )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier__infoMutator) identifier__infoMutator )attribute )return_statement )block )function_definition )module
Returns a info mutator
(module (function_definition (function_name_read_login) function_name_read_login (parameters (identifier_collector) identifier_collector (identifier_image) identifier_image (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_docker_api) identifier_docker_api (attribute (subscript (attribute (identifier_collector) identifier_collector (identifier_configuration) identifier_configuration )attribute (string_"harpoon") string_"harpoon" )subscript (identifier_docker_api) identifier_docker_api )attribute )assignment )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_collector) identifier_collector (identifier_configuration) identifier_configuration )attribute (string_"authentication") string_"authentication" )subscript (identifier_login) identifier_login )attribute (argument_list (identifier_docker_api) identifier_docker_api (identifier_image) identifier_image (keyword_argument (identifier_is_pushing) identifier_is_pushing (False) False )keyword_argument (keyword_argument (identifier_global_docker) identifier_global_docker (True) True )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Login to a docker registry with read permissions
(module (function_definition (function_name_get_provider_links) function_name_get_provider_links (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (identifier_bool) identifier_bool (argument_list (subscript (attribute (identifier_self) identifier_self (identifier__my_map) identifier__my_map )attribute (string_'providerLinkIds') string_'providerLinkIds' )subscript )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_IllegalState) identifier_IllegalState )attribute (argument_list (string_'no providerLinkIds') string_'no providerLinkIds' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_mgr) identifier_mgr (call (attribute (identifier_self) identifier_self (identifier__get_provider_manager) identifier__get_provider_manager )attribute (argument_list (string_'RESOURCE') string_'RESOURCE' )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_mgr) identifier_mgr (identifier_supports_resource_lookup) identifier_supports_resource_lookup )attribute (argument_list )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_OperationFailed) identifier_OperationFailed )attribute (argument_list (string_'Resource does not support Resource lookup') string_'Resource does not support Resource lookup' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_lookup_session) identifier_lookup_session (call (attribute (identifier_mgr) identifier_mgr (identifier_get_resource_lookup_session) identifier_get_resource_lookup_session )attribute (argument_list (keyword_argument (identifier_proxy) identifier_proxy (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (string_"_proxy") string_"_proxy" (None) None )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_lookup_session) identifier_lookup_session (identifier_use_federated_bin_view) identifier_use_federated_bin_view )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (attribute (identifier_lookup_session) identifier_lookup_session (identifier_get_resources_by_ids) identifier_get_resources_by_ids )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_provider_link_ids) identifier_get_provider_link_ids )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Gets the ``Resources`` representing the source of this asset in order from the most recent provider to the originating source. return: (osid.resource.ResourceList) - the provider chain raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.*
(module (function_definition (function_name_match_serializers) function_name_match_serializers (parameters (identifier_self) identifier_self (identifier_serializers) identifier_serializers (identifier_default_media_type) identifier_default_media_type )parameters (block (return_statement (boolean_operator (call (attribute (identifier_self) identifier_self (identifier__match_serializers_by_query_arg) identifier__match_serializers_by_query_arg )attribute (argument_list (identifier_serializers) identifier_serializers )argument_list )call (call (attribute (identifier_self) identifier_self (line_continuation_\) line_continuation_\ (identifier__match_serializers_by_accept_headers) identifier__match_serializers_by_accept_headers )attribute (argument_list (identifier_serializers) identifier_serializers (identifier_default_media_type) identifier_default_media_type )argument_list )call )boolean_operator )return_statement )block )function_definition )module
Choose serializer for a given request based on query arg or headers. Checks if query arg `format` (by default) is present and tries to match the serializer based on the arg value, by resolving the mimetype mapped to the arg value. Otherwise, chooses the serializer by retrieving the best quality `Accept` headers and matching its value (mimetype). :param serializers: Dictionary of serializers. :param default_media_type: The default media type. :returns: Best matching serializer based on `format` query arg first, then client `Accept` headers or None if no matching serializer.
(module (function_definition (function_name__get_flux_bounds) function_name__get_flux_bounds (parameters (identifier_self) identifier_self (identifier_r_id) identifier_r_id (identifier_model) identifier_model (identifier_flux_limits) identifier_flux_limits (identifier_equation) identifier_equation )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_r_id) identifier_r_id (identifier_flux_limits) identifier_flux_limits )comparison_operator (comparison_operator (subscript (subscript (identifier_flux_limits) identifier_flux_limits (identifier_r_id) identifier_r_id )subscript (integer_0) integer_0 )subscript (None) None )comparison_operator )boolean_operator (block (if_statement (comparison_operator (attribute (identifier_equation) identifier_equation (identifier_direction) identifier_direction )attribute (attribute (identifier_Direction) identifier_Direction (identifier_Forward) identifier_Forward )attribute )comparison_operator (block (expression_statement (assignment (identifier_lower) identifier_lower (integer_0) integer_0 )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_lower) identifier_lower (unary_operator (attribute (identifier_model) identifier_model (identifier_default_flux_limit) identifier_default_flux_limit )attribute )unary_operator )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (identifier_lower) identifier_lower (subscript (subscript (identifier_flux_limits) identifier_flux_limits (identifier_r_id) identifier_r_id )subscript (integer_0) integer_0 )subscript )assignment )expression_statement )block )else_clause )if_statement (if_statement (boolean_operator (comparison_operator (identifier_r_id) identifier_r_id (identifier_flux_limits) identifier_flux_limits )comparison_operator (comparison_operator (subscript (subscript (identifier_flux_limits) identifier_flux_limits (identifier_r_id) identifier_r_id )subscript (integer_1) integer_1 )subscript (None) None )comparison_operator )boolean_operator (block (if_statement (comparison_operator (attribute (identifier_equation) identifier_equation (identifier_direction) identifier_direction )attribute (attribute (identifier_Direction) identifier_Direction (identifier_Reverse) identifier_Reverse )attribute )comparison_operator (block (expression_statement (assignment (identifier_upper) identifier_upper (integer_0) integer_0 )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_upper) identifier_upper (attribute (identifier_model) identifier_model (identifier_default_flux_limit) identifier_default_flux_limit )attribute )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (identifier_upper) identifier_upper (subscript (subscript (identifier_flux_limits) identifier_flux_limits (identifier_r_id) identifier_r_id )subscript (integer_1) integer_1 )subscript )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (binary_operator (identifier_lower) identifier_lower (integer_1) integer_1 )binary_operator (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_lower) identifier_lower (call (identifier_int) identifier_int (argument_list (identifier_lower) identifier_lower )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (binary_operator (identifier_upper) identifier_upper (integer_1) integer_1 )binary_operator (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_upper) identifier_upper (call (identifier_int) identifier_int (argument_list (identifier_upper) identifier_upper )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (expression_list (call (identifier_text_type) identifier_text_type (argument_list (identifier_lower) identifier_lower )argument_list )call (call (identifier_text_type) identifier_text_type (argument_list (identifier_upper) identifier_upper )argument_list )call )expression_list )return_statement )block )function_definition )module
Read reaction's limits to set up strings for limits in the output file.
(module (function_definition (function_name_canonicalize) function_name_canonicalize (parameters (identifier_parsed_op) identifier_parsed_op )parameters (block (assert_statement (comparison_operator (string_'op') string_'op' (identifier_parsed_op) identifier_parsed_op )comparison_operator )assert_statement (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (subscript (identifier_parsed_op) identifier_parsed_op (string_'op') string_'op' )subscript )argument_list )call (integer_2) integer_2 )comparison_operator )assert_statement (if_statement (comparison_operator (subscript (subscript (identifier_parsed_op) identifier_parsed_op (string_'op') string_'op' )subscript (integer_1) integer_1 )subscript (identifier_TRANSFER_KEEP_DATA) identifier_TRANSFER_KEEP_DATA )comparison_operator (block (expression_statement (assignment (subscript (identifier_parsed_op) identifier_parsed_op (string_'keep_data') string_'keep_data' )subscript (True) True )assignment )expression_statement )block (elif_clause (comparison_operator (subscript (subscript (identifier_parsed_op) identifier_parsed_op (string_'op') string_'op' )subscript (integer_1) integer_1 )subscript (identifier_TRANSFER_REMOVE_DATA) identifier_TRANSFER_REMOVE_DATA )comparison_operator (block (expression_statement (assignment (subscript (identifier_parsed_op) identifier_parsed_op (string_'keep_data') string_'keep_data' )subscript (False) False )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Invalid op '{}'") string_"Invalid op '{}'" (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_parsed_op) identifier_parsed_op (string_'op') string_'op' )subscript )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (identifier_parsed_op) identifier_parsed_op )return_statement )block )function_definition )module
Get the "canonical form" of this operation, putting it into a form where it can be serialized to form a consensus hash. This method is meant to preserve compatibility across blockstackd releases. For NAME_TRANSFER, this means: * add 'keep_data' flag
(module (function_definition (function_name_delete_cookie) function_name_delete_cookie (parameters (identifier_self) identifier_self (identifier_key) identifier_key (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'max_age') string_'max_age' )subscript (unary_operator (integer_1) integer_1 )unary_operator )assignment )expression_statement (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'expires') string_'expires' )subscript (integer_0) integer_0 )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_cookie) identifier_set_cookie )attribute (argument_list (identifier_key) identifier_key (string_'') string_'' (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Delete a cookie. Be sure to use the same `domain` and `path` parameters as used to create the cookie.
(module (function_definition (function_name_compose) function_name_compose (parameters (identifier_self) identifier_self (identifier_sources) identifier_sources (default_parameter (identifier_client) identifier_client (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_client) identifier_client (call (attribute (identifier_self) identifier_self (identifier__require_client) identifier__require_client )attribute (argument_list (identifier_client) identifier_client )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_query_params) identifier_query_params (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_user_project) identifier_user_project )attribute (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_query_params) identifier_query_params (string_"userProject") string_"userProject" )subscript (attribute (identifier_self) identifier_self (identifier_user_project) identifier_user_project )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_request) identifier_request (dictionary (pair (string_"sourceObjects") string_"sourceObjects" (list_comprehension (dictionary (pair (string_"name") string_"name" (attribute (identifier_source) identifier_source (identifier_name) identifier_name )attribute )pair )dictionary (for_in_clause (identifier_source) identifier_source (identifier_sources) identifier_sources )for_in_clause )list_comprehension )pair (pair (string_"destination") string_"destination" (call (attribute (attribute (identifier_self) identifier_self (identifier__properties) identifier__properties )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_api_response) identifier_api_response (call (attribute (attribute (identifier_client) identifier_client (identifier__connection) identifier__connection )attribute (identifier_api_request) identifier_api_request )attribute (argument_list (keyword_argument (identifier_method) identifier_method (string_"POST") string_"POST" )keyword_argument (keyword_argument (identifier_path) identifier_path (binary_operator (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (string_"/compose") string_"/compose" )binary_operator )keyword_argument (keyword_argument (identifier_query_params) identifier_query_params (identifier_query_params) identifier_query_params )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_request) identifier_request )keyword_argument (keyword_argument (identifier__target_object) identifier__target_object (identifier_self) identifier_self )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set_properties) identifier__set_properties )attribute (argument_list (identifier_api_response) identifier_api_response )argument_list )call )expression_statement )block )function_definition )module
Concatenate source blobs into this one. If :attr:`user_project` is set on the bucket, bills the API request to that project. :type sources: list of :class:`Blob` :param sources: blobs whose contents will be composed into this blob. :type client: :class:`~google.cloud.storage.client.Client` or ``NoneType`` :param client: Optional. The client to use. If not passed, falls back to the ``client`` stored on the blob's bucket.
(module (function_definition (function_name_filter_records) function_name_filter_records (parameters (identifier_self) identifier_self (identifier_records) identifier_records )parameters (block (for_statement (identifier_record) identifier_record (identifier_records) identifier_records (block (try_statement (block (expression_statement (assignment (identifier_filtered) identifier_filtered (call (attribute (identifier_self) identifier_self (identifier_filter_record) identifier_filter_record )attribute (argument_list (identifier_record) identifier_record )argument_list )call )assignment )expression_statement (assert_statement (parenthesized_expression (identifier_filtered) identifier_filtered )parenthesized_expression )assert_statement (if_statement (comparison_operator (attribute (identifier_filtered) identifier_filtered (identifier_seq) identifier_seq )attribute (attribute (identifier_record) identifier_record (identifier_seq) identifier_seq )attribute )comparison_operator (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_passed_unchanged) identifier_passed_unchanged )attribute (integer_1) integer_1 )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_passed_changed) identifier_passed_changed )attribute (integer_1) integer_1 )augmented_assignment )expression_statement )block )else_clause )if_statement (expression_statement (yield (identifier_filtered) identifier_filtered )yield )expression_statement )block (except_clause (as_pattern (identifier_FailedFilter) identifier_FailedFilter (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_failed) identifier_failed )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (assignment (identifier_v) identifier_v (attribute (identifier_e) identifier_e (identifier_value) identifier_value )attribute )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_listener) identifier_listener )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_listener) identifier_listener )attribute (argument_list (string_'failed_filter') string_'failed_filter' (identifier_record) identifier_record (keyword_argument (identifier_filter_name) identifier_filter_name (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )keyword_argument (keyword_argument (identifier_value) identifier_value (identifier_v) identifier_v )keyword_argument )argument_list )call )expression_statement )block )if_statement )block )except_clause )try_statement )block )for_statement )block )function_definition )module
Apply the filter to records
(module (function_definition (function_name_fixPoint) function_name_fixPoint (parameters (identifier_self) identifier_self (identifier_plotterPoint) identifier_plotterPoint (identifier_canvasPoint) identifier_canvasPoint )parameters (block (expression_statement (string_'adjust visibleBox.xymin so that canvasPoint is plotted at plotterPoint') string_'adjust visibleBox.xymin so that canvasPoint is plotted at plotterPoint' )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_visibleBox) identifier_visibleBox )attribute (identifier_xmin) identifier_xmin )attribute (binary_operator (attribute (identifier_canvasPoint) identifier_canvasPoint (identifier_x) identifier_x )attribute (call (attribute (identifier_self) identifier_self (identifier_canvasW) identifier_canvasW )attribute (argument_list (binary_operator (attribute (identifier_plotterPoint) identifier_plotterPoint (identifier_x) identifier_x )attribute (attribute (attribute (identifier_self) identifier_self (identifier_plotviewBox) identifier_plotviewBox )attribute (identifier_xmin) identifier_xmin )attribute )binary_operator )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_visibleBox) identifier_visibleBox )attribute (identifier_ymin) identifier_ymin )attribute (binary_operator (attribute (identifier_canvasPoint) identifier_canvasPoint (identifier_y) identifier_y )attribute (call (attribute (identifier_self) identifier_self (identifier_canvasH) identifier_canvasH )attribute (argument_list (binary_operator (attribute (identifier_plotterPoint) identifier_plotterPoint (identifier_y) identifier_y )attribute (attribute (attribute (identifier_self) identifier_self (identifier_plotviewBox) identifier_plotviewBox )attribute (identifier_ymin) identifier_ymin )attribute )binary_operator )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_refresh) identifier_refresh )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
adjust visibleBox.xymin so that canvasPoint is plotted at plotterPoint
(module (function_definition (function_name__skip_frame) function_name__skip_frame (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__get_line) identifier__get_line )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_num_atoms) identifier_num_atoms (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_self) identifier_self (identifier__get_line) identifier__get_line )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_num_atoms) identifier_num_atoms )attribute (None) None )comparison_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_num_atoms) identifier_num_atoms )attribute (identifier_num_atoms) identifier_num_atoms )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"The number of atoms must be the same over the entire file.") string_"The number of atoms must be the same over the entire file." )argument_list )call )raise_statement )block )if_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (binary_operator (identifier_num_atoms) identifier_num_atoms (integer_1) integer_1 )binary_operator )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__get_line) identifier__get_line )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Skip one frame
(module (function_definition (function_name__parameterize_string) function_name__parameterize_string (parameters (identifier_raw) identifier_raw )parameters (block (expression_statement (assignment (identifier_parts) identifier_parts (list )list )assignment )expression_statement (expression_statement (assignment (identifier_s_index) identifier_s_index (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_match) identifier_match (call (attribute (identifier__PARAMETER_PATTERN) identifier__PARAMETER_PATTERN (identifier_finditer) identifier_finditer )attribute (argument_list (identifier_raw) identifier_raw )argument_list )call (block (expression_statement (call (attribute (identifier_parts) identifier_parts (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_raw) identifier_raw (slice (identifier_s_index) identifier_s_index (colon) colon (call (attribute (identifier_match) identifier_match (identifier_start) identifier_start )attribute (argument_list )argument_list )call )slice )subscript )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_parts) identifier_parts (identifier_append) identifier_append )attribute (argument_list (dictionary (pair (string_u"Ref") string_u"Ref" (call (attribute (identifier_match) identifier_match (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )pair )dictionary )argument_list )call )expression_statement (expression_statement (assignment (identifier_s_index) identifier_s_index (call (attribute (identifier_match) identifier_match (identifier_end) identifier_end )attribute (argument_list )argument_list )call )assignment )expression_statement )block )for_statement (if_statement (not_operator (identifier_parts) identifier_parts )not_operator (block (return_statement (call (identifier_GenericHelperFn) identifier_GenericHelperFn (argument_list (identifier_raw) identifier_raw )argument_list )call )return_statement )block )if_statement (expression_statement (call (attribute (identifier_parts) identifier_parts (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_raw) identifier_raw (slice (identifier_s_index) identifier_s_index (colon) colon )slice )subscript )argument_list )call )expression_statement (return_statement (call (identifier_GenericHelperFn) identifier_GenericHelperFn (argument_list (dictionary (pair (string_u"Fn::Join") string_u"Fn::Join" (list (string_u"") string_u"" (identifier_parts) identifier_parts )list )pair )dictionary )argument_list )call )return_statement )block )function_definition )module
Substitute placeholders in a string using CloudFormation references Args: raw (`str`): String to be processed. Byte strings are not supported; decode them before passing them to this function. Returns: `str` | :class:`troposphere.GenericHelperFn`: An expression with placeholders from the input replaced, suitable to be passed to Troposphere to be included in CloudFormation template. This will be the input string without modification if no substitutions are found, and a composition of CloudFormation calls otherwise.
(module (function_definition (function_name_getresponse) function_name_getresponse (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier___response) identifier___response )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier___response) identifier___response )attribute (identifier_isclosed) identifier_isclosed )attribute (argument_list )argument_list )call )boolean_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___response) identifier___response )attribute (None) None )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier___state) identifier___state )attribute (identifier__CS_REQ_SENT) identifier__CS_REQ_SENT )comparison_operator (attribute (identifier_self) identifier_self (identifier___response) identifier___response )attribute )boolean_operator (block (raise_statement (call (identifier_ResponseNotReady) identifier_ResponseNotReady (argument_list (attribute (identifier_self) identifier_self (identifier___state) identifier___state )attribute )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_debuglevel) identifier_debuglevel )attribute (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier_response_class) identifier_response_class )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_sock) identifier_sock )attribute (attribute (identifier_self) identifier_self (identifier_debuglevel) identifier_debuglevel )attribute (keyword_argument (identifier_method) identifier_method (attribute (identifier_self) identifier_self (identifier__method) identifier__method )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier_response_class) identifier_response_class )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_sock) identifier_sock )attribute (keyword_argument (identifier_method) identifier_method (attribute (identifier_self) identifier_self (identifier__method) identifier__method )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_response) identifier_response (identifier_begin) identifier_begin )attribute (argument_list )argument_list )call )expression_statement (assert_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_will_close) identifier_will_close )attribute (identifier__UNKNOWN) identifier__UNKNOWN )comparison_operator )assert_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___state) identifier___state )attribute (identifier__CS_IDLE) identifier__CS_IDLE )assignment )expression_statement (if_statement (attribute (identifier_response) identifier_response (identifier_will_close) identifier_will_close )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___response) identifier___response )attribute (identifier_response) identifier_response )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_response) identifier_response )return_statement )block )function_definition )module
Get the response from the server. If the HTTPConnection is in the correct state, returns an instance of HTTPResponse or of whatever object is returned by class the response_class variable. If a request has not been sent or if a previous response has not be handled, ResponseNotReady is raised. If the HTTP response indicates that the connection should be closed, then it will be closed before the response is returned. When the connection is closed, the underlying socket is closed.
(module (function_definition (function_name_default_channel_ops) function_name_default_channel_ops (parameters (identifier_nqubits) identifier_nqubits )parameters (block (for_statement (identifier_gates) identifier_gates (call (identifier_cartesian_product) identifier_cartesian_product (argument_list (call (attribute (identifier_TOMOGRAPHY_GATES) identifier_TOMOGRAPHY_GATES (identifier_values) identifier_values )attribute (argument_list )argument_list )call (keyword_argument (identifier_repeat) identifier_repeat (identifier_nqubits) identifier_nqubits )keyword_argument )argument_list )call (block (expression_statement (yield (call (attribute (identifier_qt) identifier_qt (identifier_tensor) identifier_tensor )attribute (argument_list (list_splat (identifier_gates) identifier_gates )list_splat )argument_list )call )yield )expression_statement )block )for_statement )block )function_definition )module
Generate the tomographic pre- and post-rotations of any number of qubits as qutip operators. :param int nqubits: The number of qubits to perform tomography on. :return: Qutip object corresponding to the tomographic rotation. :rtype: Qobj
(module (function_definition (function_name_deserialize_basic) function_name_deserialize_basic (parameters (identifier_self) identifier_self (identifier_attr) identifier_attr (identifier_data_type) identifier_data_type )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_attr) identifier_attr (attribute (identifier_ET) identifier_ET (identifier_Element) identifier_Element )attribute )argument_list )call (block (expression_statement (assignment (identifier_attr) identifier_attr (attribute (identifier_attr) identifier_attr (identifier_text) identifier_text )attribute )assignment )expression_statement (if_statement (not_operator (identifier_attr) identifier_attr )not_operator (block (if_statement (comparison_operator (identifier_data_type) identifier_data_type (string_"str") string_"str" )comparison_operator (block (return_statement (string_'') string_'' )return_statement )block (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement )block )if_statement )block )if_statement (if_statement (comparison_operator (identifier_data_type) identifier_data_type (string_'bool') string_'bool' )comparison_operator (block (if_statement (comparison_operator (identifier_attr) identifier_attr (list (True) True (False) False (integer_1) integer_1 (integer_0) integer_0 )list )comparison_operator (block (return_statement (call (identifier_bool) identifier_bool (argument_list (identifier_attr) identifier_attr )argument_list )call )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_attr) identifier_attr (identifier_basestring) identifier_basestring )argument_list )call (block (if_statement (comparison_operator (call (attribute (identifier_attr) identifier_attr (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (list (string_'true') string_'true' (string_'1') string_'1' )list )comparison_operator (block (return_statement (True) True )return_statement )block (elif_clause (comparison_operator (call (attribute (identifier_attr) identifier_attr (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (list (string_'false') string_'false' (string_'0') string_'0' )list )comparison_operator (block (return_statement (False) False )return_statement )block )elif_clause )if_statement )block )elif_clause )if_statement (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (string_"Invalid boolean value: {}") string_"Invalid boolean value: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_attr) identifier_attr )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_data_type) identifier_data_type (string_'str') string_'str' )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_deserialize_unicode) identifier_deserialize_unicode )attribute (argument_list (identifier_attr) identifier_attr )argument_list )call )return_statement )block )if_statement (return_statement (call (call (identifier_eval) identifier_eval (argument_list (identifier_data_type) identifier_data_type )argument_list )call (argument_list (identifier_attr) identifier_attr )argument_list )call )return_statement )block )function_definition )module
Deserialize baisc builtin data type from string. Will attempt to convert to str, int, float and bool. This function will also accept '1', '0', 'true' and 'false' as valid bool values. :param str attr: response string to be deserialized. :param str data_type: deserialization data type. :rtype: str, int, float or bool :raises: TypeError if string format is not valid.
(module (function_definition (function_name_unwrap) function_name_unwrap (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_algorithm) identifier_algorithm )attribute (string_'rsa') string_'rsa' )comparison_operator (block (return_statement (attribute (subscript (identifier_self) identifier_self (string_'private_key') string_'private_key' )subscript (identifier_parsed) identifier_parsed )attribute )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_algorithm) identifier_algorithm )attribute (string_'dsa') string_'dsa' )comparison_operator (block (expression_statement (assignment (identifier_params) identifier_params (subscript (subscript (identifier_self) identifier_self (string_'private_key_algorithm') string_'private_key_algorithm' )subscript (string_'parameters') string_'parameters' )subscript )assignment )expression_statement (return_statement (call (identifier_DSAPrivateKey) identifier_DSAPrivateKey (argument_list (dictionary (pair (string_'version') string_'version' (integer_0) integer_0 )pair (pair (string_'p') string_'p' (subscript (identifier_params) identifier_params (string_'p') string_'p' )subscript )pair (pair (string_'q') string_'q' (subscript (identifier_params) identifier_params (string_'q') string_'q' )subscript )pair (pair (string_'g') string_'g' (subscript (identifier_params) identifier_params (string_'g') string_'g' )subscript )pair (pair (string_'public_key') string_'public_key' (attribute (identifier_self) identifier_self (identifier_public_key) identifier_public_key )attribute )pair (pair (string_'private_key') string_'private_key' (attribute (subscript (identifier_self) identifier_self (string_'private_key') string_'private_key' )subscript (identifier_parsed) identifier_parsed )attribute )pair )dictionary )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_algorithm) identifier_algorithm )attribute (string_'ec') string_'ec' )comparison_operator (block (expression_statement (assignment (identifier_output) identifier_output (attribute (subscript (identifier_self) identifier_self (string_'private_key') string_'private_key' )subscript (identifier_parsed) identifier_parsed )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_output) identifier_output (string_'parameters') string_'parameters' )subscript (subscript (subscript (identifier_self) identifier_self (string_'private_key_algorithm') string_'private_key_algorithm' )subscript (string_'parameters') string_'parameters' )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_output) identifier_output (string_'public_key') string_'public_key' )subscript (attribute (identifier_self) identifier_self (identifier_public_key) identifier_public_key )attribute )assignment )expression_statement (return_statement (identifier_output) identifier_output )return_statement )block )if_statement )block )function_definition )module
Unwraps the private key into an RSAPrivateKey, DSAPrivateKey or ECPrivateKey object :return: An RSAPrivateKey, DSAPrivateKey or ECPrivateKey object
(module (function_definition (function_name_GetAPFSVolumeByPathSpec) function_name_GetAPFSVolumeByPathSpec (parameters (identifier_self) identifier_self (identifier_path_spec) identifier_path_spec )parameters (block (expression_statement (assignment (identifier_volume_index) identifier_volume_index (call (attribute (identifier_apfs_helper) identifier_apfs_helper (identifier_APFSContainerPathSpecGetVolumeIndex) identifier_APFSContainerPathSpecGetVolumeIndex )attribute (argument_list (identifier_path_spec) identifier_path_spec )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_volume_index) identifier_volume_index (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__fsapfs_container) identifier__fsapfs_container )attribute (identifier_get_volume) identifier_get_volume )attribute (argument_list (identifier_volume_index) identifier_volume_index )argument_list )call )return_statement )block )function_definition )module
Retrieves an APFS volume for a path specification. Args: path_spec (PathSpec): path specification. Returns: pyfsapfs.volume: an APFS volume or None if not available.
(module (function_definition (function_name_selection_r) function_name_selection_r (parameters (identifier_acquisition_function) identifier_acquisition_function (identifier_samples_y_aggregation) identifier_samples_y_aggregation (identifier_x_bounds) identifier_x_bounds (identifier_x_types) identifier_x_types (identifier_regressor_gp) identifier_regressor_gp (default_parameter (identifier_num_starting_points) identifier_num_starting_points (integer_100) integer_100 )default_parameter (default_parameter (identifier_minimize_constraints_fun) identifier_minimize_constraints_fun (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_minimize_starting_points) identifier_minimize_starting_points (list_comprehension (call (attribute (identifier_lib_data) identifier_lib_data (identifier_rand) identifier_rand )attribute (argument_list (identifier_x_bounds) identifier_x_bounds (identifier_x_types) identifier_x_types )argument_list )call (line_continuation_\) line_continuation_\ (for_in_clause (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (identifier_num_starting_points) identifier_num_starting_points )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_outputs) identifier_outputs (call (identifier_selection) identifier_selection (argument_list (identifier_acquisition_function) identifier_acquisition_function (identifier_samples_y_aggregation) identifier_samples_y_aggregation (identifier_x_bounds) identifier_x_bounds (identifier_x_types) identifier_x_types (identifier_regressor_gp) identifier_regressor_gp (identifier_minimize_starting_points) identifier_minimize_starting_points (keyword_argument (identifier_minimize_constraints_fun) identifier_minimize_constraints_fun (identifier_minimize_constraints_fun) identifier_minimize_constraints_fun )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_outputs) identifier_outputs )return_statement )block )function_definition )module
Selecte R value
(module (function_definition (function_name__get_vlanid) function_name__get_vlanid (parameters (identifier_self) identifier_self (identifier_context) identifier_context )parameters (block (expression_statement (assignment (identifier_segment) identifier_segment (attribute (identifier_context) identifier_context (identifier_bottom_bound_segment) identifier_bottom_bound_segment )attribute )assignment )expression_statement (if_statement (boolean_operator (identifier_segment) identifier_segment (call (attribute (identifier_self) identifier_self (identifier_check_segment) identifier_check_segment )attribute (argument_list (identifier_segment) identifier_segment )argument_list )call )boolean_operator (block (return_statement (call (attribute (identifier_segment) identifier_segment (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_api) identifier_api (identifier_SEGMENTATION_ID) identifier_SEGMENTATION_ID )attribute )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Returns vlan_id associated with a bound VLAN segment.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (default_parameter (identifier_id) identifier_id (None) None )default_parameter (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (if_statement (not_operator (binary_operator (parenthesized_expression (comparison_operator (identifier_id) identifier_id (None) None )comparison_operator )parenthesized_expression (parenthesized_expression (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator )parenthesized_expression )binary_operator )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Either id or name must be set (but not both!)") string_"Either id or name must be set (but not both!)" )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_id) identifier_id (None) None )comparison_operator (block (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_TaskQueueManager) identifier_TaskQueueManager (identifier_self) identifier_self )argument_list )call (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_id) identifier_id (identifier_id) identifier_id )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (subscript (call (attribute (identifier_self) identifier_self (identifier_list) identifier_list )attribute (argument_list (keyword_argument (identifier_filters) identifier_filters (dictionary (pair (string_"name") string_"name" (identifier_name) identifier_name )pair )dictionary )keyword_argument )argument_list )call (integer_0) integer_0 )subscript )return_statement )block )function_definition )module
Get a task queue. Either the id xor the name of the task type must be specified. Args: id (int, optional): The id of the task type to get. name (str, optional): The name of the task type to get. Returns: :class:`saltant.models.task_queue.TaskQueue`: A task queue model instance representing the task queue requested. Raises: ValueError: Neither id nor name were set *or* both id and name were set.
(module (function_definition (function_name___walk_rec) function_name___walk_rec (parameters (identifier_self) identifier_self (identifier_top) identifier_top (identifier_rec) identifier_rec )parameters (block (if_statement (boolean_operator (boolean_operator (not_operator (identifier_rec) identifier_rec )not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_islink) identifier_islink )attribute (argument_list (identifier_top) identifier_top )argument_list )call )boolean_operator (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_top) identifier_top )argument_list )call )not_operator )boolean_operator (block (expression_statement (yield (identifier_top) identifier_top )yield )expression_statement )block (else_clause (block (for_statement (pattern_list (identifier_root) identifier_root (identifier_dirs) identifier_dirs (identifier_files) identifier_files )pattern_list (call (attribute (identifier_os) identifier_os (identifier_walk) identifier_walk )attribute (argument_list (identifier_top) identifier_top )argument_list )call (block (expression_statement (yield (identifier_root) identifier_root )yield )expression_statement )block )for_statement )block )else_clause )if_statement )block )function_definition )module
Yields each subdirectories of top, doesn't follow symlinks. If rec is false, only yield top. @param top: root directory. @type top: string @param rec: recursive flag. @type rec: bool @return: path of one subdirectory. @rtype: string
(module (function_definition (function_name_intSize) function_name_intSize (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj )parameters (block (if_statement (comparison_operator (identifier_obj) identifier_obj (integer_0) integer_0 )comparison_operator (block (return_statement (integer_8) integer_8 )return_statement )block (elif_clause (comparison_operator (identifier_obj) identifier_obj (integer_0xFF) integer_0xFF )comparison_operator (block (return_statement (integer_1) integer_1 )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_obj) identifier_obj (integer_0xFFFF) integer_0xFFFF )comparison_operator (block (return_statement (integer_2) integer_2 )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_obj) identifier_obj (integer_0xFFFFFFFF) integer_0xFFFFFFFF )comparison_operator (block (return_statement (integer_4) integer_4 )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_obj) identifier_obj (integer_0x7FFFFFFFFFFFFFFF) integer_0x7FFFFFFFFFFFFFFF )comparison_operator (block (return_statement (integer_8) integer_8 )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_obj) identifier_obj (integer_0xffffffffffffffff) integer_0xffffffffffffffff )comparison_operator (block (return_statement (integer_16) integer_16 )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_InvalidPlistException) identifier_InvalidPlistException (argument_list (string_"Core Foundation can't handle integers with size greater than 8 bytes.") string_"Core Foundation can't handle integers with size greater than 8 bytes." )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Returns the number of bytes necessary to store the given integer.
(module (function_definition (function_name__final_frame_length) function_name__final_frame_length (parameters (identifier_header) identifier_header (identifier_final_frame_bytes) identifier_final_frame_bytes )parameters (block (expression_statement (assignment (identifier_final_frame_length) identifier_final_frame_length (integer_4) integer_4 )assignment )expression_statement (expression_statement (augmented_assignment (identifier_final_frame_length) identifier_final_frame_length (integer_4) integer_4 )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_final_frame_length) identifier_final_frame_length (attribute (attribute (identifier_header) identifier_header (identifier_algorithm) identifier_algorithm )attribute (identifier_iv_len) identifier_iv_len )attribute )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_final_frame_length) identifier_final_frame_length (integer_4) integer_4 )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_final_frame_length) identifier_final_frame_length (identifier_final_frame_bytes) identifier_final_frame_bytes )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_final_frame_length) identifier_final_frame_length (attribute (attribute (identifier_header) identifier_header (identifier_algorithm) identifier_algorithm )attribute (identifier_auth_len) identifier_auth_len )attribute )augmented_assignment )expression_statement (return_statement (identifier_final_frame_length) identifier_final_frame_length )return_statement )block )function_definition )module
Calculates the length of a final ciphertext frame, given a complete header and the number of bytes of ciphertext in the final frame. :param header: Complete message header object :type header: aws_encryption_sdk.structures.MessageHeader :param int final_frame_bytes: Bytes of ciphertext in the final frame :rtype: int