sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_sync) function_name_sync (parameters (identifier_self) identifier_self (default_parameter (identifier_force) identifier_force (None) None )default_parameter )parameters (block (try_statement (block (if_statement (identifier_force) identifier_force (block (expression_statement (assignment (identifier_sd) identifier_sd (identifier_force) identifier_force )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_sd) identifier_sd (call (attribute (identifier_self) identifier_self (identifier_sync_dir) identifier_sync_dir )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_sd) identifier_sd (attribute (attribute (identifier_self) identifier_self (identifier_SYNC_DIR) identifier_SYNC_DIR )attribute (identifier_FILE_TO_RECORD) identifier_FILE_TO_RECORD )attribute )comparison_operator (block (if_statement (boolean_operator (identifier_force) identifier_force (not_operator (call (attribute (identifier_self) identifier_self (identifier_exists) identifier_exists )attribute (argument_list )argument_list )call )not_operator )boolean_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_fs_to_record) identifier_fs_to_record )attribute (argument_list )argument_list )call )expression_statement )block (elif_clause (comparison_operator (identifier_sd) identifier_sd (attribute (attribute (identifier_self) identifier_self (identifier_SYNC_DIR) identifier_SYNC_DIR )attribute (identifier_RECORD_TO_FILE) identifier_RECORD_TO_FILE )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_record_to_fs) identifier_record_to_fs )attribute (argument_list )argument_list )call )expression_statement )block )elif_clause (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement (expression_statement (assignment (subscript (subscript (attribute (attribute (attribute (identifier_self) identifier_self (identifier__dataset) identifier__dataset )attribute (identifier_config) identifier_config )attribute (identifier_sync) identifier_sync )attribute (attribute (identifier_self) identifier_self (identifier_file_const) identifier_file_const )attribute )subscript (identifier_sd) identifier_sd )subscript (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (identifier_sd) identifier_sd )return_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__bundle) identifier__bundle )attribute (identifier_rollback) identifier_rollback )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__bundle) identifier__bundle )attribute (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_"Failed to sync '{}': {}") string_"Failed to sync '{}': {}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_file_const) identifier_file_const )attribute (identifier_e) identifier_e )argument_list )call )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement )block )function_definition )module
Synchronize between the file in the file system and the field record
(module (function_definition (function_name_user_remove) function_name_user_remove (parameters (identifier_name) identifier_name (default_parameter (identifier_user) identifier_user (None) None )default_parameter (default_parameter (identifier_password) identifier_password (None) None )default_parameter (default_parameter (identifier_host) identifier_host (None) None )default_parameter (default_parameter (identifier_port) identifier_port (None) None )default_parameter (default_parameter (identifier_database) identifier_database (string_'admin') string_'admin' )default_parameter (default_parameter (identifier_authdb) identifier_authdb (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_conn) identifier_conn (call (identifier__connect) identifier__connect (argument_list (identifier_user) identifier_user (identifier_password) identifier_password (identifier_host) identifier_host (identifier_port) identifier_port )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_conn) identifier_conn )not_operator (block (return_statement (string_'Failed to connect to mongo database') string_'Failed to connect to mongo database' )return_statement )block )if_statement (try_statement (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'Removing user %s') string_'Removing user %s' (identifier_name) identifier_name )argument_list )call )expression_statement (expression_statement (assignment (identifier_mdb) identifier_mdb (call (attribute (attribute (identifier_pymongo) identifier_pymongo (identifier_database) identifier_database )attribute (identifier_Database) identifier_Database )attribute (argument_list (identifier_conn) identifier_conn (identifier_database) identifier_database )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_mdb) identifier_mdb (identifier_remove_user) identifier_remove_user )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (attribute (identifier_pymongo) identifier_pymongo (identifier_errors) identifier_errors )attribute (identifier_PyMongoError) identifier_PyMongoError )attribute (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (string_'Creating database %s failed with error: %s') string_'Creating database %s failed with error: %s' (identifier_name) identifier_name (identifier_err) identifier_err )argument_list )call )expression_statement (return_statement (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_err) identifier_err )argument_list )call )return_statement )block )except_clause )try_statement (return_statement (True) True )return_statement )block )function_definition )module
Remove a MongoDB user CLI Example: .. code-block:: bash salt '*' mongodb.user_remove <name> <user> <password> <host> <port> <database>
(module (function_definition (function_name_create_rule) function_name_create_rule (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (identifier_BlockRule) identifier_BlockRule (argument_list (attribute (identifier_self) identifier_self (identifier_networkapi_url) identifier_networkapi_url )attribute (attribute (identifier_self) identifier_self (identifier_user) identifier_user )attribute (attribute (identifier_self) identifier_self (identifier_password) identifier_password )attribute (attribute (identifier_self) identifier_self (identifier_user_ldap) identifier_user_ldap )attribute )argument_list )call )return_statement )block )function_definition )module
Get an instance of block rule services facade.
(module (function_definition (function_name_del_current_vrf) function_name_del_current_vrf (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_vrf_id) identifier_vrf_id (call (identifier_int) identifier_int (argument_list (subscript (attribute (identifier_request) identifier_request (identifier_json) identifier_json )attribute (string_'vrf_id') string_'vrf_id' )subscript )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_vrf_id) identifier_vrf_id (subscript (identifier_session) identifier_session (string_'current_vrfs') string_'current_vrfs' )subscript )comparison_operator (block (delete_statement (subscript (subscript (identifier_session) identifier_session (string_'current_vrfs') string_'current_vrfs' )subscript (identifier_vrf_id) identifier_vrf_id )subscript )delete_statement (expression_statement (call (attribute (identifier_session) identifier_session (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (return_statement (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (call (attribute (identifier_session) identifier_session (identifier_get) identifier_get )attribute (argument_list (string_'current_vrfs') string_'current_vrfs' (dictionary )dictionary )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Remove VRF to filter list session variable
(module (function_definition (function_name_update_score) function_name_update_score (parameters (identifier_self) identifier_self (identifier_node) identifier_node (identifier_addToScore) identifier_addToScore )parameters (block (expression_statement (assignment (identifier_current_score) identifier_current_score (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_score_string) identifier_score_string (call (attribute (attribute (identifier_self) identifier_self (identifier_parser) identifier_parser )attribute (identifier_getAttribute) identifier_getAttribute )attribute (argument_list (identifier_node) identifier_node (string_'gravityScore') string_'gravityScore' )argument_list )call )assignment )expression_statement (if_statement (identifier_score_string) identifier_score_string (block (expression_statement (assignment (identifier_current_score) identifier_current_score (call (identifier_int) identifier_int (argument_list (identifier_score_string) identifier_score_string )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_new_score) identifier_new_score (binary_operator (identifier_current_score) identifier_current_score (identifier_addToScore) identifier_addToScore )binary_operator )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_parser) identifier_parser )attribute (identifier_setAttribute) identifier_setAttribute )attribute (argument_list (identifier_node) identifier_node (string_"gravityScore") string_"gravityScore" (call (identifier_str) identifier_str (argument_list (identifier_new_score) identifier_new_score )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
\ adds a score to the gravityScore Attribute we put on divs we'll get the current score then add the score we're passing in to the current
(module (function_definition (function_name_get_long_description) function_name_get_long_description (parameters )parameters (block (import_statement (dotted_name (identifier_codecs) identifier_codecs )dotted_name )import_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_codecs) identifier_codecs (identifier_open) identifier_open )attribute (argument_list (string_'README.rst') string_'README.rst' (keyword_argument (identifier_encoding) identifier_encoding (string_'UTF-8') string_'UTF-8' )keyword_argument )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_readme) identifier_readme (list_comprehension (identifier_line) identifier_line (for_in_clause (identifier_line) identifier_line (identifier_f) identifier_f )for_in_clause (if_clause (not_operator (call (attribute (identifier_line) identifier_line (identifier_startswith) identifier_startswith )attribute (argument_list (string_'.. contents::') string_'.. contents::' )argument_list )call )not_operator )if_clause )list_comprehension )assignment )expression_statement (return_statement (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (identifier_readme) identifier_readme )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Strip the content index from the long description.
(module (function_definition (function_name_hashing_type) function_name_hashing_type (parameters (identifier_self) identifier_self (default_parameter (identifier_cluster) identifier_cluster (string_'main') string_'main' )default_parameter )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_has_section) identifier_has_section )attribute (argument_list (identifier_cluster) identifier_cluster )argument_list )call )not_operator (block (raise_statement (call (identifier_SystemExit) identifier_SystemExit (argument_list (binary_operator (string_"Cluster '%s' not defined in %s") string_"Cluster '%s' not defined in %s" (tuple (identifier_cluster) identifier_cluster (attribute (identifier_self) identifier_self (identifier_config_file) identifier_config_file )attribute )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_hashing_type) identifier_hashing_type (string_'carbon_ch') string_'carbon_ch' )assignment )expression_statement (try_statement (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_cluster) identifier_cluster (string_'hashing_type') string_'hashing_type' )argument_list )call )return_statement )block (except_clause (identifier_NoOptionError) identifier_NoOptionError (block (return_statement (identifier_hashing_type) identifier_hashing_type )return_statement )block )except_clause )try_statement )block )function_definition )module
Hashing type of cluster.
(module (function_definition (function_name_import_symbol) function_name_import_symbol (parameters (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_path) identifier_path (None) None )default_parameter (default_parameter (identifier_typename) identifier_typename (None) None )default_parameter (default_parameter (identifier_base_path) identifier_base_path (None) None )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_symbol) identifier_symbol )pattern_list (call (identifier__import) identifier__import (argument_list (boolean_operator (identifier_name) identifier_name (identifier_typename) identifier_typename )boolean_operator (boolean_operator (identifier_path) identifier_path (identifier_base_path) identifier_base_path )boolean_operator )argument_list )call )assignment )expression_statement (return_statement (identifier_symbol) identifier_symbol )return_statement )block )function_definition )module
Import a module, or a typename within a module from its name. Arguments: name: An absolute or relative (starts with a .) Python path path: If name is relative, path is prepended to it. base_path: (DEPRECATED) Same as path typename: (DEPRECATED) Same as path
(module (function_definition (function_name_execute_sql) function_name_execute_sql (parameters (identifier_self) identifier_self (identifier_sql) identifier_sql )parameters (block (expression_statement (assignment (identifier_cursor) identifier_cursor (call (attribute (identifier_self) identifier_self (identifier_get_cursor) identifier_get_cursor )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_execute) identifier_execute )attribute (argument_list (identifier_sql) identifier_sql )argument_list )call )expression_statement (return_statement (identifier_cursor) identifier_cursor )return_statement )block )function_definition )module
Executes SQL and returns cursor for it
(module (function_definition (function_name_facets_boundary) function_name_facets_boundary (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_edges) identifier_edges (call (attribute (attribute (identifier_self) identifier_self (identifier_edges_sorted) identifier_edges_sorted )attribute (identifier_reshape) identifier_reshape )attribute (argument_list (tuple (unary_operator (integer_1) integer_1 )unary_operator (integer_6) integer_6 )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_edges_facet) identifier_edges_facet (list_comprehension (call (attribute (subscript (identifier_edges) identifier_edges (identifier_i) identifier_i )subscript (identifier_reshape) identifier_reshape )attribute (argument_list (tuple (unary_operator (integer_1) integer_1 )unary_operator (integer_2) integer_2 )tuple )argument_list )call (for_in_clause (identifier_i) identifier_i (attribute (identifier_self) identifier_self (identifier_facets) identifier_facets )attribute )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_edges_boundary) identifier_edges_boundary (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (list_comprehension (subscript (identifier_i) identifier_i (call (attribute (identifier_grouping) identifier_grouping (identifier_group_rows) identifier_group_rows )attribute (argument_list (identifier_i) identifier_i (keyword_argument (identifier_require_count) identifier_require_count (integer_1) integer_1 )keyword_argument )argument_list )call )subscript (for_in_clause (identifier_i) identifier_i (identifier_edges_facet) identifier_edges_facet )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (return_statement (identifier_edges_boundary) identifier_edges_boundary )return_statement )block )function_definition )module
Return the edges which represent the boundary of each facet Returns --------- edges_boundary : sequence of (n, 2) int Indices of self.vertices
(module (function_definition (function_name_smartfields_get_field_status) function_name_smartfields_get_field_status (parameters (identifier_self) identifier_self (identifier_field_name) identifier_field_name )parameters (block (expression_statement (assignment (identifier_manager) identifier_manager (call (attribute (attribute (identifier_self) identifier_self (identifier__smartfields_managers) identifier__smartfields_managers )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_field_name) identifier_field_name (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_manager) identifier_manager (None) None )comparison_operator (block (return_statement (call (attribute (identifier_manager) identifier_manager (identifier_get_status) identifier_get_status )attribute (argument_list (identifier_self) identifier_self )argument_list )call )return_statement )block )if_statement (return_statement (dictionary (pair (string_'state') string_'state' (string_'ready') string_'ready' )pair )dictionary )return_statement )block )function_definition )module
A way to find out a status of a filed.
(module (function_definition (function_name_create_connection) function_name_create_connection (parameters (identifier_cls) identifier_cls (identifier_address) identifier_address (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter (default_parameter (identifier_source_address) identifier_source_address (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_sock) identifier_sock (call (attribute (identifier_socket) identifier_socket (identifier_create_connection) identifier_create_connection )attribute (argument_list (identifier_address) identifier_address (identifier_timeout) identifier_timeout (identifier_source_address) identifier_source_address )argument_list )call )assignment )expression_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (identifier_sock) identifier_sock )argument_list )call )return_statement )block )function_definition )module
Create a SlipSocket connection. This convenience method creates a connection to the the specified address using the :func:`socket.create_connection` function. The socket that is returned from that call is automatically wrapped in a :class:`SlipSocket` object. .. note:: The :meth:`create_connection` method does not magically turn the socket at the remote address into a SlipSocket. For the connection to work properly, the remote socket must already have been configured to use the SLIP protocol.
(module (function_definition (function_name__reverse_convert) function_name__reverse_convert (parameters (identifier_x) identifier_x (identifier_factor1) identifier_factor1 (identifier_factor2) identifier_factor2 )parameters (block (return_statement (binary_operator (binary_operator (identifier_x) identifier_x (identifier_factor1) identifier_factor1 )binary_operator (parenthesized_expression (binary_operator (binary_operator (parenthesized_expression (binary_operator (integer_1) integer_1 (identifier_x) identifier_x )binary_operator )parenthesized_expression (identifier_factor2) identifier_factor2 )binary_operator (binary_operator (identifier_x) identifier_x (identifier_factor1) identifier_factor1 )binary_operator )binary_operator )parenthesized_expression )binary_operator )return_statement )block )function_definition )module
Converts mixing ratio x in c1 - c2 tie line to that in comp1 - comp2 tie line. Args: x (float): Mixing ratio x in c1 - c2 tie line, a float between 0 and 1. factor1 (float): Compositional ratio between composition c1 and processed composition comp1. E.g., factor for Composition('SiO2') and Composition('O') is 2. factor2 (float): Compositional ratio between composition c2 and processed composition comp2. Returns: Mixing ratio in comp1 - comp2 tie line, a float between 0 and 1.
(module (function_definition (function_name_do_placeholder) function_name_do_placeholder (parameters (identifier_parser) identifier_parser (identifier_token) identifier_token )parameters (block (expression_statement (assignment (pattern_list (identifier_name) identifier_name (identifier_params) identifier_params )pattern_list (call (identifier_parse_placeholder) identifier_parse_placeholder (argument_list (identifier_parser) identifier_parser (identifier_token) identifier_token )argument_list )call )assignment )expression_statement (return_statement (call (identifier_PlaceholderNode) identifier_PlaceholderNode (argument_list (identifier_name) identifier_name (dictionary_splat (identifier_params) identifier_params )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Method that parse the placeholder template tag. Syntax:: {% placeholder <name> [on <page>] [with <widget>] \ [parsed] [as <varname>] %} Example usage:: {% placeholder about %} {% placeholder body with TextArea as body_text %} {% placeholder welcome with TextArea parsed as welcome_text %} {% placeholder teaser on next_page with TextArea parsed %}
(module (function_definition (function_name_export) function_name_export (parameters (identifier_datastore_key) identifier_datastore_key (default_parameter (identifier_calc_id) identifier_calc_id (unary_operator (integer_1) integer_1 )unary_operator )default_parameter (default_parameter (identifier_exports) identifier_exports (string_'csv') string_'csv' )default_parameter (default_parameter (identifier_export_dir) identifier_export_dir (string_'.') string_'.' )default_parameter )parameters (block (expression_statement (assignment (identifier_dstore) identifier_dstore (call (attribute (identifier_util) identifier_util (identifier_read) identifier_read )attribute (argument_list (identifier_calc_id) identifier_calc_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_parent_id) identifier_parent_id (attribute (subscript (identifier_dstore) identifier_dstore (string_'oqparam') string_'oqparam' )subscript (identifier_hazard_calculation_id) identifier_hazard_calculation_id )attribute )assignment )expression_statement (if_statement (identifier_parent_id) identifier_parent_id (block (expression_statement (assignment (attribute (identifier_dstore) identifier_dstore (identifier_parent) identifier_parent )attribute (call (attribute (identifier_util) identifier_util (identifier_read) identifier_read )attribute (argument_list (identifier_parent_id) identifier_parent_id )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_dstore) identifier_dstore (identifier_export_dir) identifier_export_dir )attribute (identifier_export_dir) identifier_export_dir )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_performance) identifier_performance (identifier_Monitor) identifier_Monitor )attribute (argument_list (string_'export') string_'export' (keyword_argument (identifier_measuremem) identifier_measuremem (True) True )keyword_argument )argument_list )call (as_pattern_target (identifier_mon) identifier_mon )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_fmt) identifier_fmt (call (attribute (identifier_exports) identifier_exports (identifier_split) identifier_split )attribute (argument_list (string_',') string_',' )argument_list )call (block (expression_statement (assignment (identifier_fnames) identifier_fnames (call (identifier_export_) identifier_export_ (argument_list (tuple (identifier_datastore_key) identifier_datastore_key (identifier_fmt) identifier_fmt )tuple (identifier_dstore) identifier_dstore )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_nbytes) identifier_nbytes (call (identifier_sum) identifier_sum (generator_expression (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_getsize) identifier_getsize )attribute (argument_list (identifier_f) identifier_f )argument_list )call (for_in_clause (identifier_f) identifier_f (identifier_fnames) identifier_fnames )for_in_clause )generator_expression )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_'Exported %s in %s') string_'Exported %s in %s' (tuple (call (attribute (identifier_general) identifier_general (identifier_humansize) identifier_humansize )attribute (argument_list (identifier_nbytes) identifier_nbytes )argument_list )call (identifier_fnames) identifier_fnames )tuple )binary_operator )argument_list )call )expression_statement )block )for_statement )block )with_statement (if_statement (comparison_operator (attribute (identifier_mon) identifier_mon (identifier_duration) identifier_duration )attribute (integer_1) integer_1 )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_mon) identifier_mon )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_dstore) identifier_dstore (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Export an output from the datastore.
(module (function_definition (function_name_get_oauth_request) function_name_get_oauth_request (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (identifier_method) identifier_method (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (string_'REQUEST_METHOD') string_'REQUEST_METHOD' )subscript )assignment )expression_statement )block (except_clause (block (expression_statement (assignment (identifier_method) identifier_method (string_'GET') string_'GET' )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_postdata) identifier_postdata (None) None )assignment )expression_statement (if_statement (comparison_operator (identifier_method) identifier_method (tuple (string_'POST') string_'POST' (string_'PUT') string_'PUT' )tuple )comparison_operator (block (expression_statement (assignment (identifier_postdata) identifier_postdata (attribute (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (identifier_body) identifier_body )attribute )assignment )expression_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_oauth) identifier_oauth (identifier_Request) identifier_Request )attribute (identifier_from_request) identifier_from_request )attribute (argument_list (identifier_method) identifier_method (attribute (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (identifier_uri) identifier_uri )attribute (keyword_argument (identifier_headers) identifier_headers (attribute (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (identifier_headers) identifier_headers )attribute )keyword_argument (keyword_argument (identifier_query_string) identifier_query_string (identifier_postdata) identifier_postdata )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return an OAuth Request object for the current request.
(module (function_definition (function_name_plugins) function_name_plugins (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__plugins) identifier__plugins )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__plugins) identifier__plugins )attribute (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier__) identifier__ (identifier_plugin) identifier_plugin )pattern_list (call (attribute (identifier_self) identifier_self (identifier_load_extensions) identifier_load_extensions )attribute (argument_list (string_'iotile.plugin') string_'iotile.plugin' )argument_list )call (block (expression_statement (assignment (identifier_links) identifier_links (call (identifier_plugin) identifier_plugin (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_name) identifier_name (identifier_value) identifier_value )pattern_list (identifier_links) identifier_links (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__plugins) identifier__plugins )attribute (identifier_name) identifier_name )subscript (identifier_value) identifier_value )assignment )expression_statement )block )for_statement )block )for_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__plugins) identifier__plugins )attribute )return_statement )block )function_definition )module
Lazily load iotile plugins only on demand. This is a slow operation on computers with a slow FS and is rarely accessed information, so only compute it when it is actually asked for.
(module (function_definition (function_name_yield_sorted_by_type) function_name_yield_sorted_by_type (parameters (list_splat_pattern (identifier_typelist) identifier_typelist )list_splat_pattern )parameters (block (function_definition (function_name_decorate) function_name_decorate (parameters (identifier_fun) identifier_fun )parameters (block (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_fun) identifier_fun )argument_list )call )decorator (function_definition (function_name_decorated) function_name_decorated (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwds) identifier_kwds )dictionary_splat_pattern )parameters (block (return_statement (call (identifier_iterate_by_type) identifier_iterate_by_type (argument_list (call (identifier_fun) identifier_fun (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwds) identifier_kwds )dictionary_splat )argument_list )call (identifier_typelist) identifier_typelist )argument_list )call )return_statement )block )function_definition )decorated_definition (return_statement (identifier_decorated) identifier_decorated )return_statement )block )function_definition (return_statement (identifier_decorate) identifier_decorate )return_statement )block )function_definition )module
a useful decorator for the collect_impl method of SuperChange subclasses. Caches the yielded changes, and re-emits them collected by their type. The order of the types can be specified by listing the types as arguments to this decorator. Unlisted types will be yielded last in no guaranteed order. Grouping happens by exact type match only. Inheritance is not taken into consideration for grouping.
(module (function_definition (function_name_dry_run_scan) function_name_dry_run_scan (parameters (identifier_self) identifier_self (identifier_scan_id) identifier_scan_id (identifier_targets) identifier_targets )parameters (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_setsid) identifier_setsid )attribute (argument_list )argument_list )call )expression_statement (for_statement (pattern_list (identifier__) identifier__ (identifier_target) identifier_target )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_targets) identifier_targets )argument_list )call (block (expression_statement (assignment (identifier_host) identifier_host (call (identifier_resolve_hostname) identifier_resolve_hostname (argument_list (subscript (identifier_target) identifier_target (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_host) identifier_host (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"Couldn't resolve %s.") string_"Couldn't resolve %s." (subscript (identifier_target) identifier_target (integer_0) integer_0 )subscript )argument_list )call )expression_statement (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_port) identifier_port (call (attribute (identifier_self) identifier_self (identifier_get_scan_ports) identifier_get_scan_ports )attribute (argument_list (identifier_scan_id) identifier_scan_id (keyword_argument (identifier_target) identifier_target (subscript (identifier_target) identifier_target (integer_0) integer_0 )subscript )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"%s:%s: Dry run mode.") string_"%s:%s: Dry run mode." (identifier_host) identifier_host (identifier_port) identifier_port )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_scan_log) identifier_add_scan_log )attribute (argument_list (identifier_scan_id) identifier_scan_id (keyword_argument (identifier_name) identifier_name (string_'') string_'' )keyword_argument (keyword_argument (identifier_host) identifier_host (identifier_host) identifier_host )keyword_argument (keyword_argument (identifier_value) identifier_value (string_'Dry run result') string_'Dry run result' )keyword_argument )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_finish_scan) identifier_finish_scan )attribute (argument_list (identifier_scan_id) identifier_scan_id )argument_list )call )expression_statement )block )function_definition )module
Dry runs a scan.
(module (function_definition (function_name_get_attribute_selected) function_name_get_attribute_selected (parameters (identifier_self) identifier_self (identifier_attribute) identifier_attribute )parameters (block (expression_statement (assignment (identifier_items_list) identifier_items_list (call (attribute (identifier_self) identifier_self (identifier_get_options) identifier_get_options )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (identifier_next) identifier_next (argument_list (call (identifier_iter) identifier_iter (argument_list (list_comprehension (call (attribute (identifier_item) identifier_item (identifier_get_attribute) identifier_get_attribute )attribute (argument_list (identifier_attribute) identifier_attribute )argument_list )call (for_in_clause (identifier_item) identifier_item (identifier_items_list) identifier_items_list )for_in_clause (if_clause (call (attribute (identifier_item) identifier_item (identifier_is_selected) identifier_is_selected )attribute (argument_list )argument_list )call )if_clause )list_comprehension )argument_list )call (None) None )argument_list )call )return_statement )block )function_definition )module
Performs search of selected item from Web List Return attribute of selected item @params attribute - string attribute name
(module (function_definition (function_name_get_dm_online) function_name_get_dm_online (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (identifier_requests) identifier_requests )not_operator (block (return_statement (False) False )return_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_req) identifier_req (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (string_"https://earthref.org/MagIC/data-models/3.0.json") string_"https://earthref.org/MagIC/data-models/3.0.json" (keyword_argument (identifier_timeout) identifier_timeout (integer_3) integer_3 )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (attribute (identifier_req) identifier_req (identifier_ok) identifier_ok )attribute )not_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (identifier_req) identifier_req )return_statement )block (except_clause (tuple (attribute (attribute (identifier_requests) identifier_requests (identifier_exceptions) identifier_exceptions )attribute (identifier_ConnectTimeout) identifier_ConnectTimeout )attribute (attribute (attribute (identifier_requests) identifier_requests (identifier_exceptions) identifier_exceptions )attribute (identifier_ConnectionError) identifier_ConnectionError )attribute (attribute (attribute (identifier_requests) identifier_requests (identifier_exceptions) identifier_exceptions )attribute (identifier_ReadTimeout) identifier_ReadTimeout )attribute )tuple (block (return_statement (False) False )return_statement )block )except_clause )try_statement )block )function_definition )module
Use requests module to get data model from Earthref. If this fails or times out, return false. Returns --------- result : requests.models.Response, False if unsuccessful
(module (function_definition (function_name_get_content_dict) function_name_get_content_dict (parameters (identifier_vocabularies) identifier_vocabularies (identifier_content_vocab) identifier_content_vocab )parameters (block (if_statement (comparison_operator (call (attribute (identifier_vocabularies) identifier_vocabularies (identifier_get) identifier_get )attribute (argument_list (identifier_content_vocab) identifier_content_vocab (None) None )argument_list )call (None) None )comparison_operator (block (raise_statement (call (identifier_UNTLFormException) identifier_UNTLFormException (argument_list (binary_operator (string_'Could not retrieve content vocabulary "%s" for the form.') string_'Could not retrieve content vocabulary "%s" for the form.' (parenthesized_expression (identifier_content_vocab) identifier_content_vocab )parenthesized_expression )binary_operator )argument_list )call )raise_statement )block (else_clause (block (return_statement (call (attribute (identifier_vocabularies) identifier_vocabularies (identifier_get) identifier_get )attribute (argument_list (identifier_content_vocab) identifier_content_vocab )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Get the content dictionary based on the element's content vocabulary.
(module (function_definition (function_name_get_edited) function_name_get_edited (parameters (identifier_self) identifier_self (default_parameter (identifier_subreddit) identifier_subreddit (string_'mod') string_'mod' )default_parameter (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (string_'edited') string_'edited' )subscript (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_subreddit) identifier_subreddit (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_subreddit) identifier_subreddit )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_get_content) identifier_get_content )attribute (argument_list (identifier_url) identifier_url (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Return a get_content generator of edited items. :param subreddit: Either a Subreddit object or the name of the subreddit to return the edited items for. Defaults to `mod` which includes items for all the subreddits you moderate. The additional parameters are passed directly into :meth:`.get_content`. Note: the `url` parameter cannot be altered.
(module (function_definition (function_name_flush) function_name_flush (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_acquire) identifier_acquire )attribute (argument_list )argument_list )call )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_stream) identifier_stream )attribute (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (tuple (identifier_EnvironmentError) identifier_EnvironmentError (identifier_ValueError) identifier_ValueError )tuple (block (pass_statement )pass_statement )block )except_clause (finally_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_release) identifier_release )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Flushes all log files.
(module (function_definition (function_name_listdir_matches) function_name_listdir_matches (parameters (identifier_match) identifier_match )parameters (block (import_statement (dotted_name (identifier_os) identifier_os )dotted_name )import_statement (expression_statement (assignment (identifier_last_slash) identifier_last_slash (call (attribute (identifier_match) identifier_match (identifier_rfind) identifier_rfind )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_last_slash) identifier_last_slash (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (expression_statement (assignment (identifier_dirname) identifier_dirname (string_'.') string_'.' )assignment )expression_statement (expression_statement (assignment (identifier_match_prefix) identifier_match_prefix (identifier_match) identifier_match )assignment )expression_statement (expression_statement (assignment (identifier_result_prefix) identifier_result_prefix (string_'') string_'' )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_match_prefix) identifier_match_prefix (subscript (identifier_match) identifier_match (slice (binary_operator (identifier_last_slash) identifier_last_slash (integer_1) integer_1 )binary_operator (colon) colon )slice )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_last_slash) identifier_last_slash (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_dirname) identifier_dirname (string_'/') string_'/' )assignment )expression_statement (expression_statement (assignment (identifier_result_prefix) identifier_result_prefix (string_'/') string_'/' )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_dirname) identifier_dirname (subscript (identifier_match) identifier_match (slice (integer_0) integer_0 (colon) colon (identifier_last_slash) identifier_last_slash )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_result_prefix) identifier_result_prefix (binary_operator (identifier_dirname) identifier_dirname (string_'/') string_'/' )binary_operator )assignment )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement (function_definition (function_name_add_suffix_if_dir) function_name_add_suffix_if_dir (parameters (identifier_filename) identifier_filename )parameters (block (try_statement (block (if_statement (comparison_operator (parenthesized_expression (binary_operator (subscript (call (attribute (identifier_os) identifier_os (identifier_stat) identifier_stat )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call (integer_0) integer_0 )subscript (integer_0x4000) integer_0x4000 )binary_operator )parenthesized_expression (integer_0) integer_0 )comparison_operator (block (return_statement (binary_operator (identifier_filename) identifier_filename (string_'/') string_'/' )binary_operator )return_statement )block )if_statement )block (except_clause (identifier_FileNotFoundError) identifier_FileNotFoundError (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement (identifier_filename) identifier_filename )return_statement )block )function_definition (expression_statement (assignment (identifier_matches) identifier_matches (list_comprehension (call (identifier_add_suffix_if_dir) identifier_add_suffix_if_dir (argument_list (binary_operator (identifier_result_prefix) identifier_result_prefix (identifier_filename) identifier_filename )binary_operator )argument_list )call (for_in_clause (identifier_filename) identifier_filename (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (identifier_dirname) identifier_dirname )argument_list )call )for_in_clause (if_clause (call (attribute (identifier_filename) identifier_filename (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_match_prefix) identifier_match_prefix )argument_list )call )if_clause )list_comprehension )assignment )expression_statement (return_statement (identifier_matches) identifier_matches )return_statement )block )function_definition )module
Returns a list of filenames contained in the named directory. Only filenames which start with `match` will be returned. Directories will have a trailing slash.
(module (function_definition (function_name_loadTextureD3D11_Async) function_name_loadTextureD3D11_Async (parameters (identifier_self) identifier_self (identifier_textureId) identifier_textureId (identifier_pD3D11Device) identifier_pD3D11Device )parameters (block (expression_statement (assignment (identifier_fn) identifier_fn (attribute (attribute (identifier_self) identifier_self (identifier_function_table) identifier_function_table )attribute (identifier_loadTextureD3D11_Async) identifier_loadTextureD3D11_Async )attribute )assignment )expression_statement (expression_statement (assignment (identifier_ppD3D11Texture2D) identifier_ppD3D11Texture2D (call (identifier_c_void_p) identifier_c_void_p (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (identifier_fn) identifier_fn (argument_list (identifier_textureId) identifier_textureId (identifier_pD3D11Device) identifier_pD3D11Device (call (identifier_byref) identifier_byref (argument_list (identifier_ppD3D11Texture2D) identifier_ppD3D11Texture2D )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_result) identifier_result (attribute (identifier_ppD3D11Texture2D) identifier_ppD3D11Texture2D (identifier_value) identifier_value )attribute )expression_list )return_statement )block )function_definition )module
Creates a D3D11 texture and loads data into it.
(module (function_definition (function_name_OECDas) function_name_OECDas (parameters (identifier_self) identifier_self (default_parameter (identifier_to) identifier_to (string_'name_short') string_'name_short' )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_to) identifier_to (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_to) identifier_to (list (identifier_to) identifier_to )list )assignment )expression_statement )block )if_statement (return_statement (subscript (subscript (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_OECD) identifier_OECD )attribute (integer_0) integer_0 )comparison_operator )subscript (identifier_to) identifier_to )subscript )return_statement )block )function_definition )module
Return OECD member states in the specified classification Parameters ---------- to : str, optional Output classification (valid str for an index of country_data file), default: name_short Returns ------- Pandas DataFrame
(module (function_definition (function_name_add_field) function_name_add_field (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_field) identifier_field )parameters (block (if_statement (comparison_operator (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier__fields) identifier__fields )attribute )comparison_operator (block (raise_statement (call (identifier_PayloadFieldAlreadyDefinedError) identifier_PayloadFieldAlreadyDefinedError (argument_list (call (attribute (concatenated_string (string_'Key {key} is already set on this payload. The existing field was {existing_field}.') string_'Key {key} is already set on this payload. The existing field was {existing_field}.' (string_' Tried to set new field {field}.') string_' Tried to set new field {field}.' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_existing_field) identifier_existing_field (subscript (attribute (identifier_self) identifier_self (identifier__fields) identifier__fields )attribute (identifier_key) identifier_key )subscript )keyword_argument (keyword_argument (identifier_field) identifier_field (identifier_field) identifier_field )keyword_argument )argument_list )call )argument_list )call )raise_statement )block (elif_clause (attribute (identifier_self) identifier_self (identifier__frozen) identifier__frozen )attribute (block (raise_statement (call (identifier_PayloadFrozenError) identifier_PayloadFrozenError (argument_list (call (attribute (string_'Payload is frozen, field with key {key} cannot be added to it.') string_'Payload is frozen, field with key {key} cannot be added to it.' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument )argument_list )call )argument_list )call )raise_statement )block )elif_clause (else_clause (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__fields) identifier__fields )attribute (identifier_key) identifier_key )subscript (identifier_field) identifier_field )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__fingerprint_memo) identifier__fingerprint_memo )attribute (None) None )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Add a field to the Payload. :API: public :param string key: The key for the field. Fields can be accessed using attribute access as well as `get_field` using `key`. :param PayloadField field: A PayloadField instance. None is an allowable value for `field`, in which case it will be skipped during hashing.
(module (function_definition (function_name__get_person_json) function_name__get_person_json (parameters (identifier_self) identifier_self (identifier_id_) identifier_id_ (default_parameter (identifier_url_params) identifier_url_params (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier_url_builder) identifier_url_builder )attribute (argument_list (string_'person/{person_id}') string_'person/{person_id}' (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_person_id) identifier_person_id (identifier_id_) identifier_id_ )keyword_argument )argument_list )call (keyword_argument (identifier_url_params) identifier_url_params (boolean_operator (identifier_url_params) identifier_url_params (call (identifier_OrderedDict) identifier_OrderedDict (argument_list )argument_list )call )boolean_operator )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (await (call (attribute (identifier_self) identifier_self (identifier_get_data) identifier_get_data )attribute (argument_list (identifier_url) identifier_url )argument_list )call )await )assignment )expression_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Retrieve raw person JSON by ID. Arguments: id_ (:py:class:`int`): The person's TMDb ID. url_params (:py:class:`dict`): Any additional URL parameters. Returns: :py:class:`dict`: The JSON data.
(module (function_definition (function_name_container) function_name_container (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_length) identifier_length (identifier_type) identifier_type (list_splat_pattern (identifier_parameters) identifier_parameters )list_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_new_struct) identifier_new_struct )attribute (argument_list (string_'Container') string_'Container' (identifier_name) identifier_name (binary_operator (string_'length=%s') string_'length=%s' (identifier_length) identifier_length )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (call (identifier_BuiltIn) identifier_BuiltIn (argument_list )argument_list )call (identifier_run_keyword) identifier_run_keyword )attribute (argument_list (identifier_type) identifier_type (list_splat (identifier_parameters) identifier_parameters )list_splat )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_end_struct) identifier_end_struct )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Define a container with given length. This is a convenience method creating a `Struct` with `length` containing fields defined in `type`.
(module (function_definition (function_name_request) function_name_request (parameters (identifier_self) identifier_self (identifier_requests) identifier_requests )parameters (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (string_'Request resources from Mesos') string_'Request resources from Mesos' )argument_list )call )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_driver) identifier_driver )attribute (identifier_requestResources) identifier_requestResources )attribute (argument_list (call (identifier_map) identifier_map (argument_list (identifier_encode) identifier_encode (identifier_requests) identifier_requests )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Requests resources from Mesos. (see mesos.proto for a description of Request and how, for example, to request resources from specific slaves.) Any resources available are offered to the framework via Scheduler.resourceOffers callback, asynchronously.
(module (function_definition (function_name_ship_move) function_name_ship_move (parameters (identifier_ship) identifier_ship (identifier_x) identifier_x (identifier_y) identifier_y (identifier_speed) identifier_speed )parameters (block (expression_statement (call (attribute (identifier_click) identifier_click (identifier_echo) identifier_echo )attribute (argument_list (binary_operator (string_'Moving ship %s to %s,%s with speed %s') string_'Moving ship %s to %s,%s with speed %s' (tuple (identifier_ship) identifier_ship (identifier_x) identifier_x (identifier_y) identifier_y (identifier_speed) identifier_speed )tuple )binary_operator )argument_list )call )expression_statement )block )function_definition )module
Moves SHIP to the new location X,Y.
(module (function_definition (function_name_check_alert) function_name_check_alert (parameters (identifier_self) identifier_self (identifier_text) identifier_text )parameters (block (try_statement (block (expression_statement (assignment (identifier_alert) identifier_alert (call (identifier_Alert) identifier_Alert (argument_list (attribute (identifier_world) identifier_world (identifier_browser) identifier_browser )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_alert) identifier_alert (identifier_text) identifier_text )attribute (identifier_text) identifier_text )comparison_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (call (attribute (string_"Alert text expected to be {!r}, got {!r}.") string_"Alert text expected to be {!r}, got {!r}." (identifier_format) identifier_format )attribute (argument_list (identifier_text) identifier_text (attribute (identifier_alert) identifier_alert (identifier_text) identifier_text )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement )block (except_clause (identifier_WebDriverException) identifier_WebDriverException (block (pass_statement )pass_statement )block )except_clause )try_statement )block )function_definition )module
Assert an alert is showing with the given text.
(module (function_definition (function_name_collect_metrics) function_name_collect_metrics (parameters )parameters (block (function_definition (function_name__register) function_name__register (parameters (identifier_action) identifier_action )parameters (block (expression_statement (assignment (identifier_handler) identifier_handler (call (attribute (identifier_Handler) identifier_Handler (identifier_get) identifier_get )attribute (argument_list (identifier_action) identifier_action )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_handler) identifier_handler (identifier_add_predicate) identifier_add_predicate )attribute (argument_list (call (identifier_partial) identifier_partial (argument_list (identifier__restricted_hook) identifier__restricted_hook (string_'collect-metrics') string_'collect-metrics' )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_action) identifier_action )return_statement )block )function_definition (return_statement (identifier__register) identifier__register )return_statement )block )function_definition )module
Register the decorated function to run for the collect_metrics hook.
(module (function_definition (function_name_verify_signature) function_name_verify_signature (parameters (identifier_self) identifier_self (identifier_signature_filename) identifier_signature_filename (identifier_data_filename) identifier_data_filename (default_parameter (identifier_keystore) identifier_keystore (None) None )default_parameter )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_gpg) identifier_gpg )attribute )not_operator (block (raise_statement (call (identifier_DistlibException) identifier_DistlibException (argument_list (concatenated_string (string_'verification unavailable because gpg ') string_'verification unavailable because gpg ' (string_'unavailable') string_'unavailable' )concatenated_string )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (call (attribute (identifier_self) identifier_self (identifier_get_verify_command) identifier_get_verify_command )attribute (argument_list (identifier_signature_filename) identifier_signature_filename (identifier_data_filename) identifier_data_filename (identifier_keystore) identifier_keystore )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_rc) identifier_rc (identifier_stdout) identifier_stdout (identifier_stderr) identifier_stderr )pattern_list (call (attribute (identifier_self) identifier_self (identifier_run_command) identifier_run_command )attribute (argument_list (identifier_cmd) identifier_cmd )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_rc) identifier_rc (tuple (integer_0) integer_0 (integer_1) integer_1 )tuple )comparison_operator (block (raise_statement (call (identifier_DistlibException) identifier_DistlibException (argument_list (binary_operator (concatenated_string (string_'verify command failed with error ') string_'verify command failed with error ' (string_'code %s') string_'code %s' )concatenated_string (identifier_rc) identifier_rc )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (comparison_operator (identifier_rc) identifier_rc (integer_0) integer_0 )comparison_operator )return_statement )block )function_definition )module
Verify a signature for a file. :param signature_filename: The pathname to the file containing the signature. :param data_filename: The pathname to the file containing the signed data. :param keystore: The path to a directory which contains the keys used in verification. If not specified, the instance's ``gpg_home`` attribute is used instead. :return: True if the signature was verified, else False.
(module (function_definition (function_name_write) function_name_write (parameters (identifier_entries) identifier_entries )parameters (block (try_statement (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (call (identifier_get_rc_path) identifier_get_rc_path (argument_list )argument_list )call (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_rc) identifier_rc )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_rc) identifier_rc (identifier_writelines) identifier_writelines )attribute (argument_list (identifier_entries) identifier_entries )argument_list )call )expression_statement )block )with_statement )block (except_clause (identifier_IOError) identifier_IOError (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Error writing your ~/.vacationrc file!') string_'Error writing your ~/.vacationrc file!' )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Write an entire rc file.
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (identifier_resource) identifier_resource (default_parameter (identifier_timeout) identifier_timeout (unary_operator (integer_1) integer_1 )unary_operator )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier___set_default_values) identifier___set_default_values )attribute (argument_list (identifier_resource) identifier_resource )argument_list )call )expression_statement (expression_statement (assignment (identifier_uri) identifier_uri (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_build_uri) identifier_build_uri )attribute (argument_list (subscript (subscript (identifier_resource) identifier_resource (string_'logicalSwitch') string_'logicalSwitch' )subscript (string_'uri') string_'uri' )subscript )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_resource) identifier_resource (keyword_argument (identifier_uri) identifier_uri (identifier_uri) identifier_uri )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Updates a Logical Switch. Args: resource (dict): Object to update. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop waiting for its completion. Returns: dict: Updated resource.
(module (function_definition (function_name_main) function_name_main (parameters )parameters (type (None) None )type (block (expression_statement (assignment (identifier__) identifier__ (assignment (identifier_testdata) identifier_testdata (list (string_"hello") string_"hello" (integer_1) integer_1 (list (string_"bongos") string_"bongos" (string_"today") string_"today" )list )list )assignment )assignment )expression_statement (for_statement (identifier_data) identifier_data (identifier_testdata) identifier_testdata (block (expression_statement (call (identifier_compare_python_to_reference_murmur3_32) identifier_compare_python_to_reference_murmur3_32 (argument_list (identifier_data) identifier_data (keyword_argument (identifier_seed) identifier_seed (integer_0) integer_0 )keyword_argument )argument_list )call )expression_statement (expression_statement (call (identifier_compare_python_to_reference_murmur3_64) identifier_compare_python_to_reference_murmur3_64 (argument_list (identifier_data) identifier_data (keyword_argument (identifier_seed) identifier_seed (integer_0) integer_0 )keyword_argument )argument_list )call )expression_statement )block )for_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"All OK") string_"All OK" )argument_list )call )expression_statement )block )function_definition )module
Command-line validation checks.
(module (function_definition (function_name__expand_subsystems) function_name__expand_subsystems (parameters (identifier_self) identifier_self (identifier_scope_infos) identifier_scope_infos )parameters (block (function_definition (function_name_subsys_deps) function_name_subsys_deps (parameters (identifier_subsystem_client_cls) identifier_subsystem_client_cls )parameters (block (for_statement (identifier_dep) identifier_dep (call (attribute (identifier_subsystem_client_cls) identifier_subsystem_client_cls (identifier_subsystem_dependencies_iter) identifier_subsystem_dependencies_iter )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_dep) identifier_dep (identifier_scope) identifier_scope )attribute (identifier_GLOBAL_SCOPE) identifier_GLOBAL_SCOPE )comparison_operator (block (expression_statement (yield (subscript (attribute (identifier_self) identifier_self (identifier__scope_to_info) identifier__scope_to_info )attribute (attribute (identifier_dep) identifier_dep (identifier_options_scope) identifier_options_scope )attribute )subscript )yield )expression_statement (for_statement (identifier_x) identifier_x (call (identifier_subsys_deps) identifier_subsys_deps (argument_list (attribute (identifier_dep) identifier_dep (identifier_subsystem_cls) identifier_subsystem_cls )attribute )argument_list )call (block (expression_statement (yield (identifier_x) identifier_x )yield )expression_statement )block )for_statement )block )if_statement )block )for_statement )block )function_definition (for_statement (identifier_scope_info) identifier_scope_info (identifier_scope_infos) identifier_scope_infos (block (expression_statement (yield (identifier_scope_info) identifier_scope_info )yield )expression_statement (if_statement (comparison_operator (attribute (identifier_scope_info) identifier_scope_info (identifier_optionable_cls) identifier_optionable_cls )attribute (None) None )comparison_operator (block (if_statement (call (identifier_issubclass) identifier_issubclass (argument_list (attribute (identifier_scope_info) identifier_scope_info (identifier_optionable_cls) identifier_optionable_cls )attribute (identifier_GlobalOptionsRegistrar) identifier_GlobalOptionsRegistrar )argument_list )call (block (for_statement (pattern_list (identifier_scope) identifier_scope (identifier_info) identifier_info )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier__scope_to_info) identifier__scope_to_info )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_info) identifier_info (identifier_category) identifier_category )attribute (attribute (identifier_ScopeInfo) identifier_ScopeInfo (identifier_SUBSYSTEM) identifier_SUBSYSTEM )attribute )comparison_operator (comparison_operator (call (identifier_enclosing_scope) identifier_enclosing_scope (argument_list (identifier_scope) identifier_scope )argument_list )call (identifier_GLOBAL_SCOPE) identifier_GLOBAL_SCOPE )comparison_operator )boolean_operator (block (expression_statement (yield (identifier_info) identifier_info )yield )expression_statement (for_statement (identifier_subsys_dep) identifier_subsys_dep (call (identifier_subsys_deps) identifier_subsys_deps (argument_list (attribute (identifier_info) identifier_info (identifier_optionable_cls) identifier_optionable_cls )attribute )argument_list )call (block (expression_statement (yield (identifier_subsys_dep) identifier_subsys_dep )yield )expression_statement )block )for_statement )block )if_statement )block )for_statement )block (elif_clause (call (identifier_issubclass) identifier_issubclass (argument_list (attribute (identifier_scope_info) identifier_scope_info (identifier_optionable_cls) identifier_optionable_cls )attribute (identifier_SubsystemClientMixin) identifier_SubsystemClientMixin )argument_list )call (block (for_statement (identifier_subsys_dep) identifier_subsys_dep (call (identifier_subsys_deps) identifier_subsys_deps (argument_list (attribute (identifier_scope_info) identifier_scope_info (identifier_optionable_cls) identifier_optionable_cls )attribute )argument_list )call (block (expression_statement (yield (identifier_subsys_dep) identifier_subsys_dep )yield )expression_statement )block )for_statement )block )elif_clause )if_statement )block )if_statement )block )for_statement )block )function_definition )module
Add all subsystems tied to a scope, right after that scope.
(module (function_definition (function_name_message) function_name_message (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_type) identifier_type )attribute (string_'cleartext') string_'cleartext' )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_bytes_to_text) identifier_bytes_to_text )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__message) identifier__message )attribute )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_type) identifier_type )attribute (string_'literal') string_'literal' )comparison_operator (block (return_statement (attribute (attribute (identifier_self) identifier_self (identifier__message) identifier__message )attribute (identifier_contents) identifier_contents )attribute )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_type) identifier_type )attribute (string_'encrypted') string_'encrypted' )comparison_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier__message) identifier__message )attribute )return_statement )block )if_statement )block )function_definition )module
The message contents
(module (function_definition (function_name__get_id) function_name__get_id (parameters (identifier_self) identifier_self (identifier_id_) identifier_id_ (identifier_pkg_name) identifier_pkg_name )parameters (block (expression_statement (assignment (identifier_collection) identifier_collection (call (identifier_JSONClientValidated) identifier_JSONClientValidated (argument_list (string_'id') string_'id' (keyword_argument (identifier_collection) identifier_collection (binary_operator (identifier_pkg_name) identifier_pkg_name (string_'Ids') string_'Ids' )binary_operator )keyword_argument (keyword_argument (identifier_runtime) identifier_runtime (attribute (identifier_self) identifier_self (identifier__runtime) identifier__runtime )attribute )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_collection) identifier_collection (identifier_find_one) identifier_find_one )attribute (argument_list (dictionary (pair (string_'aliasIds') string_'aliasIds' (dictionary (pair (string_'$in') string_'$in' (list (call (identifier_str) identifier_str (argument_list (identifier_id_) identifier_id_ )argument_list )call )list )pair )dictionary )pair )dictionary )argument_list )call )assignment )expression_statement )block (except_clause (attribute (identifier_errors) identifier_errors (identifier_NotFound) identifier_NotFound )attribute (block (return_statement (identifier_id_) identifier_id_ )return_statement )block )except_clause (else_clause (block (return_statement (call (identifier_Id) identifier_Id (argument_list (subscript (identifier_result) identifier_result (string_'_id') string_'_id' )subscript )argument_list )call )return_statement )block )else_clause )try_statement )block )function_definition )module
Returns the primary id given an alias. If the id provided is not in the alias table, it will simply be returned as is. Only looks within the Id Alias namespace for the session package
(module (function_definition (function_name_handle_api_exception) function_name_handle_api_exception (parameters (identifier_error) identifier_error )parameters (block (expression_statement (call (identifier__mp_track) identifier__mp_track (argument_list (keyword_argument (identifier_type) identifier_type (string_"exception") string_"exception" )keyword_argument (keyword_argument (identifier_status_code) identifier_status_code (attribute (identifier_error) identifier_error (identifier_status_code) identifier_status_code )attribute )keyword_argument (keyword_argument (identifier_message) identifier_message (attribute (identifier_error) identifier_error (identifier_message) identifier_message )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (identifier_jsonify) identifier_jsonify (argument_list (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_message) identifier_message (attribute (identifier_error) identifier_error (identifier_message) identifier_message )attribute )keyword_argument )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute (attribute (identifier_error) identifier_error (identifier_status_code) identifier_status_code )attribute )assignment )expression_statement (return_statement (identifier_response) identifier_response )return_statement )block )function_definition )module
Converts an API exception into an error response.
(module (function_definition (function_name_np2str) function_name_np2str (parameters (identifier_value) identifier_value )parameters (block (if_statement (boolean_operator (boolean_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_value) identifier_value (string_'dtype') string_'dtype' )argument_list )call (line_continuation_\) line_continuation_\ (call (identifier_issubclass) identifier_issubclass (argument_list (attribute (attribute (identifier_value) identifier_value (identifier_dtype) identifier_dtype )attribute (identifier_type) identifier_type )attribute (tuple (attribute (identifier_np) identifier_np (identifier_string_) identifier_string_ )attribute (attribute (identifier_np) identifier_np (identifier_object_) identifier_object_ )attribute )tuple )argument_list )call )boolean_operator (comparison_operator (attribute (identifier_value) identifier_value (identifier_size) identifier_size )attribute (integer_1) integer_1 )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_np) identifier_np (identifier_asscalar) identifier_asscalar )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_str) identifier_str )argument_list )call )not_operator (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_value) identifier_value (identifier_decode) identifier_decode )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_value) identifier_value )return_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Array is not a string type or is larger than 1") string_"Array is not a string type or is larger than 1" )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Convert an `numpy.string_` to str. Args: value (ndarray): scalar or 1-element numpy array to convert Raises: ValueError: if value is array larger than 1-element or it is not of type `numpy.string_` or it is not a numpy array
(module (function_definition (function_name_DeregisterAnalyzer) function_name_DeregisterAnalyzer (parameters (identifier_cls) identifier_cls (identifier_analyzer_class) identifier_analyzer_class )parameters (block (expression_statement (assignment (identifier_analyzer_name) identifier_analyzer_name (call (attribute (attribute (identifier_analyzer_class) identifier_analyzer_class (identifier_NAME) identifier_NAME )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_analyzer_name) identifier_analyzer_name (attribute (identifier_cls) identifier_cls (identifier__analyzer_classes) identifier__analyzer_classes )attribute )comparison_operator (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (call (attribute (string_'analyzer class not set for name: {0:s}') string_'analyzer class not set for name: {0:s}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_analyzer_class) identifier_analyzer_class (identifier_NAME) identifier_NAME )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (delete_statement (subscript (attribute (identifier_cls) identifier_cls (identifier__analyzer_classes) identifier__analyzer_classes )attribute (identifier_analyzer_name) identifier_analyzer_name )subscript )delete_statement )block )function_definition )module
Deregisters a analyzer class. The analyzer classes are identified based on their lower case name. Args: analyzer_class (type): class object of the analyzer. Raises: KeyError: if analyzer class is not set for the corresponding name.
(module (function_definition (function_name_add_callback) function_name_add_callback (parameters (identifier_self) identifier_self (identifier_fn) identifier_fn (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (not_operator (call (identifier_callable) identifier_callable (argument_list (identifier_fn) identifier_fn )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Value for argument 'fn' is {0} and is not a callable object.") string_"Value for argument 'fn' is {0} and is not a callable object." (identifier_format) identifier_format )attribute (argument_list (call (identifier_type) identifier_type (argument_list (identifier_fn) identifier_fn )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__callbacks) identifier__callbacks )attribute (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_fn) identifier_fn (identifier_args) identifier_args (identifier_kwargs) identifier_kwargs )tuple )argument_list )call )expression_statement )block )function_definition )module
Add a function and arguments to be passed to it to be executed after the batch executes. A batch can support multiple callbacks. Note, that if the batch does not execute, the callbacks are not executed. A callback, thus, is an "on batch success" handler. :param fn: Callable object :type fn: callable :param \*args: Positional arguments to be passed to the callback at the time of execution :param \*\*kwargs: Named arguments to be passed to the callback at the time of execution
(module (function_definition (function_name_get_snapshot_policy) function_name_get_snapshot_policy (parameters (identifier_self) identifier_self (identifier_name) identifier_name (default_parameter (identifier_view) identifier_view (None) None )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (binary_operator (string_"snapshots/policies/%s") string_"snapshots/policies/%s" (identifier_name) identifier_name )binary_operator (identifier_ApiSnapshotPolicy) identifier_ApiSnapshotPolicy (keyword_argument (identifier_params) identifier_params (boolean_operator (boolean_operator (identifier_view) identifier_view (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_view) identifier_view (identifier_view) identifier_view )keyword_argument )argument_list )call )boolean_operator (None) None )boolean_operator )keyword_argument (keyword_argument (identifier_api_version) identifier_api_version (integer_6) integer_6 )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Retrieve a single snapshot policy. @param name: The name of the snapshot policy to retrieve. @param view: View to materialize. Valid values are 'full', 'summary', 'export', 'export_redacted'. @return: The requested snapshot policy. @since: API v6
(module (function_definition (function_name_get_vectors_loss) function_name_get_vectors_loss (parameters (identifier_ops) identifier_ops (identifier_docs) identifier_docs (identifier_prediction) identifier_prediction (default_parameter (identifier_objective) identifier_objective (string_"L2") string_"L2" )default_parameter )parameters (block (expression_statement (assignment (identifier_ids) identifier_ids (call (attribute (identifier_ops) identifier_ops (identifier_flatten) identifier_flatten )attribute (argument_list (list_comprehension (call (attribute (call (attribute (identifier_doc) identifier_doc (identifier_to_array) identifier_to_array )attribute (argument_list (identifier_ID) identifier_ID )argument_list )call (identifier_ravel) identifier_ravel )attribute (argument_list )argument_list )call (for_in_clause (identifier_doc) identifier_doc (identifier_docs) identifier_docs )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_target) identifier_target (subscript (attribute (attribute (attribute (subscript (identifier_docs) identifier_docs (integer_0) integer_0 )subscript (identifier_vocab) identifier_vocab )attribute (identifier_vectors) identifier_vectors )attribute (identifier_data) identifier_data )attribute (identifier_ids) identifier_ids )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_objective) identifier_objective (string_"L2") string_"L2" )comparison_operator (block (expression_statement (assignment (identifier_d_target) identifier_d_target (binary_operator (identifier_prediction) identifier_prediction (identifier_target) identifier_target )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_loss) identifier_loss (call (attribute (parenthesized_expression (binary_operator (identifier_d_target) identifier_d_target (integer_2) integer_2 )binary_operator )parenthesized_expression (identifier_sum) identifier_sum )attribute (argument_list )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_objective) identifier_objective (string_"cosine") string_"cosine" )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_loss) identifier_loss (identifier_d_target) identifier_d_target )pattern_list (call (identifier_get_cossim_loss) identifier_get_cossim_loss (argument_list (identifier_prediction) identifier_prediction (identifier_target) identifier_target )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement (return_statement (expression_list (identifier_loss) identifier_loss (identifier_d_target) identifier_d_target )expression_list )return_statement )block )function_definition )module
Compute a mean-squared error loss between the documents' vectors and the prediction. Note that this is ripe for customization! We could compute the vectors in some other word, e.g. with an LSTM language model, or use some other type of objective.
(module (function_definition (function_name_create_game) function_name_create_game (parameters (identifier_self) identifier_self (identifier_map_name) identifier_map_name (default_parameter (identifier_bot_difficulty) identifier_bot_difficulty (attribute (identifier_sc_pb) identifier_sc_pb (identifier_VeryEasy) identifier_VeryEasy )attribute )default_parameter (default_parameter (identifier_bot_race) identifier_bot_race (attribute (identifier_sc_common) identifier_sc_common (identifier_Random) identifier_Random )attribute )default_parameter (default_parameter (identifier_bot_first) identifier_bot_first (False) False )default_parameter )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__controller) identifier__controller )attribute (identifier_ping) identifier_ping )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_map_inst) identifier_map_inst (call (attribute (identifier_maps) identifier_maps (identifier_get) identifier_get )attribute (argument_list (identifier_map_name) identifier_map_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_map_data) identifier_map_data (call (attribute (identifier_map_inst) identifier_map_inst (identifier_data) identifier_data )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__run_config) identifier__run_config )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_map_name) identifier_map_name (attribute (identifier_self) identifier_self (identifier__saved_maps) identifier__saved_maps )attribute )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__controller) identifier__controller )attribute (identifier_save_map) identifier_save_map )attribute (argument_list (attribute (identifier_map_inst) identifier_map_inst (identifier_path) identifier_path )attribute (identifier_map_data) identifier_map_data )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__saved_maps) identifier__saved_maps )attribute (identifier_add) identifier_add )attribute (argument_list (identifier_map_name) identifier_map_name )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_create) identifier_create (call (attribute (identifier_sc_pb) identifier_sc_pb (identifier_RequestCreateGame) identifier_RequestCreateGame )attribute (argument_list (keyword_argument (identifier_local_map) identifier_local_map (call (attribute (identifier_sc_pb) identifier_sc_pb (identifier_LocalMap) identifier_LocalMap )attribute (argument_list (keyword_argument (identifier_map_path) identifier_map_path (attribute (identifier_map_inst) identifier_map_inst (identifier_path) identifier_path )attribute )keyword_argument (keyword_argument (identifier_map_data) identifier_map_data (identifier_map_data) identifier_map_data )keyword_argument )argument_list )call )keyword_argument (keyword_argument (identifier_disable_fog) identifier_disable_fog (False) False )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_bot_first) identifier_bot_first )not_operator (block (expression_statement (call (attribute (attribute (identifier_create) identifier_create (identifier_player_setup) identifier_player_setup )attribute (identifier_add) identifier_add )attribute (argument_list (keyword_argument (identifier_type) identifier_type (attribute (identifier_sc_pb) identifier_sc_pb (identifier_Participant) identifier_Participant )attribute )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_create) identifier_create (identifier_player_setup) identifier_player_setup )attribute (identifier_add) identifier_add )attribute (argument_list (keyword_argument (identifier_type) identifier_type (attribute (identifier_sc_pb) identifier_sc_pb (identifier_Computer) identifier_Computer )attribute )keyword_argument (keyword_argument (identifier_race) identifier_race (identifier_bot_race) identifier_bot_race )keyword_argument (keyword_argument (identifier_difficulty) identifier_difficulty (identifier_bot_difficulty) identifier_bot_difficulty )keyword_argument )argument_list )call )expression_statement (if_statement (identifier_bot_first) identifier_bot_first (block (expression_statement (call (attribute (attribute (identifier_create) identifier_create (identifier_player_setup) identifier_player_setup )attribute (identifier_add) identifier_add )attribute (argument_list (keyword_argument (identifier_type) identifier_type (attribute (identifier_sc_pb) identifier_sc_pb (identifier_Participant) identifier_Participant )attribute )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__controller) identifier__controller )attribute (identifier_create_game) identifier_create_game )attribute (argument_list (identifier_create) identifier_create )argument_list )call )expression_statement )block )function_definition )module
Create a game, one remote agent vs the specified bot. Args: map_name: The map to use. bot_difficulty: The difficulty of the bot to play against. bot_race: The race for the bot. bot_first: Whether the bot should be player 1 (else is player 2).
(module (function_definition (function_name_filter) function_name_filter (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (boolean_operator (identifier_args) identifier_args (identifier_kwargs) identifier_kwargs )boolean_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_q_filters) identifier_q_filters )attribute (call (identifier_Q) identifier_Q (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_q_filters) identifier_q_filters )attribute (call (identifier_Q) identifier_Q (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Apply filters to the existing nodes in the set. :param kwargs: filter parameters Filters mimic Django's syntax with the double '__' to separate field and operators. e.g `.filter(salary__gt=20000)` results in `salary > 20000`. The following operators are available: * 'lt': less than * 'gt': greater than * 'lte': less than or equal to * 'gte': greater than or equal to * 'ne': not equal to * 'in': matches one of list (or tuple) * 'isnull': is null * 'regex': matches supplied regex (neo4j regex format) * 'exact': exactly match string (just '=') * 'iexact': case insensitive match string * 'contains': contains string * 'icontains': case insensitive contains * 'startswith': string starts with * 'istartswith': case insensitive string starts with * 'endswith': string ends with * 'iendswith': case insensitive string ends with :return: self
(module (function_definition (function_name_get_connection_params) function_name_get_connection_params (parameters (identifier_self) identifier_self )parameters (block (return_statement (dictionary (pair (string_'uri') string_'uri' (subscript (attribute (identifier_self) identifier_self (identifier_settings_dict) identifier_settings_dict )attribute (string_'NAME') string_'NAME' )subscript )pair (pair (string_'tls') string_'tls' (call (attribute (attribute (identifier_self) identifier_self (identifier_settings_dict) identifier_settings_dict )attribute (identifier_get) identifier_get )attribute (argument_list (string_'TLS') string_'TLS' (False) False )argument_list )call )pair (pair (string_'bind_dn') string_'bind_dn' (subscript (attribute (identifier_self) identifier_self (identifier_settings_dict) identifier_settings_dict )attribute (string_'USER') string_'USER' )subscript )pair (pair (string_'bind_pw') string_'bind_pw' (subscript (attribute (identifier_self) identifier_self (identifier_settings_dict) identifier_settings_dict )attribute (string_'PASSWORD') string_'PASSWORD' )subscript )pair (pair (string_'retry_max') string_'retry_max' (call (attribute (attribute (identifier_self) identifier_self (identifier_settings_dict) identifier_settings_dict )attribute (identifier_get) identifier_get )attribute (argument_list (string_'RETRY_MAX') string_'RETRY_MAX' (integer_1) integer_1 )argument_list )call )pair (pair (string_'retry_delay') string_'retry_delay' (call (attribute (attribute (identifier_self) identifier_self (identifier_settings_dict) identifier_settings_dict )attribute (identifier_get) identifier_get )attribute (argument_list (string_'RETRY_DELAY') string_'RETRY_DELAY' (float_60.0) float_60.0 )argument_list )call )pair (pair (string_'options') string_'options' (dictionary_comprehension (pair (conditional_expression (identifier_k) identifier_k (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_k) identifier_k (identifier_int) identifier_int )argument_list )call (call (attribute (identifier_k) identifier_k (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )conditional_expression (identifier_v) identifier_v )pair (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_settings_dict) identifier_settings_dict )attribute (identifier_get) identifier_get )attribute (argument_list (string_'CONNECTION_OPTIONS') string_'CONNECTION_OPTIONS' (dictionary )dictionary )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )pair )dictionary )return_statement )block )function_definition )module
Compute appropriate parameters for establishing a new connection. Computed at system startup.
(module (function_definition (function_name_multi_pop) function_name_multi_pop (parameters (identifier_d) identifier_d (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_retval) identifier_retval (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_args) identifier_args (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_d) identifier_d )comparison_operator (block (expression_statement (assignment (subscript (identifier_retval) identifier_retval (identifier_key) identifier_key )subscript (call (attribute (identifier_d) identifier_d (identifier_pop) identifier_pop )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_retval) identifier_retval )return_statement )block )function_definition )module
pops multiple keys off a dict like object
(module (function_definition (function_name_parse_input) function_name_parse_input (parameters (identifier_self) identifier_self (identifier_text) identifier_text )parameters (block (expression_statement (assignment (identifier_parts) identifier_parts (call (attribute (identifier_util) identifier_util (identifier_split) identifier_split )attribute (argument_list (identifier_text) identifier_text )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_command) identifier_command (conditional_expression (subscript (identifier_parts) identifier_parts (integer_0) integer_0 )subscript (boolean_operator (identifier_text) identifier_text (identifier_parts) identifier_parts )boolean_operator (None) None )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_command) identifier_command (conditional_expression (call (attribute (identifier_command) identifier_command (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_command) identifier_command (None) None )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_args) identifier_args (conditional_expression (subscript (identifier_parts) identifier_parts (slice (integer_1) integer_1 (colon) colon )slice )subscript (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_parts) identifier_parts )argument_list )call (integer_1) integer_1 )comparison_operator (list )list )conditional_expression )assignment )expression_statement (return_statement (tuple (identifier_command) identifier_command (identifier_args) identifier_args )tuple )return_statement )block )function_definition )module
Parse ctl user input. Double quotes are used to group together multi words arguments.
(module (function_definition (function_name_get_json) function_name_get_json (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (identifier_usernotes) identifier_usernotes (attribute (subscript (attribute (attribute (identifier_self) identifier_self (identifier_subreddit) identifier_subreddit )attribute (identifier_wiki) identifier_wiki )attribute (attribute (identifier_self) identifier_self (identifier_page_name) identifier_page_name )attribute )subscript (identifier_content_md) identifier_content_md )attribute )assignment )expression_statement (expression_statement (assignment (identifier_notes) identifier_notes (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_usernotes) identifier_usernotes )argument_list )call )assignment )expression_statement )block (except_clause (identifier_NotFound) identifier_NotFound (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__init_notes) identifier__init_notes )attribute (argument_list )argument_list )call )expression_statement )block )except_clause (else_clause (block (if_statement (comparison_operator (subscript (identifier_notes) identifier_notes (string_'ver') string_'ver' )subscript (attribute (identifier_self) identifier_self (identifier_schema) identifier_schema )attribute )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (call (attribute (string_'Usernotes schema is v{0}, puni requires v{1}') string_'Usernotes schema is v{0}, puni requires v{1}' (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_notes) identifier_notes (string_'ver') string_'ver' )subscript (attribute (identifier_self) identifier_self (identifier_schema) identifier_schema )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_cached_json) identifier_cached_json )attribute (call (attribute (identifier_self) identifier_self (identifier__expand_json) identifier__expand_json )attribute (argument_list (identifier_notes) identifier_notes )argument_list )call )assignment )expression_statement )block )else_clause )try_statement (return_statement (attribute (identifier_self) identifier_self (identifier_cached_json) identifier_cached_json )attribute )return_statement )block )function_definition )module
Get the JSON stored on the usernotes wiki page. Returns a dict representation of the usernotes (with the notes BLOB decoded). Raises: RuntimeError if the usernotes version is incompatible with this version of puni.
(module (function_definition (function_name_get_error_code_msg) function_name_get_error_code_msg (parameters (identifier_cls) identifier_cls (identifier_full_error_message) identifier_full_error_message )parameters (block (for_statement (identifier_pattern) identifier_pattern (attribute (identifier_cls) identifier_cls (identifier_ERROR_PATTERNS) identifier_ERROR_PATTERNS )attribute (block (expression_statement (assignment (identifier_match) identifier_match (call (attribute (identifier_pattern) identifier_pattern (identifier_match) identifier_match )attribute (argument_list (identifier_full_error_message) identifier_full_error_message )argument_list )call )assignment )expression_statement (if_statement (identifier_match) identifier_match (block (return_statement (expression_list (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_match) identifier_match (identifier_group) identifier_group )attribute (argument_list (string_'code') string_'code' )argument_list )call )argument_list )call (call (attribute (call (attribute (identifier_match) identifier_match (identifier_group) identifier_group )attribute (argument_list (string_'msg') string_'msg' )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )expression_list )return_statement )block )if_statement )block )for_statement (return_statement (expression_list (integer_0) integer_0 (identifier_full_error_message) identifier_full_error_message )expression_list )return_statement )block )function_definition )module
Extract the code and message of the exception that clickhouse-server generated. See the list of error codes here: https://github.com/yandex/ClickHouse/blob/master/dbms/src/Common/ErrorCodes.cpp
(module (function_definition (function_name_read_json) function_name_read_json (parameters (identifier_file_path) identifier_file_path )parameters (block (try_statement (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_file_path) identifier_file_path (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_config) identifier_config (call (attribute (identifier_json_tricks) identifier_json_tricks (identifier_load) identifier_load )attribute (argument_list (identifier_f) identifier_f )argument_list )call )assignment )expression_statement )block )with_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_' ') string_' ' (binary_operator (string_'!') string_'!' (integer_58) integer_58 )binary_operator )binary_operator )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_' Woops! Looks the JSON syntax is not valid in:') string_' Woops! Looks the JSON syntax is not valid in:' )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_' {}') string_' {}' (identifier_format) identifier_format )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_' Note: commonly this is a result of having a trailing comma \n in the file') string_' Note: commonly this is a result of having a trailing comma \n in the file' )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_' ') string_' ' (binary_operator (string_'!') string_'!' (integer_58) integer_58 )binary_operator )binary_operator )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement (return_statement (identifier_config) identifier_config )return_statement )block )function_definition )module
Read in a json file and return a dictionary representation
(module (function_definition (function_name_set_encode_key_value) function_name_set_encode_key_value (parameters (identifier_self) identifier_self (identifier_value) identifier_value (default_parameter (identifier_store_type) identifier_store_type (identifier_PUBLIC_KEY_STORE_TYPE_BASE64) identifier_PUBLIC_KEY_STORE_TYPE_BASE64 )default_parameter )parameters (block (if_statement (comparison_operator (identifier_store_type) identifier_store_type (identifier_PUBLIC_KEY_STORE_TYPE_PEM) identifier_PUBLIC_KEY_STORE_TYPE_PEM )comparison_operator (block (expression_statement (call (attribute (identifier_PublicKeyBase) identifier_PublicKeyBase (identifier_set_encode_key_value) identifier_set_encode_key_value )attribute (argument_list (identifier_self) identifier_self (call (attribute (call (attribute (identifier_value) identifier_value (identifier_exportKey) identifier_exportKey )attribute (argument_list (string_'PEM') string_'PEM' )argument_list )call (identifier_decode) identifier_decode )attribute (argument_list )argument_list )call (identifier_store_type) identifier_store_type )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_PublicKeyBase) identifier_PublicKeyBase (identifier_set_encode_key_value) identifier_set_encode_key_value )attribute (argument_list (identifier_self) identifier_self (call (attribute (identifier_value) identifier_value (identifier_exportKey) identifier_exportKey )attribute (argument_list (string_'DER') string_'DER' )argument_list )call (identifier_store_type) identifier_store_type )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Set the value based on the type of encoding supported by RSA.
(module (function_definition (function_name_init_body_buffer) function_name_init_body_buffer (parameters (identifier_self) identifier_self (identifier_method) identifier_method (identifier_headers) identifier_headers )parameters (block (expression_statement (assignment (identifier_content_length) identifier_content_length (call (attribute (identifier_headers) identifier_headers (identifier_get) identifier_get )attribute (argument_list (string_"CONTENT-LENGTH") string_"CONTENT-LENGTH" (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_method) identifier_method (tuple (attribute (identifier_HTTPMethod) identifier_HTTPMethod (identifier_POST) identifier_POST )attribute (attribute (identifier_HTTPMethod) identifier_HTTPMethod (identifier_PUT) identifier_PUT )attribute )tuple )comparison_operator (block (if_statement (comparison_operator (identifier_content_length) identifier_content_length (None) None )comparison_operator (block (raise_statement (call (identifier_HTTPErrorBadRequest) identifier_HTTPErrorBadRequest (argument_list (string_"HTTP Method requires a CONTENT-LENGTH header") string_"HTTP Method requires a CONTENT-LENGTH header" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_content_length) identifier_content_length )attribute (call (identifier_int) identifier_int (argument_list (identifier_content_length) identifier_content_length )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_body_buffer) identifier_body_buffer )attribute (call (identifier_bytearray) identifier_bytearray (argument_list (integer_0) integer_0 )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_content_length) identifier_content_length (None) None )comparison_operator (block (raise_statement (call (identifier_HTTPErrorBadRequest) identifier_HTTPErrorBadRequest (argument_list (string_"HTTP method %s may NOT have a CONTENT-LENGTH header") string_"HTTP method %s may NOT have a CONTENT-LENGTH header" )argument_list )call )raise_statement )block )elif_clause )if_statement )block )function_definition )module
Sets up the body_buffer and content_length attributes based on method and headers.
(module (function_definition (function_name_to_cloudformation) function_name_to_cloudformation (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_resources) identifier_resources (list )list )assignment )expression_statement (expression_statement (assignment (identifier_function) identifier_function (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'function') string_'function' )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_function) identifier_function )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"Missing required keyword argument: function") string_"Missing required keyword argument: function" )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_Method) identifier_Method )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_Method) identifier_Method )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_Method) identifier_Method )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_resources) identifier_resources (identifier_extend) identifier_extend )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__get_permissions) identifier__get_permissions )attribute (argument_list (identifier_kwargs) identifier_kwargs )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_explicit_api) identifier_explicit_api (subscript (identifier_kwargs) identifier_kwargs (string_'explicit_api') string_'explicit_api' )subscript )assignment )expression_statement (if_statement (call (attribute (identifier_explicit_api) identifier_explicit_api (identifier_get) identifier_get )attribute (argument_list (string_"__MANAGE_SWAGGER") string_"__MANAGE_SWAGGER" )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_swagger_integration) identifier__add_swagger_integration )attribute (argument_list (identifier_explicit_api) identifier_explicit_api (identifier_function) identifier_function )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_resources) identifier_resources )return_statement )block )function_definition )module
If the Api event source has a RestApi property, then simply return the Lambda Permission resource allowing API Gateway to call the function. If no RestApi is provided, then additionally inject the path, method, and the x-amazon-apigateway-integration into the Swagger body for a provided implicit API. :param dict kwargs: a dict containing the implicit RestApi to be modified, should no explicit RestApi \ be provided. :returns: a list of vanilla CloudFormation Resources, to which this Api event expands :rtype: list
(module (function_definition (function_name_read) function_name_read (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (identifier_f) identifier_f (call (attribute (attribute (identifier_urllib) identifier_urllib (identifier_request) identifier_request )attribute (identifier_urlopen) identifier_urlopen )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (attribute (attribute (identifier_urllib) identifier_urllib (identifier_error) identifier_error )attribute (identifier_HTTPError) identifier_HTTPError )attribute (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (if_statement (comparison_operator (attribute (identifier_err) identifier_err (identifier_code) identifier_code )attribute (tuple (integer_401) integer_401 (integer_403) integer_403 )tuple )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_disallow_all) identifier_disallow_all )attribute (True) True )assignment )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_err) identifier_err (identifier_code) identifier_code )attribute (integer_400) integer_400 )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_allow_all) identifier_allow_all )attribute (True) True )assignment )expression_statement )block )elif_clause )if_statement )block )except_clause (else_clause (block (expression_statement (assignment (identifier_raw) identifier_raw (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_parse) identifier_parse )attribute (argument_list (call (attribute (call (attribute (identifier_raw) identifier_raw (identifier_decode) identifier_decode )attribute (argument_list (string_"utf-8") string_"utf-8" )argument_list )call (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )else_clause )try_statement )block )function_definition )module
Reads the robots.txt URL and feeds it to the parser.
(module (function_definition (function_name_predict) function_name_predict (parameters (identifier_self) identifier_self (identifier_dataset) identifier_dataset (default_parameter (identifier_new_observation_data) identifier_new_observation_data (None) None )default_parameter (default_parameter (identifier_new_user_data) identifier_new_user_data (None) None )default_parameter (default_parameter (identifier_new_item_data) identifier_new_item_data (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_new_observation_data) identifier_new_observation_data (None) None )comparison_operator (block (expression_statement (assignment (identifier_new_observation_data) identifier_new_observation_data (call (identifier__SFrame) identifier__SFrame (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_new_user_data) identifier_new_user_data (None) None )comparison_operator (block (expression_statement (assignment (identifier_new_user_data) identifier_new_user_data (call (identifier__SFrame) identifier__SFrame (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_new_item_data) identifier_new_item_data (None) None )comparison_operator (block (expression_statement (assignment (identifier_new_item_data) identifier_new_item_data (call (identifier__SFrame) identifier__SFrame (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_dataset) identifier_dataset (call (attribute (identifier_self) identifier_self (identifier___prepare_dataset_parameter) identifier___prepare_dataset_parameter )attribute (argument_list (identifier_dataset) identifier_dataset )argument_list )call )assignment )expression_statement (function_definition (function_name_check_type) function_name_check_type (parameters (identifier_arg) identifier_arg (identifier_arg_name) identifier_arg_name (identifier_required_type) identifier_required_type (identifier_allowed_types) identifier_allowed_types )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_arg) identifier_arg (identifier_required_type) identifier_required_type )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (string_"Parameter ") string_"Parameter " (identifier_arg_name) identifier_arg_name )binary_operator (string_" must be of type(s) ") string_" must be of type(s) " )binary_operator (parenthesized_expression (call (attribute (string_", ") string_", " (identifier_join) identifier_join )attribute (argument_list (identifier_allowed_types) identifier_allowed_types )argument_list )call )parenthesized_expression )binary_operator (string_"; Type '") string_"; Type '" )binary_operator (call (identifier_str) identifier_str (argument_list (call (identifier_type) identifier_type (argument_list (identifier_arg) identifier_arg )argument_list )call )argument_list )call )binary_operator (string_"' not recognized.") string_"' not recognized." )binary_operator )argument_list )call )raise_statement )block )if_statement )block )function_definition (expression_statement (call (identifier_check_type) identifier_check_type (argument_list (identifier_new_observation_data) identifier_new_observation_data (string_"new_observation_data") string_"new_observation_data" (identifier__SFrame) identifier__SFrame (list (string_"SFrame") string_"SFrame" )list )argument_list )call )expression_statement (expression_statement (call (identifier_check_type) identifier_check_type (argument_list (identifier_new_user_data) identifier_new_user_data (string_"new_user_data") string_"new_user_data" (identifier__SFrame) identifier__SFrame (list (string_"SFrame") string_"SFrame" )list )argument_list )call )expression_statement (expression_statement (call (identifier_check_type) identifier_check_type (argument_list (identifier_new_item_data) identifier_new_item_data (string_"new_item_data") string_"new_item_data" (identifier__SFrame) identifier__SFrame (list (string_"SFrame") string_"SFrame" )list )argument_list )call )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier___proxy__) identifier___proxy__ )attribute (identifier_predict) identifier_predict )attribute (argument_list (identifier_dataset) identifier_dataset (identifier_new_user_data) identifier_new_user_data (identifier_new_item_data) identifier_new_item_data )argument_list )call )assignment )expression_statement (return_statement (subscript (identifier_response) identifier_response (string_'prediction') string_'prediction' )subscript )return_statement )block )function_definition )module
Return a score prediction for the user ids and item ids in the provided data set. Parameters ---------- dataset : SFrame Dataset in the same form used for training. new_observation_data : SFrame, optional ``new_observation_data`` gives additional observation data to the model, which may be used by the models to improve score accuracy. Must be in the same format as the observation data passed to ``create``. How this data is used varies by model. new_user_data : SFrame, optional ``new_user_data`` may give additional user data to the model. If present, scoring is done with reference to this new information. If there is any overlap with the side information present at training time, then this new side data is preferred. Must be in the same format as the user data passed to ``create``. new_item_data : SFrame, optional ``new_item_data`` may give additional item data to the model. If present, scoring is done with reference to this new information. If there is any overlap with the side information present at training time, then this new side data is preferred. Must be in the same format as the item data passed to ``create``. Returns ------- out : SArray An SArray with predicted scores for each given observation predicted by the model. See Also -------- recommend, evaluate
(module (function_definition (function_name_get_log_entry_log_session) function_name_get_log_entry_log_session (parameters (identifier_self) identifier_self (identifier_proxy) identifier_proxy )parameters (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_supports_log_entry_log) identifier_supports_log_entry_log )attribute (argument_list )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_Unimplemented) identifier_Unimplemented )attribute (argument_list )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (identifier_sessions) identifier_sessions (identifier_LogEntryLogSession) identifier_LogEntryLogSession )attribute (argument_list (keyword_argument (identifier_proxy) identifier_proxy (identifier_proxy) identifier_proxy )keyword_argument (keyword_argument (identifier_runtime) identifier_runtime (attribute (identifier_self) identifier_self (identifier__runtime) identifier__runtime )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Gets the session for retrieving log entry to log mappings. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.logging.LogEntryLogSession) - a ``LogEntryLogSession`` raise: NullArgument - ``proxy`` is ``null`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_log_entry_log()`` is ``false`` *compliance: optional -- This method must be implemented if ``supports_log_entry_log()`` is ``true``.*
(module (function_definition (function_name_get_property) function_name_get_property (parameters (identifier_self) identifier_self (typed_parameter (identifier_property_key) identifier_property_key (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__check_object_exists) identifier__check_object_exists )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (attribute (identifier_DB) identifier_DB (identifier_get_hash_value) identifier_get_hash_value )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute (identifier_property_key) identifier_property_key )argument_list )call )return_statement )block )function_definition )module
Get a scheduling object property.
(module (function_definition (function_name__read) function_name__read (parameters (identifier_self) identifier_self (identifier_directory) identifier_directory (identifier_filename) identifier_filename (identifier_session) identifier_session (identifier_path) identifier_path (identifier_name) identifier_name (identifier_extension) identifier_extension (identifier_spatial) identifier_spatial (identifier_spatialReferenceID) identifier_spatialReferenceID (identifier_replaceParamFile) identifier_replaceParamFile )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (identifier_name) identifier_name )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_fileExtension) identifier_fileExtension )attribute (identifier_extension) identifier_extension )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_path) identifier_path (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_text) identifier_text )attribute (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement )block )with_statement )block )function_definition )module
Generic File Read from File Method
(module (function_definition (function_name_to_frequencies) function_name_to_frequencies (parameters (identifier_self) identifier_self (default_parameter (identifier_fill) identifier_fill (attribute (identifier_np) identifier_np (identifier_nan) identifier_nan )attribute )default_parameter )parameters (block (expression_statement (assignment (identifier_an) identifier_an (subscript (call (attribute (identifier_np) identifier_np (identifier_sum) identifier_sum )attribute (argument_list (identifier_self) identifier_self (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call (slice (colon) colon )slice (None) None )subscript )assignment )expression_statement (with_statement (with_clause (with_item (call (identifier_ignore_invalid) identifier_ignore_invalid (argument_list )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_af) identifier_af (call (attribute (identifier_np) identifier_np (identifier_where) identifier_where )attribute (argument_list (comparison_operator (identifier_an) identifier_an (integer_0) integer_0 )comparison_operator (binary_operator (identifier_self) identifier_self (identifier_an) identifier_an )binary_operator (identifier_fill) identifier_fill )argument_list )call )assignment )expression_statement )block )with_statement (return_statement (identifier_af) identifier_af )return_statement )block )function_definition )module
Compute allele frequencies. Parameters ---------- fill : float, optional Value to use when number of allele calls is 0. Returns ------- af : ndarray, float, shape (n_variants, n_alleles) Examples -------- >>> import allel >>> g = allel.GenotypeArray([[[0, 0], [0, 1]], ... [[0, 2], [1, 1]], ... [[2, 2], [-1, -1]]]) >>> ac = g.count_alleles() >>> ac.to_frequencies() array([[0.75, 0.25, 0. ], [0.25, 0.5 , 0.25], [0. , 0. , 1. ]])
(module (function_definition (function_name_LessThan) function_name_LessThan (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__awql) identifier__awql )attribute (call (attribute (identifier_self) identifier_self (identifier__CreateSingleValueCondition) identifier__CreateSingleValueCondition )attribute (argument_list (identifier_value) identifier_value (string_'<') string_'<' )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier__query_builder) identifier__query_builder )attribute )return_statement )block )function_definition )module
Sets the type of the WHERE clause as "less than". Args: value: The value to be used in the WHERE condition. Returns: The query builder that this WHERE builder links to.
(module (function_definition (function_name_set_output) function_name_set_output (parameters (identifier_self) identifier_self (identifier_outfile) identifier_outfile )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__orig_stdout) identifier__orig_stdout )attribute (block (expression_statement (assignment (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (attribute (identifier_self) identifier_self (identifier__orig_stdout) identifier__orig_stdout )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__stream) identifier__stream )attribute (identifier_outfile) identifier_outfile )assignment )expression_statement (expression_statement (assignment (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (call (identifier__LineWriter) identifier__LineWriter (argument_list (identifier_self) identifier_self (attribute (identifier_self) identifier_self (identifier__stream) identifier__stream )attribute (attribute (identifier_self) identifier_self (identifier_default) identifier_default )attribute )argument_list )call )assignment )expression_statement )block )function_definition )module
Set's the output file, currently only useful with context-managers. Note: This function is experimental and may not last.
(module (function_definition (function_name_register_scope) function_name_register_scope (parameters (identifier_self) identifier_self (identifier_scope) identifier_scope )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_scope) identifier_scope (identifier_Scope) identifier_Scope )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"Invalid scope type.") string_"Invalid scope type." )argument_list )call )raise_statement )block )if_statement (assert_statement (comparison_operator (attribute (identifier_scope) identifier_scope (identifier_id) identifier_id )attribute (attribute (identifier_self) identifier_self (identifier_scopes) identifier_scopes )attribute )comparison_operator )assert_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_scopes) identifier_scopes )attribute (attribute (identifier_scope) identifier_scope (identifier_id) identifier_id )attribute )subscript (identifier_scope) identifier_scope )assignment )expression_statement )block )function_definition )module
Register a scope. :param scope: A :class:`invenio_oauth2server.models.Scope` instance.
(module (function_definition (function_name_spkuds) function_name_spkuds (parameters (identifier_descr) identifier_descr )parameters (block (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_descr) identifier_descr )argument_list )call (integer_5) integer_5 )comparison_operator )assert_statement (expression_statement (assignment (identifier_descr) identifier_descr (call (attribute (identifier_stypes) identifier_stypes (identifier_toDoubleVector) identifier_toDoubleVector )attribute (argument_list (identifier_descr) identifier_descr )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_body) identifier_body (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_center) identifier_center (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_framenum) identifier_framenum (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_typenum) identifier_typenum (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_first) identifier_first (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_double) identifier_c_double )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_last) identifier_last (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_double) identifier_c_double )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_begin) identifier_begin (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_end) identifier_end (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_libspice) identifier_libspice (identifier_spkuds_c) identifier_spkuds_c )attribute (argument_list (identifier_descr) identifier_descr (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_body) identifier_body )argument_list )call (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_center) identifier_center )argument_list )call (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_framenum) identifier_framenum )argument_list )call (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_typenum) identifier_typenum )argument_list )call (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_first) identifier_first )argument_list )call (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_last) identifier_last )argument_list )call (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_begin) identifier_begin )argument_list )call (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_end) identifier_end )argument_list )call )argument_list )call )expression_statement (return_statement (expression_list (attribute (identifier_body) identifier_body (identifier_value) identifier_value )attribute (attribute (identifier_center) identifier_center (identifier_value) identifier_value )attribute (attribute (identifier_framenum) identifier_framenum (identifier_value) identifier_value )attribute (attribute (identifier_typenum) identifier_typenum (identifier_value) identifier_value )attribute (line_continuation_\) line_continuation_\ (attribute (identifier_first) identifier_first (identifier_value) identifier_value )attribute (attribute (identifier_last) identifier_last (identifier_value) identifier_value )attribute (attribute (identifier_begin) identifier_begin (identifier_value) identifier_value )attribute (attribute (identifier_end) identifier_end (identifier_value) identifier_value )attribute )expression_list )return_statement )block )function_definition )module
Unpack the contents of an SPK segment descriptor. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkuds_c.html :param descr: An SPK segment descriptor. :type descr: 5-Element Array of floats :return: The NAIF ID code for the body of the segment, The center of motion for body, The ID code for the frame of this segment, The type of SPK segment, The first epoch for which the segment is valid, The last epoch for which the segment is valid, Beginning DAF address of the segment, Ending DAF address of the segment. :rtype: tuple
(module (function_definition (function_name_add_nio) function_name_add_nio (parameters (identifier_self) identifier_self (identifier_nio) identifier_nio (identifier_port_number) identifier_port_number )parameters (block (if_statement (comparison_operator (identifier_port_number) identifier_port_number (attribute (identifier_self) identifier_self (identifier__nios) identifier__nios )attribute )comparison_operator (block (raise_statement (call (identifier_DynamipsError) identifier_DynamipsError (argument_list (call (attribute (string_"Port {} isn't free") string_"Port {} isn't free" (identifier_format) identifier_format )attribute (argument_list (identifier_port_number) identifier_port_number )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (yield (call (attribute (attribute (identifier_self) identifier_self (identifier__hypervisor) identifier__hypervisor )attribute (identifier_send) identifier_send )attribute (argument_list (call (attribute (string_'ethsw add_nio "{name}" {nio}') string_'ethsw add_nio "{name}" {nio}' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier__name) identifier__name )attribute )keyword_argument (keyword_argument (identifier_nio) identifier_nio (identifier_nio) identifier_nio )keyword_argument )argument_list )call )argument_list )call )yield )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_'Ethernet switch "{name}" [{id}]: NIO {nio} bound to port {port}') string_'Ethernet switch "{name}" [{id}]: NIO {nio} bound to port {port}' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier__name) identifier__name )attribute )keyword_argument (keyword_argument (identifier_id) identifier_id (attribute (identifier_self) identifier_self (identifier__id) identifier__id )attribute )keyword_argument (keyword_argument (identifier_nio) identifier_nio (identifier_nio) identifier_nio )keyword_argument (keyword_argument (identifier_port) identifier_port (identifier_port_number) identifier_port_number )keyword_argument )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__nios) identifier__nios )attribute (identifier_port_number) identifier_port_number )subscript (identifier_nio) identifier_nio )assignment )expression_statement (for_statement (identifier_port_settings) identifier_port_settings (attribute (identifier_self) identifier_self (identifier__ports) identifier__ports )attribute (block (if_statement (comparison_operator (subscript (identifier_port_settings) identifier_port_settings (string_"port_number") string_"port_number" )subscript (identifier_port_number) identifier_port_number )comparison_operator (block (expression_statement (yield (call (attribute (identifier_self) identifier_self (identifier_set_port_settings) identifier_set_port_settings )attribute (argument_list (identifier_port_number) identifier_port_number (identifier_port_settings) identifier_port_settings )argument_list )call )yield )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement )block )function_definition )module
Adds a NIO as new port on Ethernet switch. :param nio: NIO instance to add :param port_number: port to allocate for the NIO
(module (function_definition (function_name_monkey_patch) function_name_monkey_patch (parameters )parameters (block (expression_statement (call (identifier_reset) identifier_reset (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_time_mod) identifier_time_mod (identifier_time) identifier_time )attribute (identifier_time) identifier_time )assignment )expression_statement (expression_statement (assignment (attribute (identifier_time_mod) identifier_time_mod (identifier_sleep) identifier_sleep )attribute (identifier_sleep) identifier_sleep )assignment )expression_statement (expression_statement (assignment (attribute (identifier_time_mod) identifier_time_mod (identifier_gmtime) identifier_gmtime )attribute (identifier_gmtime) identifier_gmtime )assignment )expression_statement (expression_statement (assignment (attribute (identifier_time_mod) identifier_time_mod (identifier_localtime) identifier_localtime )attribute (identifier_localtime) identifier_localtime )assignment )expression_statement (expression_statement (assignment (attribute (identifier_time_mod) identifier_time_mod (identifier_ctime) identifier_ctime )attribute (identifier_ctime) identifier_ctime )assignment )expression_statement (expression_statement (assignment (attribute (identifier_time_mod) identifier_time_mod (identifier_asctime) identifier_asctime )attribute (identifier_asctime) identifier_asctime )assignment )expression_statement (expression_statement (assignment (attribute (identifier_time_mod) identifier_time_mod (identifier_strftime) identifier_strftime )attribute (identifier_strftime) identifier_strftime )assignment )expression_statement )block )function_definition )module
monkey patch `time` module to use out versions
(module (function_definition (function_name_get_function_for_aws_event) function_name_get_function_for_aws_event (parameters (identifier_self) identifier_self (identifier_record) identifier_record )parameters (block (if_statement (comparison_operator (string_'s3') string_'s3' (identifier_record) identifier_record )comparison_operator (block (if_statement (comparison_operator (string_':') string_':' (subscript (subscript (identifier_record) identifier_record (string_'s3') string_'s3' )subscript (string_'configurationId') string_'configurationId' )subscript )comparison_operator (block (return_statement (subscript (call (attribute (subscript (subscript (identifier_record) identifier_record (string_'s3') string_'s3' )subscript (string_'configurationId') string_'configurationId' )subscript (identifier_split) identifier_split )attribute (argument_list (string_':') string_':' )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript )return_statement )block )if_statement )block )if_statement (expression_statement (assignment (identifier_arn) identifier_arn (None) None )assignment )expression_statement (if_statement (comparison_operator (string_'Sns') string_'Sns' (identifier_record) identifier_record )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_message) identifier_message (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (subscript (subscript (identifier_record) identifier_record (string_'Sns') string_'Sns' )subscript (string_'Message') string_'Message' )subscript )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_message) identifier_message (identifier_get) identifier_get )attribute (argument_list (string_'command') string_'command' )argument_list )call (block (return_statement (subscript (identifier_message) identifier_message (string_'command') string_'command' )subscript )return_statement )block )if_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_arn) identifier_arn (call (attribute (subscript (identifier_record) identifier_record (string_'Sns') string_'Sns' )subscript (identifier_get) identifier_get )attribute (argument_list (string_'TopicArn') string_'TopicArn' )argument_list )call )assignment )expression_statement )block (elif_clause (boolean_operator (comparison_operator (string_'dynamodb') string_'dynamodb' (identifier_record) identifier_record )comparison_operator (comparison_operator (string_'kinesis') string_'kinesis' (identifier_record) identifier_record )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_arn) identifier_arn (call (attribute (identifier_record) identifier_record (identifier_get) identifier_get )attribute (argument_list (string_'eventSourceARN') string_'eventSourceARN' )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (boolean_operator (comparison_operator (string_'eventSource') string_'eventSource' (identifier_record) identifier_record )comparison_operator (comparison_operator (call (attribute (identifier_record) identifier_record (identifier_get) identifier_get )attribute (argument_list (string_'eventSource') string_'eventSource' )argument_list )call (string_'aws:sqs') string_'aws:sqs' )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_arn) identifier_arn (call (attribute (identifier_record) identifier_record (identifier_get) identifier_get )attribute (argument_list (string_'eventSourceARN') string_'eventSourceARN' )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (string_'s3') string_'s3' (identifier_record) identifier_record )comparison_operator (block (expression_statement (assignment (identifier_arn) identifier_arn (subscript (subscript (subscript (identifier_record) identifier_record (string_'s3') string_'s3' )subscript (string_'bucket') string_'bucket' )subscript (string_'arn') string_'arn' )subscript )assignment )expression_statement )block )elif_clause )if_statement (if_statement (identifier_arn) identifier_arn (block (return_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (identifier_AWS_EVENT_MAPPING) identifier_AWS_EVENT_MAPPING )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_arn) identifier_arn )argument_list )call )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Get the associated function to execute for a triggered AWS event Support S3, SNS, DynamoDB, kinesis and SQS events
(module (function_definition (function_name_run_script) function_name_run_script (parameters (identifier_pycode) identifier_pycode )parameters (block (if_statement (comparison_operator (subscript (identifier_pycode) identifier_pycode (integer_0) integer_0 )subscript (string_"\n") string_"\n" )comparison_operator (block (expression_statement (assignment (identifier_pycode) identifier_pycode (subscript (identifier_pycode) identifier_pycode (slice (integer_1) integer_1 (colon) colon )slice )subscript )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_pycode) identifier_pycode (identifier_rstrip) identifier_rstrip )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_pycode) identifier_pycode (call (attribute (identifier_textwrap) identifier_textwrap (identifier_dedent) identifier_dedent )attribute (argument_list (identifier_pycode) identifier_pycode )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_globs) identifier_globs (dictionary )dictionary )assignment )expression_statement (expression_statement (call (attribute (identifier_six) identifier_six (identifier_exec_) identifier_exec_ )attribute (argument_list (identifier_pycode) identifier_pycode (identifier_globs) identifier_globs (identifier_globs) identifier_globs )argument_list )call )expression_statement (return_statement (identifier_globs) identifier_globs )return_statement )block )function_definition )module
Run the Python in `pycode`, and return a dict of the resulting globals.
(module (function_definition (function_name_embedding) function_name_embedding (parameters (identifier_self) identifier_self (identifier_sentences) identifier_sentences (default_parameter (identifier_oov_way) identifier_oov_way (string_'avg') string_'avg' )default_parameter )parameters (block (expression_statement (assignment (identifier_data_iter) identifier_data_iter (call (attribute (identifier_self) identifier_self (identifier_data_loader) identifier_data_loader )attribute (argument_list (keyword_argument (identifier_sentences) identifier_sentences (identifier_sentences) identifier_sentences )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_batches) identifier_batches (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_token_ids) identifier_token_ids (identifier_valid_length) identifier_valid_length (identifier_token_types) identifier_token_types )pattern_list (identifier_data_iter) identifier_data_iter (block (expression_statement (assignment (identifier_token_ids) identifier_token_ids (call (attribute (identifier_token_ids) identifier_token_ids (identifier_as_in_context) identifier_as_in_context )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_ctx) identifier_ctx )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_valid_length) identifier_valid_length (call (attribute (identifier_valid_length) identifier_valid_length (identifier_as_in_context) identifier_as_in_context )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_ctx) identifier_ctx )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_token_types) identifier_token_types (call (attribute (identifier_token_types) identifier_token_types (identifier_as_in_context) identifier_as_in_context )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_ctx) identifier_ctx )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sequence_outputs) identifier_sequence_outputs (call (attribute (identifier_self) identifier_self (identifier_bert) identifier_bert )attribute (argument_list (identifier_token_ids) identifier_token_ids (identifier_token_types) identifier_token_types (call (attribute (identifier_valid_length) identifier_valid_length (identifier_astype) identifier_astype )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_dtype) identifier_dtype )attribute )argument_list )call )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_token_id) identifier_token_id (identifier_sequence_output) identifier_sequence_output )pattern_list (call (identifier_zip) identifier_zip (argument_list (call (attribute (identifier_token_ids) identifier_token_ids (identifier_asnumpy) identifier_asnumpy )attribute (argument_list )argument_list )call (call (attribute (identifier_sequence_outputs) identifier_sequence_outputs (identifier_asnumpy) identifier_asnumpy )attribute (argument_list )argument_list )call )argument_list )call (block (expression_statement (call (attribute (identifier_batches) identifier_batches (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_token_id) identifier_token_id (identifier_sequence_output) identifier_sequence_output )tuple )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_oov) identifier_oov )attribute (argument_list (identifier_batches) identifier_batches (identifier_oov_way) identifier_oov_way )argument_list )call )return_statement )block )function_definition )module
Get tokens, tokens embedding Parameters ---------- sentences : List[str] sentences for encoding. oov_way : str, default avg. use **avg**, **sum** or **last** to get token embedding for those out of vocabulary words Returns ------- List[(List[str], List[ndarray])] List of tokens, and tokens embedding
(module (function_definition (function_name_extract) function_name_extract (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_name) identifier_name )argument_list )call (call (identifier_type) identifier_type (argument_list (string_'') string_'' )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_ndx) identifier_ndx (call (attribute (attribute (identifier_self) identifier_self (identifier_toc) identifier_toc )attribute (identifier_find) identifier_find )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_ndx) identifier_ndx (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement )block (else_clause (block (expression_statement (assignment (identifier_ndx) identifier_ndx (identifier_name) identifier_name )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (tuple_pattern (identifier_dpos) identifier_dpos (identifier_dlen) identifier_dlen (identifier_ulen) identifier_ulen (identifier_flag) identifier_flag (identifier_typcd) identifier_typcd (identifier_nm) identifier_nm )tuple_pattern (call (attribute (attribute (identifier_self) identifier_self (identifier_toc) identifier_toc )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_ndx) identifier_ndx )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_lib) identifier_lib )attribute (identifier_seek) identifier_seek )attribute (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_pkgstart) identifier_pkgstart )attribute (identifier_dpos) identifier_dpos )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_rslt) identifier_rslt (call (attribute (attribute (identifier_self) identifier_self (identifier_lib) identifier_lib )attribute (identifier_read) identifier_read )attribute (argument_list (identifier_dlen) identifier_dlen )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_flag) identifier_flag (integer_2) integer_2 )comparison_operator (block (global_statement (identifier_AES) identifier_AES )global_statement (import_statement (dotted_name (identifier_AES) identifier_AES )dotted_name )import_statement (expression_statement (assignment (identifier_key) identifier_key (subscript (identifier_rslt) identifier_rslt (slice (colon) colon (integer_32) integer_32 )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_rslt) identifier_rslt (call (attribute (call (attribute (identifier_AES) identifier_AES (identifier_new) identifier_new )attribute (argument_list (identifier_key) identifier_key (attribute (identifier_AES) identifier_AES (identifier_MODE_CFB) identifier_MODE_CFB )attribute (binary_operator (string_"\0") string_"\0" (attribute (identifier_AES) identifier_AES (identifier_block_size) identifier_block_size )attribute )binary_operator )argument_list )call (identifier_decrypt) identifier_decrypt )attribute (argument_list (subscript (identifier_rslt) identifier_rslt (slice (integer_32) integer_32 (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_flag) identifier_flag (integer_1) integer_1 )comparison_operator (comparison_operator (identifier_flag) identifier_flag (integer_2) integer_2 )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_rslt) identifier_rslt (call (attribute (identifier_zlib) identifier_zlib (identifier_decompress) identifier_decompress )attribute (argument_list (identifier_rslt) identifier_rslt )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_typcd) identifier_typcd (string_'M') string_'M' )comparison_operator (block (return_statement (tuple (integer_1) integer_1 (identifier_rslt) identifier_rslt )tuple )return_statement )block )if_statement (return_statement (tuple (integer_0) integer_0 (identifier_rslt) identifier_rslt )tuple )return_statement )block )function_definition )module
Get the contents of an entry. NAME is an entry name. Return the tuple (ispkg, contents). For non-Python resoures, ispkg is meaningless (and 0). Used by the import mechanism.
(module (function_definition (function_name_isDone) function_name_isDone (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_done) identifier_done (call (attribute (identifier_pydaq) identifier_pydaq (identifier_bool32) identifier_bool32 )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_IsTaskDone) identifier_IsTaskDone )attribute (argument_list (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_done) identifier_done )argument_list )call )argument_list )call )expression_statement (return_statement (attribute (identifier_done) identifier_done (identifier_value) identifier_value )attribute )return_statement )block )function_definition )module
Returns true if task is done.
(module (function_definition (function_name_rh45) function_name_rh45 (parameters (identifier_msg) identifier_msg )parameters (block (expression_statement (assignment (identifier_d) identifier_d (call (identifier_hex2bin) identifier_hex2bin (argument_list (call (identifier_data) identifier_data (argument_list (identifier_msg) identifier_msg )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_d) identifier_d (integer_38) integer_38 )subscript (string_'0') string_'0' )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_rh) identifier_rh (binary_operator (call (identifier_bin2int) identifier_bin2int (argument_list (subscript (identifier_d) identifier_d (slice (integer_39) integer_39 (colon) colon (integer_51) integer_51 )slice )subscript )argument_list )call (integer_16) integer_16 )binary_operator )assignment )expression_statement (return_statement (identifier_rh) identifier_rh )return_statement )block )function_definition )module
Radio height. Args: msg (String): 28 bytes hexadecimal message string Returns: int: radio height in ft
(module (function_definition (function_name__original_path) function_name__original_path (parameters (identifier_self) identifier_self (identifier_path) identifier_path )parameters (block (function_definition (function_name_components_to_path) function_name_components_to_path (parameters )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_path_components) identifier_path_components )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_normalized_components) identifier_normalized_components )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_normalized_components) identifier_normalized_components (identifier_extend) identifier_extend )attribute (argument_list (subscript (identifier_path_components) identifier_path_components (slice (call (identifier_len) identifier_len (argument_list (identifier_normalized_components) identifier_normalized_components )argument_list )call (colon) colon )slice )subscript )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_sep) identifier_sep (call (attribute (identifier_self) identifier_self (identifier__path_separator) identifier__path_separator )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_normalized_path) identifier_normalized_path (call (attribute (identifier_sep) identifier_sep (identifier_join) identifier_join )attribute (argument_list (identifier_normalized_components) identifier_normalized_components )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (attribute (identifier_path) identifier_path (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_sep) identifier_sep )argument_list )call (not_operator (call (attribute (identifier_normalized_path) identifier_normalized_path (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_sep) identifier_sep )argument_list )call )not_operator )boolean_operator (block (expression_statement (assignment (identifier_normalized_path) identifier_normalized_path (binary_operator (identifier_sep) identifier_sep (identifier_normalized_path) identifier_normalized_path )binary_operator )assignment )expression_statement )block )if_statement (return_statement (identifier_normalized_path) identifier_normalized_path )return_statement )block )function_definition (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_is_case_sensitive) identifier_is_case_sensitive )attribute (not_operator (identifier_path) identifier_path )not_operator )boolean_operator (block (return_statement (identifier_path) identifier_path )return_statement )block )if_statement (expression_statement (assignment (identifier_path_components) identifier_path_components (call (attribute (identifier_self) identifier_self (identifier__path_components) identifier__path_components )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_normalized_components) identifier_normalized_components (list )list )assignment )expression_statement (expression_statement (assignment (identifier_current_dir) identifier_current_dir (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute )assignment )expression_statement (for_statement (identifier_component) identifier_component (identifier_path_components) identifier_path_components (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_current_dir) identifier_current_dir (identifier_FakeDirectory) identifier_FakeDirectory )argument_list )call )not_operator (block (return_statement (call (identifier_components_to_path) identifier_components_to_path (argument_list )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_dir_name) identifier_dir_name (identifier_current_dir) identifier_current_dir )pattern_list (call (attribute (identifier_self) identifier_self (identifier__directory_content) identifier__directory_content )attribute (argument_list (identifier_current_dir) identifier_current_dir (identifier_component) identifier_component )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_current_dir) identifier_current_dir (None) None )comparison_operator (parenthesized_expression (boolean_operator (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_current_dir) identifier_current_dir (identifier_FakeDirectory) identifier_FakeDirectory )argument_list )call (comparison_operator (attribute (identifier_current_dir) identifier_current_dir (identifier__byte_contents) identifier__byte_contents )attribute (None) None )comparison_operator )boolean_operator (comparison_operator (attribute (identifier_current_dir) identifier_current_dir (identifier_st_size) identifier_st_size )attribute (integer_0) integer_0 )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (block (return_statement (call (identifier_components_to_path) identifier_components_to_path (argument_list )argument_list )call )return_statement )block )if_statement (expression_statement (call (attribute (identifier_normalized_components) identifier_normalized_components (identifier_append) identifier_append )attribute (argument_list (identifier_dir_name) identifier_dir_name )argument_list )call )expression_statement )block )for_statement (return_statement (call (identifier_components_to_path) identifier_components_to_path (argument_list )argument_list )call )return_statement )block )function_definition )module
Return a normalized case version of the given path for case-insensitive file systems. For case-sensitive file systems, return path unchanged. Args: path: the file path to be transformed Returns: A version of path matching the case of existing path elements.
(module (function_definition (function_name_build) function_name_build (parameters (identifier_self) identifier_self (default_parameter (identifier_stmts) identifier_stmts (None) None )default_parameter (default_parameter (identifier_set_check_var) identifier_set_check_var (True) True )default_parameter (default_parameter (identifier_invert) identifier_invert (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_out) identifier_out (string_"") string_"" )assignment )expression_statement (if_statement (identifier_set_check_var) identifier_set_check_var (block (expression_statement (augmented_assignment (identifier_out) identifier_out (binary_operator (attribute (identifier_self) identifier_self (identifier_check_var) identifier_check_var )attribute (string_" = False\n") string_" = False\n" )binary_operator )augmented_assignment )expression_statement )block )if_statement (expression_statement (augmented_assignment (identifier_out) identifier_out (call (attribute (identifier_self) identifier_self (identifier_out) identifier_out )attribute (argument_list )argument_list )call )augmented_assignment )expression_statement (if_statement (comparison_operator (identifier_stmts) identifier_stmts (None) None )comparison_operator (block (expression_statement (augmented_assignment (identifier_out) identifier_out (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (string_"if ") string_"if " (parenthesized_expression (conditional_expression (string_"not ") string_"not " (identifier_invert) identifier_invert (string_"") string_"" )conditional_expression )parenthesized_expression )binary_operator (attribute (identifier_self) identifier_self (identifier_check_var) identifier_check_var )attribute )binary_operator (string_":") string_":" )binary_operator (string_"\n") string_"\n" )binary_operator (identifier_openindent) identifier_openindent )binary_operator (call (attribute (string_"") string_"" (identifier_join) identifier_join )attribute (argument_list (identifier_stmts) identifier_stmts )argument_list )call )binary_operator (identifier_closeindent) identifier_closeindent )binary_operator )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Construct code for performing the match then executing stmts.
(module (function_definition (function_name_copy) function_name_copy (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_new) identifier_new (call (call (identifier_type) identifier_type (argument_list (identifier_self) identifier_self )argument_list )call (argument_list (call (identifier_str) identifier_str (argument_list (identifier_self) identifier_self )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_new) identifier_new (identifier__init_from_channel) identifier__init_from_channel )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement (return_statement (identifier_new) identifier_new )return_statement )block )function_definition )module
Returns a copy of this channel
(module (function_definition (function_name_canonical_stylename) function_name_canonical_stylename (parameters (identifier_font) identifier_font )parameters (block (import_from_statement (dotted_name (identifier_fontbakery) identifier_fontbakery (identifier_constants) identifier_constants )dotted_name (dotted_name (identifier_STATIC_STYLE_NAMES) identifier_STATIC_STYLE_NAMES )dotted_name (dotted_name (identifier_VARFONT_SUFFIXES) identifier_VARFONT_SUFFIXES )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_fontbakery) identifier_fontbakery (identifier_profiles) identifier_profiles (identifier_shared_conditions) identifier_shared_conditions )dotted_name (dotted_name (identifier_is_variable_font) identifier_is_variable_font )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_fontTools) identifier_fontTools (identifier_ttLib) identifier_ttLib )dotted_name (dotted_name (identifier_TTFont) identifier_TTFont )dotted_name )import_from_statement (expression_statement (assignment (identifier_valid_style_suffixes) identifier_valid_style_suffixes (list_comprehension (call (attribute (identifier_name) identifier_name (identifier_replace) identifier_replace )attribute (argument_list (string_' ') string_' ' (string_'') string_'' )argument_list )call (for_in_clause (identifier_name) identifier_name (identifier_STATIC_STYLE_NAMES) identifier_STATIC_STYLE_NAMES )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_filename) identifier_filename (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_font) identifier_font )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_basename) identifier_basename (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (call (identifier_suffix) identifier_suffix (argument_list (identifier_font) identifier_font )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_varfont) identifier_varfont (boolean_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_font) identifier_font )argument_list )call (call (identifier_is_variable_font) identifier_is_variable_font (argument_list (call (identifier_TTFont) identifier_TTFont (argument_list (identifier_font) identifier_font )argument_list )call )argument_list )call )boolean_operator )assignment )expression_statement (if_statement (parenthesized_expression (boolean_operator (boolean_operator (comparison_operator (string_'-') string_'-' (identifier_basename) identifier_basename )comparison_operator (parenthesized_expression (boolean_operator (comparison_operator (identifier_s) identifier_s (identifier_VARFONT_SUFFIXES) identifier_VARFONT_SUFFIXES )comparison_operator (identifier_varfont) identifier_varfont )boolean_operator )parenthesized_expression )boolean_operator (parenthesized_expression (boolean_operator (comparison_operator (identifier_s) identifier_s (identifier_valid_style_suffixes) identifier_valid_style_suffixes )comparison_operator (not_operator (identifier_varfont) identifier_varfont )not_operator )boolean_operator )parenthesized_expression )boolean_operator )parenthesized_expression (block (return_statement (identifier_s) identifier_s )return_statement )block )if_statement )block )function_definition )module
Returns the canonical stylename of a given font.
(module (function_definition (function_name_process_parameters) function_name_process_parameters (parameters (identifier_parameters) identifier_parameters )parameters (block (if_statement (not_operator (identifier_parameters) identifier_parameters )not_operator (block (return_statement (dictionary )dictionary )return_statement )block )if_statement (expression_statement (assignment (identifier_params) identifier_params (call (attribute (identifier_copy) identifier_copy (identifier_copy) identifier_copy )attribute (argument_list (identifier_parameters) identifier_parameters )argument_list )call )assignment )expression_statement (for_statement (identifier_param_name) identifier_param_name (identifier_parameters) identifier_parameters (block (expression_statement (assignment (identifier_value) identifier_value (subscript (identifier_parameters) identifier_parameters (identifier_param_name) identifier_param_name )subscript )assignment )expression_statement (expression_statement (assignment (identifier_server_param_name) identifier_server_param_name (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_r'_(\w)') string_r'_(\w)' (lambda (lambda_parameters (identifier_m) identifier_m )lambda_parameters (call (attribute (call (attribute (identifier_m) identifier_m (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call )lambda (identifier_param_name) identifier_param_name )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_dict) identifier_dict )argument_list )call (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_process_parameters) identifier_process_parameters (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_params) identifier_params (identifier_server_param_name) identifier_server_param_name )subscript (identifier_value) identifier_value )assignment )expression_statement (if_statement (comparison_operator (identifier_server_param_name) identifier_server_param_name (identifier_param_name) identifier_param_name )comparison_operator (block (delete_statement (subscript (identifier_params) identifier_params (identifier_param_name) identifier_param_name )subscript )delete_statement )block )if_statement )block )for_statement (return_statement (identifier_params) identifier_params )return_statement )block )function_definition )module
Allows the use of Pythonic-style parameters with underscores instead of camel-case. :param parameters: The parameters object. :type parameters: dict :return: The processed parameters. :rtype: dict
(module (function_definition (function_name_fill_n_todo) function_name_fill_n_todo (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_left) identifier_left (attribute (identifier_self) identifier_self (identifier_left) identifier_left )attribute )assignment )expression_statement (expression_statement (assignment (identifier_right) identifier_right (attribute (identifier_self) identifier_self (identifier_right) identifier_right )attribute )assignment )expression_statement (expression_statement (assignment (identifier_top) identifier_top (attribute (identifier_self) identifier_self (identifier_top) identifier_top )attribute )assignment )expression_statement (expression_statement (assignment (identifier_bottom) identifier_bottom (attribute (identifier_self) identifier_self (identifier_bottom) identifier_bottom )attribute )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_xrange) identifier_xrange (argument_list (attribute (identifier_self) identifier_self (identifier_n_chunks) identifier_n_chunks )attribute )argument_list )call (block (expression_statement (assignment (subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_n_todo) identifier_n_todo )attribute (identifier_ravel) identifier_ravel )attribute (argument_list )argument_list )call (identifier_i) identifier_i )subscript (call (attribute (identifier_np) identifier_np (identifier_sum) identifier_sum )attribute (argument_list (list (attribute (subscript (call (attribute (identifier_left) identifier_left (identifier_ravel) identifier_ravel )attribute (argument_list )argument_list )call (identifier_i) identifier_i )subscript (identifier_n_todo) identifier_n_todo )attribute (attribute (subscript (call (attribute (identifier_right) identifier_right (identifier_ravel) identifier_ravel )attribute (argument_list )argument_list )call (identifier_i) identifier_i )subscript (identifier_n_todo) identifier_n_todo )attribute (attribute (subscript (call (attribute (identifier_top) identifier_top (identifier_ravel) identifier_ravel )attribute (argument_list )argument_list )call (identifier_i) identifier_i )subscript (identifier_n_todo) identifier_n_todo )attribute (attribute (subscript (call (attribute (identifier_bottom) identifier_bottom (identifier_ravel) identifier_ravel )attribute (argument_list )argument_list )call (identifier_i) identifier_i )subscript (identifier_n_todo) identifier_n_todo )attribute )list )argument_list )call )assignment )expression_statement )block )for_statement )block )function_definition )module
Calculate and record the number of edge pixels left to do on each tile
(module (function_definition (function_name_primary_key_field) function_name_primary_key_field (parameters (identifier_self) identifier_self )parameters (block (return_statement (subscript (list_comprehension (identifier_field) identifier_field (for_in_clause (identifier_field) identifier_field (attribute (attribute (attribute (identifier_self) identifier_self (identifier_instance) identifier_instance )attribute (identifier__meta) identifier__meta )attribute (identifier_fields) identifier_fields )attribute )for_in_clause (if_clause (attribute (identifier_field) identifier_field (identifier_primary_key) identifier_primary_key )attribute )if_clause )list_comprehension (integer_0) integer_0 )subscript )return_statement )block )function_definition )module
Return the primary key field. Is `id` in most cases. Is `history_id` for Historical models.
(module (function_definition (function_name_available_domains) function_name_available_domains (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'_available_domains') string_'_available_domains' )argument_list )call )not_operator (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (string_'http://{0}/request/domains/format/json/') string_'http://{0}/request/domains/format/json/' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_api_domain) identifier_api_domain )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_req) identifier_req (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_domains) identifier_domains (call (attribute (identifier_req) identifier_req (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (string_'_available_domains') string_'_available_domains' (identifier_domains) identifier_domains )argument_list )call )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__available_domains) identifier__available_domains )attribute )return_statement )block )function_definition )module
Return list of available domains for use in email address.
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (default_parameter (identifier_fields) identifier_fields (string_'') string_'' )default_parameter )parameters (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (string_'Users/{{UserId}}/Items/{}') string_'Users/{{UserId}}/Items/{}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_info) identifier_info (await (call (attribute (attribute (identifier_self) identifier_self (identifier_connector) identifier_connector )attribute (identifier_getJson) identifier_getJson )attribute (argument_list (identifier_path) identifier_path (keyword_argument (identifier_remote) identifier_remote (False) False )keyword_argument (keyword_argument (identifier_Fields) identifier_Fields (binary_operator (string_'Path,Overview,') string_'Path,Overview,' (identifier_fields) identifier_fields )binary_operator )keyword_argument )argument_list )call )await )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_object_dict) identifier_object_dict )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_info) identifier_info )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_extras) identifier_extras )attribute (dictionary )dictionary )assignment )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
reload object info from emby |coro| Parameters ---------- fields : str additional fields to request when updating See Also -------- refresh : same thing send : post :
(module (function_definition (function_name_guess_project_dir) function_name_guess_project_dir (parameters )parameters (block (expression_statement (assignment (identifier_projname) identifier_projname (subscript (call (attribute (attribute (identifier_settings) identifier_settings (identifier_SETTINGS_MODULE) identifier_SETTINGS_MODULE )attribute (identifier_split) identifier_split )attribute (argument_list (string_".") string_"." (integer_1) integer_1 )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_projmod) identifier_projmod (call (identifier_import_module) identifier_import_module (argument_list (identifier_projname) identifier_projname )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_projdir) identifier_projdir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (attribute (identifier_projmod) identifier_projmod (identifier___file__) identifier___file__ )attribute )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_projdir) identifier_projdir (string_"manage.py") string_"manage.py" )argument_list )call )argument_list )call (block (return_statement (identifier_projdir) identifier_projdir )return_statement )block )if_statement (expression_statement (assignment (identifier_projdir) identifier_projdir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_projdir) identifier_projdir (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_pardir) identifier_pardir )attribute )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_projdir) identifier_projdir (string_"manage.py") string_"manage.py" )argument_list )call )argument_list )call (block (return_statement (identifier_projdir) identifier_projdir )return_statement )block )if_statement (expression_statement (assignment (identifier_msg) identifier_msg (concatenated_string (string_"Unable to determine the Django project directory;") string_"Unable to determine the Django project directory;" (string_" use --project-dir to specify it") string_" use --project-dir to specify it" )concatenated_string )assignment )expression_statement (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )function_definition )module
Find the top-level Django project directory. This function guesses the top-level Django project directory based on the current environment. It looks for module containing the currently- active settings module, in both pre-1.4 and post-1.4 layours.
(module (function_definition (function_name_collect) function_name_collect (parameters (identifier_self) identifier_self )parameters (block (import_from_statement (dotted_name (identifier_dvc) identifier_dvc (identifier_scm) identifier_scm )dotted_name (dotted_name (identifier_SCM) identifier_SCM )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_dvc) identifier_dvc (identifier_utils) identifier_utils )dotted_name (dotted_name (identifier_is_binary) identifier_is_binary )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_dvc) identifier_dvc (identifier_repo) identifier_repo )dotted_name (dotted_name (identifier_Repo) identifier_Repo )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_dvc) identifier_dvc (identifier_exceptions) identifier_exceptions )dotted_name (dotted_name (identifier_NotDvcRepoError) identifier_NotDvcRepoError )dotted_name )import_from_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (attribute (identifier_self) identifier_self (identifier_PARAM_DVC_VERSION) identifier_PARAM_DVC_VERSION )attribute )subscript (identifier___version__) identifier___version__ )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (attribute (identifier_self) identifier_self (identifier_PARAM_IS_BINARY) identifier_PARAM_IS_BINARY )attribute )subscript (call (identifier_is_binary) identifier_is_binary (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (attribute (identifier_self) identifier_self (identifier_PARAM_USER_ID) identifier_PARAM_USER_ID )attribute )subscript (call (attribute (identifier_self) identifier_self (identifier__get_user_id) identifier__get_user_id )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (attribute (identifier_self) identifier_self (identifier_PARAM_SYSTEM_INFO) identifier_PARAM_SYSTEM_INFO )attribute )subscript (call (attribute (identifier_self) identifier_self (identifier__collect_system_info) identifier__collect_system_info )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_scm) identifier_scm (call (identifier_SCM) identifier_SCM (argument_list (keyword_argument (identifier_root_dir) identifier_root_dir (call (attribute (identifier_Repo) identifier_Repo (identifier_find_root) identifier_find_root )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (attribute (identifier_self) identifier_self (identifier_PARAM_SCM_CLASS) identifier_PARAM_SCM_CLASS )attribute )subscript (attribute (call (identifier_type) identifier_type (argument_list (identifier_scm) identifier_scm )argument_list )call (identifier___name__) identifier___name__ )attribute )assignment )expression_statement )block (except_clause (identifier_NotDvcRepoError) identifier_NotDvcRepoError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )function_definition )module
Collect analytics report.
(module (function_definition (function_name_remote_delete) function_name_remote_delete (parameters (identifier_self) identifier_self (identifier_remote_path) identifier_remote_path (identifier_r_st) identifier_r_st )parameters (block (if_statement (call (identifier_S_ISDIR) identifier_S_ISDIR (argument_list (attribute (identifier_r_st) identifier_r_st (identifier_st_mode) identifier_st_mode )attribute )argument_list )call (block (for_statement (identifier_item) identifier_item (call (attribute (attribute (identifier_self) identifier_self (identifier_sftp) identifier_sftp )attribute (identifier_listdir_attr) identifier_listdir_attr )attribute (argument_list (identifier_remote_path) identifier_remote_path )argument_list )call (block (expression_statement (assignment (identifier_full_path) identifier_full_path (call (identifier_path_join) identifier_path_join (argument_list (identifier_remote_path) identifier_remote_path (attribute (identifier_item) identifier_item (identifier_filename) identifier_filename )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_remote_delete) identifier_remote_delete )attribute (argument_list (identifier_full_path) identifier_full_path (identifier_item) identifier_item )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_sftp) identifier_sftp )attribute (identifier_rmdir) identifier_rmdir )attribute (argument_list (identifier_remote_path) identifier_remote_path )argument_list )call )expression_statement )block (else_clause (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_sftp) identifier_sftp )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_remote_path) identifier_remote_path )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_FileNotFoundError) identifier_FileNotFoundError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_"error while removing {}. trace: {}") string_"error while removing {}. trace: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_remote_path) identifier_remote_path (identifier_e) identifier_e )argument_list )call )argument_list )call )expression_statement )block )except_clause )try_statement )block )else_clause )if_statement )block )function_definition )module
Remove the remote directory node.
(module (function_definition (function_name__generate) function_name__generate (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_part) identifier_part (call (attribute (identifier_creator) identifier_creator (identifier_Particle) identifier_Particle )attribute (argument_list (list_comprehension (call (attribute (identifier_random) identifier_random (identifier_uniform) identifier_uniform )attribute (argument_list (unary_operator (integer_1) integer_1 )unary_operator (integer_1) integer_1 )argument_list )call (for_in_clause (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_value_means) identifier_value_means )attribute )argument_list )call )argument_list )call )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_part) identifier_part (identifier_speed) identifier_speed )attribute (list_comprehension (call (attribute (identifier_random) identifier_random (identifier_uniform) identifier_uniform )attribute (argument_list (unary_operator (attribute (identifier_self) identifier_self (identifier_max_speed) identifier_max_speed )attribute )unary_operator (attribute (identifier_self) identifier_self (identifier_max_speed) identifier_max_speed )attribute )argument_list )call (for_in_clause (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_value_means) identifier_value_means )attribute )argument_list )call )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (attribute (identifier_part) identifier_part (identifier_smin) identifier_smin )attribute (unary_operator (attribute (identifier_self) identifier_self (identifier_max_speed) identifier_max_speed )attribute )unary_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_part) identifier_part (identifier_smax) identifier_smax )attribute (attribute (identifier_self) identifier_self (identifier_max_speed) identifier_max_speed )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_part) identifier_part (identifier_ident) identifier_ident )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_part) identifier_part (identifier_neighbours) identifier_neighbours )attribute (None) None )assignment )expression_statement (return_statement (identifier_part) identifier_part )return_statement )block )function_definition )module
Generates a particle using the creator function. Notes ----- Position and speed are uniformly randomly seeded within allowed bounds. The particle also has speed limit settings taken from global values. Returns ------- part : particle object A particle used during optimisation.
(module (function_definition (function_name__process_assignments) function_name__process_assignments (parameters (identifier_self) identifier_self (identifier_anexec) identifier_anexec (identifier_contents) identifier_contents (default_parameter (identifier_mode) identifier_mode (string_"insert") string_"insert" )default_parameter )parameters (block (for_statement (identifier_assign) identifier_assign (call (attribute (attribute (identifier_self) identifier_self (identifier_RE_ASSIGN) identifier_RE_ASSIGN )attribute (identifier_finditer) identifier_finditer )attribute (argument_list (identifier_contents) identifier_contents )argument_list )call (block (expression_statement (assignment (identifier_assignee) identifier_assignee (call (attribute (call (attribute (identifier_assign) identifier_assign (identifier_group) identifier_group )attribute (argument_list (string_"assignee") string_"assignee" )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_target) identifier_target (call (attribute (subscript (call (attribute (identifier_re) identifier_re (identifier_split) identifier_split )attribute (argument_list (string_r"[(%\s]") string_r"[(%\s]" (identifier_assignee) identifier_assignee )argument_list )call (integer_0) integer_0 )subscript (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_target) identifier_target (attribute (identifier_self) identifier_self (identifier__intrinsic) identifier__intrinsic )attribute )comparison_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (boolean_operator (boolean_operator (comparison_operator (identifier_target) identifier_target (attribute (identifier_anexec) identifier_anexec (identifier_members) identifier_members )attribute )comparison_operator (line_continuation_\) line_continuation_\ (comparison_operator (identifier_target) identifier_target (attribute (identifier_anexec) identifier_anexec (identifier_parameters) identifier_parameters )attribute )comparison_operator )boolean_operator (line_continuation_\) line_continuation_\ (parenthesized_expression (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_anexec) identifier_anexec (identifier_Function) identifier_Function )argument_list )call (comparison_operator (call (attribute (identifier_target) identifier_target (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_anexec) identifier_anexec (identifier_name) identifier_name )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (block (if_statement (comparison_operator (identifier_mode) identifier_mode (string_"insert") string_"insert" )comparison_operator (block (expression_statement (call (attribute (identifier_anexec) identifier_anexec (identifier_add_assignment) identifier_add_assignment )attribute (argument_list (subscript (call (attribute (identifier_re) identifier_re (identifier_split) identifier_split )attribute (argument_list (string_r"[(\s]") string_r"[(\s]" (identifier_assignee) identifier_assignee )argument_list )call (integer_0) integer_0 )subscript )argument_list )call )expression_statement )block (elif_clause (comparison_operator (identifier_mode) identifier_mode (string_"delete") string_"delete" )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_index) identifier_index (call (attribute (attribute (identifier_element) identifier_element (identifier_assignments) identifier_assignments )attribute (identifier_index) identifier_index )attribute (argument_list (identifier_assign) identifier_assign )argument_list )call )assignment )expression_statement (delete_statement (subscript (attribute (identifier_element) identifier_element (identifier_assignments) identifier_assignments )attribute (identifier_index) identifier_index )subscript )delete_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )elif_clause )if_statement )block )if_statement )block )for_statement )block )function_definition )module
Extracts all variable assignments from the body of the executable. :arg mode: for real-time update; either 'insert', 'delete' or 'replace'.
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (typed_parameter (identifier_doc_id) identifier_doc_id (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_bool) identifier_bool )type (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_instance) identifier_instance )attribute (identifier_delete) identifier_delete )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_index) identifier_index )attribute (attribute (identifier_self) identifier_self (identifier_doc_type) identifier_doc_type )attribute (identifier_doc_id) identifier_doc_id )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_RequestError) identifier_RequestError (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_error) identifier_error )attribute (argument_list (identifier_ex) identifier_ex )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )except_clause (else_clause (block (return_statement (True) True )return_statement )block )else_clause )try_statement )block )function_definition )module
Delete a document with id.
(module (function_definition (function_name_parse_game_event) function_name_parse_game_event (parameters (identifier_self) identifier_self (identifier_ge) identifier_ge )parameters (block (if_statement (comparison_operator (attribute (identifier_ge) identifier_ge (identifier_name) identifier_name )attribute (string_"dota_combatlog") string_"dota_combatlog" )comparison_operator (block (if_statement (comparison_operator (subscript (attribute (identifier_ge) identifier_ge (identifier_keys) identifier_keys )attribute (string_"type") string_"type" )subscript (integer_4) integer_4 )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_source) identifier_source (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_dp) identifier_dp )attribute (identifier_combat_log_names) identifier_combat_log_names )attribute (identifier_get) identifier_get )attribute (argument_list (subscript (attribute (identifier_ge) identifier_ge (identifier_keys) identifier_keys )attribute (string_"sourcename") string_"sourcename" )subscript (string_"unknown") string_"unknown" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_target) identifier_target (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_dp) identifier_dp )attribute (identifier_combat_log_names) identifier_combat_log_names )attribute (identifier_get) identifier_get )attribute (argument_list (subscript (attribute (identifier_ge) identifier_ge (identifier_keys) identifier_keys )attribute (string_"targetname") string_"targetname" )subscript (string_"unknown") string_"unknown" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_target_illusion) identifier_target_illusion (subscript (attribute (identifier_ge) identifier_ge (identifier_keys) identifier_keys )attribute (string_"targetillusion") string_"targetillusion" )subscript )assignment )expression_statement (expression_statement (assignment (identifier_timestamp) identifier_timestamp (subscript (attribute (identifier_ge) identifier_ge (identifier_keys) identifier_keys )attribute (string_"timestamp") string_"timestamp" )subscript )assignment )expression_statement (if_statement (parenthesized_expression (boolean_operator (call (attribute (identifier_target) identifier_target (identifier_startswith) identifier_startswith )attribute (argument_list (string_"npc_dota_hero") string_"npc_dota_hero" )argument_list )call (not_operator (identifier_target_illusion) identifier_target_illusion )not_operator )boolean_operator )parenthesized_expression (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_kills) identifier_kills )attribute (identifier_append) identifier_append )attribute (argument_list (dictionary (pair (string_"target") string_"target" (identifier_target) identifier_target )pair (pair (string_"source") string_"source" (identifier_source) identifier_source )pair (pair (string_"timestamp") string_"timestamp" (identifier_timestamp) identifier_timestamp )pair (pair (string_"tick") string_"tick" (attribute (identifier_self) identifier_self (identifier_tick) identifier_tick )attribute )pair )dictionary )argument_list )call )expression_statement )block (elif_clause (call (attribute (identifier_source) identifier_source (identifier_startswith) identifier_startswith )attribute (argument_list (string_"npc_dota_hero") string_"npc_dota_hero" )argument_list )call (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_heroes) identifier_heroes )attribute (identifier_source) identifier_source )subscript (identifier_creep_kill) identifier_creep_kill )attribute (argument_list (identifier_target) identifier_target (identifier_timestamp) identifier_timestamp )argument_list )call )expression_statement )block )elif_clause )if_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement )block )if_statement )block )function_definition )module
Game events contain the combat log as well as 'chase_hero' events which could be interesting
(module (function_definition (function_name_stop) function_name_stop (parameters (identifier_self) identifier_self (default_parameter (identifier__task) identifier__task (None) None )default_parameter )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__logger) identifier__logger )attribute (identifier_info) identifier_info )attribute (argument_list (string_"Stopping adapter wrapper") string_"Stopping adapter wrapper" )argument_list )call )expression_statement (if_statement (attribute (attribute (identifier_self) identifier_self (identifier__task) identifier__task )attribute (identifier_stopped) identifier_stopped )attribute (block (return_statement )return_statement )block )if_statement (for_statement (identifier_task) identifier_task (attribute (attribute (identifier_self) identifier_self (identifier__task) identifier__task )attribute (identifier_subtasks) identifier_subtasks )attribute (block (expression_statement (await (call (attribute (identifier_task) identifier_task (identifier_stop) identifier_stop )attribute (argument_list )argument_list )call )await )expression_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__logger) identifier__logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_"Stopping underlying adapter %s") string_"Stopping underlying adapter %s" (attribute (attribute (attribute (identifier_self) identifier_self (identifier__adapter) identifier__adapter )attribute (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )argument_list )call )expression_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier__execute) identifier__execute )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier__adapter) identifier__adapter )attribute (identifier_stop_sync) identifier_stop_sync )attribute )argument_list )call )await )expression_statement )block )function_definition )module
Stop the device adapter. See :meth:`AbstractDeviceAdapter.stop`.
(module (function_definition (function_name_join) function_name_join (parameters (identifier_self) identifier_self (identifier_distbase) identifier_distbase (identifier_location) identifier_location )parameters (block (expression_statement (assignment (identifier_sep) identifier_sep (string_'') string_'' )assignment )expression_statement (if_statement (boolean_operator (identifier_distbase) identifier_distbase (comparison_operator (subscript (identifier_distbase) identifier_distbase (unary_operator (integer_1) integer_1 )unary_operator )subscript (tuple (string_':') string_':' (string_'/') string_'/' )tuple )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_sep) identifier_sep (string_'/') string_'/' )assignment )expression_statement )block )if_statement (return_statement (binary_operator (binary_operator (identifier_distbase) identifier_distbase (identifier_sep) identifier_sep )binary_operator (identifier_location) identifier_location )binary_operator )return_statement )block )function_definition )module
Join 'distbase' and 'location' in such way that the result is a valid scp destination.
(module (function_definition (function_name_Transfer) function_name_Transfer (parameters (identifier_self) identifier_self (identifier_wallet) identifier_wallet (identifier_from_addr) identifier_from_addr (identifier_to_addr) identifier_to_addr (identifier_amount) identifier_amount (default_parameter (identifier_tx_attributes) identifier_tx_attributes (None) None )default_parameter )parameters (block (if_statement (not_operator (identifier_tx_attributes) identifier_tx_attributes )not_operator (block (expression_statement (assignment (identifier_tx_attributes) identifier_tx_attributes (list )list )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_sb) identifier_sb (call (identifier_ScriptBuilder) identifier_ScriptBuilder (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_sb) identifier_sb (identifier_EmitAppCallWithOperationAndArgs) identifier_EmitAppCallWithOperationAndArgs )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_ScriptHash) identifier_ScriptHash )attribute (string_'transfer') string_'transfer' (list (call (attribute (identifier_PromptUtils) identifier_PromptUtils (identifier_parse_param) identifier_parse_param )attribute (argument_list (identifier_from_addr) identifier_from_addr (identifier_wallet) identifier_wallet )argument_list )call (call (attribute (identifier_PromptUtils) identifier_PromptUtils (identifier_parse_param) identifier_parse_param )attribute (argument_list (identifier_to_addr) identifier_to_addr (identifier_wallet) identifier_wallet )argument_list )call (call (attribute (identifier_PromptUtils) identifier_PromptUtils (identifier_parse_param) identifier_parse_param )attribute (argument_list (identifier_amount) identifier_amount )argument_list )call )list )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_tx) identifier_tx (identifier_fee) identifier_fee (identifier_results) identifier_results (identifier_num_ops) identifier_num_ops (identifier_engine_success) identifier_engine_success )pattern_list (call (identifier_test_invoke) identifier_test_invoke (argument_list (call (attribute (identifier_sb) identifier_sb (identifier_ToArray) identifier_ToArray )attribute (argument_list )argument_list )call (identifier_wallet) identifier_wallet (list )list (keyword_argument (identifier_from_addr) identifier_from_addr (identifier_from_addr) identifier_from_addr )keyword_argument (keyword_argument (identifier_invoke_attrs) identifier_invoke_attrs (identifier_tx_attributes) identifier_tx_attributes )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_tx) identifier_tx (identifier_fee) identifier_fee (identifier_results) identifier_results )expression_list )return_statement )block )function_definition )module
Transfer a specified amount of the NEP5Token to another address. Args: wallet (neo.Wallets.Wallet): a wallet instance. from_addr (str): public address of the account to transfer the given amount from. to_addr (str): public address of the account to transfer the given amount to. amount (int): quantity to send. tx_attributes (list): a list of TransactionAtribute objects. Returns: tuple: InvocationTransaction: the transaction. int: the transaction fee. list: the neo VM evaluationstack results.
(module (function_definition (function_name_has_ext) function_name_has_ext (parameters (identifier_path_name) identifier_path_name (keyword_separator )keyword_separator (default_parameter (identifier_multiple) identifier_multiple (None) None )default_parameter (default_parameter (identifier_if_all_ext) identifier_if_all_ext (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_base) identifier_base (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_path_name) identifier_path_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_count) identifier_count (call (attribute (identifier_base) identifier_base (identifier_count) identifier_count )attribute (argument_list (identifier_EXT) identifier_EXT )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (boolean_operator (not_operator (identifier_if_all_ext) identifier_if_all_ext )not_operator (comparison_operator (subscript (identifier_base) identifier_base (integer_0) integer_0 )subscript (identifier_EXT) identifier_EXT )comparison_operator )boolean_operator (comparison_operator (identifier_count) identifier_count (integer_0) integer_0 )comparison_operator )boolean_operator (block (expression_statement (augmented_assignment (identifier_count) identifier_count (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_multiple) identifier_multiple (None) None )comparison_operator (block (return_statement (comparison_operator (identifier_count) identifier_count (integer_1) integer_1 )comparison_operator )return_statement )block (elif_clause (identifier_multiple) identifier_multiple (block (return_statement (comparison_operator (identifier_count) identifier_count (integer_1) integer_1 )comparison_operator )return_statement )block )elif_clause (else_clause (block (return_statement (comparison_operator (identifier_count) identifier_count (integer_1) integer_1 )comparison_operator )return_statement )block )else_clause )if_statement )block )function_definition )module
Determine if the given path name has an extension
(module (function_definition (function_name_sample_binned) function_name_sample_binned (parameters (identifier_self) identifier_self (default_parameter (identifier_wavelengths) identifier_wavelengths (None) None )default_parameter (default_parameter (identifier_flux_unit) identifier_flux_unit (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_x) identifier_x (call (attribute (identifier_self) identifier_self (identifier__validate_binned_wavelengths) identifier__validate_binned_wavelengths )attribute (argument_list (identifier_wavelengths) identifier_wavelengths )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_i) identifier_i (call (attribute (identifier_np) identifier_np (identifier_searchsorted) identifier_searchsorted )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_binset) identifier_binset )attribute (identifier_x) identifier_x )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_np) identifier_np (identifier_allclose) identifier_allclose )attribute (argument_list (attribute (subscript (attribute (identifier_self) identifier_self (identifier_binset) identifier_binset )attribute (identifier_i) identifier_i )subscript (identifier_value) identifier_value )attribute (attribute (identifier_x) identifier_x (identifier_value) identifier_value )attribute )argument_list )call )not_operator (block (raise_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_InterpolationNotAllowed) identifier_InterpolationNotAllowed )attribute (argument_list (string_'Some or all wavelength values are not in binset.') string_'Some or all wavelength values are not in binset.' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_y) identifier_y (subscript (attribute (identifier_self) identifier_self (identifier_binflux) identifier_binflux )attribute (identifier_i) identifier_i )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_flux_unit) identifier_flux_unit (None) None )comparison_operator (block (expression_statement (assignment (identifier_flux) identifier_flux (identifier_y) identifier_y )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_flux) identifier_flux (call (attribute (identifier_units) identifier_units (identifier_convert_flux) identifier_convert_flux )attribute (argument_list (identifier_x) identifier_x (identifier_y) identifier_y (identifier_flux_unit) identifier_flux_unit (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_flux) identifier_flux )return_statement )block )function_definition )module
Sample binned observation without interpolation. To sample unbinned data, use ``__call__``. Parameters ---------- wavelengths : array-like, `~astropy.units.quantity.Quantity`, or `None` Wavelength values for sampling. If not a Quantity, assumed to be in Angstrom. If `None`, `binset` is used. flux_unit : str or `~astropy.units.core.Unit` or `None` Flux is converted to this unit. If not given, internal unit is used. kwargs : dict Keywords acceptable by :func:`~synphot.units.convert_flux`. Returns ------- flux : `~astropy.units.quantity.Quantity` Binned flux in given unit. Raises ------ synphot.exceptions.InterpolationNotAllowed Interpolation of binned data is not allowed.
(module (function_definition (function_name_docs_client) function_name_docs_client (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'_docs_client') string_'_docs_client' )argument_list )call )not_operator (block (expression_statement (assignment (identifier_client) identifier_client (call (identifier_DocsClient) identifier_DocsClient (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_client) identifier_client (identifier_ClientLogin) identifier_ClientLogin )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_google_user) identifier_google_user )attribute (attribute (identifier_self) identifier_self (identifier_google_password) identifier_google_password )attribute (identifier_SOURCE_NAME) identifier_SOURCE_NAME )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__docs_client) identifier__docs_client )attribute (identifier_client) identifier_client )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__docs_client) identifier__docs_client )attribute )return_statement )block )function_definition )module
A DocsClient singleton, used to look up spreadsheets by name.
(module (function_definition (function_name_unpack_rpc_response) function_name_unpack_rpc_response (parameters (identifier_status) identifier_status (default_parameter (identifier_response) identifier_response (None) None )default_parameter (default_parameter (identifier_rpc_id) identifier_rpc_id (integer_0) integer_0 )default_parameter (default_parameter (identifier_address) identifier_address (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_status_code) identifier_status_code (binary_operator (identifier_status) identifier_status (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (integer_1) integer_1 (integer_6) integer_6 )binary_operator )parenthesized_expression (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_address) identifier_address (integer_8) integer_8 )comparison_operator (block (expression_statement (augmented_assignment (identifier_status_code) identifier_status_code (unary_operator (parenthesized_expression (binary_operator (integer_1) integer_1 (integer_7) integer_7 )binary_operator )parenthesized_expression )unary_operator )augmented_assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_status) identifier_status (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_BusyRPCResponse) identifier_BusyRPCResponse (argument_list )argument_list )call )raise_statement )block (elif_clause (comparison_operator (identifier_status) identifier_status (integer_2) integer_2 )comparison_operator (block (raise_statement (call (identifier_RPCNotFoundError) identifier_RPCNotFoundError (argument_list (binary_operator (string_"rpc %d:%04X not found") string_"rpc %d:%04X not found" (tuple (identifier_address) identifier_address (identifier_rpc_id) identifier_rpc_id )tuple )binary_operator )argument_list )call )raise_statement )block )elif_clause (elif_clause (comparison_operator (identifier_status) identifier_status (integer_3) integer_3 )comparison_operator (block (raise_statement (call (identifier_RPCErrorCode) identifier_RPCErrorCode (argument_list (identifier_status_code) identifier_status_code )argument_list )call )raise_statement )block )elif_clause (elif_clause (comparison_operator (identifier_status) identifier_status (integer_0xFF) integer_0xFF )comparison_operator (block (raise_statement (call (identifier_TileNotFoundError) identifier_TileNotFoundError (argument_list (binary_operator (string_"tile %d not found") string_"tile %d not found" (identifier_address) identifier_address )binary_operator )argument_list )call )raise_statement )block )elif_clause (elif_clause (comparison_operator (identifier_status_code) identifier_status_code (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_RPCErrorCode) identifier_RPCErrorCode (argument_list (identifier_status_code) identifier_status_code )argument_list )call )raise_statement )block )elif_clause )if_statement (if_statement (comparison_operator (identifier_response) identifier_response (None) None )comparison_operator (block (expression_statement (assignment (identifier_response) identifier_response (string_b'') string_b'' )assignment )expression_statement )block )if_statement (return_statement (identifier_response) identifier_response )return_statement )block )function_definition )module
Unpack an RPC status back in to payload or exception.
(module (function_definition (function_name_render) function_name_render (parameters (identifier_self) identifier_self (identifier_tag) identifier_tag (identifier_single) identifier_single (identifier_between) identifier_between (identifier_kwargs) identifier_kwargs )parameters (block (expression_statement (assignment (identifier_out) identifier_out (binary_operator (string_"<%s") string_"<%s" (identifier_tag) identifier_tag )binary_operator )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call (block (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (identifier_key) identifier_key (identifier_strip) identifier_strip )attribute (argument_list (string_'_') string_'_' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_key) identifier_key (string_'http_equiv') string_'http_equiv' )comparison_operator (block (expression_statement (assignment (identifier_key) identifier_key (string_'http-equiv') string_'http-equiv' )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_key) identifier_key (string_'accept_charset') string_'accept_charset' )comparison_operator (block (expression_statement (assignment (identifier_key) identifier_key (string_'accept-charset') string_'accept-charset' )assignment )expression_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_out) identifier_out (binary_operator (string_"%s %s=\"%s\"") string_"%s %s=\"%s\"" (tuple (identifier_out) identifier_out (identifier_key) identifier_key (call (identifier_escape) identifier_escape (argument_list (identifier_value) identifier_value )argument_list )call )tuple )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_out) identifier_out (binary_operator (string_"%s %s") string_"%s %s" (tuple (identifier_out) identifier_out (identifier_key) identifier_key )tuple )binary_operator )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (if_statement (comparison_operator (identifier_between) identifier_between (None) None )comparison_operator (block (expression_statement (assignment (identifier_out) identifier_out (binary_operator (string_"%s>%s</%s>") string_"%s>%s</%s>" (tuple (identifier_out) identifier_out (identifier_between) identifier_between (identifier_tag) identifier_tag )tuple )binary_operator )assignment )expression_statement )block (else_clause (block (if_statement (identifier_single) identifier_single (block (expression_statement (assignment (identifier_out) identifier_out (binary_operator (string_"%s />") string_"%s />" (identifier_out) identifier_out )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_out) identifier_out (binary_operator (string_"%s>") string_"%s>" (identifier_out) identifier_out )binary_operator )assignment )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (identifier_content) identifier_content )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_out) identifier_out )argument_list )call )expression_statement )block (else_clause (block (return_statement (identifier_out) identifier_out )return_statement )block )else_clause )if_statement )block )function_definition )module
Append the actual tags to content.