sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_get_density) function_name_get_density (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_strc) identifier_strc (call (attribute (identifier_self) identifier_self (identifier_get_output_structure) identifier_get_output_structure )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_density) identifier_density (binary_operator (binary_operator (call (identifier_sum) identifier_sum (argument_list (call (attribute (identifier_strc) identifier_strc (identifier_get_masses) identifier_get_masses )attribute (argument_list )argument_list )call )argument_list )call (call (attribute (identifier_strc) identifier_strc (identifier_get_volume) identifier_get_volume )attribute (argument_list )argument_list )call )binary_operator (float_1.660539040) float_1.660539040 )binary_operator )assignment )expression_statement (return_statement (call (identifier_Property) identifier_Property (argument_list (keyword_argument (identifier_scalars) identifier_scalars (list (call (identifier_Scalar) identifier_Scalar (argument_list (keyword_argument (identifier_value) identifier_value (identifier_density) identifier_density )keyword_argument )argument_list )call )list )keyword_argument (keyword_argument (identifier_units) identifier_units (string_"g/(cm^3)") string_"g/(cm^3)" )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Compute the density from the output structure
(module (function_definition (function_name__get_end_index) function_name__get_end_index (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (identifier_max) identifier_max (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_index) identifier_index )attribute (attribute (identifier_self) identifier_self (identifier_source_window) identifier_source_window )attribute )binary_operator (binary_operator (call (attribute (identifier_self) identifier_self (identifier__get_target_index) identifier__get_target_index )attribute (argument_list )argument_list )call (attribute (identifier_self) identifier_self (identifier_target_window) identifier_target_window )attribute )binary_operator )argument_list )call )return_statement )block )function_definition )module
Return the end of both windows.
(module (function_definition (function_name_config_settings_loader) function_name_config_settings_loader (parameters (default_parameter (identifier_request) identifier_request (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_conf) identifier_conf (call (identifier_SPConfig) identifier_SPConfig (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_conf) identifier_conf (identifier_load) identifier_load )attribute (argument_list (call (attribute (identifier_copy) identifier_copy (identifier_deepcopy) identifier_deepcopy )attribute (argument_list (attribute (identifier_settings) identifier_settings (identifier_SAML_CONFIG) identifier_SAML_CONFIG )attribute )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_conf) identifier_conf )return_statement )block )function_definition )module
Utility function to load the pysaml2 configuration. This is also the default config loader.
(module (function_definition (function_name_Pop) function_name_Pop (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (expression_statement (assignment (identifier_node) identifier_node (call (attribute (attribute (identifier_self) identifier_self (identifier__hash) identifier__hash )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (if_statement (identifier_node) identifier_node (block (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier__hash) identifier__hash )attribute (identifier_key) identifier_key )subscript )delete_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__age) identifier__age )attribute (identifier_Unlink) identifier_Unlink )attribute (argument_list (identifier_node) identifier_node )argument_list )call )expression_statement (return_statement (attribute (identifier_node) identifier_node (identifier_data) identifier_data )attribute )return_statement )block )if_statement )block )function_definition )module
Remove the object from the cache completely.
(module (function_definition (function_name_get_delegates) function_name_get_delegates (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_candidate_elections) identifier_candidate_elections (call (attribute (attribute (identifier_CandidateElection) identifier_CandidateElection (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_election) identifier_election (identifier_self) identifier_self )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_delegates) identifier_delegates (None) None )assignment )expression_statement (for_statement (identifier_ce) identifier_ce (identifier_candidate_elections) identifier_candidate_elections (block (expression_statement (assignment (identifier_delegates) identifier_delegates (binary_operator (identifier_delegates) identifier_delegates (call (attribute (attribute (identifier_ce) identifier_ce (identifier_delegates) identifier_delegates )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement )block )for_statement (return_statement (identifier_delegates) identifier_delegates )return_statement )block )function_definition )module
Get all pledged delegates for any candidate in this election.
(module (function_definition (function_name_loop) function_name_loop (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"Node loop starts for {!r}.") string_"Node loop starts for {!r}." (identifier_format) identifier_format )attribute (argument_list (identifier_self) identifier_self )argument_list )call )argument_list )call )expression_statement (while_statement (attribute (identifier_self) identifier_self (identifier_should_loop) identifier_should_loop )attribute (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_step) identifier_step )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (identifier_InactiveReadableError) identifier_InactiveReadableError (block (break_statement )break_statement )block )except_clause )try_statement )block )while_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"Node loop ends for {!r}.") string_"Node loop ends for {!r}." (identifier_format) identifier_format )attribute (argument_list (identifier_self) identifier_self )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
The actual infinite loop for this transformation.
(module (function_definition (function_name_get_existing_keys) function_name_get_existing_keys (parameters (identifier_self) identifier_self (identifier_events) identifier_events )parameters (block (expression_statement (assignment (identifier_data) identifier_data (list_comprehension (subscript (identifier_e) identifier_e (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute )subscript (for_in_clause (identifier_e) identifier_e (identifier_events) identifier_events )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_ss) identifier_ss (call (attribute (string_',') string_',' (identifier_join) identifier_join )attribute (argument_list (list_comprehension (string_'%s') string_'%s' (for_in_clause (identifier__) identifier__ (identifier_data) identifier_data )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_query) identifier_query (binary_operator (string_'SELECT %s FROM %s WHERE %s IN (%s)') string_'SELECT %s FROM %s WHERE %s IN (%s)' (tuple (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute (attribute (identifier_self) identifier_self (identifier_table) identifier_table )attribute (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute (identifier_ss) identifier_ss )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_cursor) identifier_cursor (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_conn) identifier_conn )attribute (identifier_conn) identifier_conn )attribute (identifier_cursor) identifier_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_query) identifier_query (identifier_data) identifier_data )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_info) identifier_info )attribute (argument_list (string_"%s (data: %s)") string_"%s (data: %s)" (identifier_query) identifier_query (identifier_data) identifier_data )argument_list )call )expression_statement (expression_statement (assignment (identifier_existing) identifier_existing (list_comprehension (subscript (identifier_r) identifier_r (integer_0) integer_0 )subscript (for_in_clause (identifier_r) identifier_r (call (attribute (identifier_cursor) identifier_cursor (identifier_fetchall) identifier_fetchall )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_"Existing IDs: %s") string_"Existing IDs: %s" (identifier_existing) identifier_existing )binary_operator )argument_list )call )expression_statement (return_statement (call (identifier_set) identifier_set (argument_list (identifier_existing) identifier_existing )argument_list )call )return_statement )block )function_definition )module
Returns the list of keys from the given event source that are already in the DB
(module (function_definition (function_name_addreadergroup) function_name_addreadergroup (parameters (identifier_self) identifier_self (identifier_newgroup) identifier_newgroup )parameters (block (expression_statement (assignment (pattern_list (identifier_hresult) identifier_hresult (identifier_hcontext) identifier_hcontext )pattern_list (call (identifier_SCardEstablishContext) identifier_SCardEstablishContext (argument_list (identifier_SCARD_SCOPE_USER) identifier_SCARD_SCOPE_USER )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (integer_0) integer_0 (identifier_hresult) identifier_hresult )comparison_operator (block (raise_statement (call (identifier_error) identifier_error (argument_list (binary_operator (string_'Failed to establish context: ') string_'Failed to establish context: ' (line_continuation_\) line_continuation_\ (call (identifier_SCardGetErrorMessage) identifier_SCardGetErrorMessage (argument_list (identifier_hresult) identifier_hresult )argument_list )call )binary_operator )argument_list )call )raise_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_hresult) identifier_hresult (call (identifier_SCardIntroduceReaderGroup) identifier_SCardIntroduceReaderGroup (argument_list (identifier_hcontext) identifier_hcontext (identifier_newgroup) identifier_newgroup )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (integer_0) integer_0 (identifier_hresult) identifier_hresult )comparison_operator (block (raise_statement (call (identifier_error) identifier_error (argument_list (binary_operator (string_'Unable to introduce reader group: ') string_'Unable to introduce reader group: ' (line_continuation_\) line_continuation_\ (call (identifier_SCardGetErrorMessage) identifier_SCardGetErrorMessage (argument_list (identifier_hresult) identifier_hresult )argument_list )call )binary_operator )argument_list )call )raise_statement )block (else_clause (block (expression_statement (call (attribute (identifier_innerreadergroups) identifier_innerreadergroups (identifier_addreadergroup) identifier_addreadergroup )attribute (argument_list (identifier_self) identifier_self (identifier_newgroup) identifier_newgroup )argument_list )call )expression_statement )block )else_clause )if_statement )block (finally_clause (block (expression_statement (assignment (identifier_hresult) identifier_hresult (call (identifier_SCardReleaseContext) identifier_SCardReleaseContext (argument_list (identifier_hcontext) identifier_hcontext )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (integer_0) integer_0 (identifier_hresult) identifier_hresult )comparison_operator (block (raise_statement (call (identifier_error) identifier_error (argument_list (binary_operator (string_'Failed to release context: ') string_'Failed to release context: ' (line_continuation_\) line_continuation_\ (call (identifier_SCardGetErrorMessage) identifier_SCardGetErrorMessage (argument_list (identifier_hresult) identifier_hresult )argument_list )call )binary_operator )argument_list )call )raise_statement )block )if_statement )block )finally_clause )try_statement )block )function_definition )module
Add a reader group
(module (function_definition (function_name_content) function_name_content (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_content) identifier_content (call (attribute (identifier_self) identifier_self (identifier__get_content) identifier__get_content )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (identifier_bool) identifier_bool (argument_list (boolean_operator (identifier_content) identifier_content (comparison_operator (string_'\0') string_'\0' (identifier_content) identifier_content )comparison_operator )boolean_operator )argument_list )call (block (return_statement (identifier_content) identifier_content )return_statement )block )if_statement (return_statement (call (identifier_safe_unicode) identifier_safe_unicode (argument_list (identifier_content) identifier_content )argument_list )call )return_statement )block )function_definition )module
Returns lazily content of the FileNode. If possible, would try to decode content from UTF-8.
(module (function_definition (function_name_prior_from_config) function_name_prior_from_config (parameters (identifier_cp) identifier_cp (identifier_variable_params) identifier_variable_params (identifier_prior_section) identifier_prior_section (identifier_constraint_section) identifier_constraint_section )parameters (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (string_"Setting up priors for each parameter") string_"Setting up priors for each parameter" )argument_list )call )expression_statement (expression_statement (assignment (identifier_dists) identifier_dists (call (attribute (identifier_distributions) identifier_distributions (identifier_read_distributions_from_config) identifier_read_distributions_from_config )attribute (argument_list (identifier_cp) identifier_cp (identifier_prior_section) identifier_prior_section )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_constraints) identifier_constraints (call (attribute (identifier_distributions) identifier_distributions (identifier_read_constraints_from_config) identifier_read_constraints_from_config )attribute (argument_list (identifier_cp) identifier_cp (identifier_constraint_section) identifier_constraint_section )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_distributions) identifier_distributions (identifier_JointDistribution) identifier_JointDistribution )attribute (argument_list (identifier_variable_params) identifier_variable_params (list_splat (identifier_dists) identifier_dists )list_splat (keyword_argument (identifier_constraints) identifier_constraints (identifier_constraints) identifier_constraints )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Gets arguments and keyword arguments from a config file. Parameters ---------- cp : WorkflowConfigParser Config file parser to read. variable_params : list List of of model parameter names. prior_section : str Section to read prior(s) from. constraint_section : str Section to read constraint(s) from. Returns ------- pycbc.distributions.JointDistribution The prior.
(module (function_definition (function_name_prefetch_docker_image_on_private_agents) function_name_prefetch_docker_image_on_private_agents (parameters (identifier_image) identifier_image (default_parameter (identifier_timeout) identifier_timeout (call (attribute (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_minutes) identifier_minutes (integer_5) integer_5 )keyword_argument )argument_list )call (identifier_total_seconds) identifier_total_seconds )attribute (argument_list )argument_list )call )default_parameter )parameters (block (expression_statement (assignment (identifier_agents) identifier_agents (call (identifier_len) identifier_len (argument_list (call (attribute (identifier_shakedown) identifier_shakedown (identifier_get_private_agents) identifier_get_private_agents )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_app) identifier_app (dictionary (pair (string_"id") string_"id" (string_"/prefetch") string_"/prefetch" )pair (pair (string_"instances") string_"instances" (identifier_agents) identifier_agents )pair (pair (string_"container") string_"container" (dictionary (pair (string_"type") string_"type" (string_"DOCKER") string_"DOCKER" )pair (pair (string_"docker") string_"docker" (dictionary (pair (string_"image") string_"image" (identifier_image) identifier_image )pair )dictionary )pair )dictionary )pair (pair (string_"cpus") string_"cpus" (float_0.1) float_0.1 )pair (pair (string_"mem") string_"mem" (integer_128) integer_128 )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_client) identifier_client (call (attribute (identifier_marathon) identifier_marathon (identifier_create_client) identifier_create_client )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_client) identifier_client (identifier_add_app) identifier_add_app )attribute (argument_list (identifier_app) identifier_app )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_shakedown) identifier_shakedown (identifier_deployment_wait) identifier_deployment_wait )attribute (argument_list (identifier_timeout) identifier_timeout )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_shakedown) identifier_shakedown (identifier_delete_all_apps) identifier_delete_all_apps )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_shakedown) identifier_shakedown (identifier_deployment_wait) identifier_deployment_wait )attribute (argument_list (identifier_timeout) identifier_timeout )argument_list )call )expression_statement )block )function_definition )module
Given a docker image. An app with the image is scale across the private agents to ensure that the image is prefetched to all nodes. :param image: docker image name :type image: str :param timeout: timeout for deployment wait in secs (default: 5m) :type password: int
(module (function_definition (function_name_select) function_name_select (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_column_or_columns) identifier_column_or_columns )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_labels) identifier_labels (call (attribute (identifier_self) identifier_self (identifier__varargs_as_labels) identifier__varargs_as_labels )attribute (argument_list (identifier_column_or_columns) identifier_column_or_columns )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_table) identifier_table (call (call (identifier_type) identifier_type (argument_list (identifier_self) identifier_self )argument_list )call (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_label) identifier_label (identifier_labels) identifier_labels (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_column_and_format) identifier__add_column_and_format )attribute (argument_list (identifier_table) identifier_table (identifier_label) identifier_label (call (attribute (identifier_np) identifier_np (identifier_copy) identifier_copy )attribute (argument_list (subscript (identifier_self) identifier_self (identifier_label) identifier_label )subscript )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_table) identifier_table )return_statement )block )function_definition )module
Return a table with only the columns in ``column_or_columns``. Args: ``column_or_columns``: Columns to select from the ``Table`` as either column labels (``str``) or column indices (``int``). Returns: A new instance of ``Table`` containing only selected columns. The columns of the new ``Table`` are in the order given in ``column_or_columns``. Raises: ``KeyError`` if any of ``column_or_columns`` are not in the table. >>> flowers = Table().with_columns( ... 'Number of petals', make_array(8, 34, 5), ... 'Name', make_array('lotus', 'sunflower', 'rose'), ... 'Weight', make_array(10, 5, 6) ... ) >>> flowers Number of petals | Name | Weight 8 | lotus | 10 34 | sunflower | 5 5 | rose | 6 >>> flowers.select('Number of petals', 'Weight') Number of petals | Weight 8 | 10 34 | 5 5 | 6 >>> flowers # original table unchanged Number of petals | Name | Weight 8 | lotus | 10 34 | sunflower | 5 5 | rose | 6 >>> flowers.select(0, 2) Number of petals | Weight 8 | 10 34 | 5 5 | 6
(module (function_definition (function_name_serialize) function_name_serialize (parameters (identifier_self) identifier_self (identifier_value) identifier_value (default_parameter (identifier_entity) identifier_entity (None) None )default_parameter (default_parameter (identifier_request) identifier_request (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (call (attribute (identifier_self) identifier_self (identifier_from_python) identifier_from_python )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_validate) identifier_validate )attribute (argument_list (identifier_ret) identifier_ret )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_run_validators) identifier_run_validators )attribute (argument_list (identifier_value) identifier_value )argument_list )call )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Validate and serialize the value. This is the default implementation
(module (function_definition (function_name__async_open) function_name__async_open (parameters (identifier_self) identifier_self (identifier_session_id) identifier_session_id (identifier_proto_version) identifier_proto_version )parameters (block (try_statement (block (expression_statement (yield (call (attribute (attribute (identifier_self) identifier_self (identifier_application_context) identifier_application_context )attribute (identifier_create_session_if_needed) identifier_create_session_if_needed )attribute (argument_list (identifier_session_id) identifier_session_id (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute )argument_list )call )yield )expression_statement (expression_statement (assignment (identifier_session) identifier_session (call (attribute (attribute (identifier_self) identifier_self (identifier_application_context) identifier_application_context )attribute (identifier_get_session) identifier_get_session )attribute (argument_list (identifier_session_id) identifier_session_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_protocol) identifier_protocol (call (identifier_Protocol) identifier_Protocol (argument_list (identifier_proto_version) identifier_proto_version )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_receiver) identifier_receiver )attribute (call (identifier_Receiver) identifier_Receiver (argument_list (identifier_protocol) identifier_protocol )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_"Receiver created for %r") string_"Receiver created for %r" (identifier_protocol) identifier_protocol )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_handler) identifier_handler )attribute (call (identifier_ProtocolHandler) identifier_ProtocolHandler (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_"ProtocolHandler created for %r") string_"ProtocolHandler created for %r" (identifier_protocol) identifier_protocol )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_connection) identifier_connection )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_application) identifier_application )attribute (identifier_new_connection) identifier_new_connection )attribute (argument_list (identifier_protocol) identifier_protocol (identifier_self) identifier_self (attribute (identifier_self) identifier_self (identifier_application_context) identifier_application_context )attribute (identifier_session) identifier_session )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_"ServerConnection created") string_"ServerConnection created" )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_ProtocolError) identifier_ProtocolError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (string_"Could not create new server session, reason: %s") string_"Could not create new server session, reason: %s" (identifier_e) identifier_e )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (raise_statement (identifier_e) identifier_e )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_connection) identifier_connection )attribute (identifier_protocol) identifier_protocol )attribute (identifier_create) identifier_create )attribute (argument_list (string_'ACK') string_'ACK' )argument_list )call )assignment )expression_statement (expression_statement (yield (call (attribute (identifier_self) identifier_self (identifier_send_message) identifier_send_message )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call )yield )expression_statement (raise_statement (call (attribute (identifier_gen) identifier_gen (identifier_Return) identifier_Return )attribute (argument_list (None) None )argument_list )call )raise_statement )block )function_definition )module
Perform the specific steps needed to open a connection to a Bokeh session Specifically, this method coordinates: * Getting a session for a session ID (creating a new one if needed) * Creating a protocol receiver and hander * Opening a new ServerConnection and sending it an ACK Args: session_id (str) : A session ID to for a session to connect to If no session exists with the given ID, a new session is made proto_version (str): The protocol version requested by the connecting client. Returns: None
(module (function_definition (function_name_isDocumentCollection) function_name_isDocumentCollection (parameters (identifier_cls) identifier_cls (identifier_name) identifier_name )parameters (block (try_statement (block (expression_statement (assignment (identifier_col) identifier_col (call (attribute (identifier_cls) identifier_cls (identifier_getCollectionClass) identifier_getCollectionClass )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (return_statement (call (identifier_issubclass) identifier_issubclass (argument_list (identifier_col) identifier_col (identifier_Collection) identifier_Collection )argument_list )call )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (return_statement (False) False )return_statement )block )except_clause )try_statement )block )function_definition )module
return true or false wether 'name' is the name of a document collection.
(module (function_definition (function_name_process_request) function_name_process_request (parameters (identifier_self) identifier_self (identifier_request) identifier_request (identifier_client_address) identifier_client_address )parameters (block (expression_statement (assignment (identifier_thread) identifier_thread (call (attribute (identifier_threading) identifier_threading (identifier_Thread) identifier_Thread )attribute (argument_list (keyword_argument (identifier_name) identifier_name (call (attribute (string_"RemoteShell-{0}-Client-{1}") string_"RemoteShell-{0}-Client-{1}" (identifier_format) identifier_format )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_server_address) identifier_server_address )attribute (integer_1) integer_1 )subscript (subscript (identifier_client_address) identifier_client_address (slice (colon) colon (integer_2) integer_2 )slice )subscript )argument_list )call )keyword_argument (keyword_argument (identifier_target) identifier_target (attribute (identifier_self) identifier_self (identifier_process_request_thread) identifier_process_request_thread )attribute )keyword_argument (keyword_argument (identifier_args) identifier_args (tuple (identifier_request) identifier_request (identifier_client_address) identifier_client_address )tuple )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_thread) identifier_thread (identifier_daemon) identifier_daemon )attribute (attribute (identifier_self) identifier_self (identifier_daemon_threads) identifier_daemon_threads )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_thread) identifier_thread (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Starts a new thread to process the request, adding the client address in its name.
(module (function_definition (function_name_format_for_columns) function_name_format_for_columns (parameters (identifier_pkgs) identifier_pkgs (identifier_options) identifier_options )parameters (block (expression_statement (assignment (identifier_running_outdated) identifier_running_outdated (attribute (identifier_options) identifier_options (identifier_outdated) identifier_outdated )attribute )assignment )expression_statement (if_statement (identifier_running_outdated) identifier_running_outdated (block (expression_statement (assignment (identifier_header) identifier_header (list (string_"Package") string_"Package" (string_"Version") string_"Version" (string_"Latest") string_"Latest" (string_"Type") string_"Type" )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_header) identifier_header (list (string_"Package") string_"Package" (string_"Version") string_"Version" )list )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_data) identifier_data (list )list )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_options) identifier_options (identifier_verbose) identifier_verbose )attribute (integer_1) integer_1 )comparison_operator (call (identifier_any) identifier_any (generator_expression (call (identifier_dist_is_editable) identifier_dist_is_editable (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (identifier_pkgs) identifier_pkgs )for_in_clause )generator_expression )call )boolean_operator (block (expression_statement (call (attribute (identifier_header) identifier_header (identifier_append) identifier_append )attribute (argument_list (string_"Location") string_"Location" )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_options) identifier_options (identifier_verbose) identifier_verbose )attribute (integer_1) integer_1 )comparison_operator (block (expression_statement (call (attribute (identifier_header) identifier_header (identifier_append) identifier_append )attribute (argument_list (string_"Installer") string_"Installer" )argument_list )call )expression_statement )block )if_statement (for_statement (identifier_proj) identifier_proj (identifier_pkgs) identifier_pkgs (block (expression_statement (assignment (identifier_row) identifier_row (list (attribute (identifier_proj) identifier_proj (identifier_project_name) identifier_project_name )attribute (attribute (identifier_proj) identifier_proj (identifier_version) identifier_version )attribute )list )assignment )expression_statement (if_statement (identifier_running_outdated) identifier_running_outdated (block (expression_statement (call (attribute (identifier_row) identifier_row (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_proj) identifier_proj (identifier_latest_version) identifier_latest_version )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_row) identifier_row (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_proj) identifier_proj (identifier_latest_filetype) identifier_latest_filetype )attribute )argument_list )call )expression_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_options) identifier_options (identifier_verbose) identifier_verbose )attribute (integer_1) integer_1 )comparison_operator (call (identifier_dist_is_editable) identifier_dist_is_editable (argument_list (identifier_proj) identifier_proj )argument_list )call )boolean_operator (block (expression_statement (call (attribute (identifier_row) identifier_row (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_proj) identifier_proj (identifier_location) identifier_location )attribute )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_options) identifier_options (identifier_verbose) identifier_verbose )attribute (integer_1) integer_1 )comparison_operator (block (expression_statement (call (attribute (identifier_row) identifier_row (identifier_append) identifier_append )attribute (argument_list (call (identifier_get_installer) identifier_get_installer (argument_list (identifier_proj) identifier_proj )argument_list )call )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_data) identifier_data (identifier_append) identifier_append )attribute (argument_list (identifier_row) identifier_row )argument_list )call )expression_statement )block )for_statement (return_statement (expression_list (identifier_data) identifier_data (identifier_header) identifier_header )expression_list )return_statement )block )function_definition )module
Convert the package data into something usable by output_package_listing_columns.
(module (function_definition (function_name_index) function_name_index (parameters )parameters (block (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_current_index) identifier_current_index (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_current_index) identifier_current_index (identifier_k) identifier_k )subscript (integer_0) integer_0 )assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (string_"Dashboard refreshed") string_"Dashboard refreshed" )argument_list )call )expression_statement (return_statement (call (identifier_render_template) identifier_render_template (argument_list (string_"crystal_dashboard.html") string_"crystal_dashboard.html" )argument_list )call )return_statement )block )function_definition )module
Renders the dashboard when the server is initially run. Usage description: The rendered HTML allows the user to select a project and the desired run. :return: Template to render, Object that is taken care by flask.
(module (function_definition (function_name_time_delta) function_name_time_delta (parameters (identifier_self) identifier_self (default_parameter (identifier_end_datetime) identifier_end_datetime (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_start_datetime) identifier_start_datetime (call (attribute (identifier_self) identifier_self (identifier__parse_start_datetime) identifier__parse_start_datetime )attribute (argument_list (string_'now') string_'now' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_end_datetime) identifier_end_datetime (call (attribute (identifier_self) identifier_self (identifier__parse_end_datetime) identifier__parse_end_datetime )attribute (argument_list (identifier_end_datetime) identifier_end_datetime )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_seconds) identifier_seconds (binary_operator (identifier_end_datetime) identifier_end_datetime (identifier_start_datetime) identifier_start_datetime )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_ts) identifier_ts (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_generator) identifier_generator )attribute (identifier_random) identifier_random )attribute (identifier_randint) identifier_randint )attribute (argument_list (list_splat (call (identifier_sorted) identifier_sorted (argument_list (list (integer_0) integer_0 (identifier_seconds) identifier_seconds )list )argument_list )call )list_splat )argument_list )call )assignment )expression_statement (return_statement (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_seconds) identifier_seconds (identifier_ts) identifier_ts )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get a timedelta object
(module (function_definition (function_name_remove_router_interface) function_name_remove_router_interface (parameters (identifier_self) identifier_self (identifier_context) identifier_context (identifier_router_id) identifier_router_id (identifier_interface_info) identifier_interface_info )parameters (block (expression_statement (assignment (identifier_router_to_del) identifier_router_to_del (parenthesized_expression (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_AristaL3ServicePlugin) identifier_AristaL3ServicePlugin (identifier_self) identifier_self )argument_list )call (identifier_remove_router_interface) identifier_remove_router_interface )attribute (argument_list (identifier_context) identifier_context (identifier_router_id) identifier_router_id (identifier_interface_info) identifier_interface_info )argument_list )call )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_core) identifier_core (call (attribute (identifier_directory) identifier_directory (identifier_get_plugin) identifier_get_plugin )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_subnet) identifier_subnet (call (attribute (identifier_core) identifier_core (identifier_get_subnet) identifier_get_subnet )attribute (argument_list (identifier_context) identifier_context (subscript (identifier_router_to_del) identifier_router_to_del (string_'subnet_id') string_'subnet_id' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_network_id) identifier_network_id (subscript (identifier_subnet) identifier_subnet (string_'network_id') string_'network_id' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_ml2_db) identifier_ml2_db (call (identifier_NetworkContext) identifier_NetworkContext (argument_list (identifier_self) identifier_self (identifier_context) identifier_context (dictionary (pair (string_'id') string_'id' (identifier_network_id) identifier_network_id )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_seg_id) identifier_seg_id (subscript (subscript (attribute (identifier_ml2_db) identifier_ml2_db (identifier_network_segments) identifier_network_segments )attribute (integer_0) integer_0 )subscript (string_'segmentation_id') string_'segmentation_id' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_router) identifier_router (call (attribute (identifier_self) identifier_self (identifier_get_router) identifier_get_router )attribute (argument_list (identifier_context) identifier_context (identifier_router_id) identifier_router_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_router_info) identifier_router_info (call (attribute (identifier_copy) identifier_copy (identifier_deepcopy) identifier_deepcopy )attribute (argument_list (identifier_router_to_del) identifier_router_to_del )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_router_info) identifier_router_info (string_'seg_id') string_'seg_id' )subscript (identifier_seg_id) identifier_seg_id )assignment )expression_statement (expression_statement (assignment (subscript (identifier_router_info) identifier_router_info (string_'name') string_'name' )subscript (subscript (identifier_router) identifier_router (string_'name') string_'name' )subscript )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_driver) identifier_driver )attribute (identifier_remove_router_interface) identifier_remove_router_interface )attribute (argument_list (identifier_context) identifier_context (identifier_router_info) identifier_router_info )argument_list )call )expression_statement (return_statement (identifier_router_to_del) identifier_router_to_del )return_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_error) identifier_error )attribute (argument_list (call (identifier__LE) identifier__LE (argument_list (concatenated_string (string_"Error removing interface %(interface)s from ") string_"Error removing interface %(interface)s from " (string_"router %(router_id)s on Arista HW") string_"router %(router_id)s on Arista HW" (string_"Exception =(exc)s") string_"Exception =(exc)s" )concatenated_string )argument_list )call (dictionary (pair (string_'interface') string_'interface' (identifier_interface_info) identifier_interface_info )pair (pair (string_'router_id') string_'router_id' (identifier_router_id) identifier_router_id )pair (pair (string_'exc') string_'exc' (identifier_exc) identifier_exc )pair )dictionary )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Remove a subnet of a network from an existing router.
(module (function_definition (function_name_associate_health_monitor) function_name_associate_health_monitor (parameters (identifier_self) identifier_self (identifier_pool) identifier_pool (identifier_body) identifier_body )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_post) identifier_post )attribute (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_associate_pool_health_monitors_path) identifier_associate_pool_health_monitors_path )attribute (parenthesized_expression (identifier_pool) identifier_pool )parenthesized_expression )binary_operator (keyword_argument (identifier_body) identifier_body (identifier_body) identifier_body )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Associate specified load balancer health monitor and pool.
(module (function_definition (function_name_run_send_nologin) function_name_run_send_nologin (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (for_statement (identifier_user_rec) identifier_user_rec (call (attribute (identifier_MUser) identifier_MUser (identifier_query_nologin) identifier_query_nologin )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_email_add) identifier_email_add (attribute (identifier_user_rec) identifier_user_rec (identifier_user_email) identifier_user_email )attribute )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_email_add) identifier_email_add )argument_list )call )expression_statement (expression_statement (call (identifier_send_mail) identifier_send_mail (argument_list (list (identifier_email_add) identifier_email_add )list (call (attribute (string_"{0}|{1}") string_"{0}|{1}" (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_SMTP_CFG) identifier_SMTP_CFG (string_'name') string_'name' )subscript (subscript (identifier_email_cfg) identifier_email_cfg (string_'title') string_'title' )subscript )argument_list )call (subscript (identifier_email_cfg) identifier_email_cfg (string_'content') string_'content' )subscript )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_MUser) identifier_MUser (identifier_set_sendemail_time) identifier_set_sendemail_time )attribute (argument_list (attribute (identifier_user_rec) identifier_user_rec (identifier_uid) identifier_uid )attribute )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Send email to who not logged in recently.
(module (function_definition (function_name_add) function_name_add (parameters (identifier_self) identifier_self (identifier_item) identifier_item (default_parameter (identifier_safe) identifier_safe (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_item) identifier_item (identifier__set_session) identifier__set_session )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_safe) identifier_safe (None) None )comparison_operator (block (expression_statement (assignment (identifier_safe) identifier_safe (attribute (identifier_self) identifier_self (identifier_safe) identifier_safe )attribute )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_queue) identifier_queue )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_SaveOp) identifier_SaveOp (argument_list (attribute (identifier_self) identifier_self (identifier_transaction_id) identifier_transaction_id )attribute (identifier_self) identifier_self (identifier_item) identifier_item (identifier_safe) identifier_safe )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_cache_write) identifier_cache_write )attribute (argument_list (identifier_item) identifier_item )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_autoflush) identifier_autoflush )attribute (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Add an item into the queue of things to be inserted. Does not flush.
(module (function_definition (function_name_flatMap) function_name_flatMap (parameters (identifier_self) identifier_self (identifier_f) identifier_f (default_parameter (identifier_preservesPartitioning) identifier_preservesPartitioning (False) False )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_mapPartitions) identifier_mapPartitions )attribute (argument_list (lambda (lambda_parameters (identifier_p) identifier_p )lambda_parameters (generator_expression (identifier_e) identifier_e (for_in_clause (identifier_pp) identifier_pp (identifier_p) identifier_p )for_in_clause (for_in_clause (identifier_e) identifier_e (call (identifier_f) identifier_f (argument_list (identifier_pp) identifier_pp )argument_list )call )for_in_clause )generator_expression )lambda (identifier_preservesPartitioning) identifier_preservesPartitioning )argument_list )call )return_statement )block )function_definition )module
Apply function f and flatten. :param f: mapping function :rtype: DStream
(module (function_definition (function_name_clear) function_name_clear (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_pos) identifier_pos )attribute (list_comprehension (list_comprehension (integer_0) integer_0 (for_in_clause (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (attribute (identifier_self) identifier_self (identifier_board_size) identifier_board_size )attribute )argument_list )call )for_in_clause )list_comprehension (for_in_clause (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (attribute (identifier_self) identifier_self (identifier_board_size) identifier_board_size )attribute )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_graph) identifier_graph )attribute (call (attribute (identifier_copy) identifier_copy (identifier_deepcopy) identifier_deepcopy )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_pos) identifier_pos )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__game_round) identifier__game_round )attribute (integer_1) integer_1 )assignment )expression_statement )block )function_definition )module
Clear a chessboard
(module (function_definition (function_name_do_mute) function_name_do_mute (parameters (identifier_self) identifier_self (identifier_sender) identifier_sender (identifier_body) identifier_body (identifier_args) identifier_args )parameters (block (if_statement (call (attribute (identifier_sender) identifier_sender (identifier_get) identifier_get )attribute (argument_list (string_'MUTED') string_'MUTED' )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send_message) identifier_send_message )attribute (argument_list (string_'you are already muted') string_'you are already muted' (identifier_sender) identifier_sender )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_broadcast) identifier_broadcast )attribute (argument_list (binary_operator (string_'%s has muted this chatroom') string_'%s has muted this chatroom' (tuple (subscript (identifier_sender) identifier_sender (string_'NICK') string_'NICK' )subscript )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (subscript (identifier_sender) identifier_sender (string_'QUEUED_MESSAGES') string_'QUEUED_MESSAGES' )subscript (list )list )assignment )expression_statement (expression_statement (assignment (subscript (identifier_sender) identifier_sender (string_'MUTED') string_'MUTED' )subscript (True) True )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Temporarily mutes chatroom for a user
(module (function_definition (function_name_requirement_spec) function_name_requirement_spec (parameters (identifier_package_name) identifier_package_name (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (if_statement (boolean_operator (not_operator (identifier_args) identifier_args )not_operator (comparison_operator (identifier_args) identifier_args (tuple (None) None )tuple )comparison_operator )boolean_operator (block (return_statement (identifier_package_name) identifier_package_name )return_statement )block )if_statement (expression_statement (assignment (identifier_version_specs) identifier_version_specs (list )list )assignment )expression_statement (for_statement (identifier_version_spec) identifier_version_spec (identifier_args) identifier_args (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_version_spec) identifier_version_spec (tuple (identifier_list) identifier_list (identifier_tuple) identifier_tuple )tuple )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_operator) identifier_operator (identifier_version) identifier_version )pattern_list (identifier_version_spec) identifier_version_spec )assignment )expression_statement )block (else_clause (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_version_spec) identifier_version_spec (identifier_str) identifier_str )argument_list )call )assert_statement (expression_statement (assignment (identifier_operator) identifier_operator (string_"==") string_"==" )assignment )expression_statement (expression_statement (assignment (identifier_version) identifier_version (identifier_version_spec) identifier_version_spec )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_version_specs) identifier_version_specs (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_"%s%s") string_"%s%s" (tuple (identifier_operator) identifier_operator (identifier_version) identifier_version )tuple )binary_operator )argument_list )call )expression_statement )block )for_statement (return_statement (binary_operator (string_"%s%s") string_"%s%s" (tuple (identifier_package_name) identifier_package_name (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (identifier_version_specs) identifier_version_specs )argument_list )call )tuple )binary_operator )return_statement )block )function_definition )module
Identifier used when specifying a requirement to pip or setuptools.
(module (function_definition (function_name_humanize_timedelta) function_name_humanize_timedelta (parameters (identifier_td) identifier_td )parameters (block (expression_statement (assignment (identifier_secs) identifier_secs (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_td) identifier_td (identifier_total_seconds) identifier_total_seconds )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_hours) identifier_hours (identifier_secs) identifier_secs )pattern_list (call (identifier_divmod) identifier_divmod (argument_list (identifier_secs) identifier_secs (binary_operator (integer_60) integer_60 (integer_60) integer_60 )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_mins) identifier_mins (identifier_secs) identifier_secs )pattern_list (call (identifier_divmod) identifier_divmod (argument_list (identifier_secs) identifier_secs (integer_60) integer_60 )argument_list )call )assignment )expression_statement (if_statement (identifier_hours) identifier_hours (block (return_statement (binary_operator (string_'%dh %dm') string_'%dh %dm' (tuple (identifier_hours) identifier_hours (identifier_mins) identifier_mins )tuple )binary_operator )return_statement )block )if_statement (if_statement (identifier_mins) identifier_mins (block (return_statement (binary_operator (string_'%dm') string_'%dm' (identifier_mins) identifier_mins )binary_operator )return_statement )block )if_statement (return_statement (binary_operator (string_'%ds') string_'%ds' (identifier_secs) identifier_secs )binary_operator )return_statement )block )function_definition )module
Pretty-print a timedelta in a human readable format.
(module (function_definition (function_name_add_group_members) function_name_add_group_members (parameters (identifier_self) identifier_self (identifier_members) identifier_members )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_members) identifier_members (identifier_list) identifier_list )argument_list )call )not_operator (block (expression_statement (assignment (identifier_members) identifier_members (list (identifier_members) identifier_members )list )assignment )expression_statement )block )if_statement (if_statement (not_operator (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (string_'group_members') string_'group_members' (None) None )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_group_members) identifier_group_members )attribute (identifier_members) identifier_members )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_group_members) identifier_group_members )attribute (identifier_extend) identifier_extend )attribute (argument_list (identifier_members) identifier_members )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Add a new group member to the groups list :param members: member name :type members: str :return: None
(module (function_definition (function_name__insert_uncompressed) function_name__insert_uncompressed (parameters (identifier_collection_name) identifier_collection_name (identifier_docs) identifier_docs (identifier_check_keys) identifier_check_keys (identifier_safe) identifier_safe (identifier_last_error_args) identifier_last_error_args (identifier_continue_on_error) identifier_continue_on_error (identifier_opts) identifier_opts )parameters (block (expression_statement (assignment (pattern_list (identifier_op_insert) identifier_op_insert (identifier_max_bson_size) identifier_max_bson_size )pattern_list (call (identifier__insert) identifier__insert (argument_list (identifier_collection_name) identifier_collection_name (identifier_docs) identifier_docs (identifier_check_keys) identifier_check_keys (identifier_continue_on_error) identifier_continue_on_error (identifier_opts) identifier_opts )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_rid) identifier_rid (identifier_msg) identifier_msg )pattern_list (call (identifier___pack_message) identifier___pack_message (argument_list (integer_2002) integer_2002 (identifier_op_insert) identifier_op_insert )argument_list )call )assignment )expression_statement (if_statement (identifier_safe) identifier_safe (block (expression_statement (assignment (pattern_list (identifier_rid) identifier_rid (identifier_gle) identifier_gle (identifier__) identifier__ )pattern_list (call (identifier___last_error) identifier___last_error (argument_list (identifier_collection_name) identifier_collection_name (identifier_last_error_args) identifier_last_error_args )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_rid) identifier_rid (binary_operator (identifier_msg) identifier_msg (identifier_gle) identifier_gle )binary_operator (identifier_max_bson_size) identifier_max_bson_size )expression_list )return_statement )block )if_statement (return_statement (expression_list (identifier_rid) identifier_rid (identifier_msg) identifier_msg (identifier_max_bson_size) identifier_max_bson_size )expression_list )return_statement )block )function_definition )module
Internal insert message helper.
(module (function_definition (function_name_RGB_to_HSV) function_name_RGB_to_HSV (parameters (identifier_cobj) identifier_cobj (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_var_R) identifier_var_R (attribute (identifier_cobj) identifier_cobj (identifier_rgb_r) identifier_rgb_r )attribute )assignment )expression_statement (expression_statement (assignment (identifier_var_G) identifier_var_G (attribute (identifier_cobj) identifier_cobj (identifier_rgb_g) identifier_rgb_g )attribute )assignment )expression_statement (expression_statement (assignment (identifier_var_B) identifier_var_B (attribute (identifier_cobj) identifier_cobj (identifier_rgb_b) identifier_rgb_b )attribute )assignment )expression_statement (expression_statement (assignment (identifier_var_max) identifier_var_max (call (identifier_max) identifier_max (argument_list (identifier_var_R) identifier_var_R (identifier_var_G) identifier_var_G (identifier_var_B) identifier_var_B )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_var_min) identifier_var_min (call (identifier_min) identifier_min (argument_list (identifier_var_R) identifier_var_R (identifier_var_G) identifier_var_G (identifier_var_B) identifier_var_B )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_var_H) identifier_var_H (call (identifier___RGB_to_Hue) identifier___RGB_to_Hue (argument_list (identifier_var_R) identifier_var_R (identifier_var_G) identifier_var_G (identifier_var_B) identifier_var_B (identifier_var_min) identifier_var_min (identifier_var_max) identifier_var_max )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_var_max) identifier_var_max (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_var_S) identifier_var_S (integer_0) integer_0 )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_var_S) identifier_var_S (binary_operator (float_1.0) float_1.0 (parenthesized_expression (binary_operator (identifier_var_min) identifier_var_min (identifier_var_max) identifier_var_max )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_var_V) identifier_var_V (identifier_var_max) identifier_var_max )assignment )expression_statement (return_statement (call (identifier_HSVColor) identifier_HSVColor (argument_list (identifier_var_H) identifier_var_H (identifier_var_S) identifier_var_S (identifier_var_V) identifier_var_V )argument_list )call )return_statement )block )function_definition )module
Converts from RGB to HSV. H values are in degrees and are 0 to 360. S values are a percentage, 0.0 to 1.0. V values are a percentage, 0.0 to 1.0.
(module (function_definition (function_name_create_subgroup_global) function_name_create_subgroup_global (parameters (identifier_self) identifier_self (identifier_id) identifier_id (identifier_title) identifier_title (default_parameter (identifier_description) identifier_description (None) None )default_parameter (default_parameter (identifier_vendor_guid) identifier_vendor_guid (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_path) identifier_path (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_path) identifier_path (string_"id") string_"id" )subscript (identifier_id) identifier_id )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_"title") string_"title" )subscript (identifier_title) identifier_title )assignment )expression_statement (if_statement (comparison_operator (identifier_description) identifier_description (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_"description") string_"description" )subscript (identifier_description) identifier_description )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_vendor_guid) identifier_vendor_guid (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_"vendor_guid") string_"vendor_guid" )subscript (identifier_vendor_guid) identifier_vendor_guid )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"POST /api/v1/global/outcome_groups/{id}/subgroups with query params: {params} and form data: {data}") string_"POST /api/v1/global/outcome_groups/{id}/subgroups with query params: {params} and form data: {data}" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (dictionary_splat (identifier_path) identifier_path )dictionary_splat )argument_list )call )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_generic_request) identifier_generic_request )attribute (argument_list (string_"POST") string_"POST" (call (attribute (string_"/api/v1/global/outcome_groups/{id}/subgroups") string_"/api/v1/global/outcome_groups/{id}/subgroups" (identifier_format) identifier_format )attribute (argument_list (dictionary_splat (identifier_path) identifier_path )dictionary_splat )argument_list )call (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_single_item) identifier_single_item (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Create a subgroup. Creates a new empty subgroup under the outcome group with the given title and description.
(module (function_definition (function_name_rfft2d_freqs) function_name_rfft2d_freqs (parameters (identifier_h) identifier_h (identifier_w) identifier_w )parameters (block (expression_statement (assignment (identifier_fy) identifier_fy (subscript (call (attribute (attribute (identifier_np) identifier_np (identifier_fft) identifier_fft )attribute (identifier_fftfreq) identifier_fftfreq )attribute (argument_list (identifier_h) identifier_h )argument_list )call (slice (colon) colon )slice (None) None )subscript )assignment )expression_statement (if_statement (comparison_operator (binary_operator (identifier_w) identifier_w (integer_2) integer_2 )binary_operator (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_fx) identifier_fx (subscript (call (attribute (attribute (identifier_np) identifier_np (identifier_fft) identifier_fft )attribute (identifier_fftfreq) identifier_fftfreq )attribute (argument_list (identifier_w) identifier_w )argument_list )call (slice (colon) colon (binary_operator (binary_operator (identifier_w) identifier_w (integer_2) integer_2 )binary_operator (integer_2) integer_2 )binary_operator )slice )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_fx) identifier_fx (subscript (call (attribute (attribute (identifier_np) identifier_np (identifier_fft) identifier_fft )attribute (identifier_fftfreq) identifier_fftfreq )attribute (argument_list (identifier_w) identifier_w )argument_list )call (slice (colon) colon (binary_operator (binary_operator (identifier_w) identifier_w (integer_2) integer_2 )binary_operator (integer_1) integer_1 )binary_operator )slice )subscript )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (binary_operator (binary_operator (identifier_fx) identifier_fx (identifier_fx) identifier_fx )binary_operator (binary_operator (identifier_fy) identifier_fy (identifier_fy) identifier_fy )binary_operator )binary_operator )argument_list )call )return_statement )block )function_definition )module
Computes 2D spectrum frequencies.
(module (function_definition (function_name_purge_archives) function_name_purge_archives (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_klass) identifier_klass (call (attribute (identifier_self) identifier_self (identifier_get_version_class) identifier_get_version_class )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_qs) identifier_qs (subscript (call (attribute (call (attribute (attribute (identifier_klass) identifier_klass (identifier_normal) identifier_normal )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_object_id) identifier_object_id (attribute (identifier_self) identifier_self (identifier_object_id) identifier_object_id )attribute )keyword_argument (keyword_argument (identifier_state) identifier_state (attribute (identifier_self) identifier_self (identifier_ARCHIVED) identifier_ARCHIVED )attribute )keyword_argument )argument_list )call (identifier_order_by) identifier_order_by )attribute (argument_list (string_'-last_save') string_'-last_save' )argument_list )call (slice (attribute (identifier_self) identifier_self (identifier_NUM_KEEP_ARCHIVED) identifier_NUM_KEEP_ARCHIVED )attribute (colon) colon )slice )subscript )assignment )expression_statement (for_statement (identifier_obj) identifier_obj (identifier_qs) identifier_qs (block (expression_statement (call (attribute (identifier_obj) identifier_obj (identifier__delete_reverses) identifier__delete_reverses )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (call (attribute (attribute (identifier_klass) identifier_klass (identifier_normal) identifier_normal )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_vid) identifier_vid (attribute (identifier_obj) identifier_obj (identifier_vid) identifier_vid )attribute )keyword_argument )argument_list )call (identifier_delete) identifier_delete )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Delete older archived items. Use the class attribute NUM_KEEP_ARCHIVED to control how many items are kept.
(module (function_definition (function_name_length_limits) function_name_length_limits (parameters (identifier_max_length_limit) identifier_max_length_limit (identifier_length_limit_step) identifier_length_limit_step )parameters (block (expression_statement (assignment (identifier_string_len) identifier_string_len (call (identifier_len) identifier_len (argument_list (call (identifier_str) identifier_str (argument_list (identifier_max_length_limit) identifier_max_length_limit )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (call (attribute (call (identifier_str) identifier_str (argument_list (identifier_i) identifier_i )argument_list )call (identifier_zfill) identifier_zfill )attribute (argument_list (identifier_string_len) identifier_string_len )argument_list )call (for_in_clause (identifier_i) identifier_i (call (identifier_xrange) identifier_xrange (argument_list (identifier_length_limit_step) identifier_length_limit_step (binary_operator (binary_operator (identifier_max_length_limit) identifier_max_length_limit (identifier_length_limit_step) identifier_length_limit_step )binary_operator (integer_1) integer_1 )binary_operator (identifier_length_limit_step) identifier_length_limit_step )argument_list )call )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Generates the length limits
(module (function_definition (function_name_schema) function_name_schema (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_status) identifier_status )attribute (string_"DELETING") string_"DELETING" )comparison_operator (block (return_statement (string_"") string_"" )return_statement )block )if_statement (expression_statement (assignment (identifier_parts) identifier_parts (list (string_"GLOBAL") string_"GLOBAL" (attribute (identifier_self) identifier_self (identifier_index_type) identifier_index_type )attribute (string_"INDEX") string_"INDEX" )list )assignment )expression_statement (expression_statement (call (attribute (identifier_parts) identifier_parts (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_"('%s', %s,") string_"('%s', %s," (tuple (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (attribute (attribute (identifier_self) identifier_self (identifier_hash_key) identifier_hash_key )attribute (identifier_name) identifier_name )attribute )tuple )binary_operator )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_range_key) identifier_range_key )attribute (block (expression_statement (call (attribute (identifier_parts) identifier_parts (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_"%s,") string_"%s," (attribute (attribute (identifier_self) identifier_self (identifier_range_key) identifier_range_key )attribute (identifier_name) identifier_name )attribute )binary_operator )argument_list )call )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_includes) identifier_includes )attribute (block (expression_statement (call (attribute (identifier_parts) identifier_parts (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_"[%s],") string_"[%s]," (call (attribute (string_", ") string_", " (identifier_join) identifier_join )attribute (argument_list (generator_expression (binary_operator (string_"'%s'") string_"'%s'" (identifier_i) identifier_i )binary_operator (for_in_clause (identifier_i) identifier_i (attribute (identifier_self) identifier_self (identifier_includes) identifier_includes )attribute )for_in_clause )generator_expression )argument_list )call )binary_operator )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_parts) identifier_parts (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_"THROUGHPUT (%d, %d))") string_"THROUGHPUT (%d, %d))" (tuple (attribute (identifier_self) identifier_self (identifier_read_throughput) identifier_read_throughput )attribute (attribute (identifier_self) identifier_self (identifier_write_throughput) identifier_write_throughput )attribute )tuple )binary_operator )argument_list )call )expression_statement (return_statement (call (attribute (string_" ") string_" " (identifier_join) identifier_join )attribute (argument_list (identifier_parts) identifier_parts )argument_list )call )return_statement )block )function_definition )module
The DQL fragment for constructing this index
(module (function_definition (function_name_cmd_dhcp_discover) function_name_cmd_dhcp_discover (parameters (identifier_iface) identifier_iface (identifier_timeout) identifier_timeout (identifier_verbose) identifier_verbose )parameters (block (expression_statement (assignment (attribute (identifier_conf) identifier_conf (identifier_verb) identifier_verb )attribute (False) False )assignment )expression_statement (if_statement (identifier_iface) identifier_iface (block (expression_statement (assignment (attribute (identifier_conf) identifier_conf (identifier_iface) identifier_iface )attribute (identifier_iface) identifier_iface )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_conf) identifier_conf (identifier_checkIPaddr) identifier_checkIPaddr )attribute (False) False )assignment )expression_statement (expression_statement (assignment (identifier_hw) identifier_hw (call (identifier_get_if_raw_hwaddr) identifier_get_if_raw_hwaddr (argument_list (attribute (identifier_conf) identifier_conf (identifier_iface) identifier_iface )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ether) identifier_ether (call (identifier_Ether) identifier_Ether (argument_list (keyword_argument (identifier_dst) identifier_dst (string_"ff:ff:ff:ff:ff:ff") string_"ff:ff:ff:ff:ff:ff" )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ip) identifier_ip (call (identifier_IP) identifier_IP (argument_list (keyword_argument (identifier_src) identifier_src (string_"0.0.0.0") string_"0.0.0.0" )keyword_argument (keyword_argument (identifier_dst) identifier_dst (string_"255.255.255.255") string_"255.255.255.255" )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_udp) identifier_udp (call (identifier_UDP) identifier_UDP (argument_list (keyword_argument (identifier_sport) identifier_sport (integer_68) integer_68 )keyword_argument (keyword_argument (identifier_dport) identifier_dport (integer_67) integer_67 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bootp) identifier_bootp (call (identifier_BOOTP) identifier_BOOTP (argument_list (keyword_argument (identifier_chaddr) identifier_chaddr (identifier_hw) identifier_hw )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dhcp) identifier_dhcp (call (identifier_DHCP) identifier_DHCP (argument_list (keyword_argument (identifier_options) identifier_options (list (tuple (string_"message-type") string_"message-type" (string_"discover") string_"discover" )tuple (string_"end") string_"end" )list )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dhcp_discover) identifier_dhcp_discover (binary_operator (binary_operator (binary_operator (binary_operator (identifier_ether) identifier_ether (identifier_ip) identifier_ip )binary_operator (identifier_udp) identifier_udp )binary_operator (identifier_bootp) identifier_bootp )binary_operator (identifier_dhcp) identifier_dhcp )binary_operator )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_ans) identifier_ans (identifier_unans) identifier_unans )pattern_list (call (identifier_srp) identifier_srp (argument_list (identifier_dhcp_discover) identifier_dhcp_discover (keyword_argument (identifier_multi) identifier_multi (True) True )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (integer_5) integer_5 )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier__) identifier__ (identifier_pkt) identifier_pkt )pattern_list (identifier_ans) identifier_ans (block (if_statement (identifier_verbose) identifier_verbose (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (identifier_pkt) identifier_pkt (identifier_show) identifier_show )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (identifier_pkt) identifier_pkt (identifier_summary) identifier_summary )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement )block )function_definition )module
Send a DHCP request and show what devices has replied. Note: Using '-v' you can see all the options (like DNS servers) included on the responses. \b # habu.dhcp_discover Ether / IP / UDP 192.168.0.1:bootps > 192.168.0.5:bootpc / BOOTP / DHCP
(module (function_definition (function_name_latent_prediction_model) function_name_latent_prediction_model (parameters (identifier_inputs) identifier_inputs (identifier_ed_attention_bias) identifier_ed_attention_bias (identifier_latents_discrete) identifier_latents_discrete (identifier_latents_dense) identifier_latents_dense (identifier_hparams) identifier_hparams (default_parameter (identifier_vocab_size) identifier_vocab_size (None) None )default_parameter (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (with_statement (with_clause (with_item (call (attribute (identifier_tf) identifier_tf (identifier_variable_scope) identifier_variable_scope )attribute (argument_list (identifier_name) identifier_name (keyword_argument (identifier_default_name) identifier_default_name (string_"latent_prediction") string_"latent_prediction" )keyword_argument )argument_list )call )with_item )with_clause (block (if_statement (comparison_operator (attribute (identifier_hparams) identifier_hparams (identifier_mode) identifier_mode )attribute (attribute (attribute (attribute (identifier_tf) identifier_tf (identifier_estimator) identifier_estimator )attribute (identifier_ModeKeys) identifier_ModeKeys )attribute (identifier_PREDICT) identifier_PREDICT )attribute )comparison_operator (block (expression_statement (assignment (identifier_latents_pred) identifier_latents_pred (call (identifier_transformer_latent_decoder) identifier_transformer_latent_decoder (argument_list (call (attribute (identifier_tf) identifier_tf (identifier_stop_gradient) identifier_stop_gradient )attribute (argument_list (identifier_latents_dense) identifier_latents_dense )argument_list )call (identifier_inputs) identifier_inputs (identifier_ed_attention_bias) identifier_ed_attention_bias (identifier_hparams) identifier_hparams (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_vocab_size) identifier_vocab_size (None) None )comparison_operator (block (expression_statement (assignment (identifier_vocab_size) identifier_vocab_size (binary_operator (integer_2) integer_2 (attribute (identifier_hparams) identifier_hparams (identifier_bottleneck_bits) identifier_bottleneck_bits )attribute )binary_operator )assignment )expression_statement )block )if_statement (if_statement (not_operator (attribute (identifier_hparams) identifier_hparams (identifier_soft_em) identifier_soft_em )attribute )not_operator (block (expression_statement (assignment (identifier_latents_discrete) identifier_latents_discrete (call (attribute (identifier_tf) identifier_tf (identifier_one_hot) identifier_one_hot )attribute (argument_list (identifier_latents_discrete) identifier_latents_discrete (keyword_argument (identifier_depth) identifier_depth (identifier_vocab_size) identifier_vocab_size )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_latent_pred_loss) identifier_latent_pred_loss )pattern_list (call (identifier_ae_latent_softmax) identifier_ae_latent_softmax (argument_list (identifier_latents_pred) identifier_latents_pred (call (attribute (identifier_tf) identifier_tf (identifier_stop_gradient) identifier_stop_gradient )attribute (argument_list (identifier_latents_discrete) identifier_latents_discrete )argument_list )call (identifier_vocab_size) identifier_vocab_size (identifier_hparams) identifier_hparams )argument_list )call )assignment )expression_statement )block )if_statement )block )with_statement (return_statement (expression_list (identifier_latents_pred) identifier_latents_pred (identifier_latent_pred_loss) identifier_latent_pred_loss )expression_list )return_statement )block )function_definition )module
Transformer-based latent prediction model. It is an autoregressive decoder over latents_discrete given inputs. Args: inputs: Tensor of shape [batch, length_kv, hparams.hidden_size]. Inputs to attend to for the decoder on latents. ed_attention_bias: Tensor which broadcasts with shape [batch, hparams.num_heads, length_q, length_kv]. Encoder-decoder attention bias. latents_discrete: Tensor of shape [batch, length_q, vocab_size]. One-hot latents to compute log-probability of given inputs. latents_dense: Tensor of shape [batch, length_q, hparams.hidden_size]. length_q is the latent length, which is height * width * hparams.num_latents / (2**hparams.num_compress_steps). hparams: HParams. vocab_size: int or None. If None, it is 2**hparams.bottleneck_bits. name: string, variable scope. Returns: latents_pred: Tensor of shape [batch, length_q, hparams.hidden_size]. latents_pred_loss: Tensor of shape [batch, length_q].
(module (function_definition (function_name_context_id) function_name_context_id (parameters (typed_parameter (identifier_ctx) identifier_ctx (type (identifier_Context_T) identifier_Context_T )type )typed_parameter (keyword_separator )keyword_separator (typed_default_parameter (identifier_mode) identifier_mode (type (identifier_str) identifier_str )type (string_'default') string_'default' )typed_default_parameter (typed_default_parameter (identifier_use_hash) identifier_use_hash (type (identifier_bool) identifier_bool )type (False) False )typed_default_parameter )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_ctx_id) identifier_ctx_id (string_'') string_'' )assignment )expression_statement (if_statement (comparison_operator (identifier_mode) identifier_mode (string_'default') string_'default' )comparison_operator (block (if_statement (call (attribute (identifier_ctx) identifier_ctx (identifier_get) identifier_get )attribute (argument_list (string_'group_id') string_'group_id' )argument_list )call (block (expression_statement (assignment (identifier_ctx_id) identifier_ctx_id (string_f'/group/{ctx["group_id"]}') string_f'/group/{ctx["group_id"]}' )assignment )expression_statement )block (elif_clause (call (attribute (identifier_ctx) identifier_ctx (identifier_get) identifier_get )attribute (argument_list (string_'discuss_id') string_'discuss_id' )argument_list )call (block (expression_statement (assignment (identifier_ctx_id) identifier_ctx_id (string_f'/discuss/{ctx["discuss_id"]}') string_f'/discuss/{ctx["discuss_id"]}' )assignment )expression_statement )block )elif_clause )if_statement (if_statement (call (attribute (identifier_ctx) identifier_ctx (identifier_get) identifier_get )attribute (argument_list (string_'user_id') string_'user_id' )argument_list )call (block (expression_statement (augmented_assignment (identifier_ctx_id) identifier_ctx_id (string_f'/user/{ctx["user_id"]}') string_f'/user/{ctx["user_id"]}' )augmented_assignment )expression_statement )block )if_statement )block (elif_clause (comparison_operator (identifier_mode) identifier_mode (string_'group') string_'group' )comparison_operator (block (if_statement (call (attribute (identifier_ctx) identifier_ctx (identifier_get) identifier_get )attribute (argument_list (string_'group_id') string_'group_id' )argument_list )call (block (expression_statement (assignment (identifier_ctx_id) identifier_ctx_id (string_f'/group/{ctx["group_id"]}') string_f'/group/{ctx["group_id"]}' )assignment )expression_statement )block (elif_clause (call (attribute (identifier_ctx) identifier_ctx (identifier_get) identifier_get )attribute (argument_list (string_'discuss_id') string_'discuss_id' )argument_list )call (block (expression_statement (assignment (identifier_ctx_id) identifier_ctx_id (string_f'/discuss/{ctx["discuss_id"]}') string_f'/discuss/{ctx["discuss_id"]}' )assignment )expression_statement )block )elif_clause (elif_clause (call (attribute (identifier_ctx) identifier_ctx (identifier_get) identifier_get )attribute (argument_list (string_'user_id') string_'user_id' )argument_list )call (block (expression_statement (assignment (identifier_ctx_id) identifier_ctx_id (string_f'/user/{ctx["user_id"]}') string_f'/user/{ctx["user_id"]}' )assignment )expression_statement )block )elif_clause )if_statement )block )elif_clause (elif_clause (comparison_operator (identifier_mode) identifier_mode (string_'user') string_'user' )comparison_operator (block (if_statement (call (attribute (identifier_ctx) identifier_ctx (identifier_get) identifier_get )attribute (argument_list (string_'user_id') string_'user_id' )argument_list )call (block (expression_statement (assignment (identifier_ctx_id) identifier_ctx_id (string_f'/user/{ctx["user_id"]}') string_f'/user/{ctx["user_id"]}' )assignment )expression_statement )block )if_statement )block )elif_clause )if_statement (if_statement (boolean_operator (identifier_ctx_id) identifier_ctx_id (identifier_use_hash) identifier_use_hash )boolean_operator (block (expression_statement (assignment (identifier_ctx_id) identifier_ctx_id (call (attribute (call (attribute (identifier_hashlib) identifier_hashlib (identifier_md5) identifier_md5 )attribute (argument_list (call (attribute (identifier_ctx_id) identifier_ctx_id (identifier_encode) identifier_encode )attribute (argument_list (string_'ascii') string_'ascii' )argument_list )call )argument_list )call (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_ctx_id) identifier_ctx_id )return_statement )block )function_definition )module
Calculate a unique id representing the current context. mode: default: one id for one context group: one id for one group or discuss user: one id for one user :param ctx: the context dict :param mode: unique id mode: "default", "group", or "user" :param use_hash: use md5 to hash the id or not
(module (function_definition (function_name_get_names) function_name_get_names (parameters (identifier_self) identifier_self )parameters (block (return_statement (parenthesized_expression (binary_operator (list_comprehension (binary_operator (string_'do_') string_'do_' (identifier_x) identifier_x )binary_operator (for_in_clause (identifier_x) identifier_x (subscript (attribute (identifier_self) identifier_self (identifier_commands) identifier_commands )attribute (string_'shell') string_'shell' )subscript )for_in_clause )list_comprehension (list_comprehension (binary_operator (string_'do_') string_'do_' (identifier_x) identifier_x )binary_operator (for_in_clause (identifier_x) identifier_x (subscript (attribute (identifier_self) identifier_self (identifier_commands) identifier_commands )attribute (string_'forth') string_'forth' )subscript )for_in_clause )list_comprehension )binary_operator )parenthesized_expression )return_statement )block )function_definition )module
Get names for autocompletion.
(module (function_definition (function_name__use_last_dir_name) function_name__use_last_dir_name (parameters (identifier_self) identifier_self (identifier_path) identifier_path (default_parameter (identifier_prefix) identifier_prefix (string_'') string_'' )default_parameter )parameters (block (expression_statement (assignment (identifier_matching_dirs) identifier_matching_dirs (generator_expression (identifier_dir_name) identifier_dir_name (for_in_clause (identifier_dir_name) identifier_dir_name (call (identifier_reversed) identifier_reversed (argument_list (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (identifier_path) identifier_path )argument_list )call )argument_list )call )for_in_clause (if_clause (boolean_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_path) identifier_path (identifier_dir_name) identifier_dir_name )argument_list )call )argument_list )call (call (attribute (identifier_dir_name) identifier_dir_name (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_prefix) identifier_prefix )argument_list )call )boolean_operator )if_clause )generator_expression )assignment )expression_statement (return_statement (boolean_operator (call (identifier_next) identifier_next (argument_list (identifier_matching_dirs) identifier_matching_dirs (None) None )argument_list )call (string_'') string_'' )boolean_operator )return_statement )block )function_definition )module
Return name of the last dir in path or '' if no dir found. Parameters ---------- path: str Use dirs in this path prefix: str Use only dirs startings by this prefix
(module (function_definition (function_name_check_element_by_selector) function_name_check_element_by_selector (parameters (identifier_self) identifier_self (identifier_selector) identifier_selector )parameters (block (expression_statement (assignment (identifier_elems) identifier_elems (call (identifier_find_elements_by_jquery) identifier_find_elements_by_jquery (argument_list (attribute (identifier_world) identifier_world (identifier_browser) identifier_browser )attribute (identifier_selector) identifier_selector )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_elems) identifier_elems )not_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (string_"Expected matching elements, none found.") string_"Expected matching elements, none found." )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Assert an element exists matching the given selector.
(module (function_definition (function_name__write_critic_model_stats) function_name__write_critic_model_stats (parameters (identifier_self) identifier_self (typed_parameter (identifier_iteration) identifier_iteration (type (identifier_int) identifier_int )type )typed_parameter )parameters (type (None) None )type (block (expression_statement (string_"Writes gradient statistics for critic to Tensorboard.") string_"Writes gradient statistics for critic to Tensorboard." )expression_statement (expression_statement (assignment (identifier_critic) identifier_critic (attribute (attribute (attribute (identifier_self) identifier_self (identifier_learn) identifier_learn )attribute (identifier_gan_trainer) identifier_gan_trainer )attribute (identifier_critic) identifier_critic )attribute )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_stats_writer) identifier_stats_writer )attribute (identifier_write) identifier_write )attribute (argument_list (keyword_argument (identifier_model) identifier_model (identifier_critic) identifier_critic )keyword_argument (keyword_argument (identifier_iteration) identifier_iteration (identifier_iteration) identifier_iteration )keyword_argument (keyword_argument (identifier_tbwriter) identifier_tbwriter (attribute (identifier_self) identifier_self (identifier_tbwriter) identifier_tbwriter )attribute )keyword_argument (keyword_argument (identifier_name) identifier_name (string_'crit_model_stats') string_'crit_model_stats' )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_crit_stats_updated) identifier_crit_stats_updated )attribute (True) True )assignment )expression_statement )block )function_definition )module
Writes gradient statistics for critic to Tensorboard.
(module (function_definition (function_name_to_packets) function_name_to_packets (parameters (identifier_pages) identifier_pages (default_parameter (identifier_strict) identifier_strict (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_serial) identifier_serial (attribute (subscript (identifier_pages) identifier_pages (integer_0) integer_0 )subscript (identifier_serial) identifier_serial )attribute )assignment )expression_statement (expression_statement (assignment (identifier_sequence) identifier_sequence (attribute (subscript (identifier_pages) identifier_pages (integer_0) integer_0 )subscript (identifier_sequence) identifier_sequence )attribute )assignment )expression_statement (expression_statement (assignment (identifier_packets) identifier_packets (list )list )assignment )expression_statement (if_statement (identifier_strict) identifier_strict (block (if_statement (attribute (subscript (identifier_pages) identifier_pages (integer_0) integer_0 )subscript (identifier_continued) identifier_continued )attribute (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"first packet is continued") string_"first packet is continued" )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (attribute (subscript (identifier_pages) identifier_pages (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_complete) identifier_complete )attribute )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"last packet does not complete") string_"last packet does not complete" )argument_list )call )raise_statement )block )if_statement )block (elif_clause (boolean_operator (identifier_pages) identifier_pages (attribute (subscript (identifier_pages) identifier_pages (integer_0) integer_0 )subscript (identifier_continued) identifier_continued )attribute )boolean_operator (block (expression_statement (call (attribute (identifier_packets) identifier_packets (identifier_append) identifier_append )attribute (argument_list (list (string_b"") string_b"" )list )argument_list )call )expression_statement )block )elif_clause )if_statement (for_statement (identifier_page) identifier_page (identifier_pages) identifier_pages (block (if_statement (comparison_operator (identifier_serial) identifier_serial (attribute (identifier_page) identifier_page (identifier_serial) identifier_serial )attribute )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"invalid serial number in %r") string_"invalid serial number in %r" (identifier_page) identifier_page )binary_operator )argument_list )call )raise_statement )block (elif_clause (comparison_operator (identifier_sequence) identifier_sequence (attribute (identifier_page) identifier_page (identifier_sequence) identifier_sequence )attribute )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"bad sequence number in %r") string_"bad sequence number in %r" (identifier_page) identifier_page )binary_operator )argument_list )call )raise_statement )block )elif_clause (else_clause (block (expression_statement (augmented_assignment (identifier_sequence) identifier_sequence (integer_1) integer_1 )augmented_assignment )expression_statement )block )else_clause )if_statement (if_statement (attribute (identifier_page) identifier_page (identifier_continued) identifier_continued )attribute (block (expression_statement (call (attribute (subscript (identifier_packets) identifier_packets (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_append) identifier_append )attribute (argument_list (subscript (attribute (identifier_page) identifier_page (identifier_packets) identifier_packets )attribute (integer_0) integer_0 )subscript )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_packets) identifier_packets (identifier_append) identifier_append )attribute (argument_list (list (subscript (attribute (identifier_page) identifier_page (identifier_packets) identifier_packets )attribute (integer_0) integer_0 )subscript )list )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_packets) identifier_packets (identifier_extend) identifier_extend )attribute (generator_expression (list (identifier_p) identifier_p )list (for_in_clause (identifier_p) identifier_p (subscript (attribute (identifier_page) identifier_page (identifier_packets) identifier_packets )attribute (slice (integer_1) integer_1 (colon) colon )slice )subscript )for_in_clause )generator_expression )call )expression_statement )block )for_statement (return_statement (list_comprehension (call (attribute (string_b"") string_b"" (identifier_join) identifier_join )attribute (argument_list (identifier_p) identifier_p )argument_list )call (for_in_clause (identifier_p) identifier_p (identifier_packets) identifier_packets )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Construct a list of packet data from a list of Ogg pages. If strict is true, the first page must start a new packet, and the last page must end the last packet.
(module (function_definition (function_name_registerJavaFunction) function_name_registerJavaFunction (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_javaClassName) identifier_javaClassName (default_parameter (identifier_returnType) identifier_returnType (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_jdt) identifier_jdt (None) None )assignment )expression_statement (if_statement (comparison_operator (identifier_returnType) identifier_returnType (None) None )comparison_operator (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_returnType) identifier_returnType (identifier_DataType) identifier_DataType )argument_list )call )not_operator (block (expression_statement (assignment (identifier_returnType) identifier_returnType (call (identifier__parse_datatype_string) identifier__parse_datatype_string (argument_list (identifier_returnType) identifier_returnType )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_jdt) identifier_jdt (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_sparkSession) identifier_sparkSession )attribute (identifier__jsparkSession) identifier__jsparkSession )attribute (identifier_parseDataType) identifier_parseDataType )attribute (argument_list (call (attribute (identifier_returnType) identifier_returnType (identifier_json) identifier_json )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_sparkSession) identifier_sparkSession )attribute (identifier__jsparkSession) identifier__jsparkSession )attribute (identifier_udf) identifier_udf )attribute (argument_list )argument_list )call (identifier_registerJava) identifier_registerJava )attribute (argument_list (identifier_name) identifier_name (identifier_javaClassName) identifier_javaClassName (identifier_jdt) identifier_jdt )argument_list )call )expression_statement )block )function_definition )module
Register a Java user-defined function as a SQL function. In addition to a name and the function itself, the return type can be optionally specified. When the return type is not specified we would infer it via reflection. :param name: name of the user-defined function :param javaClassName: fully qualified name of java class :param returnType: the return type of the registered Java function. The value can be either a :class:`pyspark.sql.types.DataType` object or a DDL-formatted type string. >>> from pyspark.sql.types import IntegerType >>> spark.udf.registerJavaFunction( ... "javaStringLength", "test.org.apache.spark.sql.JavaStringLength", IntegerType()) >>> spark.sql("SELECT javaStringLength('test')").collect() [Row(UDF:javaStringLength(test)=4)] >>> spark.udf.registerJavaFunction( ... "javaStringLength2", "test.org.apache.spark.sql.JavaStringLength") >>> spark.sql("SELECT javaStringLength2('test')").collect() [Row(UDF:javaStringLength2(test)=4)] >>> spark.udf.registerJavaFunction( ... "javaStringLength3", "test.org.apache.spark.sql.JavaStringLength", "integer") >>> spark.sql("SELECT javaStringLength3('test')").collect() [Row(UDF:javaStringLength3(test)=4)]
(module (function_definition (function_name_on_capability_sasl_enabled) function_name_on_capability_sasl_enabled (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_sasl_mechanism) identifier_sasl_mechanism )attribute (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier__sasl_mechanisms) identifier__sasl_mechanisms )attribute (comparison_operator (attribute (identifier_self) identifier_self (identifier_sasl_mechanism) identifier_sasl_mechanism )attribute (attribute (identifier_self) identifier_self (identifier__sasl_mechanisms) identifier__sasl_mechanisms )attribute )comparison_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_warning) identifier_warning )attribute (argument_list (string_'Requested SASL mechanism is not in server mechanism list: aborting SASL authentication.') string_'Requested SASL mechanism is not in server mechanism list: aborting SASL authentication.' )argument_list )call )expression_statement (return_statement (attribute (identifier_cap) identifier_cap (identifier_failed) identifier_failed )attribute )return_statement )block )if_statement (expression_statement (assignment (identifier_mechanisms) identifier_mechanisms (list (attribute (identifier_self) identifier_self (identifier_sasl_mechanism) identifier_sasl_mechanism )attribute )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_mechanisms) identifier_mechanisms (boolean_operator (attribute (identifier_self) identifier_self (identifier__sasl_mechanisms) identifier__sasl_mechanisms )attribute (list (string_'PLAIN') string_'PLAIN' )list )boolean_operator )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_mechanisms) identifier_mechanisms (list (string_'EXTERNAL') string_'EXTERNAL' )list )comparison_operator (block (expression_statement (assignment (identifier_mechanism) identifier_mechanism (string_'EXTERNAL') string_'EXTERNAL' )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__sasl_client) identifier__sasl_client )attribute (call (attribute (attribute (identifier_puresasl) identifier_puresasl (identifier_client) identifier_client )attribute (identifier_SASLClient) identifier_SASLClient )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_connection) identifier_connection )attribute (identifier_hostname) identifier_hostname )attribute (string_'irc') string_'irc' (keyword_argument (identifier_username) identifier_username (attribute (identifier_self) identifier_self (identifier_sasl_username) identifier_sasl_username )attribute )keyword_argument (keyword_argument (identifier_password) identifier_password (attribute (identifier_self) identifier_self (identifier_sasl_password) identifier_sasl_password )attribute )keyword_argument (keyword_argument (identifier_identity) identifier_identity (attribute (identifier_self) identifier_self (identifier_sasl_identity) identifier_sasl_identity )attribute )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__sasl_client) identifier__sasl_client )attribute (identifier_choose_mechanism) identifier_choose_mechanism )attribute (argument_list (identifier_mechanisms) identifier_mechanisms (keyword_argument (identifier_allow_anonymous) identifier_allow_anonymous (False) False )keyword_argument )argument_list )call )expression_statement )block (except_clause (attribute (identifier_puresasl) identifier_puresasl (identifier_SASLError) identifier_SASLError )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_exception) identifier_exception )attribute (argument_list (string_'SASL mechanism choice failed: aborting SASL authentication.') string_'SASL mechanism choice failed: aborting SASL authentication.' )argument_list )call )expression_statement (return_statement (attribute (identifier_cap) identifier_cap (identifier_FAILED) identifier_FAILED )attribute )return_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_mechanism) identifier_mechanism (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier__sasl_client) identifier__sasl_client )attribute (identifier_mechanism) identifier_mechanism )attribute (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier__sasl_start) identifier__sasl_start )attribute (argument_list (identifier_mechanism) identifier_mechanism )argument_list )call )await )expression_statement (return_statement (attribute (identifier_cap) identifier_cap (identifier_NEGOTIATING) identifier_NEGOTIATING )attribute )return_statement )block )function_definition )module
Start SASL authentication.
(module (function_definition (function_name_enclosing_frame) function_name_enclosing_frame (parameters (default_parameter (identifier_frame) identifier_frame (None) None )default_parameter (default_parameter (identifier_level) identifier_level (integer_2) integer_2 )default_parameter )parameters (block (expression_statement (assignment (identifier_frame) identifier_frame (boolean_operator (identifier_frame) identifier_frame (call (attribute (identifier_sys) identifier_sys (identifier__getframe) identifier__getframe )attribute (argument_list (identifier_level) identifier_level )argument_list )call )boolean_operator )assignment )expression_statement (while_statement (comparison_operator (call (attribute (attribute (identifier_frame) identifier_frame (identifier_f_globals) identifier_f_globals )attribute (identifier_get) identifier_get )attribute (argument_list (string_'__name__') string_'__name__' )argument_list )call (identifier___name__) identifier___name__ )comparison_operator (block (expression_statement (assignment (identifier_frame) identifier_frame (attribute (identifier_frame) identifier_frame (identifier_f_back) identifier_f_back )attribute )assignment )expression_statement )block )while_statement (return_statement (identifier_frame) identifier_frame )return_statement )block )function_definition )module
Get an enclosing frame that skips decorator code
(module (function_definition (function_name_extend) function_name_extend (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_graph) identifier_graph (call (identifier_GraphAPI) identifier_GraphAPI (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_graph) identifier_graph (identifier_get) identifier_get )attribute (argument_list (string_'oauth/access_token') string_'oauth/access_token' (keyword_argument (identifier_client_id) identifier_client_id (identifier_FACEBOOK_APPLICATION_ID) identifier_FACEBOOK_APPLICATION_ID )keyword_argument (keyword_argument (identifier_client_secret) identifier_client_secret (identifier_FACEBOOK_APPLICATION_SECRET_KEY) identifier_FACEBOOK_APPLICATION_SECRET_KEY )keyword_argument (keyword_argument (identifier_grant_type) identifier_grant_type (string_'fb_exchange_token') string_'fb_exchange_token' )keyword_argument (keyword_argument (identifier_fb_exchange_token) identifier_fb_exchange_token (attribute (identifier_self) identifier_self (identifier_token) identifier_token )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_components) identifier_components (call (identifier_parse_qs) identifier_parse_qs (argument_list (identifier_response) identifier_response )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_token) identifier_token )attribute (subscript (subscript (identifier_components) identifier_components (string_'access_token') string_'access_token' )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_expires_at) identifier_expires_at )attribute (binary_operator (call (identifier_now) identifier_now (argument_list )argument_list )call (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_seconds) identifier_seconds (call (identifier_int) identifier_int (argument_list (subscript (subscript (identifier_components) identifier_components (string_'expires') string_'expires' )subscript (integer_0) integer_0 )subscript )argument_list )call )keyword_argument )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Extend the OAuth token.
(module (function_definition (function_name_external_system_identifiers) function_name_external_system_identifiers (parameters (identifier_endpoint) identifier_endpoint )parameters (block (decorated_definition (decorator (attribute (identifier_utils) identifier_utils (identifier_flatten) identifier_flatten )attribute )decorator (decorator (attribute (identifier_utils) identifier_utils (identifier_for_each_value) identifier_for_each_value )attribute )decorator (function_definition (function_name__external_system_identifiers) function_name__external_system_identifiers (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_value) identifier_value )parameters (block (expression_statement (assignment (identifier_new_recid) identifier_new_recid (call (identifier_maybe_int) identifier_maybe_int (argument_list (call (attribute (identifier_value) identifier_value (identifier_get) identifier_get )attribute (argument_list (string_'d') string_'d' )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (identifier_new_recid) identifier_new_recid (block (expression_statement (assignment (subscript (identifier_self) identifier_self (string_'new_record') string_'new_record' )subscript (call (identifier_get_record_ref) identifier_get_record_ref (argument_list (identifier_new_recid) identifier_new_recid (identifier_endpoint) identifier_endpoint )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (list_comprehension (dictionary (pair (string_'schema') string_'schema' (string_'SPIRES') string_'SPIRES' )pair (pair (string_'value') string_'value' (identifier_ext_sys_id) identifier_ext_sys_id )pair )dictionary (for_in_clause (identifier_ext_sys_id) identifier_ext_sys_id (call (identifier_force_list) identifier_force_list (argument_list (call (attribute (identifier_value) identifier_value (identifier_get) identifier_get )attribute (argument_list (string_'a') string_'a' )argument_list )call )argument_list )call )for_in_clause )list_comprehension )return_statement )block )function_definition )decorated_definition (return_statement (identifier__external_system_identifiers) identifier__external_system_identifiers )return_statement )block )function_definition )module
Populate the ``external_system_identifiers`` key. Also populates the ``new_record`` key through side effects.
(module (function_definition (function_name_convert_sbml_model) function_name_convert_sbml_model (parameters (identifier_model) identifier_model )parameters (block (expression_statement (assignment (identifier_biomass_reactions) identifier_biomass_reactions (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_reaction) identifier_reaction (attribute (identifier_model) identifier_model (identifier_reactions) identifier_reactions )attribute (block (if_statement (comparison_operator (attribute (identifier_reaction) identifier_reaction (identifier_id) identifier_id )attribute (attribute (identifier_model) identifier_model (identifier_limits) identifier_limits )attribute )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_lower) identifier_lower (identifier_upper) identifier_upper )pattern_list (call (identifier_parse_flux_bounds) identifier_parse_flux_bounds (argument_list (identifier_reaction) identifier_reaction )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_lower) identifier_lower (None) None )comparison_operator (comparison_operator (identifier_upper) identifier_upper (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (subscript (attribute (identifier_model) identifier_model (identifier_limits) identifier_limits )attribute (attribute (identifier_reaction) identifier_reaction (identifier_id) identifier_id )attribute )subscript (expression_list (attribute (identifier_reaction) identifier_reaction (identifier_id) identifier_id )attribute (identifier_lower) identifier_lower (identifier_upper) identifier_upper )expression_list )assignment )expression_statement )block )if_statement )block )if_statement (expression_statement (assignment (identifier_objective) identifier_objective (call (identifier_parse_objective_coefficient) identifier_parse_objective_coefficient (argument_list (identifier_reaction) identifier_reaction )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_objective) identifier_objective (None) None )comparison_operator (comparison_operator (identifier_objective) identifier_objective (integer_0) integer_0 )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_biomass_reactions) identifier_biomass_reactions (identifier_add) identifier_add )attribute (argument_list (attribute (identifier_reaction) identifier_reaction (identifier_id) identifier_id )attribute )argument_list )call )expression_statement )block )if_statement )block )for_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_biomass_reactions) identifier_biomass_reactions )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (attribute (identifier_model) identifier_model (identifier_biomass_reaction) identifier_biomass_reaction )attribute (call (identifier_next) identifier_next (argument_list (call (identifier_iter) identifier_iter (argument_list (identifier_biomass_reactions) identifier_biomass_reactions )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (identifier_convert_model_entries) identifier_convert_model_entries (argument_list (identifier_model) identifier_model )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_model) identifier_model (identifier_extracellular_compartment) identifier_extracellular_compartment )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_extracellular) identifier_extracellular (call (identifier_detect_extracellular_compartment) identifier_detect_extracellular_compartment (argument_list (identifier_model) identifier_model )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_model) identifier_model (identifier_extracellular_compartment) identifier_extracellular_compartment )attribute (identifier_extracellular) identifier_extracellular )assignment )expression_statement )block )if_statement (expression_statement (call (identifier_convert_exchange_to_compounds) identifier_convert_exchange_to_compounds (argument_list (identifier_model) identifier_model )argument_list )call )expression_statement )block )function_definition )module
Convert raw SBML model to extended model. Args: model: :class:`NativeModel` obtained from :class:`SBMLReader`.
(module (function_definition (function_name_add_resources) function_name_add_resources (parameters (identifier_self) identifier_self (identifier_resources) identifier_resources )parameters (block (expression_statement (assignment (identifier_new_resources) identifier_new_resources (call (attribute (identifier_self) identifier_self (identifier__build_resource_dictionary) identifier__build_resource_dictionary )attribute (argument_list (identifier_resources) identifier_resources )argument_list )call )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_new_resources) identifier_new_resources (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__resources) identifier__resources )attribute (identifier_key) identifier_key )subscript (subscript (identifier_new_resources) identifier_new_resources (identifier_key) identifier_key )subscript )assignment )expression_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__dirty_attributes) identifier__dirty_attributes )attribute (identifier_add) identifier_add )attribute (argument_list (string_u'resources') string_u'resources' )argument_list )call )expression_statement )block )function_definition )module
Adds new resources to the event. *resources* can be a list of email addresses or :class:`ExchangeEventAttendee` objects.
(module (function_definition (function_name_rescue) function_name_rescue (parameters (identifier_f) identifier_f (identifier_on_success) identifier_on_success (default_parameter (identifier_on_error) identifier_on_error (identifier_reraise) identifier_reraise )default_parameter (default_parameter (identifier_on_complete) identifier_on_complete (identifier_nop) identifier_nop )default_parameter )parameters (block (function_definition (function_name__rescue) function_name__rescue (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (try_statement (block (return_statement (call (identifier_on_success) identifier_on_success (argument_list (call (identifier_f) identifier_f (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (return_statement (call (identifier_on_error) identifier_on_error (argument_list (identifier_e) identifier_e )argument_list )call )return_statement )block )except_clause (finally_clause (block (expression_statement (call (identifier_on_complete) identifier_on_complete (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition (return_statement (identifier__rescue) identifier__rescue )return_statement )block )function_definition )module
Functional try-except-finally :param function f: guarded function :param function on_succes: called when f is executed without error :param function on_error: called with `error` parameter when f failed :param function on_complete: called as finally block :returns function: call signature is equal f signature
(module (function_definition (function_name_call_next) function_name_call_next (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute (identifier_cancel) identifier_cancel )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_next_time) identifier_next_time (call (attribute (identifier_self) identifier_self (identifier_get_next) identifier_get_next )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_loop) identifier_loop )attribute (identifier_call_at) identifier_call_at )attribute (argument_list (identifier_next_time) identifier_next_time (attribute (identifier_self) identifier_self (identifier_call_next) identifier_call_next )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_call_func) identifier_call_func )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Set next hop in the loop. Call task
(module (function_definition (function_name_initialize) function_name_initialize (parameters (identifier_self) identifier_self (identifier_name) identifier_name (default_parameter (identifier_reuse) identifier_reuse (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_user) identifier_user (subscript (attribute (identifier_self) identifier_self (identifier__kwargs) identifier__kwargs )attribute (string_'user') string_'user' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_password) identifier_password (subscript (attribute (identifier_self) identifier_self (identifier__kwargs) identifier__kwargs )attribute (string_'password') string_'password' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_host) identifier_host (subscript (attribute (identifier_self) identifier_self (identifier__kwargs) identifier__kwargs )attribute (string_'host') string_'host' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_port) identifier_port (subscript (attribute (identifier_self) identifier_self (identifier__kwargs) identifier__kwargs )attribute (string_'port') string_'port' )subscript )assignment )expression_statement (if_statement (comparison_operator (string_'-') string_'-' (identifier_name) identifier_name )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_"dabase name '%s' cannot contain '-' characters") string_"dabase name '%s' cannot contain '-' characters" (identifier_name) identifier_name )binary_operator )argument_list )call )expression_statement (return_statement (identifier_CODE_VALUE_ERROR) identifier_CODE_VALUE_ERROR )return_statement )block )if_statement (try_statement (block (expression_statement (call (attribute (identifier_Database) identifier_Database (identifier_create) identifier_create )attribute (argument_list (identifier_user) identifier_user (identifier_password) identifier_password (identifier_name) identifier_name (identifier_host) identifier_host (identifier_port) identifier_port )argument_list )call )expression_statement (expression_statement (assignment (identifier_db) identifier_db (call (identifier_Database) identifier_Database (argument_list (identifier_user) identifier_user (identifier_password) identifier_password (identifier_name) identifier_name (identifier_host) identifier_host (identifier_port) identifier_port )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier___load_countries) identifier___load_countries )attribute (argument_list (identifier_db) identifier_db )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_DatabaseExists) identifier_DatabaseExists (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (if_statement (not_operator (identifier_reuse) identifier_reuse )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_error) identifier_error )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_CODE_DATABASE_EXISTS) identifier_CODE_DATABASE_EXISTS )return_statement )block )if_statement )block )except_clause (except_clause (as_pattern (identifier_DatabaseError) identifier_DatabaseError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_error) identifier_error )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_CODE_DATABASE_ERROR) identifier_CODE_DATABASE_ERROR )return_statement )block )except_clause (except_clause (as_pattern (identifier_LoadError) identifier_LoadError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_Database) identifier_Database (identifier_drop) identifier_drop )attribute (argument_list (identifier_user) identifier_user (identifier_password) identifier_password (identifier_name) identifier_name (identifier_host) identifier_host (identifier_port) identifier_port )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_error) identifier_error )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_CODE_LOAD_ERROR) identifier_CODE_LOAD_ERROR )return_statement )block )except_clause )try_statement (return_statement (identifier_CMD_SUCCESS) identifier_CMD_SUCCESS )return_statement )block )function_definition )module
Create an empty Sorting Hat registry. This method creates a new database including the schema of Sorting Hat. Any attempt to create a new registry over an existing instance will produce an error, except if reuse=True. In that case, the database will be reused, assuming the database schema is correct (it won't be created in this case). :param name: name of the database :param reuse: reuse database if it already exists
(module (function_definition (function_name_get_nested_blocks_spec) function_name_get_nested_blocks_spec (parameters (identifier_self) identifier_self )parameters (block (return_statement (list_comprehension (conditional_expression (identifier_block_spec) identifier_block_spec (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_block_spec) identifier_block_spec (identifier_NestedXBlockSpec) identifier_NestedXBlockSpec )argument_list )call (call (identifier_NestedXBlockSpec) identifier_NestedXBlockSpec (argument_list (identifier_block_spec) identifier_block_spec )argument_list )call )conditional_expression (for_in_clause (identifier_block_spec) identifier_block_spec (attribute (identifier_self) identifier_self (identifier_allowed_nested_blocks) identifier_allowed_nested_blocks )attribute )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Converts allowed_nested_blocks items to NestedXBlockSpec to provide common interface
(module (function_definition (function_name_batch_delete_entities) function_name_batch_delete_entities (parameters (identifier_self) identifier_self (identifier_parent) identifier_parent (identifier_entity_values) identifier_entity_values (default_parameter (identifier_language_code) identifier_language_code (None) None )default_parameter (default_parameter (identifier_retry) identifier_retry (attribute (attribute (attribute (attribute (identifier_google) identifier_google (identifier_api_core) identifier_api_core )attribute (identifier_gapic_v1) identifier_gapic_v1 )attribute (identifier_method) identifier_method )attribute (identifier_DEFAULT) identifier_DEFAULT )attribute )default_parameter (default_parameter (identifier_timeout) identifier_timeout (attribute (attribute (attribute (attribute (identifier_google) identifier_google (identifier_api_core) identifier_api_core )attribute (identifier_gapic_v1) identifier_gapic_v1 )attribute (identifier_method) identifier_method )attribute (identifier_DEFAULT) identifier_DEFAULT )attribute )default_parameter (default_parameter (identifier_metadata) identifier_metadata (None) None )default_parameter )parameters (block (if_statement (comparison_operator (string_'batch_delete_entities') string_'batch_delete_entities' (attribute (identifier_self) identifier_self (identifier__inner_api_calls) identifier__inner_api_calls )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__inner_api_calls) identifier__inner_api_calls )attribute (string_'batch_delete_entities') string_'batch_delete_entities' )subscript (call (attribute (attribute (attribute (attribute (identifier_google) identifier_google (identifier_api_core) identifier_api_core )attribute (identifier_gapic_v1) identifier_gapic_v1 )attribute (identifier_method) identifier_method )attribute (identifier_wrap_method) identifier_wrap_method )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_transport) identifier_transport )attribute (identifier_batch_delete_entities) identifier_batch_delete_entities )attribute (keyword_argument (identifier_default_retry) identifier_default_retry (attribute (subscript (attribute (identifier_self) identifier_self (identifier__method_configs) identifier__method_configs )attribute (string_'BatchDeleteEntities') string_'BatchDeleteEntities' )subscript (identifier_retry) identifier_retry )attribute )keyword_argument (keyword_argument (identifier_default_timeout) identifier_default_timeout (attribute (subscript (attribute (identifier_self) identifier_self (identifier__method_configs) identifier__method_configs )attribute (string_'BatchDeleteEntities') string_'BatchDeleteEntities' )subscript (identifier_timeout) identifier_timeout )attribute )keyword_argument (keyword_argument (identifier_client_info) identifier_client_info (attribute (identifier_self) identifier_self (identifier__client_info) identifier__client_info )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_request) identifier_request (call (attribute (identifier_entity_type_pb2) identifier_entity_type_pb2 (identifier_BatchDeleteEntitiesRequest) identifier_BatchDeleteEntitiesRequest )attribute (argument_list (keyword_argument (identifier_parent) identifier_parent (identifier_parent) identifier_parent )keyword_argument (keyword_argument (identifier_entity_values) identifier_entity_values (identifier_entity_values) identifier_entity_values )keyword_argument (keyword_argument (identifier_language_code) identifier_language_code (identifier_language_code) identifier_language_code )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_operation) identifier_operation (call (subscript (attribute (identifier_self) identifier_self (identifier__inner_api_calls) identifier__inner_api_calls )attribute (string_'batch_delete_entities') string_'batch_delete_entities' )subscript (argument_list (identifier_request) identifier_request (keyword_argument (identifier_retry) identifier_retry (identifier_retry) identifier_retry )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument (keyword_argument (identifier_metadata) identifier_metadata (identifier_metadata) identifier_metadata )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (attribute (identifier_google) identifier_google (identifier_api_core) identifier_api_core )attribute (identifier_operation) identifier_operation )attribute (identifier_from_gapic) identifier_from_gapic )attribute (argument_list (identifier_operation) identifier_operation (attribute (attribute (identifier_self) identifier_self (identifier_transport) identifier_transport )attribute (identifier__operations_client) identifier__operations_client )attribute (attribute (identifier_empty_pb2) identifier_empty_pb2 (identifier_Empty) identifier_Empty )attribute (keyword_argument (identifier_metadata_type) identifier_metadata_type (attribute (identifier_struct_pb2) identifier_struct_pb2 (identifier_Struct) identifier_Struct )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Deletes entities in the specified entity type. Operation <response: ``google.protobuf.Empty``, metadata: [google.protobuf.Struct][google.protobuf.Struct]> Example: >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.EntityTypesClient() >>> >>> parent = client.entity_type_path('[PROJECT]', '[ENTITY_TYPE]') >>> >>> # TODO: Initialize ``entity_values``: >>> entity_values = [] >>> >>> response = client.batch_delete_entities(parent, entity_values) >>> >>> def callback(operation_future): ... # Handle result. ... result = operation_future.result() >>> >>> response.add_done_callback(callback) >>> >>> # Handle metadata. >>> metadata = response.metadata() Args: parent (str): Required. The name of the entity type to delete entries for. Format: ``projects/<Project ID>/agent/entityTypes/<Entity Type ID>``. entity_values (list[str]): Required. The canonical ``values`` of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with ``projects/<Project ID>``. language_code (str): Optional. The language of entity synonyms defined in ``entities``. If not specified, the agent's default language is used. [More than a dozen languages](https://dialogflow.com/docs/reference/language) are supported. Note: languages must be enabled in the agent, before they can be used. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. Returns: A :class:`~google.cloud.dialogflow_v2.types._OperationFuture` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. google.api_core.exceptions.RetryError: If the request failed due to a retryable error and retry attempts failed. ValueError: If the parameters are invalid.
(module (function_definition (function_name_get_participant) function_name_get_participant (parameters (identifier_self) identifier_self (typed_parameter (identifier_p_id) identifier_p_id (type (identifier_int) identifier_int )type )typed_parameter (default_parameter (identifier_force_update) identifier_force_update (False) False )default_parameter )parameters (type (identifier_Participant) identifier_Participant )type (block (expression_statement (assignment (identifier_found_p) identifier_found_p (call (attribute (identifier_self) identifier_self (identifier__find_participant) identifier__find_participant )attribute (argument_list (identifier_p_id) identifier_p_id )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_force_update) identifier_force_update (comparison_operator (identifier_found_p) identifier_found_p (None) None )comparison_operator )boolean_operator (block (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier_get_participants) identifier_get_participants )attribute (argument_list )argument_list )call )await )expression_statement (expression_statement (assignment (identifier_found_p) identifier_found_p (call (attribute (identifier_self) identifier_self (identifier__find_participant) identifier__find_participant )attribute (argument_list (identifier_p_id) identifier_p_id )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_found_p) identifier_found_p )return_statement )block )function_definition )module
get a participant by its id |methcoro| Args: p_id: participant id force_update (dfault=False): True to force an update to the Challonge API Returns: Participant: None if not found Raises: APIException
(module (function_definition (function_name__get_result_paths) function_name__get_result_paths (parameters (identifier_self) identifier_self (identifier_output_dir) identifier_output_dir )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__write_properties_file) identifier__write_properties_file )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_properties_fp) identifier_properties_fp (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_ModelDir) identifier_ModelDir )attribute (attribute (identifier_self) identifier_self (identifier_PropertiesFile) identifier_PropertiesFile )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result_paths) identifier_result_paths (dictionary (pair (string_'properties') string_'properties' (call (identifier_ResultPath) identifier_ResultPath (argument_list (identifier_properties_fp) identifier_properties_fp (keyword_argument (identifier_IsWritten) identifier_IsWritten (True) True )keyword_argument )argument_list )call )pair )dictionary )assignment )expression_statement (return_statement (identifier_result_paths) identifier_result_paths )return_statement )block )function_definition )module
Return a dict of output files.
(module (function_definition (function_name_smartos) function_name_smartos (parameters )parameters (block (expression_statement (assignment (identifier_grains) identifier_grains (dictionary )dictionary )assignment )expression_statement (if_statement (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_platform) identifier_platform )attribute (identifier_is_smartos_zone) identifier_is_smartos_zone )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_grains) identifier_grains (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_dictupdate) identifier_dictupdate )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_grains) identifier_grains (call (identifier__smartos_zone_data) identifier__smartos_zone_data (argument_list )argument_list )call (keyword_argument (identifier_merge_lists) identifier_merge_lists (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_grains) identifier_grains (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_dictupdate) identifier_dictupdate )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_grains) identifier_grains (call (identifier__smartos_zone_pkgsrc_data) identifier__smartos_zone_pkgsrc_data (argument_list )argument_list )call (keyword_argument (identifier_merge_lists) identifier_merge_lists (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_grains) identifier_grains (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_dictupdate) identifier_dictupdate )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_grains) identifier_grains (call (identifier__smartos_zone_pkgin_data) identifier__smartos_zone_pkgin_data (argument_list )argument_list )call (keyword_argument (identifier_merge_lists) identifier_merge_lists (True) True )keyword_argument )argument_list )call )assignment )expression_statement )block (elif_clause (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_platform) identifier_platform )attribute (identifier_is_smartos_globalzone) identifier_is_smartos_globalzone )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_grains) identifier_grains (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_dictupdate) identifier_dictupdate )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_grains) identifier_grains (call (identifier__smartos_computenode_data) identifier__smartos_computenode_data (argument_list )argument_list )call (keyword_argument (identifier_merge_lists) identifier_merge_lists (True) True )keyword_argument )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement (return_statement (identifier_grains) identifier_grains )return_statement )block )function_definition )module
Provide grains for SmartOS
(module (function_definition (function_name__setTag) function_name__setTag (parameters (identifier_self) identifier_self (identifier_tag) identifier_tag )parameters (block (if_statement (identifier_tag) identifier_tag (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__tagRef) identifier__tagRef )attribute (call (attribute (identifier_weakref) identifier_weakref (identifier_ref) identifier_ref )attribute (argument_list (identifier_tag) identifier_tag )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__tagRef) identifier__tagRef )attribute (None) None )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
_setTag - INTERNAL METHOD. Associated a given AdvancedTag to this attributes dict. If bool(#tag) is True, will set the weakref to that tag. Otherwise, will clear the reference @param tag <AdvancedTag/None> - Either the AdvancedTag to associate, or None to clear current association
(module (function_definition (function_name_list_env) function_name_list_env (parameters (default_parameter (identifier_saltenv) identifier_saltenv (string_'base') string_'base' )default_parameter )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_saltenv) identifier_saltenv (subscript (identifier___opts__) identifier___opts__ (string_'pillar_roots') string_'pillar_roots' )subscript )comparison_operator (block (return_statement (identifier_ret) identifier_ret )return_statement )block )if_statement (for_statement (identifier_f_root) identifier_f_root (subscript (subscript (identifier___opts__) identifier___opts__ (string_'pillar_roots') string_'pillar_roots' )subscript (identifier_saltenv) identifier_saltenv )subscript (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (identifier_f_root) identifier_f_root )subscript (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_root) identifier_root (identifier_dirs) identifier_dirs (identifier_files) identifier_files )pattern_list (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_path) identifier_path )attribute (identifier_os_walk) identifier_os_walk )attribute (argument_list (identifier_f_root) identifier_f_root )argument_list )call (block (expression_statement (assignment (identifier_sub) identifier_sub (subscript (identifier_ret) identifier_ret (identifier_f_root) identifier_f_root )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_root) identifier_root (identifier_f_root) identifier_f_root )comparison_operator (block (expression_statement (assignment (identifier_sroot) identifier_sroot (identifier_root) identifier_root )assignment )expression_statement (expression_statement (assignment (identifier_above) identifier_above (list )list )assignment )expression_statement (while_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_samefile) identifier_samefile )attribute (argument_list (identifier_sroot) identifier_sroot (identifier_f_root) identifier_f_root )argument_list )call )not_operator (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_sroot) identifier_sroot )argument_list )call )assignment )expression_statement (if_statement (identifier_base) identifier_base (block (expression_statement (call (attribute (identifier_above) identifier_above (identifier_insert) identifier_insert )attribute (argument_list (integer_0) integer_0 (identifier_base) identifier_base )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_sroot) identifier_sroot (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier_sroot) identifier_sroot )argument_list )call )assignment )expression_statement )block )while_statement (for_statement (identifier_aroot) identifier_aroot (identifier_above) identifier_above (block (expression_statement (assignment (identifier_sub) identifier_sub (subscript (identifier_sub) identifier_sub (identifier_aroot) identifier_aroot )subscript )assignment )expression_statement )block )for_statement )block )if_statement (for_statement (identifier_dir_) identifier_dir_ (identifier_dirs) identifier_dirs (block (expression_statement (assignment (subscript (identifier_sub) identifier_sub (identifier_dir_) identifier_dir_ )subscript (dictionary )dictionary )assignment )expression_statement )block )for_statement (for_statement (identifier_fn_) identifier_fn_ (identifier_files) identifier_files (block (expression_statement (assignment (subscript (identifier_sub) identifier_sub (identifier_fn_) identifier_fn_ )subscript (string_'f') string_'f' )assignment )expression_statement )block )for_statement )block )for_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Return all of the file paths found in an environment
(module (function_definition (function_name_linestrings_to_path) function_name_linestrings_to_path (parameters (identifier_multi) identifier_multi )parameters (block (expression_statement (assignment (identifier_entities) identifier_entities (list )list )assignment )expression_statement (expression_statement (assignment (identifier_vertices) identifier_vertices (list )list )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_util) identifier_util (identifier_is_sequence) identifier_is_sequence )attribute (argument_list (identifier_multi) identifier_multi )argument_list )call )not_operator (block (expression_statement (assignment (identifier_multi) identifier_multi (list (identifier_multi) identifier_multi )list )assignment )expression_statement )block )if_statement (for_statement (identifier_line) identifier_line (identifier_multi) identifier_multi (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_line) identifier_line (string_'coords') string_'coords' )argument_list )call (block (expression_statement (assignment (identifier_coords) identifier_coords (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (attribute (identifier_line) identifier_line (identifier_coords) identifier_coords )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_coords) identifier_coords )argument_list )call (integer_2) integer_2 )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (attribute (identifier_entities) identifier_entities (identifier_append) identifier_append )attribute (argument_list (call (identifier_Line) identifier_Line (argument_list (binary_operator (call (attribute (identifier_np) identifier_np (identifier_arange) identifier_arange )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_coords) identifier_coords )argument_list )call )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_vertices) identifier_vertices )argument_list )call )binary_operator )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_vertices) identifier_vertices (identifier_extend) identifier_extend )attribute (argument_list (identifier_coords) identifier_coords )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_kwargs) identifier_kwargs (dictionary (pair (string_'entities') string_'entities' (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_entities) identifier_entities )argument_list )call )pair (pair (string_'vertices') string_'vertices' (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_vertices) identifier_vertices )argument_list )call )pair )dictionary )assignment )expression_statement (return_statement (identifier_kwargs) identifier_kwargs )return_statement )block )function_definition )module
Load shapely LineString objects into a trimesh.path.Path2D object Parameters ------------- multi : shapely.geometry.LineString or MultiLineString Input 2D geometry Returns ------------- kwargs : dict Keyword arguments for Path2D constructor
(module (function_definition (function_name_parameterized_send) function_name_parameterized_send (parameters (identifier_self) identifier_self (identifier_request) identifier_request (identifier_parameter_list) identifier_parameter_list )parameters (block (expression_statement (assignment (identifier_response_queues) identifier_response_queues (call (identifier_OrderedDict) identifier_OrderedDict (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_parameter) identifier_parameter (identifier_parameter_list) identifier_parameter_list (block (expression_statement (assignment (subscript (identifier_response_queues) identifier_response_queues (identifier_parameter) identifier_parameter )subscript (call (attribute (identifier_self) identifier_self (identifier_send) identifier_send )attribute (argument_list (binary_operator (identifier_request) identifier_request (identifier_parameter) identifier_parameter )binary_operator )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_response_queues) identifier_response_queues )return_statement )block )function_definition )module
Send batched requests for a list of parameters Args: request (str): Request to send, like "%s.*?\n" parameter_list (list): parameters to format with, like ["TTLIN", "TTLOUT"] Returns: dict: {parameter: response_queue}
(module (function_definition (function_name_away_two_point_field_goal_percentage) function_name_away_two_point_field_goal_percentage (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_result) identifier_result (binary_operator (call (identifier_float) identifier_float (argument_list (attribute (identifier_self) identifier_self (identifier_away_two_point_field_goals) identifier_away_two_point_field_goals )attribute )argument_list )call (line_continuation_\) line_continuation_\ (call (identifier_float) identifier_float (argument_list (attribute (identifier_self) identifier_self (identifier_away_two_point_field_goal_attempts) identifier_away_two_point_field_goal_attempts )attribute )argument_list )call )binary_operator )assignment )expression_statement (return_statement (call (identifier_round) identifier_round (argument_list (call (identifier_float) identifier_float (argument_list (identifier_result) identifier_result )argument_list )call (integer_3) integer_3 )argument_list )call )return_statement )block )function_definition )module
Returns a ``float`` of the number of two point field goals made divided by the number of two point field goal attempts by the away team. Percentage ranges from 0-1.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_user) identifier_user (attribute (identifier_request) identifier_request (identifier_user) identifier_user )attribute )assignment )expression_statement (expression_statement (assignment (identifier_serializer) identifier_serializer (call (identifier_PermissionsUserSerializer) identifier_PermissionsUserSerializer (argument_list (keyword_argument (identifier_instance) identifier_instance (identifier_user) identifier_user )keyword_argument (keyword_argument (identifier_context) identifier_context (dictionary (pair (string_'request') string_'request' (identifier_request) identifier_request )pair )dictionary )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_Response) identifier_Response (argument_list (keyword_argument (identifier_data) identifier_data (attribute (identifier_serializer) identifier_serializer (identifier_data) identifier_data )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get user information, with a list of permissions for that user.
(module (function_definition (function_name_rolling_upgrade) function_name_rolling_upgrade (parameters (identifier_self) identifier_self (identifier_upgrade_from_cdh_version) identifier_upgrade_from_cdh_version (identifier_upgrade_to_cdh_version) identifier_upgrade_to_cdh_version (identifier_upgrade_service_names) identifier_upgrade_service_names (default_parameter (identifier_slave_batch_size) identifier_slave_batch_size (None) None )default_parameter (default_parameter (identifier_slave_fail_count_threshold) identifier_slave_fail_count_threshold (None) None )default_parameter (default_parameter (identifier_sleep_seconds) identifier_sleep_seconds (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_args) identifier_args (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'upgradeFromCdhVersion') string_'upgradeFromCdhVersion' )subscript (identifier_upgrade_from_cdh_version) identifier_upgrade_from_cdh_version )assignment )expression_statement (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'upgradeToCdhVersion') string_'upgradeToCdhVersion' )subscript (identifier_upgrade_to_cdh_version) identifier_upgrade_to_cdh_version )assignment )expression_statement (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'upgradeServiceNames') string_'upgradeServiceNames' )subscript (identifier_upgrade_service_names) identifier_upgrade_service_names )assignment )expression_statement (if_statement (identifier_slave_batch_size) identifier_slave_batch_size (block (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'slaveBatchSize') string_'slaveBatchSize' )subscript (identifier_slave_batch_size) identifier_slave_batch_size )assignment )expression_statement )block )if_statement (if_statement (identifier_slave_fail_count_threshold) identifier_slave_fail_count_threshold (block (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'slaveFailCountThreshold') string_'slaveFailCountThreshold' )subscript (identifier_slave_fail_count_threshold) identifier_slave_fail_count_threshold )assignment )expression_statement )block )if_statement (if_statement (identifier_sleep_seconds) identifier_sleep_seconds (block (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'sleepSeconds') string_'sleepSeconds' )subscript (identifier_sleep_seconds) identifier_sleep_seconds )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__cmd) identifier__cmd )attribute (argument_list (string_'rollingUpgrade') string_'rollingUpgrade' (keyword_argument (identifier_data) identifier_data (identifier_args) identifier_args )keyword_argument (keyword_argument (identifier_api_version) identifier_api_version (integer_10) integer_10 )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Command to do a rolling upgrade of services in the given cluster This command does not handle any services that don't support rolling upgrades. The command will throw an error and not start if upgrade of any such service is requested. This command does not upgrade the full CDH Cluster. You should normally use the upgradeCDH Command for upgrading the cluster. This is primarily helpful if you need to need to recover from an upgrade failure or for advanced users to script an alternative to the upgradeCdhCommand. This command expects the binaries to be available on hosts and activated. It does not change any binaries on the hosts. @param upgrade_from_cdh_version: Current CDH Version of the services. Example versions are: "5.1.0", "5.2.2" or "5.4.0" @param upgrade_to_cdh_version: Target CDH Version for the services. The CDH version should already be present and activated on the nodes. Example versions are: "5.1.0", "5.2.2" or "5.4.0" @param upgrade_service_names: List of specific services to be upgraded and restarted. @param slave_batch_size: Number of hosts with slave roles to restart at a time Must be greater than 0. Default is 1. @param slave_fail_count_threshold: The threshold for number of slave host batches that are allowed to fail to restart before the entire command is considered failed. Must be >= 0. Default is 0. @param sleep_seconds: Number of seconds to sleep between restarts of slave host batches. Must be >=0. Default is 0. @return: Reference to the submitted command. @since: API v10
(module (function_definition (function_name__static) function_name__static (parameters (identifier_self) identifier_self (identifier_target) identifier_target (identifier_value) identifier_value )parameters (block (return_statement (binary_operator (string_'static ') string_'static ' (call (attribute (identifier_self) identifier_self (identifier___p) identifier___p )attribute (argument_list (call (attribute (identifier_ast) identifier_ast (identifier_Assign) identifier_Assign )attribute (argument_list (keyword_argument (identifier_targets) identifier_targets (list (identifier_target) identifier_target )list )keyword_argument (keyword_argument (identifier_value) identifier_value (identifier_value) identifier_value )keyword_argument )argument_list )call )argument_list )call )binary_operator )return_statement )block )function_definition )module
PHP's "static"
(module (function_definition (function_name_elapsed_time_from) function_name_elapsed_time_from (parameters (identifier_start_time) identifier_start_time )parameters (block (expression_statement (assignment (identifier_time_then) identifier_time_then (call (identifier_make_time) identifier_make_time (argument_list (identifier_start_time) identifier_start_time )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_time_now) identifier_time_now (call (attribute (call (attribute (identifier_datetime) identifier_datetime (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (keyword_argument (identifier_microsecond) identifier_microsecond (integer_0) integer_0 )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_time_then) identifier_time_then (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_delta_t) identifier_delta_t (binary_operator (identifier_time_now) identifier_time_now (identifier_time_then) identifier_time_then )binary_operator )assignment )expression_statement (return_statement (identifier_delta_t) identifier_delta_t )return_statement )block )function_definition )module
calculate time delta from latched time and current time
(module (function_definition (function_name_assert_regex) function_name_assert_regex (parameters (identifier_text) identifier_text (identifier_regex) identifier_regex (default_parameter (identifier_msg_fmt) identifier_msg_fmt (string_"{msg}") string_"{msg}" )default_parameter )parameters (block (expression_statement (assignment (identifier_compiled) identifier_compiled (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (identifier_regex) identifier_regex )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_compiled) identifier_compiled (identifier_search) identifier_search )attribute (argument_list (identifier_text) identifier_text )argument_list )call )not_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (string_"{!r} does not match {!r}") string_"{!r} does not match {!r}" (identifier_format) identifier_format )attribute (argument_list (identifier_text) identifier_text (attribute (identifier_compiled) identifier_compiled (identifier_pattern) identifier_pattern )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_fail) identifier_fail (argument_list (call (attribute (identifier_msg_fmt) identifier_msg_fmt (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_msg) identifier_msg (identifier_msg) identifier_msg )keyword_argument (keyword_argument (identifier_text) identifier_text (identifier_text) identifier_text )keyword_argument (keyword_argument (identifier_pattern) identifier_pattern (attribute (identifier_compiled) identifier_compiled (identifier_pattern) identifier_pattern )attribute )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Fail if text does not match the regular expression. regex can be either a regular expression string or a compiled regular expression object. >>> assert_regex("Hello World!", r"llo.*rld!$") >>> assert_regex("Hello World!", r"\\d") Traceback (most recent call last): ... AssertionError: 'Hello World!' does not match '\\\\d' The following msg_fmt arguments are supported: * msg - the default error message * text - text that is matched * pattern - regular expression pattern as string
(module (function_definition (function_name_get_compliance_expansion) function_name_get_compliance_expansion (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_order) identifier_order )attribute (integer_4) integer_4 )comparison_operator )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_"Compliance tensor expansion only ") string_"Compliance tensor expansion only " (string_"supported for fourth-order and lower") string_"supported for fourth-order and lower" )concatenated_string )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_ce_exp) identifier_ce_exp (list (attribute (call (identifier_ElasticTensor) identifier_ElasticTensor (argument_list (subscript (identifier_self) identifier_self (integer_0) integer_0 )subscript )argument_list )call (identifier_compliance_tensor) identifier_compliance_tensor )attribute )list )assignment )expression_statement (expression_statement (assignment (identifier_einstring) identifier_einstring (string_"ijpq,pqrsuv,rskl,uvmn->ijklmn") string_"ijpq,pqrsuv,rskl,uvmn->ijklmn" )assignment )expression_statement (expression_statement (call (attribute (identifier_ce_exp) identifier_ce_exp (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_np) identifier_np (identifier_einsum) identifier_einsum )attribute (argument_list (identifier_einstring) identifier_einstring (unary_operator (subscript (identifier_ce_exp) identifier_ce_exp (unary_operator (integer_1) integer_1 )unary_operator )subscript )unary_operator (subscript (identifier_self) identifier_self (integer_1) integer_1 )subscript (subscript (identifier_ce_exp) identifier_ce_exp (unary_operator (integer_1) integer_1 )unary_operator )subscript (subscript (identifier_ce_exp) identifier_ce_exp (unary_operator (integer_1) integer_1 )unary_operator )subscript )argument_list )call )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_order) identifier_order )attribute (integer_4) integer_4 )comparison_operator (block (expression_statement (assignment (identifier_einstring_1) identifier_einstring_1 (string_"pqab,cdij,efkl,ghmn,abcdefgh") string_"pqab,cdij,efkl,ghmn,abcdefgh" )assignment )expression_statement (expression_statement (assignment (identifier_tensors_1) identifier_tensors_1 (binary_operator (binary_operator (list (subscript (identifier_ce_exp) identifier_ce_exp (integer_0) integer_0 )subscript )list (integer_4) integer_4 )binary_operator (list (subscript (identifier_self) identifier_self (unary_operator (integer_1) integer_1 )unary_operator )subscript )list )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_temp) identifier_temp (unary_operator (call (attribute (identifier_np) identifier_np (identifier_einsum) identifier_einsum )attribute (argument_list (identifier_einstring_1) identifier_einstring_1 (list_splat (identifier_tensors_1) identifier_tensors_1 )list_splat )argument_list )call )unary_operator )assignment )expression_statement (expression_statement (assignment (identifier_einstring_2) identifier_einstring_2 (string_"pqab,abcdef,cdijmn,efkl") string_"pqab,abcdef,cdijmn,efkl" )assignment )expression_statement (expression_statement (assignment (identifier_einstring_3) identifier_einstring_3 (string_"pqab,abcdef,efklmn,cdij") string_"pqab,abcdef,efklmn,cdij" )assignment )expression_statement (expression_statement (assignment (identifier_einstring_4) identifier_einstring_4 (string_"pqab,abcdef,cdijkl,efmn") string_"pqab,abcdef,cdijkl,efmn" )assignment )expression_statement (for_statement (identifier_es) identifier_es (list (identifier_einstring_2) identifier_einstring_2 (identifier_einstring_3) identifier_einstring_3 (identifier_einstring_4) identifier_einstring_4 )list (block (expression_statement (augmented_assignment (identifier_temp) identifier_temp (call (attribute (identifier_np) identifier_np (identifier_einsum) identifier_einsum )attribute (argument_list (identifier_es) identifier_es (subscript (identifier_ce_exp) identifier_ce_exp (integer_0) integer_0 )subscript (subscript (identifier_self) identifier_self (unary_operator (integer_2) integer_2 )unary_operator )subscript (subscript (identifier_ce_exp) identifier_ce_exp (integer_1) integer_1 )subscript (subscript (identifier_ce_exp) identifier_ce_exp (integer_0) integer_0 )subscript )argument_list )call )augmented_assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_ce_exp) identifier_ce_exp (identifier_append) identifier_append )attribute (argument_list (identifier_temp) identifier_temp )argument_list )call )expression_statement )block )if_statement (return_statement (call (identifier_TensorCollection) identifier_TensorCollection (argument_list (identifier_ce_exp) identifier_ce_exp )argument_list )call )return_statement )block )function_definition )module
Gets a compliance tensor expansion from the elastic tensor expansion.
(module (function_definition (function_name_get_url) function_name_get_url (parameters (identifier_self) identifier_self (default_parameter (identifier_version) identifier_version (None) None )default_parameter )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_fixed_bundle_url) identifier_fixed_bundle_url )attribute (block (return_statement (attribute (identifier_self) identifier_self (identifier_fixed_bundle_url) identifier_fixed_bundle_url )attribute )return_statement )block )if_statement (return_statement (binary_operator (string_'%s.%s.%s') string_'%s.%s.%s' (tuple (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_bundle_url_root) identifier_bundle_url_root )attribute (attribute (identifier_self) identifier_self (identifier_bundle_filename) identifier_bundle_filename )attribute )argument_list )call (boolean_operator (identifier_version) identifier_version (call (attribute (identifier_self) identifier_self (identifier_get_version) identifier_get_version )attribute (argument_list )argument_list )call )boolean_operator (attribute (identifier_self) identifier_self (identifier_bundle_type) identifier_bundle_type )attribute )tuple )binary_operator )return_statement )block )function_definition )module
Return the filename of the bundled bundle
(module (function_definition (function_name_trace) function_name_trace (parameters (identifier_f) identifier_f (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (print_statement (binary_operator (string_'Calling %s() with args %s, %s ') string_'Calling %s() with args %s, %s ' (tuple (attribute (identifier_f) identifier_f (identifier___name__) identifier___name__ )attribute (identifier_args) identifier_args (identifier_kwargs) identifier_kwargs )tuple )binary_operator )print_statement (return_statement (call (identifier_f) identifier_f (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Decorator used to trace function calls for debugging purposes.
(module (function_definition (function_name__connect) function_name__connect (parameters (identifier_self) identifier_self (identifier_sock) identifier_sock (identifier_addr) identifier_addr (identifier_timeout) identifier_timeout )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_connection) identifier_connection )attribute (block (raise_statement (call (identifier_SocketClientConnectedError) identifier_SocketClientConnectedError (argument_list )argument_list )call )raise_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_connector) identifier_connector )attribute (block (raise_statement (call (identifier_SocketClientConnectingError) identifier_SocketClientConnectingError (argument_list )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_connect_deferred) identifier_connect_deferred )attribute (call (identifier_Deferred) identifier_Deferred (argument_list (attribute (identifier_self) identifier_self (identifier_loop) identifier_loop )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_sock) identifier_sock )attribute (identifier_sock) identifier_sock )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_addr) identifier_addr )attribute (identifier_addr) identifier_addr )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_connector) identifier_connector )attribute (call (identifier_Connector) identifier_Connector (argument_list (attribute (identifier_self) identifier_self (identifier_loop) identifier_loop )attribute (identifier_sock) identifier_sock (identifier_addr) identifier_addr (identifier_timeout) identifier_timeout )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_connector) identifier_connector )attribute (identifier_deferred) identifier_deferred )attribute (identifier_add_callback) identifier_add_callback )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__connected) identifier__connected )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_connector) identifier_connector )attribute (identifier_deferred) identifier_deferred )attribute (identifier_add_errback) identifier_add_errback )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__connect_failed) identifier__connect_failed )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_connector) identifier_connector )attribute (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier_connect_deferred) identifier_connect_deferred )attribute )return_statement )block )function_definition )module
Start watching the socket for it to be writtable.
(module (function_definition (function_name_charge) function_name_charge (parameters (identifier_self) identifier_self (identifier_user) identifier_user (default_parameter (identifier_vault_id) identifier_vault_id (None) None )default_parameter )parameters (block (assert_statement (call (attribute (identifier_self) identifier_self (identifier_is_in_vault) identifier_is_in_vault )attribute (argument_list (identifier_user) identifier_user )argument_list )call )assert_statement (if_statement (identifier_vault_id) identifier_vault_id (block (expression_statement (assignment (identifier_user_vault) identifier_user_vault (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument (keyword_argument (identifier_vault_id) identifier_vault_id (identifier_vault_id) identifier_vault_id )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_user_vault) identifier_user_vault (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
If vault_id is not passed this will assume that there is only one instane of user and vault_id in the db.
(module (function_definition (function_name_valid) function_name_valid (parameters (identifier_names) identifier_names )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_names) identifier_names (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_names) identifier_names (list (identifier_names) identifier_names )list )assignment )expression_statement (assert_statement (call (identifier_is_iterable_typed) identifier_is_iterable_typed (argument_list (identifier_names) identifier_names (identifier_basestring) identifier_basestring )argument_list )call )assert_statement )block )if_statement (return_statement (call (identifier_all) identifier_all (generator_expression (comparison_operator (identifier_name) identifier_name (identifier___all_features) identifier___all_features )comparison_operator (for_in_clause (identifier_name) identifier_name (identifier_names) identifier_names )for_in_clause )generator_expression )call )return_statement )block )function_definition )module
Returns true iff all elements of names are valid features.
(module (function_definition (function_name_insert) function_name_insert (parameters (identifier_self) identifier_self (identifier_item) identifier_item (identifier_low_value) identifier_low_value )parameters (block (return_statement (call (identifier_c_void_p) identifier_c_void_p (argument_list (call (attribute (identifier_lib) identifier_lib (identifier_zlistx_insert) identifier_zlistx_insert )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__as_parameter_) identifier__as_parameter_ )attribute (identifier_item) identifier_item (identifier_low_value) identifier_low_value )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Create a new node and insert it into a sorted list. Calls the item duplicator, if any, on the item. If low_value is true, starts searching from the start of the list, otherwise searches from the end. Use the item comparator, if any, to find where to place the new node. Returns a handle to the new node, or NULL if memory was exhausted. Resets the cursor to the list head.
(module (function_definition (function_name_task_log) function_name_task_log (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_task_id) identifier_task_id )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'task_id is None') string_'task_id is None' )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_get_task_log) identifier_get_task_log )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_task_id) identifier_task_id )attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (attribute (identifier_self) identifier_self (identifier_request_kwargs) identifier_request_kwargs )attribute )argument_list )call )return_statement )block )function_definition )module
Get task log. :rtype: str :returns: The task log as a string.
(module (function_definition (function_name_parse_protobuf) function_name_parse_protobuf (parameters (identifier_self) identifier_self (identifier_proto_type) identifier_proto_type )parameters (block (if_statement (comparison_operator (string_'protobuf') string_'protobuf' (call (attribute (attribute (identifier_self) identifier_self (identifier_environ) identifier_environ )attribute (identifier_get) identifier_get )attribute (argument_list (string_'CONTENT_TYPE') string_'CONTENT_TYPE' (string_'') string_'' )argument_list )call )comparison_operator (block (raise_statement (call (identifier_BadRequest) identifier_BadRequest (argument_list (string_'Not a Protobuf request') string_'Not a Protobuf request' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_obj) identifier_obj (call (identifier_proto_type) identifier_proto_type (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_obj) identifier_obj (identifier_ParseFromString) identifier_ParseFromString )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (raise_statement (call (identifier_BadRequest) identifier_BadRequest (argument_list (string_"Unable to parse Protobuf request") string_"Unable to parse Protobuf request" )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_protobuf_check_initialization) identifier_protobuf_check_initialization )attribute (not_operator (call (attribute (identifier_obj) identifier_obj (identifier_IsInitialized) identifier_IsInitialized )attribute (argument_list )argument_list )call )not_operator )boolean_operator (block (raise_statement (call (identifier_BadRequest) identifier_BadRequest (argument_list (string_"Partial Protobuf request") string_"Partial Protobuf request" )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_obj) identifier_obj )return_statement )block )function_definition )module
Parse the data into an instance of proto_type.
(module (function_definition (function_name_get_topic_set) function_name_get_topic_set (parameters (identifier_file_path) identifier_file_path )parameters (block (expression_statement (assignment (identifier_topic_set) identifier_topic_set (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_file_row_gen) identifier_file_row_gen (call (identifier_get_file_row_generator) identifier_get_file_row_generator (argument_list (identifier_file_path) identifier_file_path (string_",") string_"," )argument_list )call )assignment )expression_statement (for_statement (identifier_file_row) identifier_file_row (identifier_file_row_gen) identifier_file_row_gen (block (expression_statement (call (attribute (identifier_topic_set) identifier_topic_set (identifier_add) identifier_add )attribute (argument_list (subscript (identifier_file_row) identifier_file_row (integer_0) integer_0 )subscript )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_topic_set) identifier_topic_set )return_statement )block )function_definition )module
Opens one of the topic set resource files and returns a set of topics. - Input: - file_path: The path pointing to the topic set resource file. - Output: - topic_set: A python set of strings.
(module (function_definition (function_name_get_group) function_name_get_group (parameters (identifier_self) identifier_self (identifier_group_id) identifier_group_id )parameters (block (function_definition (function_name_process_result) function_name_process_result (parameters (identifier_result) identifier_result )parameters (block (return_statement (call (identifier_Group) identifier_Group (argument_list (identifier_self) identifier_self (identifier_result) identifier_result )argument_list )call )return_statement )block )function_definition (return_statement (call (identifier_Command) identifier_Command (argument_list (string_'get') string_'get' (list (identifier_ROOT_GROUPS) identifier_ROOT_GROUPS (identifier_group_id) identifier_group_id )list (keyword_argument (identifier_process_result) identifier_process_result (identifier_process_result) identifier_process_result )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return specified group. Returns a Command.
(module (function_definition (function_name_ways_in_bbox) function_name_ways_in_bbox (parameters (identifier_lat_min) identifier_lat_min (identifier_lng_min) identifier_lng_min (identifier_lat_max) identifier_lat_max (identifier_lng_max) identifier_lng_max (identifier_network_type) identifier_network_type (default_parameter (identifier_timeout) identifier_timeout (integer_180) integer_180 )default_parameter (default_parameter (identifier_memory) identifier_memory (None) None )default_parameter (default_parameter (identifier_max_query_area_size) identifier_max_query_area_size (binary_operator (binary_operator (binary_operator (integer_50) integer_50 (integer_1000) integer_1000 )binary_operator (integer_50) integer_50 )binary_operator (integer_1000) integer_1000 )binary_operator )default_parameter (default_parameter (identifier_custom_osm_filter) identifier_custom_osm_filter (None) None )default_parameter )parameters (block (return_statement (call (identifier_parse_network_osm_query) identifier_parse_network_osm_query (argument_list (call (identifier_osm_net_download) identifier_osm_net_download (argument_list (keyword_argument (identifier_lat_max) identifier_lat_max (identifier_lat_max) identifier_lat_max )keyword_argument (keyword_argument (identifier_lat_min) identifier_lat_min (identifier_lat_min) identifier_lat_min )keyword_argument (keyword_argument (identifier_lng_min) identifier_lng_min (identifier_lng_min) identifier_lng_min )keyword_argument (keyword_argument (identifier_lng_max) identifier_lng_max (identifier_lng_max) identifier_lng_max )keyword_argument (keyword_argument (identifier_network_type) identifier_network_type (identifier_network_type) identifier_network_type )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument (keyword_argument (identifier_memory) identifier_memory (identifier_memory) identifier_memory )keyword_argument (keyword_argument (identifier_max_query_area_size) identifier_max_query_area_size (identifier_max_query_area_size) identifier_max_query_area_size )keyword_argument (keyword_argument (identifier_custom_osm_filter) identifier_custom_osm_filter (identifier_custom_osm_filter) identifier_custom_osm_filter )keyword_argument )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Get DataFrames of OSM data in a bounding box. Parameters ---------- lat_min : float southern latitude of bounding box lng_min : float eastern longitude of bounding box lat_max : float northern latitude of bounding box lng_max : float western longitude of bounding box network_type : {'walk', 'drive'}, optional Specify the network type where value of 'walk' includes roadways where pedestrians are allowed and pedestrian pathways and 'drive' includes driveable roadways. timeout : int the timeout interval for requests and to pass to Overpass API memory : int server memory allocation size for the query, in bytes. If none, server will use its default allocation size max_query_area_size : float max area for any part of the geometry, in the units the geometry is in: any polygon bigger will get divided up for multiple queries to Overpass API (default is 50,000 * 50,000 units (ie, 50km x 50km in area, if units are meters)) custom_osm_filter : string, optional specify custom arguments for the way["highway"] query to OSM. Must follow Overpass API schema. For example to request highway ways that are service roads use: '["highway"="service"]' Returns ------- nodes, ways, waynodes : pandas.DataFrame
(module (function_definition (function_name_cmd_condition_yaw) function_name_cmd_condition_yaw (parameters (identifier_self) identifier_self (identifier_args) identifier_args )parameters (block (if_statement (parenthesized_expression (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (integer_3) integer_3 )comparison_operator )parenthesized_expression (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Usage: yaw ANGLE ANGULAR_SPEED MODE:[0 absolute / 1 relative]") string_"Usage: yaw ANGLE ANGULAR_SPEED MODE:[0 absolute / 1 relative]" )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (if_statement (parenthesized_expression (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (integer_3) integer_3 )comparison_operator )parenthesized_expression (block (expression_statement (assignment (identifier_angle) identifier_angle (call (identifier_float) identifier_float (argument_list (subscript (identifier_args) identifier_args (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_angular_speed) identifier_angular_speed (call (identifier_float) identifier_float (argument_list (subscript (identifier_args) identifier_args (integer_1) integer_1 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_angle_mode) identifier_angle_mode (call (identifier_float) identifier_float (argument_list (subscript (identifier_args) identifier_args (integer_2) integer_2 )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"ANGLE %s") string_"ANGLE %s" (parenthesized_expression (call (identifier_str) identifier_str (argument_list (identifier_angle) identifier_angle )argument_list )call )parenthesized_expression )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_master) identifier_master )attribute (identifier_mav) identifier_mav )attribute (identifier_command_long_send) identifier_command_long_send )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (identifier_target_system) identifier_target_system )attribute (attribute (attribute (identifier_mavutil) identifier_mavutil (identifier_mavlink) identifier_mavlink )attribute (identifier_MAV_COMP_ID_SYSTEM_CONTROL) identifier_MAV_COMP_ID_SYSTEM_CONTROL )attribute (attribute (attribute (identifier_mavutil) identifier_mavutil (identifier_mavlink) identifier_mavlink )attribute (identifier_MAV_CMD_CONDITION_YAW) identifier_MAV_CMD_CONDITION_YAW )attribute (integer_0) integer_0 (identifier_angle) identifier_angle (identifier_angular_speed) identifier_angular_speed (integer_0) integer_0 (identifier_angle_mode) identifier_angle_mode (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
yaw angle angular_speed angle_mode
(module (function_definition (function_name_to_python_index) function_name_to_python_index (parameters (identifier_self) identifier_self (identifier_length) identifier_length (default_parameter (identifier_check_bounds) identifier_check_bounds (True) True )default_parameter (default_parameter (identifier_circular) identifier_circular (False) False )default_parameter )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_is_unitless) identifier_is_unitless )attribute )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Index cannot have units: {0!r}") string_"Index cannot have units: {0!r}" (identifier_format) identifier_format )attribute (argument_list (identifier_self) identifier_self )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_ret) identifier_ret (call (identifier_int) identifier_int (argument_list (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_ret) identifier_ret (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Index must be an integer: {0!r}") string_"Index must be an integer: {0!r}" (identifier_format) identifier_format )attribute (argument_list (identifier_ret) identifier_ret )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_ret) identifier_ret (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Index cannot be zero") string_"Index cannot be zero" )argument_list )call )raise_statement )block )if_statement (if_statement (boolean_operator (boolean_operator (identifier_check_bounds) identifier_check_bounds (not_operator (identifier_circular) identifier_circular )not_operator )boolean_operator (comparison_operator (call (identifier_abs) identifier_abs (argument_list (identifier_ret) identifier_ret )argument_list )call (identifier_length) identifier_length )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Index {0!r} out of bounds for length {1}") string_"Index {0!r} out of bounds for length {1}" (identifier_format) identifier_format )attribute (argument_list (identifier_ret) identifier_ret (identifier_length) identifier_length )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_ret) identifier_ret (integer_0) integer_0 )comparison_operator (block (expression_statement (augmented_assignment (identifier_ret) identifier_ret (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement (if_statement (identifier_circular) identifier_circular (block (expression_statement (assignment (identifier_ret) identifier_ret (binary_operator (identifier_ret) identifier_ret (identifier_length) identifier_length )binary_operator )assignment )expression_statement )block )if_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Return a plain Python integer appropriate for indexing a sequence of the given length. Raise if this is impossible for any reason whatsoever.
(module (function_definition (function_name_find) function_name_find (parameters (identifier_s) identifier_s )parameters (block (expression_statement (assignment (identifier_abbrev1) identifier_abbrev1 (None) None )assignment )expression_statement (expression_statement (assignment (identifier_origS) identifier_origS (identifier_s) identifier_s )assignment )expression_statement (if_statement (comparison_operator (string_' ') string_' ' (identifier_s) identifier_s )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_first) identifier_first (identifier_rest) identifier_rest )pattern_list (call (attribute (identifier_s) identifier_s (identifier_split) identifier_split )attribute (argument_list (string_' ') string_' ' (integer_1) integer_1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (binary_operator (binary_operator (call (attribute (identifier_first) identifier_first (identifier_title) identifier_title )attribute (argument_list )argument_list )call (string_' ') string_' ' )binary_operator (call (attribute (identifier_rest) identifier_rest (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_s) identifier_s (identifier_title) identifier_title )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_s) identifier_s (identifier_NAMES) identifier_NAMES )comparison_operator (block (expression_statement (assignment (identifier_abbrev1) identifier_abbrev1 (identifier_s) identifier_s )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_s) identifier_s (identifier_ABBREV3_TO_ABBREV1) identifier_ABBREV3_TO_ABBREV1 )comparison_operator (block (expression_statement (assignment (identifier_abbrev1) identifier_abbrev1 (subscript (identifier_ABBREV3_TO_ABBREV1) identifier_ABBREV3_TO_ABBREV1 (identifier_s) identifier_s )subscript )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_s) identifier_s (identifier_NAMES_TO_ABBREV1) identifier_NAMES_TO_ABBREV1 )comparison_operator (block (expression_statement (assignment (identifier_abbrev1) identifier_abbrev1 (subscript (identifier_NAMES_TO_ABBREV1) identifier_NAMES_TO_ABBREV1 (identifier_s) identifier_s )subscript )assignment )expression_statement )block )elif_clause (else_clause (block (function_definition (function_name_findCodon) function_name_findCodon (parameters (identifier_target) identifier_target )parameters (block (for_statement (pattern_list (identifier_abbrev1) identifier_abbrev1 (identifier_codons) identifier_codons )pattern_list (call (attribute (identifier_CODONS) identifier_CODONS (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (for_statement (identifier_codon) identifier_codon (identifier_codons) identifier_codons (block (if_statement (comparison_operator (identifier_codon) identifier_codon (identifier_target) identifier_target )comparison_operator (block (return_statement (identifier_abbrev1) identifier_abbrev1 )return_statement )block )if_statement )block )for_statement )block )for_statement )block )function_definition (expression_statement (assignment (identifier_abbrev1) identifier_abbrev1 (call (identifier_findCodon) identifier_findCodon (argument_list (call (attribute (identifier_origS) identifier_origS (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (identifier_abbrev1) identifier_abbrev1 (block (return_statement (call (identifier_AminoAcid) identifier_AminoAcid (argument_list (subscript (identifier_NAMES) identifier_NAMES (identifier_abbrev1) identifier_abbrev1 )subscript (subscript (identifier_ABBREV3) identifier_ABBREV3 (identifier_abbrev1) identifier_abbrev1 )subscript (identifier_abbrev1) identifier_abbrev1 (subscript (identifier_CODONS) identifier_CODONS (identifier_abbrev1) identifier_abbrev1 )subscript (subscript (identifier_PROPERTIES) identifier_PROPERTIES (identifier_abbrev1) identifier_abbrev1 )subscript (subscript (identifier_PROPERTY_DETAILS) identifier_PROPERTY_DETAILS (identifier_abbrev1) identifier_abbrev1 )subscript (subscript (identifier_PROPERTY_CLUSTERS) identifier_PROPERTY_CLUSTERS (identifier_abbrev1) identifier_abbrev1 )subscript )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Find an amino acid whose name or abbreviation is s. @param s: A C{str} amino acid specifier. This may be a full name, a 3-letter abbreviation or a 1-letter abbreviation. Case is ignored. return: An L{AminoAcid} instance or C{None} if no matching amino acid can be located.
(module (function_definition (function_name_Q) function_name_Q (parameters (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_retval) identifier_retval (call (attribute (call (attribute (identifier_PApplet) identifier_PApplet (identifier_getDeclaredField) identifier_getDeclaredField )attribute (argument_list (identifier_name) identifier_name )argument_list )call (identifier_get) identifier_get )attribute (argument_list (call (attribute (identifier_Sketch) identifier_Sketch (identifier_get_instance) identifier_get_instance )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_retval) identifier_retval (tuple (identifier_long) identifier_long (identifier_int) identifier_int )tuple )argument_list )call (block (return_statement (call (identifier_float) identifier_float (argument_list (identifier_retval) identifier_retval )argument_list )call )return_statement )block (else_clause (block (return_statement (identifier_retval) identifier_retval )return_statement )block )else_clause )if_statement )block )function_definition )module
Gets a variable from the current sketch. Processing has a number of methods and variables with the same name, 'mousePressed' for example. This allows us to disambiguate. Also casts numeric values as floats to make it easier to translate code from pde to python.
(module (function_definition (function_name__check_align) function_name__check_align (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_"_align") string_"_align" )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__align) identifier__align )attribute (binary_operator (list (string_"l") string_"l" )list (attribute (identifier_self) identifier_self (identifier__row_size) identifier__row_size )attribute )binary_operator )assignment )expression_statement )block )if_statement (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_"_valign") string_"_valign" )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__valign) identifier__valign )attribute (binary_operator (list (string_"t") string_"t" )list (attribute (identifier_self) identifier_self (identifier__row_size) identifier__row_size )attribute )binary_operator )assignment )expression_statement )block )if_statement )block )function_definition )module
Check if alignment has been specified, set default one if not
(module (function_definition (function_name_get_default_if) function_name_get_default_if (parameters )parameters (block (expression_statement (assignment (identifier_f) identifier_f (call (identifier_open) identifier_open (argument_list (string_'/proc/net/route') string_'/proc/net/route' (string_'r') string_'r' )argument_list )call )assignment )expression_statement (for_statement (identifier_line) identifier_line (identifier_f) identifier_f (block (expression_statement (assignment (identifier_words) identifier_words (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dest) identifier_dest (subscript (identifier_words) identifier_words (integer_1) integer_1 )subscript )assignment )expression_statement (try_statement (block (if_statement (parenthesized_expression (comparison_operator (call (identifier_int) identifier_int (argument_list (identifier_dest) identifier_dest )argument_list )call (integer_0) integer_0 )comparison_operator )parenthesized_expression (block (expression_statement (assignment (identifier_interf) identifier_interf (subscript (identifier_words) identifier_words (integer_0) integer_0 )subscript )assignment )expression_statement (break_statement )break_statement )block )if_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (return_statement (identifier_interf) identifier_interf )return_statement )block )function_definition )module
Returns the default interface
(module (function_definition (function_name_create) function_name_create (parameters )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (attribute (identifier_options) identifier_options (identifier_path) identifier_path )attribute )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_'creating working directory: ') string_'creating working directory: ' (attribute (identifier_options) identifier_options (identifier_path) identifier_path )attribute )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (attribute (identifier_options) identifier_options (identifier_path) identifier_path )attribute )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Create workdir.options.path
(module (function_definition (function_name__initialize) function_name__initialize (parameters (identifier_self) identifier_self (identifier_boto_session) identifier_boto_session (identifier_sagemaker_client) identifier_sagemaker_client (identifier_sagemaker_runtime_client) identifier_sagemaker_runtime_client )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_boto_session) identifier_boto_session )attribute (boolean_operator (identifier_boto_session) identifier_boto_session (call (attribute (identifier_boto3) identifier_boto3 (identifier_Session) identifier_Session )attribute (argument_list )argument_list )call )boolean_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__region_name) identifier__region_name )attribute (attribute (attribute (identifier_self) identifier_self (identifier_boto_session) identifier_boto_session )attribute (identifier_region_name) identifier_region_name )attribute )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__region_name) identifier__region_name )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Must setup local AWS configuration with a region supported by SageMaker.') string_'Must setup local AWS configuration with a region supported by SageMaker.' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_sagemaker_client) identifier_sagemaker_client )attribute (boolean_operator (identifier_sagemaker_client) identifier_sagemaker_client (call (attribute (attribute (identifier_self) identifier_self (identifier_boto_session) identifier_boto_session )attribute (identifier_client) identifier_client )attribute (argument_list (string_'sagemaker') string_'sagemaker' )argument_list )call )boolean_operator )assignment )expression_statement (expression_statement (call (identifier_prepend_user_agent) identifier_prepend_user_agent (argument_list (attribute (identifier_self) identifier_self (identifier_sagemaker_client) identifier_sagemaker_client )attribute )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_sagemaker_runtime_client) identifier_sagemaker_runtime_client (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_sagemaker_runtime_client) identifier_sagemaker_runtime_client )attribute (identifier_sagemaker_runtime_client) identifier_sagemaker_runtime_client )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_config) identifier_config (call (attribute (attribute (identifier_botocore) identifier_botocore (identifier_config) identifier_config )attribute (identifier_Config) identifier_Config )attribute (argument_list (keyword_argument (identifier_read_timeout) identifier_read_timeout (integer_80) integer_80 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_sagemaker_runtime_client) identifier_sagemaker_runtime_client )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_boto_session) identifier_boto_session )attribute (identifier_client) identifier_client )attribute (argument_list (string_'runtime.sagemaker') string_'runtime.sagemaker' (keyword_argument (identifier_config) identifier_config (identifier_config) identifier_config )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (identifier_prepend_user_agent) identifier_prepend_user_agent (argument_list (attribute (identifier_self) identifier_self (identifier_sagemaker_runtime_client) identifier_sagemaker_runtime_client )attribute )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_local_mode) identifier_local_mode )attribute (False) False )assignment )expression_statement )block )function_definition )module
Initialize this SageMaker Session. Creates or uses a boto_session, sagemaker_client and sagemaker_runtime_client. Sets the region_name.
(module (function_definition (function_name_max_intensity) function_name_max_intensity (parameters (identifier_self) identifier_self (identifier_time) identifier_time )parameters (block (expression_statement (assignment (identifier_ti) identifier_ti (subscript (subscript (call (attribute (identifier_np) identifier_np (identifier_where) identifier_where )attribute (argument_list (comparison_operator (identifier_time) identifier_time (attribute (identifier_self) identifier_self (identifier_times) identifier_times )attribute )comparison_operator )argument_list )call (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_timesteps) identifier_timesteps )attribute (identifier_ti) identifier_ti )subscript (identifier_max) identifier_max )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Calculate the maximum intensity found at a timestep.
(module (function_definition (function_name_getheader) function_name_getheader (parameters (identifier_self) identifier_self (identifier_field) identifier_field (default_parameter (identifier_default) identifier_default (string_'') string_'' )default_parameter )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute (block (for_statement (identifier_header) identifier_header (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute (block (if_statement (comparison_operator (call (attribute (identifier_field) identifier_field (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (call (attribute (identifier_header) identifier_header (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )comparison_operator (block (return_statement (subscript (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute (identifier_header) identifier_header )subscript )return_statement )block )if_statement )block )for_statement )block )if_statement (return_statement (identifier_default) identifier_default )return_statement )block )function_definition )module
Returns the HTTP response header field, case insensitively
(module (function_definition (function_name_render_template) function_name_render_template (parameters (identifier_self) identifier_self (identifier_template_file) identifier_template_file (identifier_target_file) identifier_target_file (default_parameter (identifier_template_vars) identifier_template_vars (dictionary )dictionary )default_parameter )parameters (block (expression_statement (assignment (identifier_template_dir) identifier_template_dir (call (attribute (call (identifier_str) identifier_str (argument_list (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_template) identifier_template (call (attribute (attribute (identifier_self) identifier_self (identifier_jinja_env) identifier_jinja_env )attribute (identifier_get_template) identifier_get_template )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_template_dir) identifier_template_dir (identifier_template_file) identifier_template_file )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_file_path) identifier_file_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_work_root) identifier_work_root )attribute (identifier_target_file) identifier_target_file )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_file_path) identifier_file_path (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_template) identifier_template (identifier_render) identifier_render )attribute (argument_list (identifier_template_vars) identifier_template_vars )argument_list )call )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Render a Jinja2 template for the backend The template file is expected in the directory templates/BACKEND_NAME.
(module (function_definition (function_name_render_django_response) function_name_render_django_response (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (import_from_statement (dotted_name (identifier_django) identifier_django (identifier_http) identifier_http )dotted_name (dotted_name (identifier_HttpResponse) identifier_HttpResponse )dotted_name )import_from_statement (return_statement (call (identifier_HttpResponse) identifier_HttpResponse (argument_list (call (attribute (identifier_self) identifier_self (identifier_render) identifier_render )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (keyword_argument (identifier_content_type) identifier_content_type (string_'image/svg+xml') string_'image/svg+xml' )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Render the graph, and return a Django response
(module (function_definition (function_name_create_relation) function_name_create_relation (parameters (identifier_self) identifier_self (identifier_event) identifier_event (identifier_content_object) identifier_content_object (default_parameter (identifier_distinction) identifier_distinction (string_'') string_'' )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_EventRelation) identifier_EventRelation (identifier_objects) identifier_objects )attribute (identifier_create) identifier_create )attribute (argument_list (keyword_argument (identifier_event) identifier_event (identifier_event) identifier_event )keyword_argument (keyword_argument (identifier_distinction) identifier_distinction (identifier_distinction) identifier_distinction )keyword_argument (keyword_argument (identifier_content_object) identifier_content_object (identifier_content_object) identifier_content_object )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Creates a relation between event and content_object. See EventRelation for help on distinction.
(module (function_definition (function_name_find_first_fit) function_name_find_first_fit (parameters (identifier_unoccupied_columns) identifier_unoccupied_columns (identifier_row) identifier_row (identifier_row_length) identifier_row_length )parameters (block (for_statement (identifier_free_col) identifier_free_col (identifier_unoccupied_columns) identifier_unoccupied_columns (block (expression_statement (assignment (identifier_first_item_x) identifier_first_item_x (subscript (subscript (identifier_row) identifier_row (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_offset) identifier_offset (binary_operator (identifier_free_col) identifier_free_col (identifier_first_item_x) identifier_first_item_x )binary_operator )assignment )expression_statement (if_statement (call (identifier_check_columns_fit) identifier_check_columns_fit (argument_list (identifier_unoccupied_columns) identifier_unoccupied_columns (identifier_row) identifier_row (identifier_offset) identifier_offset (identifier_row_length) identifier_row_length )argument_list )call (block (return_statement (identifier_offset) identifier_offset )return_statement )block )if_statement )block )for_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Row cannot bossily fit in %r: %r") string_"Row cannot bossily fit in %r: %r" (tuple (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_unoccupied_columns) identifier_unoccupied_columns (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call (identifier_row) identifier_row )tuple )binary_operator )argument_list )call )raise_statement )block )function_definition )module
Finds the first index that the row's items can fit.
(module (function_definition (function_name_remove_port_channel) function_name_remove_port_channel (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_port_int) identifier_port_int (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'port_int') string_'port_int' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_callback) identifier_callback (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'callback') string_'callback' (attribute (identifier_self) identifier_self (identifier__callback) identifier__callback )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_'^[0-9]{1,4}$') string_'^[0-9]{1,4}$' (identifier_port_int) identifier_port_int )argument_list )call (None) None )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (concatenated_string (string_'%s must be in the format of x for port channel ') string_'%s must be in the format of x for port channel ' (string_'interfaces.') string_'interfaces.' )concatenated_string (call (identifier_repr) identifier_repr (argument_list (identifier_port_int) identifier_port_int )argument_list )call )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_port_channel) identifier_port_channel (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_self) identifier_self (identifier__interface) identifier__interface )attribute (string_'interface_port_channel_name') string_'interface_port_channel_name' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_port_channel_args) identifier_port_channel_args (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_name) identifier_name (identifier_port_int) identifier_port_int )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_config) identifier_config (call (identifier_port_channel) identifier_port_channel (argument_list (dictionary_splat (identifier_port_channel_args) identifier_port_channel_args )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_delete_channel) identifier_delete_channel (call (attribute (identifier_config) identifier_config (identifier_find) identifier_find )attribute (argument_list (string_'.//*port-channel') string_'.//*port-channel' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_delete_channel) identifier_delete_channel (identifier_set) identifier_set )attribute (argument_list (string_'operation') string_'operation' (string_'delete') string_'delete' )argument_list )call )expression_statement (return_statement (call (identifier_callback) identifier_callback (argument_list (identifier_config) identifier_config )argument_list )call )return_statement )block )function_definition )module
Remove a port channel interface. Args: port_int (str): port-channel number (1, 2, 3, etc). callback (function): A function executed upon completion of the method. The only parameter passed to `callback` will be the ``ElementTree`` `config`. Returns: Return value of `callback`. Raises: KeyError: if `port_int` is not passed. ValueError: if `port_int` is invalid. Examples: >>> import pynos.device >>> switches = ['10.24.39.211', '10.24.39.203'] >>> auth = ('admin', 'password') >>> for switch in switches: ... conn = (switch, '22') ... with pynos.device.Device(conn=conn, auth=auth) as dev: ... output = dev.interface.channel_group(name='225/0/20', ... int_type='tengigabitethernet', ... port_int='1', channel_type='standard', mode='active') ... output = dev.interface.remove_port_channel( ... port_int='1')
(module (function_definition (function_name_to_networkx) function_name_to_networkx (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (import_from_statement (dotted_name (identifier_networkx) identifier_networkx )dotted_name (dotted_name (identifier_DiGraph) identifier_DiGraph )dotted_name (dotted_name (identifier_set_node_attributes) identifier_set_node_attributes )dotted_name )import_from_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (raise_statement (call (identifier_ImportError) identifier_ImportError (argument_list (string_'You must have networkx installed to export networkx graphs') string_'You must have networkx installed to export networkx graphs' )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_max_node) identifier_max_node (binary_operator (integer_2) integer_2 (subscript (attribute (attribute (identifier_self) identifier_self (identifier__linkage) identifier__linkage )attribute (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_num_points) identifier_num_points (binary_operator (identifier_max_node) identifier_max_node (parenthesized_expression (binary_operator (subscript (attribute (attribute (identifier_self) identifier_self (identifier__linkage) identifier__linkage )attribute (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (identifier_DiGraph) identifier_DiGraph (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_parent) identifier_parent (identifier_row) identifier_row )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_self) identifier_self (identifier__linkage) identifier__linkage )attribute (identifier_num_points) identifier_num_points )argument_list )call (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_add_edge) identifier_add_edge )attribute (argument_list (identifier_parent) identifier_parent (subscript (identifier_row) identifier_row (integer_0) integer_0 )subscript (keyword_argument (identifier_weight) identifier_weight (subscript (identifier_row) identifier_row (integer_2) integer_2 )subscript )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_add_edge) identifier_add_edge )attribute (argument_list (identifier_parent) identifier_parent (subscript (identifier_row) identifier_row (integer_1) integer_1 )subscript (keyword_argument (identifier_weight) identifier_weight (subscript (identifier_row) identifier_row (integer_2) integer_2 )subscript )keyword_argument )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_size_dict) identifier_size_dict (dictionary_comprehension (pair (identifier_parent) identifier_parent (subscript (identifier_row) identifier_row (integer_3) integer_3 )subscript )pair (for_in_clause (pattern_list (identifier_parent) identifier_parent (identifier_row) identifier_row )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_self) identifier_self (identifier__linkage) identifier__linkage )attribute (identifier_num_points) identifier_num_points )argument_list )call )for_in_clause )dictionary_comprehension )assignment )expression_statement (expression_statement (call (identifier_set_node_attributes) identifier_set_node_attributes (argument_list (identifier_result) identifier_result (identifier_size_dict) identifier_size_dict (string_'size') string_'size' )argument_list )call )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Return a NetworkX DiGraph object representing the single linkage tree. Edge weights in the graph are the distance values at which child nodes merge to form the parent cluster. Nodes have a `size` attribute attached giving the number of points that are in the cluster.
(module (function_definition (function_name_write_case_data) function_name_write_case_data (parameters (identifier_self) identifier_self (identifier_file) identifier_file )parameters (block (expression_statement (assignment (identifier_writer) identifier_writer (call (attribute (identifier_self) identifier_self (identifier__get_writer) identifier__get_writer )attribute (argument_list (identifier_file) identifier_file )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_writer) identifier_writer (identifier_writerow) identifier_writerow )attribute (argument_list (list (string_"Name") string_"Name" (string_"base_mva") string_"base_mva" )list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_writer) identifier_writer (identifier_writerow) identifier_writerow )attribute (argument_list (list (attribute (attribute (identifier_self) identifier_self (identifier_case) identifier_case )attribute (identifier_name) identifier_name )attribute (attribute (attribute (identifier_self) identifier_self (identifier_case) identifier_case )attribute (identifier_base_mva) identifier_base_mva )attribute )list )argument_list )call )expression_statement )block )function_definition )module
Writes the case data as CSV.
(module (function_definition (function_name_get_vertex) function_name_get_vertex (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (if_statement (comparison_operator (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier_vertex_map) identifier_vertex_map )attribute )comparison_operator (block (return_statement (subscript (attribute (identifier_self) identifier_self (identifier_vertex_map) identifier_vertex_map )attribute (identifier_key) identifier_key )subscript )return_statement )block )if_statement (expression_statement (assignment (identifier_vertex) identifier_vertex (call (attribute (identifier_self) identifier_self (identifier_new_vertex) identifier_new_vertex )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_vertex_map) identifier_vertex_map )attribute (identifier_key) identifier_key )subscript (identifier_vertex) identifier_vertex )assignment )expression_statement (return_statement (identifier_vertex) identifier_vertex )return_statement )block )function_definition )module
Returns or Creates a Vertex mapped by key. Args: key: A string reference for a vertex. May refer to a new Vertex in which case it will be created. Returns: A the Vertex mapped to by key.
(module (function_definition (function_name_subtract_column_median) function_name_subtract_column_median (parameters (identifier_df) identifier_df (default_parameter (identifier_prefix) identifier_prefix (string_'Intensity ') string_'Intensity ' )default_parameter )parameters (block (expression_statement (assignment (identifier_df) identifier_df (call (attribute (identifier_df) identifier_df (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_df) identifier_df (identifier_replace) identifier_replace )attribute (argument_list (list (attribute (identifier_np) identifier_np (identifier_inf) identifier_inf )attribute (unary_operator (attribute (identifier_np) identifier_np (identifier_inf) identifier_inf )attribute )unary_operator )list (attribute (identifier_np) identifier_np (identifier_nan) identifier_nan )attribute (keyword_argument (identifier_inplace) identifier_inplace (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_mask) identifier_mask (list_comprehension (call (attribute (identifier_l) identifier_l (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_prefix) identifier_prefix )argument_list )call (for_in_clause (identifier_l) identifier_l (attribute (attribute (identifier_df) identifier_df (identifier_columns) identifier_columns )attribute (identifier_values) identifier_values )attribute )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_df) identifier_df (identifier_iloc) identifier_iloc )attribute (slice (colon) colon )slice (identifier_mask) identifier_mask )subscript (binary_operator (subscript (attribute (identifier_df) identifier_df (identifier_iloc) identifier_iloc )attribute (slice (colon) colon )slice (identifier_mask) identifier_mask )subscript (call (attribute (subscript (attribute (identifier_df) identifier_df (identifier_iloc) identifier_iloc )attribute (slice (colon) colon )slice (identifier_mask) identifier_mask )subscript (identifier_median) identifier_median )attribute (argument_list (keyword_argument (identifier_axis) identifier_axis (integer_0) integer_0 )keyword_argument )argument_list )call )binary_operator )assignment )expression_statement (return_statement (identifier_df) identifier_df )return_statement )block )function_definition )module
Apply column-wise normalisation to expression columns. Default is median transform to expression columns beginning with Intensity :param df: :param prefix: The column prefix for expression columns :return: