sequence stringlengths 557 12.7k | docstring stringlengths 4 15.2k |
|---|---|
(module
(function_definition
(function_name_load_adjusted_array) function_name_load_adjusted_array
(parameters
(identifier_self) identifier_self
(identifier_domain) identifier_domain
(identifier_columns) identifier_columns
(identifier_dates) identifier_dates
(identifier_sids) identifier_sids
(identifier_mask) identifier_mask
)parameters
(block
(if_statement
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_columns) identifier_columns
)argument_list
)call
(integer_1) integer_1
)comparison_operator
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(string_"Can't load multiple columns with DataFrameLoader") string_"Can't load multiple columns with DataFrameLoader"
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_column) identifier_column
(subscript
(identifier_columns) identifier_columns
(integer_0) integer_0
)subscript
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__validate_input_column) identifier__validate_input_column
)attribute
(argument_list
(identifier_column) identifier_column
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_date_indexer) identifier_date_indexer
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_dates) identifier_dates
)attribute
(identifier_get_indexer) identifier_get_indexer
)attribute
(argument_list
(identifier_dates) identifier_dates
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_assets_indexer) identifier_assets_indexer
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_assets) identifier_assets
)attribute
(identifier_get_indexer) identifier_get_indexer
)attribute
(argument_list
(identifier_sids) identifier_sids
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_good_dates) identifier_good_dates
(parenthesized_expression
(comparison_operator
(identifier_date_indexer) identifier_date_indexer
(unary_operator
(integer_1) integer_1
)unary_operator
)comparison_operator
)parenthesized_expression
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_good_assets) identifier_good_assets
(parenthesized_expression
(comparison_operator
(identifier_assets_indexer) identifier_assets_indexer
(unary_operator
(integer_1) integer_1
)unary_operator
)comparison_operator
)parenthesized_expression
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_data) identifier_data
(subscript
(attribute
(identifier_self) identifier_self
(identifier_baseline) identifier_baseline
)attribute
(call
(identifier_ix_) identifier_ix_
(argument_list
(identifier_date_indexer) identifier_date_indexer
(identifier_assets_indexer) identifier_assets_indexer
)argument_list
)call
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_mask) identifier_mask
(binary_operator
(parenthesized_expression
(binary_operator
(identifier_good_assets) identifier_good_assets
(call
(identifier_as_column) identifier_as_column
(argument_list
(identifier_good_dates) identifier_good_dates
)argument_list
)call
)binary_operator
)parenthesized_expression
(identifier_mask) identifier_mask
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_data) identifier_data
(unary_operator
(identifier_mask) identifier_mask
)unary_operator
)subscript
(attribute
(identifier_column) identifier_column
(identifier_missing_value) identifier_missing_value
)attribute
)assignment
)expression_statement
(return_statement
(dictionary
(pair
(identifier_column) identifier_column
(call
(identifier_AdjustedArray) identifier_AdjustedArray
(argument_list
(keyword_argument
(identifier_data) identifier_data
(identifier_data) identifier_data
)keyword_argument
(keyword_argument
(identifier_adjustments) identifier_adjustments
(call
(attribute
(identifier_self) identifier_self
(identifier_format_adjustments) identifier_format_adjustments
)attribute
(argument_list
(identifier_dates) identifier_dates
(identifier_sids) identifier_sids
)argument_list
)call
)keyword_argument
(keyword_argument
(identifier_missing_value) identifier_missing_value
(attribute
(identifier_column) identifier_column
(identifier_missing_value) identifier_missing_value
)attribute
)keyword_argument
)argument_list
)call
)pair
)dictionary
)return_statement
)block
)function_definition
)module | Load data from our stored baseline. |
(module
(function_definition
(function_name_template_str) function_name_template_str
(parameters
(identifier_tem) identifier_tem
(default_parameter
(identifier_queue) identifier_queue
(False) False
)default_parameter
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(expression_statement
(assignment
(identifier_conflict) identifier_conflict
(call
(identifier__check_queue) identifier__check_queue
(argument_list
(identifier_queue) identifier_queue
(identifier_kwargs) identifier_kwargs
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_conflict) identifier_conflict
(None) None
)comparison_operator
(block
(return_statement
(identifier_conflict) identifier_conflict
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_opts) identifier_opts
(call
(attribute
(attribute
(attribute
(identifier_salt) identifier_salt
(identifier_utils) identifier_utils
)attribute
(identifier_state) identifier_state
)attribute
(identifier_get_sls_opts) identifier_get_sls_opts
)attribute
(argument_list
(identifier___opts__) identifier___opts__
(dictionary_splat
(identifier_kwargs) identifier_kwargs
)dictionary_splat
)argument_list
)call
)assignment
)expression_statement
(try_statement
(block
(expression_statement
(assignment
(identifier_st_) identifier_st_
(call
(attribute
(attribute
(identifier_salt) identifier_salt
(identifier_state) identifier_state
)attribute
(identifier_State) identifier_State
)attribute
(argument_list
(identifier_opts) identifier_opts
(keyword_argument
(identifier_proxy) identifier_proxy
(identifier___proxy__) identifier___proxy__
)keyword_argument
(keyword_argument
(identifier_initial_pillar) identifier_initial_pillar
(call
(identifier__get_initial_pillar) identifier__get_initial_pillar
(argument_list
(identifier_opts) identifier_opts
)argument_list
)call
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
)block
(except_clause
(identifier_NameError) identifier_NameError
(block
(expression_statement
(assignment
(identifier_st_) identifier_st_
(call
(attribute
(attribute
(identifier_salt) identifier_salt
(identifier_state) identifier_state
)attribute
(identifier_State) identifier_State
)attribute
(argument_list
(identifier_opts) identifier_opts
(keyword_argument
(identifier_initial_pillar) identifier_initial_pillar
(call
(identifier__get_initial_pillar) identifier__get_initial_pillar
(argument_list
(identifier_opts) identifier_opts
)argument_list
)call
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
)block
)except_clause
)try_statement
(expression_statement
(assignment
(identifier_ret) identifier_ret
(call
(attribute
(identifier_st_) identifier_st_
(identifier_call_template_str) identifier_call_template_str
)attribute
(argument_list
(identifier_tem) identifier_tem
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(identifier__set_retcode) identifier__set_retcode
(argument_list
(identifier_ret) identifier_ret
)argument_list
)call
)expression_statement
(return_statement
(identifier_ret) identifier_ret
)return_statement
)block
)function_definition
)module | Execute the information stored in a string from an sls template
CLI Example:
.. code-block:: bash
salt '*' state.template_str '<Template String>' |
(module
(function_definition
(function_name_pack) function_name_pack
(parameters
(identifier_o) identifier_o
(default_parameter
(identifier_default) identifier_default
(identifier_encode) identifier_encode
)default_parameter
(default_parameter
(identifier_encoding) identifier_encoding
(string_'utf-8') string_'utf-8'
)default_parameter
(default_parameter
(identifier_unicode_errors) identifier_unicode_errors
(string_'strict') string_'strict'
)default_parameter
(default_parameter
(identifier_use_single_float) identifier_use_single_float
(False) False
)default_parameter
(default_parameter
(identifier_autoreset) identifier_autoreset
(integer_1) integer_1
)default_parameter
(default_parameter
(identifier_use_bin_type) identifier_use_bin_type
(integer_1) integer_1
)default_parameter
)parameters
(block
(return_statement
(call
(attribute
(call
(identifier_Packer) identifier_Packer
(argument_list
(keyword_argument
(identifier_default) identifier_default
(identifier_default) identifier_default
)keyword_argument
(keyword_argument
(identifier_encoding) identifier_encoding
(identifier_encoding) identifier_encoding
)keyword_argument
(keyword_argument
(identifier_unicode_errors) identifier_unicode_errors
(identifier_unicode_errors) identifier_unicode_errors
)keyword_argument
(keyword_argument
(identifier_use_single_float) identifier_use_single_float
(identifier_use_single_float) identifier_use_single_float
)keyword_argument
(keyword_argument
(identifier_autoreset) identifier_autoreset
(identifier_autoreset) identifier_autoreset
)keyword_argument
(keyword_argument
(identifier_use_bin_type) identifier_use_bin_type
(identifier_use_bin_type) identifier_use_bin_type
)keyword_argument
)argument_list
)call
(identifier_pack) identifier_pack
)attribute
(argument_list
(identifier_o) identifier_o
)argument_list
)call
)return_statement
)block
)function_definition
)module | Pack an object and return the packed bytes. |
(module
(function_definition
(function_name_update_global_variables_list_store) function_name_update_global_variables_list_store
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_list_store_iterators) identifier_list_store_iterators
)attribute
(dictionary
)dictionary
)assignment
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_list_store) identifier_list_store
)attribute
(identifier_clear) identifier_clear
)attribute
(argument_list
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_keys) identifier_keys
(call
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier_model) identifier_model
)attribute
(identifier_global_variable_manager) identifier_global_variable_manager
)attribute
(identifier_get_all_keys) identifier_get_all_keys
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_keys) identifier_keys
(identifier_sort) identifier_sort
)attribute
(argument_list
)argument_list
)call
)expression_statement
(for_statement
(identifier_key) identifier_key
(identifier_keys) identifier_keys
(block
(expression_statement
(assignment
(identifier_iter) identifier_iter
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_list_store) identifier_list_store
)attribute
(identifier_append) identifier_append
)attribute
(argument_list
(list
(identifier_key) identifier_key
(attribute
(call
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier_model) identifier_model
)attribute
(identifier_global_variable_manager) identifier_global_variable_manager
)attribute
(identifier_get_data_type) identifier_get_data_type
)attribute
(argument_list
(identifier_key) identifier_key
)argument_list
)call
(identifier___name__) identifier___name__
)attribute
(call
(identifier_str) identifier_str
(argument_list
(call
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier_model) identifier_model
)attribute
(identifier_global_variable_manager) identifier_global_variable_manager
)attribute
(identifier_get_representation) identifier_get_representation
)attribute
(argument_list
(identifier_key) identifier_key
)argument_list
)call
)argument_list
)call
(call
(identifier_str) identifier_str
(argument_list
(call
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier_model) identifier_model
)attribute
(identifier_global_variable_manager) identifier_global_variable_manager
)attribute
(identifier_is_locked) identifier_is_locked
)attribute
(argument_list
(identifier_key) identifier_key
)argument_list
)call
)argument_list
)call
)list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(attribute
(identifier_self) identifier_self
(identifier_list_store_iterators) identifier_list_store_iterators
)attribute
(identifier_key) identifier_key
)subscript
(identifier_iter) identifier_iter
)assignment
)expression_statement
)block
)for_statement
)block
)function_definition
)module | Updates the global variable list store
Triggered after creation or deletion of a variable has taken place. |
(module
(function_definition
(function_name_main) function_name_main
(parameters
)parameters
(block
(expression_statement
(assignment
(identifier_parser) identifier_parser
(call
(identifier___build_option_parser) identifier___build_option_parser
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_args) identifier_args
(call
(attribute
(identifier_parser) identifier_parser
(identifier_parse_args) identifier_parse_args
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_analyze_ws) identifier_analyze_ws
(call
(identifier_AnalyzeWS) identifier_AnalyzeWS
(argument_list
(identifier_args) identifier_args
)argument_list
)call
)assignment
)expression_statement
(try_statement
(block
(expression_statement
(call
(attribute
(identifier_analyze_ws) identifier_analyze_ws
(identifier_set_file) identifier_set_file
)attribute
(argument_list
(subscript
(attribute
(identifier_args) identifier_args
(identifier_file_) identifier_file_
)attribute
(integer_0) integer_0
)subscript
)argument_list
)call
)expression_statement
)block
(except_clause
(identifier_IOError) identifier_IOError
(block
(print_statement
(string_'IOError raised while reading file. Exiting!') string_'IOError raised while reading file. Exiting!'
)print_statement
(expression_statement
(call
(attribute
(identifier_sys) identifier_sys
(identifier_exit) identifier_exit
)attribute
(argument_list
(integer_3) integer_3
)argument_list
)call
)expression_statement
)block
)except_clause
)try_statement
(if_statement
(boolean_operator
(attribute
(identifier_args) identifier_args
(identifier_to_file) identifier_to_file
)attribute
(attribute
(identifier_args) identifier_args
(identifier_to_browser) identifier_to_browser
)attribute
)boolean_operator
(block
(expression_statement
(call
(attribute
(identifier_analyze_ws) identifier_analyze_ws
(identifier_to_file_mode) identifier_to_file_mode
)attribute
(argument_list
)argument_list
)call
)expression_statement
(if_statement
(attribute
(identifier_args) identifier_args
(identifier_to_browser) identifier_to_browser
)attribute
(block
(expression_statement
(call
(attribute
(identifier_analyze_ws) identifier_analyze_ws
(identifier_to_browser_mode) identifier_to_browser_mode
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)if_statement
)block
(else_clause
(block
(expression_statement
(call
(attribute
(identifier_analyze_ws) identifier_analyze_ws
(identifier_interactive_mode) identifier_interactive_mode
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module | Main method of the script |
(module
(function_definition
(function_name_Process) function_name_Process
(parameters
(identifier_self) identifier_self
(identifier_parser_mediator) identifier_parser_mediator
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(if_statement
(identifier_kwargs) identifier_kwargs
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(call
(attribute
(string_'Unused keyword arguments: {0:s}.') string_'Unused keyword arguments: {0:s}.'
(identifier_format) identifier_format
)attribute
(argument_list
(call
(attribute
(string_', ') string_', '
(identifier_join) identifier_join
)attribute
(argument_list
(call
(attribute
(identifier_kwargs) identifier_kwargs
(identifier_keys) identifier_keys
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)argument_list
)call
)argument_list
)call
)raise_statement
)block
)if_statement
)block
)function_definition
)module | Evaluates if this is the correct plugin and processes data accordingly.
The purpose of the process function is to evaluate if this particular
plugin is the correct one for the particular data structure at hand.
This function accepts one value to use for evaluation, that could be
a registry key, list of table names for a database or any other criteria
that can be used to evaluate if the plugin should be run or not.
Args:
parser_mediator (ParserMediator): mediates interactions between
parsers and other components, such as storage and dfvfs.
kwargs (dict[str, object]): Depending on the plugin they may require
different sets of arguments to be able to evaluate whether or not
this is the correct plugin.
Raises:
ValueError: when there are unused keyword arguments. |
(module
(function_definition
(function_name_add) function_name_add
(parameters
(identifier_ctx) identifier_ctx
(identifier_alias) identifier_alias
(identifier_mapping) identifier_mapping
(identifier_backend) identifier_backend
)parameters
(block
(if_statement
(not_operator
(identifier_backend) identifier_backend
)not_operator
(block
(expression_statement
(assignment
(identifier_backends_list) identifier_backends_list
(call
(attribute
(subscript
(attribute
(identifier_ctx) identifier_ctx
(identifier_obj) identifier_obj
)attribute
(string_'settings') string_'settings'
)subscript
(identifier_get_backends) identifier_get_backends
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_backends_list) identifier_backends_list
)argument_list
)call
(integer_1) integer_1
)comparison_operator
(block
(raise_statement
(call
(attribute
(identifier_click) identifier_click
(identifier_UsageError) identifier_UsageError
)attribute
(argument_list
(binary_operator
(concatenated_string
(string_"You're using more than 1 backend. Please set the backend to ") string_"You're using more than 1 backend. Please set the backend to "
(string_"add the alias to with the --backend option (choices are %s)") string_"add the alias to with the --backend option (choices are %s)"
)concatenated_string
(call
(attribute
(string_", ") string_", "
(identifier_join) identifier_join
)attribute
(argument_list
(call
(attribute
(call
(identifier_dict) identifier_dict
(argument_list
(identifier_backends_list) identifier_backends_list
)argument_list
)call
(identifier_keys) identifier_keys
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)binary_operator
)argument_list
)call
)raise_statement
)block
)if_statement
)block
)if_statement
(expression_statement
(call
(identifier_add_mapping) identifier_add_mapping
(argument_list
(identifier_ctx) identifier_ctx
(identifier_alias) identifier_alias
(identifier_mapping) identifier_mapping
(identifier_backend) identifier_backend
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Add a new alias to your configuration file. |
(module
(function_definition
(function_name_recompile) function_name_recompile
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_nick) identifier_nick
(None) None
)default_parameter
(default_parameter
(identifier_new_nick) identifier_new_nick
(None) None
)default_parameter
(dictionary_splat_pattern
(identifier_kw) identifier_kw
)dictionary_splat_pattern
)parameters
(block
(if_statement
(comparison_operator
(attribute
(attribute
(identifier_self) identifier_self
(identifier_bot) identifier_bot
)attribute
(identifier_nick) identifier_nick
)attribute
(attribute
(identifier_nick) identifier_nick
(identifier_nick) identifier_nick
)attribute
)comparison_operator
(block
(expression_statement
(assignment
(subscript
(attribute
(attribute
(identifier_self) identifier_self
(identifier_bot) identifier_bot
)attribute
(identifier_config) identifier_config
)attribute
(string_'nick') string_'nick'
)subscript
(identifier_new_nick) identifier_new_nick
)assignment
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_bot) identifier_bot
)attribute
(identifier_recompile) identifier_recompile
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)function_definition
)module | recompile regexp on new nick |
(module
(function_definition
(function_name__get_account_number) function_name__get_account_number
(parameters
(identifier_self) identifier_self
(identifier_token) identifier_token
(identifier_uuid) identifier_uuid
)parameters
(block
(expression_statement
(assignment
(identifier_data) identifier_data
(dictionary
(pair
(string_"accessToken") string_"accessToken"
(identifier_token) identifier_token
)pair
(pair
(string_"uuid") string_"uuid"
(identifier_uuid) identifier_uuid
)pair
)dictionary
)assignment
)expression_statement
(try_statement
(block
(expression_statement
(assignment
(identifier_raw_res) identifier_raw_res
(yield
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__session) identifier__session
)attribute
(identifier_post) identifier_post
)attribute
(argument_list
(identifier_ACCOUNT_URL) identifier_ACCOUNT_URL
(keyword_argument
(identifier_data) identifier_data
(identifier_data) identifier_data
)keyword_argument
(keyword_argument
(identifier_headers) identifier_headers
(attribute
(identifier_self) identifier_self
(identifier__headers) identifier__headers
)attribute
)keyword_argument
(keyword_argument
(identifier_timeout) identifier_timeout
(attribute
(identifier_self) identifier_self
(identifier__timeout) identifier__timeout
)attribute
)keyword_argument
)argument_list
)call
)yield
)assignment
)expression_statement
)block
(except_clause
(identifier_OSError) identifier_OSError
(block
(raise_statement
(call
(identifier_PyFidoError) identifier_PyFidoError
(argument_list
(string_"Can not get account number") string_"Can not get account number"
)argument_list
)call
)raise_statement
)block
)except_clause
)try_statement
(try_statement
(block
(expression_statement
(assignment
(identifier_json_content) identifier_json_content
(yield
(call
(attribute
(identifier_raw_res) identifier_raw_res
(identifier_json) identifier_json
)attribute
(argument_list
)argument_list
)call
)yield
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_account_number) identifier_account_number
(call
(attribute
(subscript
(call
(attribute
(call
(attribute
(identifier_json_content) identifier_json_content
(line_continuation_\) line_continuation_\
(identifier_get) identifier_get
)attribute
(argument_list
(string_'getCustomerAccounts') string_'getCustomerAccounts'
(dictionary
)dictionary
)argument_list
)call
(line_continuation_\) line_continuation_\
(identifier_get) identifier_get
)attribute
(argument_list
(string_'accounts') string_'accounts'
(list
(dictionary
)dictionary
)list
)argument_list
)call
(integer_0) integer_0
)subscript
(line_continuation_\) line_continuation_\
(identifier_get) identifier_get
)attribute
(argument_list
(string_'accountNumber') string_'accountNumber'
)argument_list
)call
)assignment
)expression_statement
)block
(except_clause
(tuple
(identifier_OSError) identifier_OSError
(identifier_ValueError) identifier_ValueError
)tuple
(block
(raise_statement
(call
(identifier_PyFidoError) identifier_PyFidoError
(argument_list
(string_"Bad json getting account number") string_"Bad json getting account number"
)argument_list
)call
)raise_statement
)block
)except_clause
)try_statement
(if_statement
(comparison_operator
(identifier_account_number) identifier_account_number
(None) None
)comparison_operator
(block
(raise_statement
(call
(identifier_PyFidoError) identifier_PyFidoError
(argument_list
(string_"Can not get account number") string_"Can not get account number"
)argument_list
)call
)raise_statement
)block
)if_statement
(return_statement
(identifier_account_number) identifier_account_number
)return_statement
)block
)function_definition
)module | Get fido account number. |
(module
(function_definition
(function_name_dump_as_json) function_name_dump_as_json
(parameters
(identifier_record) identifier_record
(identifier_output_file) identifier_output_file
)parameters
(block
(function_definition
(function_name_default_func) function_name_default_func
(parameters
(identifier_value) identifier_value
)parameters
(block
(if_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_value) identifier_value
(identifier_frozenset) identifier_frozenset
)argument_list
)call
(block
(return_statement
(call
(identifier_sorted) identifier_sorted
(argument_list
(identifier_value) identifier_value
)argument_list
)call
)return_statement
)block
)if_statement
(raise_statement
(call
(identifier_TypeError) identifier_TypeError
(argument_list
(binary_operator
(call
(identifier_repr) identifier_repr
(argument_list
(identifier_value) identifier_value
)argument_list
)call
(string_" is not JSON serializable") string_" is not JSON serializable"
)binary_operator
)argument_list
)call
)raise_statement
)block
)function_definition
(expression_statement
(assignment
(identifier_converted_record) identifier_converted_record
(call
(attribute
(identifier_record) identifier_record
(identifier__replace) identifier__replace
)attribute
(argument_list
(keyword_argument
(identifier_ordered_statistics) identifier_ordered_statistics
(list_comprehension
(call
(attribute
(identifier_x) identifier_x
(identifier__asdict) identifier__asdict
)attribute
(argument_list
)argument_list
)call
(for_in_clause
(identifier_x) identifier_x
(attribute
(identifier_record) identifier_record
(identifier_ordered_statistics) identifier_ordered_statistics
)attribute
)for_in_clause
)list_comprehension
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_json) identifier_json
(identifier_dump) identifier_dump
)attribute
(argument_list
(call
(attribute
(identifier_converted_record) identifier_converted_record
(identifier__asdict) identifier__asdict
)attribute
(argument_list
)argument_list
)call
(identifier_output_file) identifier_output_file
(keyword_argument
(identifier_default) identifier_default
(identifier_default_func) identifier_default_func
)keyword_argument
(keyword_argument
(identifier_ensure_ascii) identifier_ensure_ascii
(False) False
)keyword_argument
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_output_file) identifier_output_file
(identifier_write) identifier_write
)attribute
(argument_list
(attribute
(identifier_os) identifier_os
(identifier_linesep) identifier_linesep
)attribute
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Dump an relation record as a json value.
Arguments:
record -- A RelationRecord instance to dump.
output_file -- A file to output. |
(module
(function_definition
(function_name__PrintAnalysisStatusUpdateLinear) function_name__PrintAnalysisStatusUpdateLinear
(parameters
(identifier_self) identifier_self
(identifier_processing_status) identifier_processing_status
)parameters
(block
(for_statement
(identifier_worker_status) identifier_worker_status
(attribute
(identifier_processing_status) identifier_processing_status
(identifier_workers_status) identifier_workers_status
)attribute
(block
(expression_statement
(assignment
(identifier_status_line) identifier_status_line
(call
(attribute
(parenthesized_expression
(concatenated_string
(string_'{0:s} (PID: {1:d}) - events consumed: {2:d} - running: ') string_'{0:s} (PID: {1:d}) - events consumed: {2:d} - running: '
(string_'{3!s}\n') string_'{3!s}\n'
)concatenated_string
)parenthesized_expression
(identifier_format) identifier_format
)attribute
(argument_list
(attribute
(identifier_worker_status) identifier_worker_status
(identifier_identifier) identifier_identifier
)attribute
(attribute
(identifier_worker_status) identifier_worker_status
(identifier_pid) identifier_pid
)attribute
(attribute
(identifier_worker_status) identifier_worker_status
(identifier_number_of_consumed_events) identifier_number_of_consumed_events
)attribute
(comparison_operator
(attribute
(identifier_worker_status) identifier_worker_status
(identifier_status) identifier_status
)attribute
(attribute
(identifier_definitions) identifier_definitions
(identifier_ERROR_STATUS_INDICATORS) identifier_ERROR_STATUS_INDICATORS
)attribute
)comparison_operator
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__output_writer) identifier__output_writer
)attribute
(identifier_Write) identifier_Write
)attribute
(argument_list
(identifier_status_line) identifier_status_line
)argument_list
)call
)expression_statement
)block
)for_statement
)block
)function_definition
)module | Prints an analysis status update in linear mode.
Args:
processing_status (ProcessingStatus): processing status. |
(module
(function_definition
(function_name__get_id) function_name__get_id
(parameters
(identifier_self) identifier_self
(identifier_file_path) identifier_file_path
)parameters
(block
(expression_statement
(assignment
(identifier_title) identifier_title
(binary_operator
(string_'%s._get_id') string_'%s._get_id'
(attribute
(attribute
(identifier_self) identifier_self
(identifier___class__) identifier___class__
)attribute
(identifier___name__) identifier___name__
)attribute
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_list_kwargs) identifier_list_kwargs
(dictionary
(pair
(string_'spaces') string_'spaces'
(attribute
(identifier_self) identifier_self
(identifier_drive_space) identifier_drive_space
)attribute
)pair
(pair
(string_'fields') string_'fields'
(string_'files(id, parents)') string_'files(id, parents)'
)pair
)dictionary
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_path_segments) identifier_path_segments
(call
(attribute
(identifier_file_path) identifier_file_path
(identifier_split) identifier_split
)attribute
(argument_list
(attribute
(identifier_os) identifier_os
(identifier_sep) identifier_sep
)attribute
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_parent_id) identifier_parent_id
(string_'') string_''
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_empty_string) identifier_empty_string
(string_'') string_''
)assignment
)expression_statement
(while_statement
(identifier_path_segments) identifier_path_segments
(block
(expression_statement
(assignment
(identifier_walk_query) identifier_walk_query
(binary_operator
(string_"name = '%s'") string_"name = '%s'"
(call
(attribute
(identifier_path_segments) identifier_path_segments
(identifier_pop) identifier_pop
)attribute
(argument_list
(integer_0) integer_0
)argument_list
)call
)binary_operator
)assignment
)expression_statement
(if_statement
(identifier_parent_id) identifier_parent_id
(block
(expression_statement
(augmented_assignment
(identifier_walk_query) identifier_walk_query
(binary_operator
(string_"and '%s' in parents") string_"and '%s' in parents"
(identifier_parent_id) identifier_parent_id
)binary_operator
)augmented_assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(subscript
(identifier_list_kwargs) identifier_list_kwargs
(string_'q') string_'q'
)subscript
(identifier_walk_query) identifier_walk_query
)assignment
)expression_statement
(try_statement
(block
(expression_statement
(assignment
(identifier_response) identifier_response
(call
(attribute
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_drive) identifier_drive
)attribute
(identifier_list) identifier_list
)attribute
(argument_list
(dictionary_splat
(identifier_list_kwargs) identifier_list_kwargs
)dictionary_splat
)argument_list
)call
(identifier_execute) identifier_execute
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
)block
(except_clause
(block
(raise_statement
(call
(identifier_DriveConnectionError) identifier_DriveConnectionError
(argument_list
(identifier_title) identifier_title
)argument_list
)call
)raise_statement
)block
)except_clause
)try_statement
(expression_statement
(assignment
(identifier_file_list) identifier_file_list
(call
(attribute
(identifier_response) identifier_response
(identifier_get) identifier_get
)attribute
(argument_list
(string_'files') string_'files'
(list
)list
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_file_list) identifier_file_list
(block
(if_statement
(identifier_path_segments) identifier_path_segments
(block
(expression_statement
(assignment
(identifier_parent_id) identifier_parent_id
(call
(attribute
(subscript
(identifier_file_list) identifier_file_list
(integer_0) integer_0
)subscript
(identifier_get) identifier_get
)attribute
(argument_list
(string_'id') string_'id'
)argument_list
)call
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_file_id) identifier_file_id
(call
(attribute
(subscript
(identifier_file_list) identifier_file_list
(integer_0) integer_0
)subscript
(identifier_get) identifier_get
)attribute
(argument_list
(string_'id') string_'id'
)argument_list
)call
)assignment
)expression_statement
(return_statement
(expression_list
(identifier_file_id) identifier_file_id
(identifier_parent_id) identifier_parent_id
)expression_list
)return_statement
)block
)else_clause
)if_statement
)block
(else_clause
(block
(return_statement
(expression_list
(identifier_empty_string) identifier_empty_string
(identifier_empty_string) identifier_empty_string
)expression_list
)return_statement
)block
)else_clause
)if_statement
)block
)while_statement
)block
)function_definition
)module | a helper method for retrieving id of file or folder |
(module
(function_definition
(function_name_input_flush) function_name_input_flush
(parameters
)parameters
(block
(try_statement
(block
(import_statement
(dotted_name
(identifier_sys) identifier_sys
)dotted_name
(dotted_name
(identifier_termios) identifier_termios
)dotted_name
)import_statement
(expression_statement
(call
(attribute
(identifier_termios) identifier_termios
(identifier_tcflush) identifier_tcflush
)attribute
(argument_list
(attribute
(identifier_sys) identifier_sys
(identifier_stdin) identifier_stdin
)attribute
(attribute
(identifier_termios) identifier_termios
(identifier_TCIFLUSH) identifier_TCIFLUSH
)attribute
)argument_list
)call
)expression_statement
)block
(except_clause
(identifier_ImportError) identifier_ImportError
(block
(import_statement
(dotted_name
(identifier_msvcrt) identifier_msvcrt
)dotted_name
)import_statement
(while_statement
(call
(attribute
(identifier_msvcrt) identifier_msvcrt
(identifier_kbhit) identifier_kbhit
)attribute
(argument_list
)argument_list
)call
(block
(expression_statement
(call
(attribute
(identifier_msvcrt) identifier_msvcrt
(identifier_getch) identifier_getch
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)while_statement
)block
)except_clause
)try_statement
)block
)function_definition
)module | Flush the input buffer on posix and windows. |
(module
(function_definition
(function_name_extract_and_process) function_name_extract_and_process
(parameters
(identifier_path_in) identifier_path_in
(identifier_path_out) identifier_path_out
)parameters
(block
(expression_statement
(assignment
(identifier_path_in) identifier_path_in
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_realpath) identifier_realpath
)attribute
(argument_list
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_expanduser) identifier_expanduser
)attribute
(argument_list
(identifier_path_in) identifier_path_in
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_path_out) identifier_path_out
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_realpath) identifier_realpath
)attribute
(argument_list
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_expanduser) identifier_expanduser
)attribute
(argument_list
(identifier_path_out) identifier_path_out
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(identifier_extract_from_directory) identifier_extract_from_directory
(argument_list
(identifier_path_in) identifier_path_in
(identifier_path_out) identifier_path_out
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_jsons) identifier_jsons
(call
(attribute
(identifier_glob) identifier_glob
(identifier_glob) identifier_glob
)attribute
(argument_list
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_join) identifier_join
)attribute
(argument_list
(identifier_path_out) identifier_path_out
(string_'*.jsonld') string_'*.jsonld'
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_logger) identifier_logger
(identifier_info) identifier_info
)attribute
(argument_list
(binary_operator
(string_'Found %d JSON-LD files to process in %s') string_'Found %d JSON-LD files to process in %s'
(tuple
(call
(identifier_len) identifier_len
(argument_list
(identifier_jsons) identifier_jsons
)argument_list
)call
(identifier_path_out) identifier_path_out
)tuple
)binary_operator
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_stmts) identifier_stmts
(list
)list
)assignment
)expression_statement
(for_statement
(identifier_json) identifier_json
(identifier_jsons) identifier_jsons
(block
(expression_statement
(assignment
(identifier_ep) identifier_ep
(call
(identifier_process_json_file) identifier_process_json_file
(argument_list
(identifier_json) identifier_json
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_ep) identifier_ep
(block
(expression_statement
(augmented_assignment
(identifier_stmts) identifier_stmts
(attribute
(identifier_ep) identifier_ep
(identifier_statements) identifier_statements
)attribute
)augmented_assignment
)expression_statement
)block
)if_statement
)block
)for_statement
(return_statement
(identifier_stmts) identifier_stmts
)return_statement
)block
)function_definition
)module | Run Eidos on a set of text files and process output with INDRA.
The output is produced in the specified output folder but
the output files aren't processed by this function.
Parameters
----------
path_in : str
Path to an input folder with some text files
path_out : str
Path to an output folder in which Eidos places the output
JSON-LD files
Returns
-------
stmts : list[indra.statements.Statements]
A list of INDRA Statements |
(module
(function_definition
(function_name_send_remote_port) function_name_send_remote_port
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_msg) identifier_msg
(binary_operator
(string_"REMOTE TCP %s") string_"REMOTE TCP %s"
(parenthesized_expression
(call
(identifier_str) identifier_str
(argument_list
(attribute
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_transport) identifier_transport
)attribute
(identifier_getPeer) identifier_getPeer
)attribute
(argument_list
)argument_list
)call
(identifier_port) identifier_port
)attribute
)argument_list
)call
)parenthesized_expression
)binary_operator
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_send_line) identifier_send_line
)attribute
(argument_list
(identifier_msg) identifier_msg
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Sends the remote port mapped for the connection.
This port is surprisingly often the same as the locally
bound port for an endpoint because a lot of NAT types
preserve the port. |
(module
(function_definition
(function_name_register_introspection_functions) function_name_register_introspection_functions
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_funcs) identifier_funcs
)attribute
(identifier_update) identifier_update
)attribute
(argument_list
(dictionary
(pair
(string_'system.listMethods') string_'system.listMethods'
(attribute
(identifier_self) identifier_self
(identifier_system_listMethods) identifier_system_listMethods
)attribute
)pair
(pair
(string_'system.methodSignature') string_'system.methodSignature'
(attribute
(identifier_self) identifier_self
(identifier_system_methodSignature) identifier_system_methodSignature
)attribute
)pair
(pair
(string_'system.methodHelp') string_'system.methodHelp'
(attribute
(identifier_self) identifier_self
(identifier_system_methodHelp) identifier_system_methodHelp
)attribute
)pair
)dictionary
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Registers the XML-RPC introspection methods in the system
namespace.
see http://xmlrpc.usefulinc.com/doc/reserved.html |
(module
(function_definition
(function_name_get_networks) function_name_get_networks
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_networks) identifier_networks
(subscript
(attribute
(identifier_self) identifier_self
(identifier_c_resources) identifier_c_resources
)attribute
(string_"networks") string_"networks"
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_result) identifier_result
(list
)list
)assignment
)expression_statement
(for_statement
(identifier_net) identifier_net
(identifier_networks) identifier_networks
(block
(expression_statement
(assignment
(identifier__c_network) identifier__c_network
(call
(attribute
(identifier_net) identifier_net
(identifier_get) identifier_get
)attribute
(argument_list
(string_"_c_network") string_"_c_network"
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier__c_network) identifier__c_network
(None) None
)comparison_operator
(block
(continue_statement
)continue_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_roles) identifier_roles
(call
(attribute
(identifier_utils) identifier_utils
(identifier_get_roles_as_list) identifier_get_roles_as_list
)attribute
(argument_list
(identifier_net) identifier_net
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_result) identifier_result
(identifier_append) identifier_append
)attribute
(argument_list
(tuple
(identifier_roles) identifier_roles
(identifier__c_network) identifier__c_network
)tuple
)argument_list
)call
)expression_statement
)block
)for_statement
(return_statement
(identifier_result) identifier_result
)return_statement
)block
)function_definition
)module | Get the networks assoiated with the resource description.
Returns
list of tuple roles, network |
(module
(function_definition
(function_name__set_batch) function_name__set_batch
(parameters
(identifier_self) identifier_self
(identifier_batch) identifier_batch
(identifier_fg) identifier_fg
(identifier_bg) identifier_bg
(default_parameter
(identifier_bgblend) identifier_bgblend
(integer_1) integer_1
)default_parameter
(default_parameter
(identifier_nullChar) identifier_nullChar
(False) False
)default_parameter
)parameters
(block
(for_statement
(pattern_list
(tuple_pattern
(identifier_x) identifier_x
(identifier_y) identifier_y
)tuple_pattern
(identifier_char) identifier_char
)pattern_list
(identifier_batch) identifier_batch
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__set_char) identifier__set_char
)attribute
(argument_list
(identifier_x) identifier_x
(identifier_y) identifier_y
(identifier_char) identifier_char
(identifier_fg) identifier_fg
(identifier_bg) identifier_bg
(identifier_bgblend) identifier_bgblend
)argument_list
)call
)expression_statement
)block
)for_statement
)block
)function_definition
)module | Try to perform a batch operation otherwise fall back to _set_char.
If fg and bg are defined then this is faster but not by very
much.
if any character is None then nullChar is True
batch is a iterable of [(x, y), ch] items |
(module
(function_definition
(function_name_make_opfields) function_name_make_opfields
(parameters
(identifier_cls) identifier_cls
)parameters
(block
(expression_statement
(assignment
(identifier_opfields) identifier_opfields
(dictionary
)dictionary
)assignment
)expression_statement
(for_statement
(identifier_opname) identifier_opname
(call
(attribute
(identifier_SERIALIZE_FIELDS) identifier_SERIALIZE_FIELDS
(identifier_keys) identifier_keys
)attribute
(argument_list
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_opcode) identifier_opcode
(subscript
(identifier_NAME_OPCODES) identifier_NAME_OPCODES
(identifier_opname) identifier_opname
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_opfields) identifier_opfields
(identifier_opcode) identifier_opcode
)subscript
(subscript
(identifier_SERIALIZE_FIELDS) identifier_SERIALIZE_FIELDS
(identifier_opname) identifier_opname
)subscript
)assignment
)expression_statement
)block
)for_statement
(return_statement
(identifier_opfields) identifier_opfields
)return_statement
)block
)function_definition
)module | Calculate the virtulachain-required opfields dict. |
(module
(function_definition
(function_name__render_timestep) function_name__render_timestep
(parameters
(identifier_self) identifier_self
(typed_parameter
(identifier_t) identifier_t
(type
(identifier_int) identifier_int
)type
)typed_parameter
(typed_parameter
(identifier_s) identifier_s
(type
(identifier_Fluents) identifier_Fluents
)type
)typed_parameter
(typed_parameter
(identifier_a) identifier_a
(type
(identifier_Fluents) identifier_Fluents
)type
)typed_parameter
(typed_parameter
(identifier_f) identifier_f
(type
(identifier_Fluents) identifier_Fluents
)type
)typed_parameter
(typed_parameter
(identifier_r) identifier_r
(type
(attribute
(identifier_np) identifier_np
(identifier_float32) identifier_float32
)attribute
)type
)typed_parameter
)parameters
(type
(None) None
)type
(block
(expression_statement
(call
(identifier_print) identifier_print
(argument_list
(string_"============================") string_"============================"
)argument_list
)call
)expression_statement
(expression_statement
(call
(identifier_print) identifier_print
(argument_list
(call
(attribute
(string_"TIME = {}") string_"TIME = {}"
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_t) identifier_t
)argument_list
)call
)argument_list
)call
)expression_statement
(expression_statement
(call
(identifier_print) identifier_print
(argument_list
(string_"============================") string_"============================"
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_fluent_variables) identifier_fluent_variables
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier__compiler) identifier__compiler
)attribute
(identifier_rddl) identifier_rddl
)attribute
(identifier_action_fluent_variables) identifier_action_fluent_variables
)attribute
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__render_fluent_timestep) identifier__render_fluent_timestep
)attribute
(argument_list
(string_'action') string_'action'
(identifier_a) identifier_a
(identifier_fluent_variables) identifier_fluent_variables
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_fluent_variables) identifier_fluent_variables
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier__compiler) identifier__compiler
)attribute
(identifier_rddl) identifier_rddl
)attribute
(identifier_interm_fluent_variables) identifier_interm_fluent_variables
)attribute
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__render_fluent_timestep) identifier__render_fluent_timestep
)attribute
(argument_list
(string_'interms') string_'interms'
(identifier_f) identifier_f
(identifier_fluent_variables) identifier_fluent_variables
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_fluent_variables) identifier_fluent_variables
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier__compiler) identifier__compiler
)attribute
(identifier_rddl) identifier_rddl
)attribute
(identifier_state_fluent_variables) identifier_state_fluent_variables
)attribute
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__render_fluent_timestep) identifier__render_fluent_timestep
)attribute
(argument_list
(string_'states') string_'states'
(identifier_s) identifier_s
(identifier_fluent_variables) identifier_fluent_variables
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__render_reward) identifier__render_reward
)attribute
(argument_list
(identifier_r) identifier_r
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Prints fluents and rewards for the given timestep `t`.
Args:
t (int): timestep
s (Sequence[Tuple[str], np.array]: State fluents.
a (Sequence[Tuple[str], np.array]: Action fluents.
f (Sequence[Tuple[str], np.array]: Interm state fluents.
r (np.float32): Reward. |
(module
(function_definition
(function_name_read_static_uplink) function_name_read_static_uplink
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(boolean_operator
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_node_list) identifier_node_list
)attribute
(None) None
)comparison_operator
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_node_uplink_list) identifier_node_uplink_list
)attribute
(None) None
)comparison_operator
)boolean_operator
(block
(return_statement
)return_statement
)block
)if_statement
(for_statement
(pattern_list
(identifier_node) identifier_node
(identifier_port) identifier_port
)pattern_list
(call
(identifier_zip) identifier_zip
(argument_list
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_node_list) identifier_node_list
)attribute
(identifier_split) identifier_split
)attribute
(argument_list
(string_',') string_','
)argument_list
)call
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_node_uplink_list) identifier_node_uplink_list
)attribute
(identifier_split) identifier_split
)attribute
(argument_list
(string_',') string_','
)argument_list
)call
)argument_list
)call
(block
(if_statement
(comparison_operator
(call
(attribute
(identifier_node) identifier_node
(identifier_strip) identifier_strip
)attribute
(argument_list
)argument_list
)call
(attribute
(identifier_self) identifier_self
(identifier_host_name) identifier_host_name
)attribute
)comparison_operator
(block
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_static_uplink) identifier_static_uplink
)attribute
(True) True
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_static_uplink_port) identifier_static_uplink_port
)attribute
(call
(attribute
(identifier_port) identifier_port
(identifier_strip) identifier_strip
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(return_statement
)return_statement
)block
)if_statement
)block
)for_statement
)block
)function_definition
)module | Read the static uplink from file, if given. |
(module
(function_definition
(function_name__activity_helper) function_name__activity_helper
(parameters
(typed_parameter
(identifier_modifier) identifier_modifier
(type
(identifier_str) identifier_str
)type
)typed_parameter
(default_parameter
(identifier_location) identifier_location
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_rv) identifier_rv
(dictionary
(pair
(identifier_MODIFIER) identifier_MODIFIER
(identifier_modifier) identifier_modifier
)pair
)dictionary
)assignment
)expression_statement
(if_statement
(identifier_location) identifier_location
(block
(expression_statement
(assignment
(subscript
(identifier_rv) identifier_rv
(identifier_LOCATION) identifier_LOCATION
)subscript
(identifier_location) identifier_location
)assignment
)expression_statement
)block
)if_statement
(return_statement
(identifier_rv) identifier_rv
)return_statement
)block
)function_definition
)module | Make an activity dictionary.
:param str modifier:
:param Optional[dict] location: An entity from :func:`pybel.dsl.entity`
:rtype: dict |
(module
(function_definition
(function_name_get_mentions) function_name_get_mentions
(parameters
(identifier_self) identifier_self
(list_splat_pattern
(identifier_args) identifier_args
)list_splat_pattern
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(return_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_get_content) identifier_get_content
)attribute
(argument_list
(subscript
(attribute
(identifier_self) identifier_self
(identifier_config) identifier_config
)attribute
(string_'mentions') string_'mentions'
)subscript
(list_splat
(identifier_args) identifier_args
)list_splat
(dictionary_splat
(identifier_kwargs) identifier_kwargs
)dictionary_splat
)argument_list
)call
)return_statement
)block
)function_definition
)module | Return a get_content generator for username mentions.
The additional parameters are passed directly into
:meth:`.get_content`. Note: the `url` parameter cannot be altered. |
(module
(function_definition
(function_name_directly_connected) function_name_directly_connected
(parameters
(identifier_self) identifier_self
(identifier_ident) identifier_ident
)parameters
(block
(expression_statement
(assignment
(pattern_list
(identifier_content_id) identifier_content_id
(identifier_subtopic_id) identifier_subtopic_id
)pattern_list
(call
(identifier_normalize_ident) identifier_normalize_ident
(argument_list
(identifier_ident) identifier_ident
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_everything) identifier_everything
)attribute
(argument_list
(keyword_argument
(identifier_include_deleted) identifier_include_deleted
(False) False
)keyword_argument
(keyword_argument
(identifier_content_id) identifier_content_id
(identifier_content_id) identifier_content_id
)keyword_argument
(keyword_argument
(identifier_subtopic_id) identifier_subtopic_id
(identifier_subtopic_id) identifier_subtopic_id
)keyword_argument
)argument_list
)call
)return_statement
)block
)function_definition
)module | Return a generator of labels connected to ``ident``.
``ident`` may be a ``content_id`` or a ``(content_id,
subtopic_id)``.
If no labels are defined for ``ident``, then the generator
will yield no labels.
Note that this only returns *directly* connected labels. It
will not follow transitive relationships.
:param ident: content id or (content id and subtopic id)
:type ident: ``str`` or ``(str, str)``
:rtype: generator of :class:`Label` |
(module
(function_definition
(function_name__has_terms) function_name__has_terms
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_loc) identifier_loc
(call
(attribute
(identifier_self) identifier_self
(identifier__super_get) identifier__super_get
)attribute
(argument_list
(string_'_term_location') string_'_term_location'
)argument_list
)call
)assignment
)expression_statement
(return_statement
(boolean_operator
(boolean_operator
(boolean_operator
(call
(attribute
(identifier_self) identifier_self
(identifier__super_has) identifier__super_has
)attribute
(argument_list
(identifier_loc) identifier_loc
)argument_list
)call
(line_continuation_\) line_continuation_\
(call
(identifier_isiterable) identifier_isiterable
(argument_list
(call
(attribute
(identifier_self) identifier_self
(identifier__super_get) identifier__super_get
)attribute
(argument_list
(identifier_loc) identifier_loc
)argument_list
)call
)argument_list
)call
)boolean_operator
(line_continuation_\) line_continuation_\
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(call
(attribute
(identifier_self) identifier_self
(identifier__super_get) identifier__super_get
)attribute
(argument_list
(identifier_loc) identifier_loc
)argument_list
)call
)argument_list
)call
(integer_0) integer_0
)comparison_operator
)boolean_operator
(line_continuation_\) line_continuation_\
(call
(identifier_all) identifier_all
(argument_list
(list_comprehension
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_term) identifier_term
(identifier_Term) identifier_Term
)argument_list
)call
(for_in_clause
(identifier_term) identifier_term
(call
(attribute
(identifier_self) identifier_self
(identifier__super_get) identifier__super_get
)attribute
(argument_list
(identifier_loc) identifier_loc
)argument_list
)call
)for_in_clause
)list_comprehension
)argument_list
)call
)boolean_operator
)return_statement
)block
)function_definition
)module | bool, whether the instance has any sub-terms |
(module
(function_definition
(function_name_shell_call) function_name_shell_call
(parameters
(identifier_self) identifier_self
(identifier_shellcmd) identifier_shellcmd
)parameters
(block
(return_statement
(parenthesized_expression
(call
(attribute
(identifier_subprocess) identifier_subprocess
(identifier_call) identifier_call
)attribute
(argument_list
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier_shellsetup) identifier_shellsetup
)attribute
(identifier_shellcmd) identifier_shellcmd
)binary_operator
(keyword_argument
(identifier_shell) identifier_shell
(True) True
)keyword_argument
)argument_list
)call
)parenthesized_expression
)return_statement
)block
)function_definition
)module | Shell call with necessary setup first. |
(module
(function_definition
(function_name_delete_stream) function_name_delete_stream
(parameters
(identifier_stream_name) identifier_stream_name
(default_parameter
(identifier_region) identifier_region
(None) None
)default_parameter
(default_parameter
(identifier_key) identifier_key
(None) None
)default_parameter
(default_parameter
(identifier_keyid) identifier_keyid
(None) None
)default_parameter
(default_parameter
(identifier_profile) identifier_profile
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_conn) identifier_conn
(call
(identifier__get_conn) identifier__get_conn
(argument_list
(keyword_argument
(identifier_region) identifier_region
(identifier_region) identifier_region
)keyword_argument
(keyword_argument
(identifier_key) identifier_key
(identifier_key) identifier_key
)keyword_argument
(keyword_argument
(identifier_keyid) identifier_keyid
(identifier_keyid) identifier_keyid
)keyword_argument
(keyword_argument
(identifier_profile) identifier_profile
(identifier_profile) identifier_profile
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_r) identifier_r
(call
(identifier__execute_with_retries) identifier__execute_with_retries
(argument_list
(identifier_conn) identifier_conn
(string_"delete_stream") string_"delete_stream"
(keyword_argument
(identifier_StreamName) identifier_StreamName
(identifier_stream_name) identifier_stream_name
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(string_'error') string_'error'
(identifier_r) identifier_r
)comparison_operator
(block
(expression_statement
(assignment
(subscript
(identifier_r) identifier_r
(string_'result') string_'result'
)subscript
(True) True
)assignment
)expression_statement
)block
)if_statement
(return_statement
(identifier_r) identifier_r
)return_statement
)block
)function_definition
)module | Delete the stream with name stream_name. This cannot be undone! All data will be lost!!
CLI example::
salt myminion boto_kinesis.delete_stream my_stream region=us-east-1 |
(module
(function_definition
(function_name_call) function_name_call
(parameters
(identifier_cmd_args) identifier_cmd_args
(default_parameter
(identifier_suppress_output) identifier_suppress_output
(False) False
)default_parameter
)parameters
(block
(if_statement
(boolean_operator
(not_operator
(call
(attribute
(identifier_funcy) identifier_funcy
(identifier_is_list) identifier_is_list
)attribute
(argument_list
(identifier_cmd_args) identifier_cmd_args
)argument_list
)call
)not_operator
(not_operator
(call
(attribute
(identifier_funcy) identifier_funcy
(identifier_is_tuple) identifier_is_tuple
)attribute
(argument_list
(identifier_cmd_args) identifier_cmd_args
)argument_list
)call
)not_operator
)boolean_operator
(block
(expression_statement
(assignment
(identifier_cmd_args) identifier_cmd_args
(call
(attribute
(identifier_shlex) identifier_shlex
(identifier_split) identifier_split
)attribute
(argument_list
(identifier_cmd_args) identifier_cmd_args
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(call
(attribute
(identifier_logger) identifier_logger
(identifier_info) identifier_info
)attribute
(argument_list
(call
(attribute
(string_'executing `{}`') string_'executing `{}`'
(identifier_format) identifier_format
)attribute
(argument_list
(call
(attribute
(string_' ') string_' '
(identifier_join) identifier_join
)attribute
(argument_list
(identifier_cmd_args) identifier_cmd_args
)argument_list
)call
)argument_list
)call
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_call_request) identifier_call_request
(call
(identifier_CallRequest) identifier_CallRequest
(argument_list
(identifier_cmd_args) identifier_cmd_args
(keyword_argument
(identifier_suppress_output) identifier_suppress_output
(identifier_suppress_output) identifier_suppress_output
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_call_result) identifier_call_result
(call
(attribute
(identifier_call_request) identifier_call_request
(identifier_run) identifier_run
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(if_statement
(attribute
(identifier_call_result) identifier_call_result
(identifier_exitval) identifier_exitval
)attribute
(block
(expression_statement
(call
(attribute
(identifier_logger) identifier_logger
(identifier_error) identifier_error
)attribute
(argument_list
(call
(attribute
(string_'`{}` returned error code {}') string_'`{}` returned error code {}'
(identifier_format) identifier_format
)attribute
(argument_list
(call
(attribute
(string_' ') string_' '
(identifier_join) identifier_join
)attribute
(argument_list
(identifier_cmd_args) identifier_cmd_args
)argument_list
)call
(attribute
(identifier_call_result) identifier_call_result
(identifier_exitval) identifier_exitval
)attribute
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)if_statement
(return_statement
(identifier_call_result) identifier_call_result
)return_statement
)block
)function_definition
)module | Call an arbitary command and return the exit value, stdout, and stderr as a tuple
Command can be passed in as either a string or iterable
>>> result = call('hatchery', suppress_output=True)
>>> result.exitval
0
>>> result = call(['hatchery', 'notreal'])
>>> result.exitval
1 |
(module
(function_definition
(function_name_get_commands_in_namespace) function_name_get_commands_in_namespace
(parameters
(default_parameter
(identifier_namespace) identifier_namespace
(None) None
)default_parameter
(default_parameter
(identifier_level) identifier_level
(integer_1) integer_1
)default_parameter
)parameters
(block
(import_from_statement
(relative_import
(import_prefix
)import_prefix
(dotted_name
(identifier_command) identifier_command
)dotted_name
)relative_import
(dotted_name
(identifier_Command) identifier_Command
)dotted_name
)import_from_statement
(expression_statement
(assignment
(identifier_commands) identifier_commands
(dictionary
)dictionary
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_namespace) identifier_namespace
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(identifier_frame) identifier_frame
(subscript
(subscript
(call
(attribute
(identifier_inspect) identifier_inspect
(identifier_stack) identifier_stack
)attribute
(argument_list
)argument_list
)call
(identifier_level) identifier_level
)subscript
(integer_0) integer_0
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_namespace) identifier_namespace
(attribute
(identifier_frame) identifier_frame
(identifier_f_globals) identifier_f_globals
)attribute
)assignment
)expression_statement
)block
(elif_clause
(call
(attribute
(identifier_inspect) identifier_inspect
(identifier_ismodule) identifier_ismodule
)attribute
(argument_list
(identifier_namespace) identifier_namespace
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_namespace) identifier_namespace
(call
(identifier_vars) identifier_vars
(argument_list
(identifier_namespace) identifier_namespace
)argument_list
)call
)assignment
)expression_statement
)block
)elif_clause
)if_statement
(for_statement
(identifier_name) identifier_name
(identifier_namespace) identifier_namespace
(block
(expression_statement
(assignment
(identifier_obj) identifier_obj
(subscript
(identifier_namespace) identifier_namespace
(identifier_name) identifier_name
)subscript
)assignment
)expression_statement
(if_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_obj) identifier_obj
(identifier_Command) identifier_Command
)argument_list
)call
(block
(expression_statement
(assignment
(subscript
(identifier_commands) identifier_commands
(identifier_name) identifier_name
)subscript
(identifier_obj) identifier_obj
)assignment
)expression_statement
)block
)if_statement
)block
)for_statement
(return_statement
(call
(identifier_OrderedDict) identifier_OrderedDict
(generator_expression
(tuple
(identifier_name) identifier_name
(subscript
(identifier_commands) identifier_commands
(identifier_name) identifier_name
)subscript
)tuple
(for_in_clause
(identifier_name) identifier_name
(call
(identifier_sorted) identifier_sorted
(argument_list
(identifier_commands) identifier_commands
)argument_list
)call
)for_in_clause
)generator_expression
)call
)return_statement
)block
)function_definition
)module | Get commands in namespace.
Args:
namespace (dict|module): Typically a module. If not passed, the
globals from the call site will be used.
level (int): If not called from the global scope, set this
appropriately to account for the call stack.
Returns:
OrderedDict: The commands found in the namespace, ordered by
name.
Can be used to create ``__all__`` lists::
__all__ = list(get_commands_in_namespace()) |
(module
(function_definition
(function_name_reduce_list_of_bags_of_words) function_name_reduce_list_of_bags_of_words
(parameters
(identifier_list_of_keyword_sets) identifier_list_of_keyword_sets
)parameters
(block
(expression_statement
(assignment
(identifier_bag_of_words) identifier_bag_of_words
(call
(identifier_dict) identifier_dict
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_get_bag_of_words_keys) identifier_get_bag_of_words_keys
(attribute
(identifier_bag_of_words) identifier_bag_of_words
(identifier_keys) identifier_keys
)attribute
)assignment
)expression_statement
(for_statement
(identifier_keyword_set) identifier_keyword_set
(identifier_list_of_keyword_sets) identifier_list_of_keyword_sets
(block
(for_statement
(identifier_keyword) identifier_keyword
(identifier_keyword_set) identifier_keyword_set
(block
(if_statement
(comparison_operator
(identifier_keyword) identifier_keyword
(call
(identifier_get_bag_of_words_keys) identifier_get_bag_of_words_keys
(argument_list
)argument_list
)call
)comparison_operator
(block
(expression_statement
(augmented_assignment
(subscript
(identifier_bag_of_words) identifier_bag_of_words
(identifier_keyword) identifier_keyword
)subscript
(integer_1) integer_1
)augmented_assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(subscript
(identifier_bag_of_words) identifier_bag_of_words
(identifier_keyword) identifier_keyword
)subscript
(integer_1) integer_1
)assignment
)expression_statement
)block
)else_clause
)if_statement
)block
)for_statement
)block
)for_statement
(return_statement
(identifier_bag_of_words) identifier_bag_of_words
)return_statement
)block
)function_definition
)module | Reduces a number of keyword sets to a bag-of-words.
Input: - list_of_keyword_sets: This is a python list of sets of strings.
Output: - bag_of_words: This is the corresponding multi-set or bag-of-words, in the form of a python dictionary. |
(module
(function_definition
(function_name_add_metadata_query_properties) function_name_add_metadata_query_properties
(parameters
(identifier_self) identifier_self
(identifier_meta_constraints) identifier_meta_constraints
(identifier_id_table) identifier_id_table
(identifier_id_column) identifier_id_column
)parameters
(block
(for_statement
(identifier_mc) identifier_mc
(identifier_meta_constraints) identifier_meta_constraints
(block
(expression_statement
(assignment
(identifier_meta_key) identifier_meta_key
(call
(identifier_str) identifier_str
(argument_list
(attribute
(identifier_mc) identifier_mc
(identifier_key) identifier_key
)attribute
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_ct) identifier_ct
(attribute
(identifier_mc) identifier_mc
(identifier_constraint_type) identifier_constraint_type
)attribute
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_sql_template) identifier_sql_template
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_sql_args) identifier_sql_args
)attribute
(identifier_append) identifier_append
)attribute
(argument_list
(call
(attribute
(identifier_SQLBuilder) identifier_SQLBuilder
(identifier_map_value) identifier_map_value
)attribute
(argument_list
(attribute
(identifier_mc) identifier_mc
(identifier_value) identifier_value
)attribute
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_sql_args) identifier_sql_args
)attribute
(identifier_append) identifier_append
)attribute
(argument_list
(identifier_meta_key) identifier_meta_key
)argument_list
)call
)expression_statement
(if_statement
(comparison_operator
(identifier_ct) identifier_ct
(string_'less') string_'less'
)comparison_operator
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_where_clauses) identifier_where_clauses
)attribute
(identifier_append) identifier_append
)attribute
(argument_list
(call
(attribute
(identifier_sql_template) identifier_sql_template
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_id_table) identifier_id_table
(identifier_id_column) identifier_id_column
(string_'floatValue') string_'floatValue'
(string_'<=') string_'<='
)argument_list
)call
)argument_list
)call
)expression_statement
)block
(elif_clause
(comparison_operator
(identifier_ct) identifier_ct
(string_'greater') string_'greater'
)comparison_operator
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_where_clauses) identifier_where_clauses
)attribute
(identifier_append) identifier_append
)attribute
(argument_list
(call
(attribute
(identifier_sql_template) identifier_sql_template
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_id_table) identifier_id_table
(identifier_id_column) identifier_id_column
(string_'floatValue') string_'floatValue'
(string_'>=') string_'>='
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)elif_clause
(elif_clause
(comparison_operator
(identifier_ct) identifier_ct
(string_'number_equals') string_'number_equals'
)comparison_operator
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_where_clauses) identifier_where_clauses
)attribute
(identifier_append) identifier_append
)attribute
(argument_list
(call
(attribute
(identifier_sql_template) identifier_sql_template
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_id_table) identifier_id_table
(identifier_id_column) identifier_id_column
(string_'floatValue') string_'floatValue'
(string_'=') string_'='
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)elif_clause
(elif_clause
(comparison_operator
(identifier_ct) identifier_ct
(string_'string_equals') string_'string_equals'
)comparison_operator
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_where_clauses) identifier_where_clauses
)attribute
(identifier_append) identifier_append
)attribute
(argument_list
(call
(attribute
(identifier_sql_template) identifier_sql_template
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_id_table) identifier_id_table
(identifier_id_column) identifier_id_column
(string_'stringValue') string_'stringValue'
(string_'=') string_'='
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)elif_clause
(else_clause
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(string_"Unknown meta constraint type!") string_"Unknown meta constraint type!"
)argument_list
)call
)raise_statement
)block
)else_clause
)if_statement
)block
)for_statement
)block
)function_definition
)module | Construct WHERE clauses from a list of MetaConstraint objects, adding them to the query state.
:param meta_constraints:
A list of MetaConstraint objects, each of which defines a condition over metadata which must be satisfied
for results to be included in the overall query.
:raises:
ValueError if an unknown meta constraint type is encountered. |
(module
(function_definition
(function_name_contains_circle) function_name_contains_circle
(parameters
(identifier_self) identifier_self
(identifier_pt) identifier_pt
(identifier_radius) identifier_radius
)parameters
(block
(return_statement
(parenthesized_expression
(boolean_operator
(boolean_operator
(boolean_operator
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_l) identifier_l
)attribute
(binary_operator
(attribute
(identifier_pt) identifier_pt
(identifier_x) identifier_x
)attribute
(identifier_radius) identifier_radius
)binary_operator
)comparison_operator
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_r) identifier_r
)attribute
(binary_operator
(attribute
(identifier_pt) identifier_pt
(identifier_x) identifier_x
)attribute
(identifier_radius) identifier_radius
)binary_operator
)comparison_operator
)boolean_operator
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_t) identifier_t
)attribute
(binary_operator
(attribute
(identifier_pt) identifier_pt
(identifier_y) identifier_y
)attribute
(identifier_radius) identifier_radius
)binary_operator
)comparison_operator
)boolean_operator
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_b) identifier_b
)attribute
(binary_operator
(attribute
(identifier_pt) identifier_pt
(identifier_y) identifier_y
)attribute
(identifier_radius) identifier_radius
)binary_operator
)comparison_operator
)boolean_operator
)parenthesized_expression
)return_statement
)block
)function_definition
)module | Is the circle completely inside this rect? |
(module
(function_definition
(function_name_read_sps) function_name_read_sps
(parameters
(identifier_path) identifier_path
)parameters
(block
(for_statement
(identifier_line) identifier_line
(call
(identifier_open) identifier_open
(argument_list
(identifier_path) identifier_path
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_xs) identifier_xs
(call
(attribute
(call
(attribute
(identifier_line) identifier_line
(identifier_rstrip) identifier_rstrip
)attribute
(argument_list
)argument_list
)call
(identifier_split) identifier_split
)attribute
(argument_list
(string_' ') string_' '
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(yield
(expression_list
(subscript
(identifier_xs) identifier_xs
(slice
(integer_1) integer_1
(colon) colon
)slice
)subscript
(call
(identifier_int) identifier_int
(argument_list
(subscript
(identifier_xs) identifier_xs
(integer_0) integer_0
)subscript
)argument_list
)call
)expression_list
)yield
)expression_statement
)block
)for_statement
)block
)function_definition
)module | Read a LibSVM file line-by-line.
Args:
path (str): A path to the LibSVM file to read.
Yields:
data (list) and target (int). |
(module
(function_definition
(function_name_format_unencoded) function_name_format_unencoded
(parameters
(identifier_self) identifier_self
(identifier_tokensource) identifier_tokensource
(identifier_outfile) identifier_outfile
)parameters
(block
(expression_statement
(assignment
(identifier_source) identifier_source
(call
(attribute
(identifier_self) identifier_self
(identifier__format_lines) identifier__format_lines
)attribute
(argument_list
(identifier_tokensource) identifier_tokensource
)argument_list
)call
)assignment
)expression_statement
(if_statement
(attribute
(identifier_self) identifier_self
(identifier_hl_lines) identifier_hl_lines
)attribute
(block
(expression_statement
(assignment
(identifier_source) identifier_source
(call
(attribute
(identifier_self) identifier_self
(identifier__highlight_lines) identifier__highlight_lines
)attribute
(argument_list
(identifier_source) identifier_source
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(if_statement
(not_operator
(attribute
(identifier_self) identifier_self
(identifier_nowrap) identifier_nowrap
)attribute
)not_operator
(block
(if_statement
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_linenos) identifier_linenos
)attribute
(integer_2) integer_2
)comparison_operator
(block
(expression_statement
(assignment
(identifier_source) identifier_source
(call
(attribute
(identifier_self) identifier_self
(identifier__wrap_inlinelinenos) identifier__wrap_inlinelinenos
)attribute
(argument_list
(identifier_source) identifier_source
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(if_statement
(attribute
(identifier_self) identifier_self
(identifier_lineanchors) identifier_lineanchors
)attribute
(block
(expression_statement
(assignment
(identifier_source) identifier_source
(call
(attribute
(identifier_self) identifier_self
(identifier__wrap_lineanchors) identifier__wrap_lineanchors
)attribute
(argument_list
(identifier_source) identifier_source
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(if_statement
(attribute
(identifier_self) identifier_self
(identifier_linespans) identifier_linespans
)attribute
(block
(expression_statement
(assignment
(identifier_source) identifier_source
(call
(attribute
(identifier_self) identifier_self
(identifier__wrap_linespans) identifier__wrap_linespans
)attribute
(argument_list
(identifier_source) identifier_source
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_source) identifier_source
(call
(attribute
(identifier_self) identifier_self
(identifier_wrap) identifier_wrap
)attribute
(argument_list
(identifier_source) identifier_source
(identifier_outfile) identifier_outfile
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_linenos) identifier_linenos
)attribute
(integer_1) integer_1
)comparison_operator
(block
(expression_statement
(assignment
(identifier_source) identifier_source
(call
(attribute
(identifier_self) identifier_self
(identifier__wrap_tablelinenos) identifier__wrap_tablelinenos
)attribute
(argument_list
(identifier_source) identifier_source
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(if_statement
(attribute
(identifier_self) identifier_self
(identifier_full) identifier_full
)attribute
(block
(expression_statement
(assignment
(identifier_source) identifier_source
(call
(attribute
(identifier_self) identifier_self
(identifier__wrap_full) identifier__wrap_full
)attribute
(argument_list
(identifier_source) identifier_source
(identifier_outfile) identifier_outfile
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
)block
)if_statement
(for_statement
(pattern_list
(identifier_t) identifier_t
(identifier_piece) identifier_piece
)pattern_list
(identifier_source) identifier_source
(block
(expression_statement
(call
(attribute
(identifier_outfile) identifier_outfile
(identifier_write) identifier_write
)attribute
(argument_list
(identifier_piece) identifier_piece
)argument_list
)call
)expression_statement
)block
)for_statement
)block
)function_definition
)module | The formatting process uses several nested generators; which of
them are used is determined by the user's options.
Each generator should take at least one argument, ``inner``,
and wrap the pieces of text generated by this.
Always yield 2-tuples: (code, text). If "code" is 1, the text
is part of the original tokensource being highlighted, if it's
0, the text is some piece of wrapping. This makes it possible to
use several different wrappers that process the original source
linewise, e.g. line number generators. |
(module
(function_definition
(function_name_is_node) function_name_is_node
(parameters
(identifier_objecttype) identifier_objecttype
)parameters
(block
(if_statement
(not_operator
(call
(identifier_isclass) identifier_isclass
(argument_list
(identifier_objecttype) identifier_objecttype
)argument_list
)call
)not_operator
(block
(return_statement
(False) False
)return_statement
)block
)if_statement
(if_statement
(not_operator
(call
(identifier_issubclass) identifier_issubclass
(argument_list
(identifier_objecttype) identifier_objecttype
(identifier_ObjectType) identifier_ObjectType
)argument_list
)call
)not_operator
(block
(return_statement
(False) False
)return_statement
)block
)if_statement
(for_statement
(identifier_i) identifier_i
(attribute
(attribute
(identifier_objecttype) identifier_objecttype
(identifier__meta) identifier__meta
)attribute
(identifier_interfaces) identifier_interfaces
)attribute
(block
(if_statement
(call
(identifier_issubclass) identifier_issubclass
(argument_list
(identifier_i) identifier_i
(identifier_Node) identifier_Node
)argument_list
)call
(block
(return_statement
(True) True
)return_statement
)block
)if_statement
)block
)for_statement
(return_statement
(False) False
)return_statement
)block
)function_definition
)module | Check if the given objecttype has Node as an interface |
(module
(function_definition
(function_name_includeme) function_name_includeme
(parameters
(identifier_config) identifier_config
)parameters
(block
(expression_statement
(assignment
(identifier_root) identifier_root
(call
(attribute
(identifier_config) identifier_config
(identifier_get_root_resource) identifier_get_root_resource
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_root) identifier_root
(identifier_add) identifier_add
)attribute
(argument_list
(string_'nef_polymorphic') string_'nef_polymorphic'
(string_'{collections:.+,.+}') string_'{collections:.+,.+}'
(keyword_argument
(identifier_view) identifier_view
(identifier_PolymorphicESView) identifier_PolymorphicESView
)keyword_argument
(keyword_argument
(identifier_factory) identifier_factory
(identifier_PolymorphicACL) identifier_PolymorphicACL
)keyword_argument
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Connect view to route that catches all URIs like
'something,something,...' |
(module
(function_definition
(function_name__order_pases) function_name__order_pases
(parameters
(identifier_self) identifier_self
(identifier_passes) identifier_passes
)parameters
(block
(expression_statement
(assignment
(identifier_passes) identifier_passes
(call
(identifier_set) identifier_set
(argument_list
(identifier_passes) identifier_passes
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_pass_deps) identifier_pass_deps
(dictionary
)dictionary
)assignment
)expression_statement
(for_statement
(identifier_opt) identifier_opt
(identifier_passes) identifier_passes
(block
(expression_statement
(assignment
(pattern_list
(identifier__) identifier__
(identifier_before) identifier_before
(identifier_after) identifier_after
)pattern_list
(subscript
(attribute
(identifier_self) identifier_self
(identifier__known_passes) identifier__known_passes
)attribute
(identifier_opt) identifier_opt
)subscript
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_opt) identifier_opt
(identifier_pass_deps) identifier_pass_deps
)comparison_operator
(block
(expression_statement
(assignment
(subscript
(identifier_pass_deps) identifier_pass_deps
(identifier_opt) identifier_opt
)subscript
(call
(identifier_set) identifier_set
(argument_list
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(for_statement
(identifier_after_pass) identifier_after_pass
(identifier_after) identifier_after
(block
(expression_statement
(call
(attribute
(subscript
(identifier_pass_deps) identifier_pass_deps
(identifier_opt) identifier_opt
)subscript
(identifier_add) identifier_add
)attribute
(argument_list
(identifier_after_pass) identifier_after_pass
)argument_list
)call
)expression_statement
)block
)for_statement
(for_statement
(identifier_other) identifier_other
(identifier_before) identifier_before
(block
(if_statement
(comparison_operator
(identifier_other) identifier_other
(identifier_passes) identifier_passes
)comparison_operator
(block
(continue_statement
)continue_statement
)block
)if_statement
(if_statement
(comparison_operator
(identifier_other) identifier_other
(identifier_pass_deps) identifier_pass_deps
)comparison_operator
(block
(expression_statement
(assignment
(subscript
(identifier_pass_deps) identifier_pass_deps
(identifier_other) identifier_other
)subscript
(call
(identifier_set) identifier_set
(argument_list
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(call
(attribute
(subscript
(identifier_pass_deps) identifier_pass_deps
(identifier_other) identifier_other
)subscript
(identifier_add) identifier_add
)attribute
(argument_list
(identifier_opt) identifier_opt
)argument_list
)call
)expression_statement
)block
)for_statement
)block
)for_statement
(return_statement
(call
(identifier_toposort_flatten) identifier_toposort_flatten
(argument_list
(identifier_pass_deps) identifier_pass_deps
)argument_list
)call
)return_statement
)block
)function_definition
)module | Topologically sort optimization passes.
This ensures that the resulting passes are run in order
respecting before/after constraints.
Args:
passes (iterable): An iterable of pass names that should
be included in the optimization passes run. |
(module
(function_definition
(function_name__execute_cmd) function_name__execute_cmd
(parameters
(identifier_plugin) identifier_plugin
(default_parameter
(identifier_args) identifier_args
(string_'') string_''
)default_parameter
(default_parameter
(identifier_run_type) identifier_run_type
(string_'cmd.retcode') string_'cmd.retcode'
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_data) identifier_data
(dictionary
)dictionary
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_all_plugins) identifier_all_plugins
(call
(identifier_list_plugins) identifier_list_plugins
(argument_list
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_plugin) identifier_plugin
(identifier_all_plugins) identifier_all_plugins
)comparison_operator
(block
(expression_statement
(assignment
(identifier_data) identifier_data
(call
(subscript
(identifier___salt__) identifier___salt__
(identifier_run_type) identifier_run_type
)subscript
(argument_list
(call
(attribute
(string_'{0}{1} {2}') string_'{0}{1} {2}'
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_PLUGINDIR) identifier_PLUGINDIR
(identifier_plugin) identifier_plugin
(identifier_args) identifier_args
)argument_list
)call
(keyword_argument
(identifier_python_shell) identifier_python_shell
(False) False
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(return_statement
(identifier_data) identifier_data
)return_statement
)block
)function_definition
)module | Execute nagios plugin if it's in the directory with salt command specified in run_type |
(module
(function_definition
(function_name_get_proxies) function_name_get_proxies
(parameters
(identifier_self) identifier_self
(identifier_url) identifier_url
)parameters
(block
(expression_statement
(assignment
(identifier_hostname) identifier_hostname
(attribute
(call
(identifier_urlparse) identifier_urlparse
(argument_list
(identifier_url) identifier_url
)argument_list
)call
(identifier_hostname) identifier_hostname
)attribute
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_hostname) identifier_hostname
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(identifier_hostname) identifier_hostname
(string_"") string_""
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_value_from_js_func) identifier_value_from_js_func
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_pac) identifier_pac
)attribute
(identifier_find_proxy_for_url) identifier_find_proxy_for_url
)attribute
(argument_list
(identifier_url) identifier_url
(identifier_hostname) identifier_hostname
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_value_from_js_func) identifier_value_from_js_func
(attribute
(identifier_self) identifier_self
(identifier__cache) identifier__cache
)attribute
)comparison_operator
(block
(return_statement
(subscript
(attribute
(identifier_self) identifier_self
(identifier__cache) identifier__cache
)attribute
(identifier_value_from_js_func) identifier_value_from_js_func
)subscript
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_config_values) identifier_config_values
(call
(identifier_parse_pac_value) identifier_parse_pac_value
(argument_list
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_pac) identifier_pac
)attribute
(identifier_find_proxy_for_url) identifier_find_proxy_for_url
)attribute
(argument_list
(identifier_url) identifier_url
(identifier_hostname) identifier_hostname
)argument_list
)call
(attribute
(identifier_self) identifier_self
(identifier_socks_scheme) identifier_socks_scheme
)attribute
)argument_list
)call
)assignment
)expression_statement
(if_statement
(attribute
(identifier_self) identifier_self
(identifier__proxy_auth) identifier__proxy_auth
)attribute
(block
(expression_statement
(assignment
(identifier_config_values) identifier_config_values
(list_comprehension
(call
(identifier_add_proxy_auth) identifier_add_proxy_auth
(argument_list
(identifier_value) identifier_value
(attribute
(identifier_self) identifier_self
(identifier__proxy_auth) identifier__proxy_auth
)attribute
)argument_list
)call
(for_in_clause
(identifier_value) identifier_value
(identifier_config_values) identifier_config_values
)for_in_clause
)list_comprehension
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(subscript
(attribute
(identifier_self) identifier_self
(identifier__cache) identifier__cache
)attribute
(identifier_value_from_js_func) identifier_value_from_js_func
)subscript
(identifier_config_values) identifier_config_values
)assignment
)expression_statement
(return_statement
(identifier_config_values) identifier_config_values
)return_statement
)block
)function_definition
)module | Get the proxies that are applicable to a given URL, according to the PAC file.
:param str url: The URL for which to find appropriate proxies.
:return: All the proxies that apply to the given URL.
Can be empty, which means to abort the request.
:rtype: list[str] |
(module
(function_definition
(function_name_ApproximateDistanceBetweenPoints) function_name_ApproximateDistanceBetweenPoints
(parameters
(identifier_pa) identifier_pa
(identifier_pb) identifier_pb
)parameters
(block
(expression_statement
(assignment
(pattern_list
(identifier_alat) identifier_alat
(identifier_alon) identifier_alon
)pattern_list
(identifier_pa) identifier_pa
)assignment
)expression_statement
(expression_statement
(assignment
(pattern_list
(identifier_blat) identifier_blat
(identifier_blon) identifier_blon
)pattern_list
(identifier_pb) identifier_pb
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_sa) identifier_sa
(call
(attribute
(identifier_transitfeed) identifier_transitfeed
(identifier_Stop) identifier_Stop
)attribute
(argument_list
(keyword_argument
(identifier_lat) identifier_lat
(identifier_alat) identifier_alat
)keyword_argument
(keyword_argument
(identifier_lng) identifier_lng
(identifier_alon) identifier_alon
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_sb) identifier_sb
(call
(attribute
(identifier_transitfeed) identifier_transitfeed
(identifier_Stop) identifier_Stop
)attribute
(argument_list
(keyword_argument
(identifier_lat) identifier_lat
(identifier_blat) identifier_blat
)keyword_argument
(keyword_argument
(identifier_lng) identifier_lng
(identifier_blon) identifier_blon
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_transitfeed) identifier_transitfeed
(identifier_ApproximateDistanceBetweenStops) identifier_ApproximateDistanceBetweenStops
)attribute
(argument_list
(identifier_sa) identifier_sa
(identifier_sb) identifier_sb
)argument_list
)call
)return_statement
)block
)function_definition
)module | Finds the distance between two points on the Earth's surface.
This is an approximate distance based on assuming that the Earth is a sphere.
The points are specified by their lattitude and longitude.
Args:
pa: the first (lat, lon) point tuple
pb: the second (lat, lon) point tuple
Returns:
The distance as a float in metres. |
(module
(function_definition
(function_name_img_binary_list) function_name_img_binary_list
(parameters
)parameters
(block
(expression_statement
(assignment
(identifier_qemu_imgs) identifier_qemu_imgs
(list
)list
)assignment
)expression_statement
(for_statement
(identifier_path) identifier_path
(call
(attribute
(identifier_Qemu) identifier_Qemu
(identifier_paths_list) identifier_paths_list
)attribute
(argument_list
)argument_list
)call
(block
(try_statement
(block
(for_statement
(identifier_f) identifier_f
(call
(attribute
(identifier_os) identifier_os
(identifier_listdir) identifier_listdir
)attribute
(argument_list
(identifier_path) identifier_path
)argument_list
)call
(block
(if_statement
(boolean_operator
(boolean_operator
(parenthesized_expression
(boolean_operator
(comparison_operator
(identifier_f) identifier_f
(string_"qemu-img") string_"qemu-img"
)comparison_operator
(comparison_operator
(identifier_f) identifier_f
(string_"qemu-img.exe") string_"qemu-img.exe"
)comparison_operator
)boolean_operator
)parenthesized_expression
(line_continuation_\) line_continuation_\
(call
(attribute
(identifier_os) identifier_os
(identifier_access) identifier_access
)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_f) identifier_f
)argument_list
)call
(attribute
(identifier_os) identifier_os
(identifier_X_OK) identifier_X_OK
)attribute
)argument_list
)call
)boolean_operator
(line_continuation_\) line_continuation_\
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_isfile) identifier_isfile
)attribute
(argument_list
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_join) identifier_join
)attribute
(argument_list
(identifier_path) identifier_path
(identifier_f) identifier_f
)argument_list
)call
)argument_list
)call
)boolean_operator
(block
(expression_statement
(assignment
(identifier_qemu_path) identifier_qemu_path
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_join) identifier_join
)attribute
(argument_list
(identifier_path) identifier_path
(identifier_f) identifier_f
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_version) identifier_version
(yield
(call
(attribute
(identifier_Qemu) identifier_Qemu
(identifier__get_qemu_img_version) identifier__get_qemu_img_version
)attribute
(argument_list
(identifier_qemu_path) identifier_qemu_path
)argument_list
)call
)yield
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_qemu_imgs) identifier_qemu_imgs
(identifier_append) identifier_append
)attribute
(argument_list
(dictionary
(pair
(string_"path") string_"path"
(identifier_qemu_path) identifier_qemu_path
)pair
(pair
(string_"version") string_"version"
(identifier_version) identifier_version
)pair
)dictionary
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)for_statement
)block
(except_clause
(identifier_OSError) identifier_OSError
(block
(continue_statement
)continue_statement
)block
)except_clause
)try_statement
)block
)for_statement
(return_statement
(identifier_qemu_imgs) identifier_qemu_imgs
)return_statement
)block
)function_definition
)module | Gets QEMU-img binaries list available on the host.
:returns: Array of dictionary {"path": Qemu-img binary path, "version": version of Qemu-img} |
(module
(function_definition
(function_name_frameify) function_name_frameify
(parameters
(identifier_self) identifier_self
(identifier_state) identifier_state
(identifier_data) identifier_data
)parameters
(block
(expression_statement
(assignment
(identifier_data) identifier_data
(binary_operator
(attribute
(identifier_state) identifier_state
(identifier_recv_buf) identifier_recv_buf
)attribute
(identifier_data) identifier_data
)binary_operator
)assignment
)expression_statement
(while_statement
(identifier_data) identifier_data
(block
(expression_statement
(assignment
(pattern_list
(identifier_line) identifier_line
(identifier_sep) identifier_sep
(identifier_rest) identifier_rest
)pattern_list
(call
(attribute
(identifier_data) identifier_data
(identifier_partition) identifier_partition
)attribute
(argument_list
(string_'\n') string_'\n'
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_sep) identifier_sep
(string_'\n') string_'\n'
)comparison_operator
(block
(break_statement
)break_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_data) identifier_data
(identifier_rest) identifier_rest
)assignment
)expression_statement
(if_statement
(boolean_operator
(attribute
(identifier_self) identifier_self
(identifier_carriage_return) identifier_carriage_return
)attribute
(comparison_operator
(subscript
(identifier_line) identifier_line
(unary_operator
(integer_1) integer_1
)unary_operator
)subscript
(string_'\r') string_'\r'
)comparison_operator
)boolean_operator
(block
(expression_statement
(assignment
(identifier_line) identifier_line
(subscript
(identifier_line) identifier_line
(slice
(colon) colon
(unary_operator
(integer_1) integer_1
)unary_operator
)slice
)subscript
)assignment
)expression_statement
)block
)if_statement
(try_statement
(block
(expression_statement
(yield
(identifier_line) identifier_line
)yield
)expression_statement
)block
(except_clause
(identifier_FrameSwitch) identifier_FrameSwitch
(block
(break_statement
)break_statement
)block
)except_clause
)try_statement
)block
)while_statement
(expression_statement
(assignment
(attribute
(identifier_state) identifier_state
(identifier_recv_buf) identifier_recv_buf
)attribute
(identifier_data) identifier_data
)assignment
)expression_statement
)block
)function_definition
)module | Split data into a sequence of lines. |
(module
(function_definition
(function_name_get_mutations_size) function_name_get_mutations_size
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_mutation_size) identifier_mutation_size
(integer_0) integer_0
)assignment
)expression_statement
(for_statement
(identifier_mutation) identifier_mutation
(call
(attribute
(identifier_self) identifier_self
(identifier__get_mutations) identifier__get_mutations
)attribute
(argument_list
)argument_list
)call
(block
(expression_statement
(augmented_assignment
(identifier_mutation_size) identifier_mutation_size
(call
(attribute
(identifier_mutation) identifier_mutation
(identifier_ByteSize) identifier_ByteSize
)attribute
(argument_list
)argument_list
)call
)augmented_assignment
)expression_statement
)block
)for_statement
(return_statement
(identifier_mutation_size) identifier_mutation_size
)return_statement
)block
)function_definition
)module | Gets the total mutations size for current row
For example:
.. literalinclude:: snippets_table.py
:start-after: [START bigtable_row_get_mutations_size]
:end-before: [END bigtable_row_get_mutations_size] |
(module
(function_definition
(function_name_within_depth_range) function_name_within_depth_range
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_lower_depth) identifier_lower_depth
(None) None
)default_parameter
(default_parameter
(identifier_upper_depth) identifier_upper_depth
(None) None
)default_parameter
)parameters
(block
(if_statement
(not_operator
(identifier_lower_depth) identifier_lower_depth
)not_operator
(block
(if_statement
(not_operator
(identifier_upper_depth) identifier_upper_depth
)not_operator
(block
(return_statement
(attribute
(identifier_self) identifier_self
(identifier_catalogue) identifier_catalogue
)attribute
)return_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_lower_depth) identifier_lower_depth
(attribute
(identifier_np) identifier_np
(identifier_inf) identifier_inf
)attribute
)assignment
)expression_statement
)block
)else_clause
)if_statement
)block
)if_statement
(if_statement
(not_operator
(identifier_upper_depth) identifier_upper_depth
)not_operator
(block
(expression_statement
(assignment
(identifier_upper_depth) identifier_upper_depth
(float_0.0) float_0.0
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_is_valid) identifier_is_valid
(call
(attribute
(identifier_np) identifier_np
(identifier_logical_and) identifier_logical_and
)attribute
(argument_list
(comparison_operator
(subscript
(attribute
(attribute
(identifier_self) identifier_self
(identifier_catalogue) identifier_catalogue
)attribute
(identifier_data) identifier_data
)attribute
(string_'depth') string_'depth'
)subscript
(identifier_upper_depth) identifier_upper_depth
)comparison_operator
(comparison_operator
(subscript
(attribute
(attribute
(identifier_self) identifier_self
(identifier_catalogue) identifier_catalogue
)attribute
(identifier_data) identifier_data
)attribute
(string_'depth') string_'depth'
)subscript
(identifier_lower_depth) identifier_lower_depth
)comparison_operator
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_select_catalogue) identifier_select_catalogue
)attribute
(argument_list
(identifier_is_valid) identifier_is_valid
)argument_list
)call
)return_statement
)block
)function_definition
)module | Selects events within a specified depth range
:param float lower_depth:
Lower depth for consideration
:param float upper_depth:
Upper depth for consideration
:returns:
Instance of :class:`openquake.hmtk.seismicity.catalogue.Catalogue`
containing only selected events |
(module
(function_definition
(function_name_save_excel) function_name_save_excel
(parameters
(identifier_self) identifier_self
(identifier_fd) identifier_fd
)parameters
(block
(import_from_statement
(dotted_name
(identifier_pylon) identifier_pylon
(identifier_io) identifier_io
(identifier_excel) identifier_excel
)dotted_name
(dotted_name
(identifier_ExcelWriter) identifier_ExcelWriter
)dotted_name
)import_from_statement
(expression_statement
(call
(attribute
(call
(identifier_ExcelWriter) identifier_ExcelWriter
(argument_list
(identifier_self) identifier_self
)argument_list
)call
(identifier_write) identifier_write
)attribute
(argument_list
(identifier_fd) identifier_fd
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Saves the case as an Excel spreadsheet. |
(module
(function_definition
(function_name_confusion_matrix) function_name_confusion_matrix
(parameters
(identifier_gold) identifier_gold
(identifier_pred) identifier_pred
(default_parameter
(identifier_null_pred) identifier_null_pred
(False) False
)default_parameter
(default_parameter
(identifier_null_gold) identifier_null_gold
(False) False
)default_parameter
(default_parameter
(identifier_normalize) identifier_normalize
(False) False
)default_parameter
(default_parameter
(identifier_pretty_print) identifier_pretty_print
(True) True
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_conf) identifier_conf
(call
(identifier_ConfusionMatrix) identifier_ConfusionMatrix
(argument_list
(keyword_argument
(identifier_null_pred) identifier_null_pred
(identifier_null_pred) identifier_null_pred
)keyword_argument
(keyword_argument
(identifier_null_gold) identifier_null_gold
(identifier_null_gold) identifier_null_gold
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_gold) identifier_gold
(call
(identifier_arraylike_to_numpy) identifier_arraylike_to_numpy
(argument_list
(identifier_gold) identifier_gold
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_pred) identifier_pred
(call
(identifier_arraylike_to_numpy) identifier_arraylike_to_numpy
(argument_list
(identifier_pred) identifier_pred
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_conf) identifier_conf
(identifier_add) identifier_add
)attribute
(argument_list
(identifier_gold) identifier_gold
(identifier_pred) identifier_pred
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_mat) identifier_mat
(call
(attribute
(identifier_conf) identifier_conf
(identifier_compile) identifier_compile
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_normalize) identifier_normalize
(block
(expression_statement
(assignment
(identifier_mat) identifier_mat
(binary_operator
(identifier_mat) identifier_mat
(call
(identifier_len) identifier_len
(argument_list
(identifier_gold) identifier_gold
)argument_list
)call
)binary_operator
)assignment
)expression_statement
)block
)if_statement
(if_statement
(identifier_pretty_print) identifier_pretty_print
(block
(expression_statement
(call
(attribute
(identifier_conf) identifier_conf
(identifier_display) identifier_display
)attribute
(argument_list
(keyword_argument
(identifier_normalize) identifier_normalize
(identifier_normalize) identifier_normalize
)keyword_argument
)argument_list
)call
)expression_statement
)block
)if_statement
(return_statement
(identifier_mat) identifier_mat
)return_statement
)block
)function_definition
)module | A shortcut method for building a confusion matrix all at once.
Args:
gold: an array-like of gold labels (ints)
pred: an array-like of predictions (ints)
null_pred: If True, include the row corresponding to null predictions
null_gold: If True, include the col corresponding to null gold labels
normalize: if True, divide counts by the total number of items
pretty_print: if True, pretty-print the matrix before returning |
(module
(function_definition
(function_name_full_name_natural_split) function_name_full_name_natural_split
(parameters
(identifier_full_name) identifier_full_name
)parameters
(block
(expression_statement
(assignment
(identifier_parts) identifier_parts
(call
(attribute
(call
(attribute
(identifier_full_name) identifier_full_name
(identifier_strip) identifier_strip
)attribute
(argument_list
)argument_list
)call
(identifier_split) identifier_split
)attribute
(argument_list
(string_' ') string_' '
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_first_name) identifier_first_name
(string_"") string_""
)assignment
)expression_statement
(if_statement
(identifier_parts) identifier_parts
(block
(expression_statement
(assignment
(identifier_first_name) identifier_first_name
(call
(attribute
(identifier_parts) identifier_parts
(identifier_pop) identifier_pop
)attribute
(argument_list
(integer_0) integer_0
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(if_statement
(boolean_operator
(comparison_operator
(call
(attribute
(identifier_first_name) identifier_first_name
(identifier_lower) identifier_lower
)attribute
(argument_list
)argument_list
)call
(string_"el") string_"el"
)comparison_operator
(identifier_parts) identifier_parts
)boolean_operator
(block
(expression_statement
(augmented_assignment
(identifier_first_name) identifier_first_name
(binary_operator
(string_" ") string_" "
(call
(attribute
(identifier_parts) identifier_parts
(identifier_pop) identifier_pop
)attribute
(argument_list
(integer_0) integer_0
)argument_list
)call
)binary_operator
)augmented_assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_last_name) identifier_last_name
(string_"") string_""
)assignment
)expression_statement
(if_statement
(identifier_parts) identifier_parts
(block
(expression_statement
(assignment
(identifier_last_name) identifier_last_name
(call
(attribute
(identifier_parts) identifier_parts
(identifier_pop) identifier_pop
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(if_statement
(parenthesized_expression
(boolean_operator
(boolean_operator
(comparison_operator
(call
(attribute
(identifier_last_name) identifier_last_name
(identifier_lower) identifier_lower
)attribute
(argument_list
)argument_list
)call
(string_'i') string_'i'
)comparison_operator
(comparison_operator
(call
(attribute
(identifier_last_name) identifier_last_name
(identifier_lower) identifier_lower
)attribute
(argument_list
)argument_list
)call
(string_'ii') string_'ii'
)comparison_operator
)boolean_operator
(boolean_operator
(comparison_operator
(call
(attribute
(identifier_last_name) identifier_last_name
(identifier_lower) identifier_lower
)attribute
(argument_list
)argument_list
)call
(string_'iii') string_'iii'
)comparison_operator
(identifier_parts) identifier_parts
)boolean_operator
)boolean_operator
)parenthesized_expression
(block
(expression_statement
(assignment
(identifier_last_name) identifier_last_name
(binary_operator
(binary_operator
(call
(attribute
(identifier_parts) identifier_parts
(identifier_pop) identifier_pop
)attribute
(argument_list
)argument_list
)call
(string_" ") string_" "
)binary_operator
(identifier_last_name) identifier_last_name
)binary_operator
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_middle_initials) identifier_middle_initials
(string_"") string_""
)assignment
)expression_statement
(for_statement
(identifier_middle_name) identifier_middle_name
(identifier_parts) identifier_parts
(block
(if_statement
(identifier_middle_name) identifier_middle_name
(block
(expression_statement
(augmented_assignment
(identifier_middle_initials) identifier_middle_initials
(subscript
(identifier_middle_name) identifier_middle_name
(integer_0) integer_0
)subscript
)augmented_assignment
)expression_statement
)block
)if_statement
)block
)for_statement
(return_statement
(expression_list
(identifier_first_name) identifier_first_name
(identifier_middle_initials) identifier_middle_initials
(identifier_last_name) identifier_last_name
)expression_list
)return_statement
)block
)function_definition
)module | This function splits a full name into a natural first name, last name
and middle initials. |
(module
(function_definition
(function_name_open_browser) function_name_open_browser
(parameters
(typed_parameter
(identifier_url) identifier_url
(type
(identifier_str) identifier_str
)type
)typed_parameter
(typed_default_parameter
(identifier_browser) identifier_browser
(type
(identifier_str) identifier_str
)type
(None) None
)typed_default_parameter
)parameters
(type
(None) None
)type
(block
(if_statement
(comparison_operator
(string_'--open-browser') string_'--open-browser'
(attribute
(identifier_sys) identifier_sys
(identifier_argv) identifier_argv
)attribute
)comparison_operator
(block
(expression_statement
(call
(attribute
(attribute
(identifier_sys) identifier_sys
(identifier_argv) identifier_argv
)attribute
(identifier_remove) identifier_remove
)attribute
(argument_list
(string_'--open-browser') string_'--open-browser'
)argument_list
)call
)expression_statement
)block
)if_statement
(if_statement
(comparison_operator
(identifier_browser) identifier_browser
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(identifier_browser) identifier_browser
(attribute
(identifier_config) identifier_config
(identifier_browser) identifier_browser
)attribute
)assignment
)expression_statement
)block
)if_statement
(if_statement
(comparison_operator
(identifier_browser) identifier_browser
(identifier__browsers) identifier__browsers
)comparison_operator
(block
(expression_statement
(call
(attribute
(call
(attribute
(identifier_webbrowser) identifier_webbrowser
(identifier_get) identifier_get
)attribute
(argument_list
(identifier_browser) identifier_browser
)argument_list
)call
(identifier_open) identifier_open
)attribute
(argument_list
(identifier_url) identifier_url
)argument_list
)call
)expression_statement
)block
(else_clause
(block
(expression_statement
(call
(attribute
(identifier_webbrowser) identifier_webbrowser
(identifier_open) identifier_open
)attribute
(argument_list
(identifier_url) identifier_url
)argument_list
)call
)expression_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module | Open web browser. |
(module
(function_definition
(function_name_get_curve) function_name_get_curve
(parameters
(identifier_self) identifier_self
(identifier_mnemonic) identifier_mnemonic
(default_parameter
(identifier_alias) identifier_alias
(None) None
)default_parameter
)parameters
(block
(return_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_data) identifier_data
)attribute
(identifier_get) identifier_get
)attribute
(argument_list
(call
(attribute
(identifier_self) identifier_self
(identifier_get_mnemonic) identifier_get_mnemonic
)attribute
(argument_list
(identifier_mnemonic) identifier_mnemonic
(keyword_argument
(identifier_alias) identifier_alias
(identifier_alias) identifier_alias
)keyword_argument
)argument_list
)call
(None) None
)argument_list
)call
)return_statement
)block
)function_definition
)module | Wraps get_mnemonic.
Instead of picking curves by name directly from the data dict, you
can pick them up with this method, which takes account of the alias
dict you pass it. If you do not pass an alias dict, then you get the
curve you asked for, if it exists, or None. NB Wells do not have alias
dicts, but Projects do.
Args:
mnemonic (str): the name of the curve you want.
alias (dict): an alias dictionary, mapping mnemonics to lists of
mnemonics.
Returns:
Curve. |
(module
(function_definition
(function_name_calculate_iI_correspondence) function_name_calculate_iI_correspondence
(parameters
(identifier_omega) identifier_omega
)parameters
(block
(expression_statement
(identifier_r) identifier_r
)expression_statement
(expression_statement
(assignment
(identifier_Ne) identifier_Ne
(call
(identifier_len) identifier_len
(argument_list
(subscript
(identifier_omega) identifier_omega
(integer_0) integer_0
)subscript
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_om) identifier_om
(subscript
(subscript
(identifier_omega) identifier_omega
(integer_0) integer_0
)subscript
(integer_0) integer_0
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_correspondence) identifier_correspondence
(list
)list
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_I) identifier_I
(integer_0) integer_0
)assignment
)expression_statement
(for_statement
(identifier_i) identifier_i
(call
(identifier_range) identifier_range
(argument_list
(identifier_Ne) identifier_Ne
)argument_list
)call
(block
(if_statement
(comparison_operator
(subscript
(subscript
(identifier_omega) identifier_omega
(identifier_i) identifier_i
)subscript
(integer_0) integer_0
)subscript
(identifier_om) identifier_om
)comparison_operator
(block
(expression_statement
(assignment
(identifier_om) identifier_om
(subscript
(subscript
(identifier_omega) identifier_omega
(identifier_i) identifier_i
)subscript
(integer_0) integer_0
)subscript
)assignment
)expression_statement
(expression_statement
(augmented_assignment
(identifier_I) identifier_I
(integer_1) integer_1
)augmented_assignment
)expression_statement
)block
)if_statement
(expression_statement
(augmented_assignment
(identifier_correspondence) identifier_correspondence
(list
(tuple
(binary_operator
(identifier_i) identifier_i
(integer_1) integer_1
)binary_operator
(binary_operator
(identifier_I) identifier_I
(integer_1) integer_1
)binary_operator
)tuple
)list
)augmented_assignment
)expression_statement
)block
)for_statement
(expression_statement
(assignment
(identifier_Nnd) identifier_Nnd
(binary_operator
(identifier_I) identifier_I
(integer_1) integer_1
)binary_operator
)assignment
)expression_statement
(function_definition
(function_name_I_nd) function_name_I_nd
(parameters
(identifier_i) identifier_i
)parameters
(block
(return_statement
(subscript
(subscript
(identifier_correspondence) identifier_correspondence
(binary_operator
(identifier_i) identifier_i
(integer_1) integer_1
)binary_operator
)subscript
(integer_1) integer_1
)subscript
)return_statement
)block
)function_definition
(function_definition
(function_name_i_d) function_name_i_d
(parameters
(identifier_I) identifier_I
)parameters
(block
(for_statement
(identifier_i) identifier_i
(call
(identifier_range) identifier_range
(argument_list
(identifier_Ne) identifier_Ne
)argument_list
)call
(block
(if_statement
(comparison_operator
(subscript
(subscript
(identifier_correspondence) identifier_correspondence
(identifier_i) identifier_i
)subscript
(integer_1) integer_1
)subscript
(identifier_I) identifier_I
)comparison_operator
(block
(return_statement
(subscript
(subscript
(identifier_correspondence) identifier_correspondence
(identifier_i) identifier_i
)subscript
(integer_0) integer_0
)subscript
)return_statement
)block
)if_statement
)block
)for_statement
)block
)function_definition
(return_statement
(expression_list
(identifier_i_d) identifier_i_d
(identifier_I_nd) identifier_I_nd
(identifier_Nnd) identifier_Nnd
)expression_list
)return_statement
)block
)function_definition
)module | r"""Get the correspondance between degenerate and nondegenerate schemes. |
(module
(function_definition
(function_name_set) function_name_set
(parameters
(identifier_self) identifier_self
(identifier_key) identifier_key
(identifier_value) identifier_value
)parameters
(block
(return_statement
(call
(attribute
(identifier_self) identifier_self
(identifier___setitem__) identifier___setitem__
)attribute
(argument_list
(identifier_key) identifier_key
(identifier_value) identifier_value
(keyword_argument
(identifier_force) identifier_force
(True) True
)keyword_argument
)argument_list
)call
)return_statement
)block
)function_definition
)module | Set a key's value regardless of whether a change is seen. |
(module
(function_definition
(function_name__create_feed_dict) function_name__create_feed_dict
(parameters
(identifier_self) identifier_self
(identifier_data) identifier_data
)parameters
(block
(return_statement
(dictionary
(pair
(attribute
(identifier_self) identifier_self
(identifier_input_data) identifier_input_data
)attribute
(identifier_data) identifier_data
)pair
(pair
(attribute
(identifier_self) identifier_self
(identifier_hrand) identifier_hrand
)attribute
(call
(attribute
(attribute
(identifier_np) identifier_np
(identifier_random) identifier_random
)attribute
(identifier_rand) identifier_rand
)attribute
(argument_list
(subscript
(attribute
(identifier_data) identifier_data
(identifier_shape) identifier_shape
)attribute
(integer_0) integer_0
)subscript
(attribute
(identifier_self) identifier_self
(identifier_num_hidden) identifier_num_hidden
)attribute
)argument_list
)call
)pair
(pair
(attribute
(identifier_self) identifier_self
(identifier_vrand) identifier_vrand
)attribute
(call
(attribute
(attribute
(identifier_np) identifier_np
(identifier_random) identifier_random
)attribute
(identifier_rand) identifier_rand
)attribute
(argument_list
(subscript
(attribute
(identifier_data) identifier_data
(identifier_shape) identifier_shape
)attribute
(integer_0) integer_0
)subscript
(subscript
(attribute
(identifier_data) identifier_data
(identifier_shape) identifier_shape
)attribute
(integer_1) integer_1
)subscript
)argument_list
)call
)pair
)dictionary
)return_statement
)block
)function_definition
)module | Create the dictionary of data to feed to tf session during training.
:param data: training/validation set batch
:return: dictionary(self.input_data: data, self.hrand: random_uniform,
self.vrand: random_uniform) |
(module
(function_definition
(function_name_expected_counts) function_name_expected_counts
(parameters
(identifier_p0) identifier_p0
(identifier_T) identifier_T
(identifier_N) identifier_N
)parameters
(block
(expression_statement
(identifier_r) identifier_r
)expression_statement
(if_statement
(parenthesized_expression
(comparison_operator
(identifier_N) identifier_N
(integer_0) integer_0
)comparison_operator
)parenthesized_expression
(block
(expression_statement
(assignment
(identifier_EC) identifier_EC
(call
(identifier_coo_matrix) identifier_coo_matrix
(argument_list
(attribute
(identifier_T) identifier_T
(identifier_shape) identifier_shape
)attribute
(keyword_argument
(identifier_dtype) identifier_dtype
(identifier_float) identifier_float
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(return_statement
(identifier_EC) identifier_EC
)return_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_p_k) identifier_p_k
(binary_operator
(float_1.0) float_1.0
(identifier_p0) identifier_p0
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_p_sum) identifier_p_sum
(binary_operator
(float_1.0) float_1.0
(identifier_p_k) identifier_p_k
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_Tt) identifier_Tt
(call
(attribute
(identifier_T) identifier_T
(identifier_transpose) identifier_transpose
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(for_statement
(identifier_k) identifier_k
(call
(attribute
(identifier_np) identifier_np
(identifier_arange) identifier_arange
)attribute
(argument_list
(binary_operator
(identifier_N) identifier_N
(integer_1) integer_1
)binary_operator
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_p_k) identifier_p_k
(call
(attribute
(identifier_Tt) identifier_Tt
(identifier_dot) identifier_dot
)attribute
(argument_list
(identifier_p_k) identifier_p_k
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(augmented_assignment
(identifier_p_sum) identifier_p_sum
(identifier_p_k) identifier_p_k
)augmented_assignment
)expression_statement
)block
)for_statement
(expression_statement
(assignment
(identifier_D_psum) identifier_D_psum
(call
(identifier_diags) identifier_diags
(argument_list
(identifier_p_sum) identifier_p_sum
(integer_0) integer_0
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_EC) identifier_EC
(call
(attribute
(identifier_D_psum) identifier_D_psum
(identifier_dot) identifier_dot
)attribute
(argument_list
(identifier_T) identifier_T
)argument_list
)call
)assignment
)expression_statement
(return_statement
(identifier_EC) identifier_EC
)return_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module | r"""Compute expected transition counts for Markov chain after N steps.
Expected counts are computed according to ..math::
E[C_{ij}^{(n)}]=\sum_{k=0}^{N-1} (p_0^T T^{k})_{i} p_{ij}
Parameters
----------
p0 : (M,) ndarray
Starting (probability) vector of the chain.
T : (M, M) sparse matrix
Transition matrix of the chain.
N : int
Number of steps to take from initial state.
Returns
--------
EC : (M, M) sparse matrix
Expected value for transition counts after N steps. |
(module
(function_definition
(function_name__add_colorbar) function_name__add_colorbar
(parameters
(typed_parameter
(identifier_ax) identifier_ax
(type
(identifier_Axes) identifier_Axes
)type
)typed_parameter
(typed_parameter
(identifier_cmap) identifier_cmap
(type
(attribute
(identifier_colors) identifier_colors
(identifier_Colormap) identifier_Colormap
)attribute
)type
)typed_parameter
(typed_parameter
(identifier_cmap_data) identifier_cmap_data
(type
(attribute
(identifier_np) identifier_np
(identifier_ndarray) identifier_ndarray
)attribute
)type
)typed_parameter
(typed_parameter
(identifier_norm) identifier_norm
(type
(attribute
(identifier_colors) identifier_colors
(identifier_Normalize) identifier_Normalize
)attribute
)type
)typed_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_fig) identifier_fig
(call
(attribute
(identifier_ax) identifier_ax
(identifier_get_figure) identifier_get_figure
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_mappable) identifier_mappable
(call
(attribute
(identifier_cm) identifier_cm
(identifier_ScalarMappable) identifier_ScalarMappable
)attribute
(argument_list
(keyword_argument
(identifier_cmap) identifier_cmap
(identifier_cmap) identifier_cmap
)keyword_argument
(keyword_argument
(identifier_norm) identifier_norm
(identifier_norm) identifier_norm
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_mappable) identifier_mappable
(identifier_set_array) identifier_set_array
)attribute
(argument_list
(identifier_cmap_data) identifier_cmap_data
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_fig) identifier_fig
(identifier_colorbar) identifier_colorbar
)attribute
(argument_list
(identifier_mappable) identifier_mappable
(keyword_argument
(identifier_ax) identifier_ax
(identifier_ax) identifier_ax
)keyword_argument
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Show a colorbar right of the plot. |
(module
(function_definition
(function_name_visit_tryfinally) function_name_visit_tryfinally
(parameters
(identifier_self) identifier_self
(identifier_node) identifier_node
(identifier_parent) identifier_parent
)parameters
(block
(expression_statement
(assignment
(identifier_newnode) identifier_newnode
(call
(attribute
(identifier_nodes) identifier_nodes
(identifier_TryFinally) identifier_TryFinally
)attribute
(argument_list
(attribute
(identifier_node) identifier_node
(identifier_lineno) identifier_lineno
)attribute
(attribute
(identifier_node) identifier_node
(identifier_col_offset) identifier_col_offset
)attribute
(identifier_parent) identifier_parent
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_newnode) identifier_newnode
(identifier_postinit) identifier_postinit
)attribute
(argument_list
(list_comprehension
(call
(attribute
(identifier_self) identifier_self
(identifier_visit) identifier_visit
)attribute
(argument_list
(identifier_child) identifier_child
(identifier_newnode) identifier_newnode
)argument_list
)call
(for_in_clause
(identifier_child) identifier_child
(attribute
(identifier_node) identifier_node
(identifier_body) identifier_body
)attribute
)for_in_clause
)list_comprehension
(list_comprehension
(call
(attribute
(identifier_self) identifier_self
(identifier_visit) identifier_visit
)attribute
(argument_list
(identifier_n) identifier_n
(identifier_newnode) identifier_newnode
)argument_list
)call
(for_in_clause
(identifier_n) identifier_n
(attribute
(identifier_node) identifier_node
(identifier_finalbody) identifier_finalbody
)attribute
)for_in_clause
)list_comprehension
)argument_list
)call
)expression_statement
(return_statement
(identifier_newnode) identifier_newnode
)return_statement
)block
)function_definition
)module | visit a TryFinally node by returning a fresh instance of it |
(module
(function_definition
(function_name_raw_mode) function_name_raw_mode
(parameters
)parameters
(block
(if_statement
(identifier_WIN) identifier_WIN
(block
(expression_statement
(yield
)yield
)expression_statement
)block
(else_clause
(block
(import_statement
(dotted_name
(identifier_tty) identifier_tty
)dotted_name
)import_statement
(import_statement
(dotted_name
(identifier_termios) identifier_termios
)dotted_name
)import_statement
(if_statement
(not_operator
(call
(identifier_isatty) identifier_isatty
(argument_list
(attribute
(identifier_sys) identifier_sys
(identifier_stdin) identifier_stdin
)attribute
)argument_list
)call
)not_operator
(block
(expression_statement
(assignment
(identifier_f) identifier_f
(call
(identifier_open) identifier_open
(argument_list
(string_"/dev/tty") string_"/dev/tty"
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_fd) identifier_fd
(call
(attribute
(identifier_f) identifier_f
(identifier_fileno) identifier_fileno
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_fd) identifier_fd
(call
(attribute
(attribute
(identifier_sys) identifier_sys
(identifier_stdin) identifier_stdin
)attribute
(identifier_fileno) identifier_fileno
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_f) identifier_f
(None) None
)assignment
)expression_statement
)block
)else_clause
)if_statement
(try_statement
(block
(expression_statement
(assignment
(identifier_old_settings) identifier_old_settings
(call
(attribute
(identifier_termios) identifier_termios
(identifier_tcgetattr) identifier_tcgetattr
)attribute
(argument_list
(identifier_fd) identifier_fd
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_tty) identifier_tty
(identifier_setraw) identifier_setraw
)attribute
(argument_list
(identifier_fd) identifier_fd
)argument_list
)call
)expression_statement
)block
(except_clause
(attribute
(identifier_termios) identifier_termios
(identifier_error) identifier_error
)attribute
(block
(pass_statement
)pass_statement
)block
)except_clause
)try_statement
(try_statement
(block
(expression_statement
(yield
)yield
)expression_statement
)block
(finally_clause
(block
(try_statement
(block
(expression_statement
(call
(attribute
(identifier_termios) identifier_termios
(identifier_tcsetattr) identifier_tcsetattr
)attribute
(argument_list
(identifier_fd) identifier_fd
(attribute
(identifier_termios) identifier_termios
(identifier_TCSADRAIN) identifier_TCSADRAIN
)attribute
(identifier_old_settings) identifier_old_settings
)argument_list
)call
)expression_statement
(if_statement
(comparison_operator
(identifier_f) identifier_f
(None) None
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_f) identifier_f
(identifier_close) identifier_close
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)if_statement
)block
(except_clause
(attribute
(identifier_termios) identifier_termios
(identifier_error) identifier_error
)attribute
(block
(pass_statement
)pass_statement
)block
)except_clause
)try_statement
)block
)finally_clause
)try_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module | Enables terminal raw mode during the context.
Note: Currently noop for Windows systems.
Usage: ::
with raw_mode():
do_some_stuff() |
(module
(function_definition
(function_name__printTraceback) function_name__printTraceback
(parameters
(identifier_self) identifier_self
(identifier_test) identifier_test
(identifier_err) identifier_err
)parameters
(block
(expression_statement
(assignment
(pattern_list
(identifier_exception_type) identifier_exception_type
(identifier_exception_value) identifier_exception_value
)pattern_list
(subscript
(identifier_err) identifier_err
(slice
(colon) colon
(integer_2) integer_2
)slice
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_extracted_tb) identifier_extracted_tb
(call
(identifier_extract_relevant_tb) identifier_extract_relevant_tb
(argument_list
(subscript
(identifier_err) identifier_err
(integer_2) integer_2
)subscript
(identifier_exception_type) identifier_exception_type
(comparison_operator
(identifier_exception_type) identifier_exception_type
(attribute
(identifier_test) identifier_test
(identifier_failureException) identifier_failureException
)attribute
)comparison_operator
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_test_frame_index) identifier_test_frame_index
(call
(identifier_index_of_test_frame) identifier_index_of_test_frame
(argument_list
(identifier_extracted_tb) identifier_extracted_tb
(identifier_exception_type) identifier_exception_type
(identifier_exception_value) identifier_exception_value
(identifier_test) identifier_test
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_test_frame_index) identifier_test_frame_index
(block
(expression_statement
(assignment
(identifier_extracted_tb) identifier_extracted_tb
(subscript
(identifier_extracted_tb) identifier_extracted_tb
(slice
(identifier_test_frame_index) identifier_test_frame_index
(colon) colon
)slice
)subscript
)assignment
)expression_statement
)block
)if_statement
(with_statement
(with_clause
(with_item
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_bar) identifier_bar
)attribute
(identifier_dodging) identifier_dodging
)attribute
(argument_list
)argument_list
)call
)with_item
)with_clause
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_stream) identifier_stream
)attribute
(identifier_write) identifier_write
)attribute
(argument_list
(call
(attribute
(string_'') string_''
(identifier_join) identifier_join
)attribute
(argument_list
(call
(identifier_format_traceback) identifier_format_traceback
(argument_list
(identifier_extracted_tb) identifier_extracted_tb
(identifier_exception_type) identifier_exception_type
(identifier_exception_value) identifier_exception_value
(attribute
(identifier_self) identifier_self
(identifier__cwd) identifier__cwd
)attribute
(attribute
(identifier_self) identifier_self
(identifier__term) identifier__term
)attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier__options) identifier__options
)attribute
(identifier_function_color) identifier_function_color
)attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier__options) identifier__options
)attribute
(identifier_dim_color) identifier_dim_color
)attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier__options) identifier__options
)attribute
(identifier_editor) identifier_editor
)attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier__options) identifier__options
)attribute
(identifier_editor_shortcut_template) identifier_editor_shortcut_template
)attribute
)argument_list
)call
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)with_statement
)block
)function_definition
)module | Print a nicely formatted traceback.
:arg err: exc_info()-style traceback triple
:arg test: the test that precipitated this call |
(module
(function_definition
(function_name_amplification_circuit) function_name_amplification_circuit
(parameters
(typed_parameter
(identifier_algorithm) identifier_algorithm
(type
(identifier_Program) identifier_Program
)type
)typed_parameter
(typed_parameter
(identifier_oracle) identifier_oracle
(type
(identifier_Program) identifier_Program
)type
)typed_parameter
(typed_parameter
(identifier_qubits) identifier_qubits
(type
(generic_type
(identifier_List) identifier_List
(type_parameter
(type
(identifier_int) identifier_int
)type
)type_parameter
)generic_type
)type
)typed_parameter
(typed_parameter
(identifier_num_iter) identifier_num_iter
(type
(identifier_int) identifier_int
)type
)typed_parameter
(typed_default_parameter
(identifier_decompose_diffusion) identifier_decompose_diffusion
(type
(identifier_bool) identifier_bool
)type
(False) False
)typed_default_parameter
)parameters
(type
(identifier_Program) identifier_Program
)type
(block
(expression_statement
(assignment
(identifier_program) identifier_program
(call
(identifier_Program) identifier_Program
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_uniform_superimposer) identifier_uniform_superimposer
(call
(attribute
(call
(identifier_Program) identifier_Program
(argument_list
)argument_list
)call
(identifier_inst) identifier_inst
)attribute
(argument_list
(list_comprehension
(call
(identifier_H) identifier_H
(argument_list
(identifier_qubit) identifier_qubit
)argument_list
)call
(for_in_clause
(identifier_qubit) identifier_qubit
(identifier_qubits) identifier_qubits
)for_in_clause
)list_comprehension
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(augmented_assignment
(identifier_program) identifier_program
(identifier_uniform_superimposer) identifier_uniform_superimposer
)augmented_assignment
)expression_statement
(if_statement
(identifier_decompose_diffusion) identifier_decompose_diffusion
(block
(expression_statement
(assignment
(identifier_diffusion) identifier_diffusion
(call
(identifier_decomposed_diffusion_program) identifier_decomposed_diffusion_program
(argument_list
(identifier_qubits) identifier_qubits
)argument_list
)call
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_diffusion) identifier_diffusion
(call
(identifier_diffusion_program) identifier_diffusion_program
(argument_list
(identifier_qubits) identifier_qubits
)argument_list
)call
)assignment
)expression_statement
)block
)else_clause
)if_statement
(expression_statement
(assignment
(identifier_defined_gates) identifier_defined_gates
(binary_operator
(binary_operator
(attribute
(identifier_oracle) identifier_oracle
(identifier_defined_gates) identifier_defined_gates
)attribute
(attribute
(identifier_algorithm) identifier_algorithm
(identifier_defined_gates) identifier_defined_gates
)attribute
)binary_operator
(attribute
(identifier_diffusion) identifier_diffusion
(identifier_defined_gates) identifier_defined_gates
)attribute
)binary_operator
)assignment
)expression_statement
(for_statement
(identifier__) identifier__
(call
(identifier_range) identifier_range
(argument_list
(identifier_num_iter) identifier_num_iter
)argument_list
)call
(block
(expression_statement
(augmented_assignment
(identifier_program) identifier_program
(parenthesized_expression
(binary_operator
(binary_operator
(binary_operator
(attribute
(identifier_oracle) identifier_oracle
(identifier_instructions) identifier_instructions
)attribute
(attribute
(call
(attribute
(identifier_algorithm) identifier_algorithm
(identifier_dagger) identifier_dagger
)attribute
(argument_list
)argument_list
)call
(identifier_instructions) identifier_instructions
)attribute
)binary_operator
(attribute
(identifier_diffusion) identifier_diffusion
(identifier_instructions) identifier_instructions
)attribute
)binary_operator
(attribute
(identifier_algorithm) identifier_algorithm
(identifier_instructions) identifier_instructions
)attribute
)binary_operator
)parenthesized_expression
)augmented_assignment
)expression_statement
)block
)for_statement
(for_statement
(identifier_gate) identifier_gate
(identifier_defined_gates) identifier_defined_gates
(block
(expression_statement
(call
(attribute
(identifier_program) identifier_program
(identifier_defgate) identifier_defgate
)attribute
(argument_list
(attribute
(identifier_gate) identifier_gate
(identifier_name) identifier_name
)attribute
(attribute
(identifier_gate) identifier_gate
(identifier_matrix) identifier_matrix
)attribute
)argument_list
)call
)expression_statement
)block
)for_statement
(return_statement
(identifier_program) identifier_program
)return_statement
)block
)function_definition
)module | Returns a program that does ``num_iter`` rounds of amplification, given a measurement-less
algorithm, an oracle, and a list of qubits to operate on.
:param algorithm: A program representing a measurement-less algorithm run on qubits.
:param oracle: An oracle maps any basis vector ``|psi>`` to either ``+|psi>`` or
``-|psi>`` depending on whether ``|psi>`` is in the desirable subspace or the undesirable
subspace.
:param qubits: the qubits to operate on
:param num_iter: number of iterations of amplifications to run
:param decompose_diffusion: If True, decompose the Grover diffusion gate into two qubit
gates. If False, use a defgate to define the gate.
:return: The amplified algorithm. |
(module
(function_definition
(function_name__waitForSSHPort) function_name__waitForSSHPort
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(call
(attribute
(identifier_logger) identifier_logger
(identifier_debug) identifier_debug
)attribute
(argument_list
(string_'Waiting for ssh port to open...') string_'Waiting for ssh port to open...'
)argument_list
)call
)expression_statement
(for_statement
(identifier_i) identifier_i
(call
(identifier_count) identifier_count
(argument_list
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_s) identifier_s
(call
(attribute
(identifier_socket) identifier_socket
(identifier_socket) identifier_socket
)attribute
(argument_list
(attribute
(identifier_socket) identifier_socket
(identifier_AF_INET) identifier_AF_INET
)attribute
(attribute
(identifier_socket) identifier_socket
(identifier_SOCK_STREAM) identifier_SOCK_STREAM
)attribute
)argument_list
)call
)assignment
)expression_statement
(try_statement
(block
(expression_statement
(call
(attribute
(identifier_s) identifier_s
(identifier_settimeout) identifier_settimeout
)attribute
(argument_list
(identifier_a_short_time) identifier_a_short_time
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_s) identifier_s
(identifier_connect) identifier_connect
)attribute
(argument_list
(tuple
(attribute
(identifier_self) identifier_self
(identifier_effectiveIP) identifier_effectiveIP
)attribute
(integer_22) integer_22
)tuple
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_logger) identifier_logger
(identifier_debug) identifier_debug
)attribute
(argument_list
(string_'...ssh port open') string_'...ssh port open'
)argument_list
)call
)expression_statement
(return_statement
(identifier_i) identifier_i
)return_statement
)block
(except_clause
(attribute
(identifier_socket) identifier_socket
(identifier_error) identifier_error
)attribute
(block
(pass_statement
)pass_statement
)block
)except_clause
(finally_clause
(block
(expression_statement
(call
(attribute
(identifier_s) identifier_s
(identifier_close) identifier_close
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)finally_clause
)try_statement
)block
)for_statement
)block
)function_definition
)module | Wait until the instance represented by this box is accessible via SSH.
:return: the number of unsuccessful attempts to connect to the port before a the first
success |
(module
(function_definition
(function_name_remap_overlapping_column_names) function_name_remap_overlapping_column_names
(parameters
(identifier_table_op) identifier_table_op
(identifier_root_table) identifier_root_table
(identifier_data_columns) identifier_data_columns
)parameters
(block
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_table_op) identifier_table_op
(attribute
(identifier_ops) identifier_ops
(identifier_Join) identifier_Join
)attribute
)argument_list
)call
)not_operator
(block
(return_statement
(None) None
)return_statement
)block
)if_statement
(expression_statement
(assignment
(pattern_list
(identifier_left_root) identifier_left_root
(identifier_right_root) identifier_right_root
)pattern_list
(call
(attribute
(identifier_ops) identifier_ops
(identifier_distinct_roots) identifier_distinct_roots
)attribute
(argument_list
(attribute
(identifier_table_op) identifier_table_op
(identifier_left) identifier_left
)attribute
(attribute
(identifier_table_op) identifier_table_op
(identifier_right) identifier_right
)attribute
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_suffixes) identifier_suffixes
(dictionary
(pair
(identifier_left_root) identifier_left_root
(attribute
(identifier_constants) identifier_constants
(identifier_LEFT_JOIN_SUFFIX) identifier_LEFT_JOIN_SUFFIX
)attribute
)pair
(pair
(identifier_right_root) identifier_right_root
(attribute
(identifier_constants) identifier_constants
(identifier_RIGHT_JOIN_SUFFIX) identifier_RIGHT_JOIN_SUFFIX
)attribute
)pair
)dictionary
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_column_names) identifier_column_names
(list_comprehension
(tuple
(binary_operator
(set
(identifier_name) identifier_name
(binary_operator
(identifier_name) identifier_name
(subscript
(identifier_suffixes) identifier_suffixes
(identifier_root_table) identifier_root_table
)subscript
)binary_operator
)set
(identifier_data_columns) identifier_data_columns
)binary_operator
(identifier_name) identifier_name
)tuple
(for_in_clause
(identifier_name) identifier_name
(attribute
(attribute
(identifier_root_table) identifier_root_table
(identifier_schema) identifier_schema
)attribute
(identifier_names) identifier_names
)attribute
)for_in_clause
)list_comprehension
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_mapping) identifier_mapping
(call
(identifier_OrderedDict) identifier_OrderedDict
(generator_expression
(tuple
(call
(identifier_first) identifier_first
(argument_list
(identifier_col_name) identifier_col_name
)argument_list
)call
(identifier_final_name) identifier_final_name
)tuple
(for_in_clause
(pattern_list
(identifier_col_name) identifier_col_name
(identifier_final_name) identifier_final_name
)pattern_list
(identifier_column_names) identifier_column_names
)for_in_clause
(if_clause
(identifier_col_name) identifier_col_name
)if_clause
)generator_expression
)call
)assignment
)expression_statement
(return_statement
(identifier_mapping) identifier_mapping
)return_statement
)block
)function_definition
)module | Return an ``OrderedDict`` mapping possibly suffixed column names to
column names without suffixes.
Parameters
----------
table_op : TableNode
The ``TableNode`` we're selecting from.
root_table : TableNode
The root table of the expression we're selecting from.
data_columns : set or frozenset
The available columns to select from
Returns
-------
mapping : OrderedDict[str, str]
A map from possibly-suffixed column names to column names without
suffixes. |
(module
(function_definition
(function_name_write_molecule) function_name_write_molecule
(parameters
(identifier_filename) identifier_filename
(default_parameter
(identifier_format) identifier_format
(None) None
)default_parameter
)parameters
(block
(expression_statement
(call
(attribute
(call
(identifier_datafile) identifier_datafile
(argument_list
(identifier_filename) identifier_filename
(keyword_argument
(identifier_format) identifier_format
(identifier_format) identifier_format
)keyword_argument
(keyword_argument
(identifier_mode) identifier_mode
(string_'w') string_'w'
)keyword_argument
)argument_list
)call
(identifier_write) identifier_write
)attribute
(argument_list
(string_'molecule') string_'molecule'
(call
(identifier_current_system) identifier_current_system
(argument_list
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Write the system displayed in a file as a molecule. |
(module
(function_definition
(function_name_mime_type) function_name_mime_type
(parameters
(identifier_self) identifier_self
(identifier_path) identifier_path
)parameters
(block
(expression_statement
(assignment
(pattern_list
(identifier_name) identifier_name
(identifier_ext) identifier_ext
)pattern_list
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_splitext) identifier_splitext
)attribute
(argument_list
(identifier_path) identifier_path
)argument_list
)call
)assignment
)expression_statement
(return_statement
(subscript
(identifier_MIME_TYPES) identifier_MIME_TYPES
(identifier_ext) identifier_ext
)subscript
)return_statement
)block
)function_definition
)module | Get mime-type from filename |
(module
(function_definition
(function_name_check_verifier) function_name_check_verifier
(parameters
(identifier_self) identifier_self
(identifier_verifier) identifier_verifier
)parameters
(block
(expression_statement
(assignment
(pattern_list
(identifier_lower) identifier_lower
(identifier_upper) identifier_upper
)pattern_list
(attribute
(identifier_self) identifier_self
(identifier_verifier_length) identifier_verifier_length
)attribute
)assignment
)expression_statement
(return_statement
(parenthesized_expression
(boolean_operator
(comparison_operator
(call
(identifier_set) identifier_set
(argument_list
(identifier_verifier) identifier_verifier
)argument_list
)call
(attribute
(identifier_self) identifier_self
(identifier_safe_characters) identifier_safe_characters
)attribute
)comparison_operator
(comparison_operator
(identifier_lower) identifier_lower
(call
(identifier_len) identifier_len
(argument_list
(identifier_verifier) identifier_verifier
)argument_list
)call
(identifier_upper) identifier_upper
)comparison_operator
)boolean_operator
)parenthesized_expression
)return_statement
)block
)function_definition
)module | Checks that the verifier contains only safe characters
and is no shorter than lower and no longer than upper. |
(module
(function_definition
(function_name_get_export_configuration) function_name_get_export_configuration
(parameters
(identifier_self) identifier_self
(identifier_config_id) identifier_config_id
)parameters
(block
(expression_statement
(assignment
(identifier_sql) identifier_sql
(parenthesized_expression
(concatenated_string
(string_'SELECT uid, exportConfigId, exportType, searchString, targetURL, ') string_'SELECT uid, exportConfigId, exportType, searchString, targetURL, '
(string_'targetUser, targetPassword, exportName, description, active ') string_'targetUser, targetPassword, exportName, description, active '
(string_'FROM archive_exportConfig WHERE exportConfigId = %s') string_'FROM archive_exportConfig WHERE exportConfigId = %s'
)concatenated_string
)parenthesized_expression
)assignment
)expression_statement
(return_statement
(call
(identifier_first_from_generator) identifier_first_from_generator
(argument_list
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_generators) identifier_generators
)attribute
(identifier_export_configuration_generator) identifier_export_configuration_generator
)attribute
(argument_list
(keyword_argument
(identifier_sql) identifier_sql
(identifier_sql) identifier_sql
)keyword_argument
(keyword_argument
(identifier_sql_args) identifier_sql_args
(tuple
(identifier_config_id) identifier_config_id
)tuple
)keyword_argument
)argument_list
)call
)argument_list
)call
)return_statement
)block
)function_definition
)module | Retrieve the ExportConfiguration with the given ID
:param string config_id:
ID for which to search
:return:
a :class:`meteorpi_model.ExportConfiguration` or None, or no match was found. |
(module
(function_definition
(function_name_received_message) function_name_received_message
(parameters
(identifier_self) identifier_self
(identifier_m) identifier_m
)parameters
(block
(expression_statement
(assignment
(identifier_m) identifier_m
(call
(identifier_str) identifier_str
(argument_list
(identifier_m) identifier_m
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_logger) identifier_logger
(identifier_debug) identifier_debug
)attribute
(argument_list
(string_"Incoming upstream WS: %s") string_"Incoming upstream WS: %s"
(identifier_m) identifier_m
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_uwsgi) identifier_uwsgi
(identifier_websocket_send) identifier_websocket_send
)attribute
(argument_list
(identifier_m) identifier_m
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_logger) identifier_logger
(identifier_debug) identifier_debug
)attribute
(argument_list
(string_"Send ok") string_"Send ok"
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Push upstream messages to downstream. |
(module
(function_definition
(function_name_determine_emitter) function_name_determine_emitter
(parameters
(identifier_cls) identifier_cls
(identifier_request) identifier_request
)parameters
(block
(expression_statement
(assignment
(identifier_default_emitter) identifier_default_emitter
(subscript
(attribute
(attribute
(identifier_cls) identifier_cls
(identifier__meta) identifier__meta
)attribute
(identifier_emitters) identifier_emitters
)attribute
(integer_0) integer_0
)subscript
)assignment
)expression_statement
(if_statement
(not_operator
(identifier_request) identifier_request
)not_operator
(block
(return_statement
(identifier_default_emitter) identifier_default_emitter
)return_statement
)block
)if_statement
(if_statement
(comparison_operator
(attribute
(identifier_request) identifier_request
(identifier_method) identifier_method
)attribute
(string_'OPTIONS') string_'OPTIONS'
)comparison_operator
(block
(return_statement
(identifier_JSONEmitter) identifier_JSONEmitter
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_accept) identifier_accept
(call
(attribute
(attribute
(identifier_request) identifier_request
(identifier_META) identifier_META
)attribute
(identifier_get) identifier_get
)attribute
(argument_list
(string_'HTTP_ACCEPT') string_'HTTP_ACCEPT'
(string_'*/*') string_'*/*'
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_accept) identifier_accept
(string_'*/*') string_'*/*'
)comparison_operator
(block
(return_statement
(identifier_default_emitter) identifier_default_emitter
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_base_format) identifier_base_format
(call
(attribute
(identifier_mimeparse) identifier_mimeparse
(identifier_best_match) identifier_best_match
)attribute
(argument_list
(call
(attribute
(attribute
(attribute
(identifier_cls) identifier_cls
(identifier__meta) identifier__meta
)attribute
(identifier_emitters_dict) identifier_emitters_dict
)attribute
(identifier_keys) identifier_keys
)attribute
(argument_list
)argument_list
)call
(identifier_accept) identifier_accept
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(attribute
(attribute
(identifier_cls) identifier_cls
(identifier__meta) identifier__meta
)attribute
(identifier_emitters_dict) identifier_emitters_dict
)attribute
(identifier_get) identifier_get
)attribute
(argument_list
(identifier_base_format) identifier_base_format
(identifier_default_emitter) identifier_default_emitter
)argument_list
)call
)return_statement
)block
)function_definition
)module | Get emitter for request.
:return emitter: Instance of adrest.utils.emitters.BaseEmitter |
(module
(function_definition
(function_name_add_list) function_name_add_list
(parameters
(identifier_self) identifier_self
(identifier_bl) identifier_bl
)parameters
(block
(if_statement
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_cur_element) identifier_cur_element
)attribute
(None) None
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_add_text_frame) identifier_add_text_frame
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)if_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_push_element) identifier_push_element
)attribute
(argument_list
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier_cur_element) identifier_cur_element
)attribute
(identifier__text_box) identifier__text_box
)attribute
(identifier_append) identifier_append
)attribute
(argument_list
(attribute
(identifier_bl) identifier_bl
(identifier_node) identifier_node
)attribute
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_style) identifier_style
(attribute
(identifier_bl) identifier_bl
(identifier_style_name) identifier_style_name
)attribute
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_style) identifier_style
(attribute
(attribute
(identifier_self) identifier_self
(identifier__preso) identifier__preso
)attribute
(identifier__styles_added) identifier__styles_added
)attribute
)comparison_operator
(block
(expression_statement
(assignment
(subscript
(attribute
(attribute
(identifier_self) identifier_self
(identifier__preso) identifier__preso
)attribute
(identifier__styles_added) identifier__styles_added
)attribute
(identifier_style) identifier_style
)subscript
(integer_1) integer_1
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_content) identifier_content
(subscript
(call
(attribute
(identifier_bl) identifier_bl
(identifier_default_styles_root) identifier_default_styles_root
)attribute
(argument_list
)argument_list
)call
(integer_0) integer_0
)subscript
)assignment
)expression_statement
(expression_statement
(call
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier__preso) identifier__preso
)attribute
(identifier__auto_styles) identifier__auto_styles
)attribute
(identifier_append) identifier_append
)attribute
(argument_list
(identifier_content) identifier_content
)argument_list
)call
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_cur_element) identifier_cur_element
)attribute
(identifier_bl) identifier_bl
)assignment
)expression_statement
)block
)function_definition
)module | note that this pushes the cur_element, but doesn't pop it.
You'll need to do that |
(module
(function_definition
(function_name__update_card_file_location) function_name__update_card_file_location
(parameters
(identifier_self) identifier_self
(identifier_card_name) identifier_card_name
(identifier_new_directory) identifier_new_directory
)parameters
(block
(with_statement
(with_clause
(with_item
(call
(identifier_tmp_chdir) identifier_tmp_chdir
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_gssha_directory) identifier_gssha_directory
)attribute
)argument_list
)call
)with_item
)with_clause
(block
(expression_statement
(assignment
(identifier_file_card) identifier_file_card
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_project_manager) identifier_project_manager
)attribute
(identifier_getCard) identifier_getCard
)attribute
(argument_list
(identifier_card_name) identifier_card_name
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_file_card) identifier_file_card
(block
(if_statement
(attribute
(identifier_file_card) identifier_file_card
(identifier_value) identifier_value
)attribute
(block
(expression_statement
(assignment
(identifier_original_location) identifier_original_location
(call
(attribute
(call
(attribute
(attribute
(identifier_file_card) identifier_file_card
(identifier_value) identifier_value
)attribute
(identifier_strip) identifier_strip
)attribute
(argument_list
(string_"'") string_"'"
)argument_list
)call
(identifier_strip) identifier_strip
)attribute
(argument_list
(string_'"') string_'"'
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_new_location) identifier_new_location
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_join) identifier_join
)attribute
(argument_list
(identifier_new_directory) identifier_new_directory
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_basename) identifier_basename
)attribute
(argument_list
(identifier_original_location) identifier_original_location
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_file_card) identifier_file_card
(identifier_value) identifier_value
)attribute
(call
(attribute
(string_'"{0}"') string_'"{0}"'
(identifier_format) identifier_format
)attribute
(argument_list
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_basename) identifier_basename
)attribute
(argument_list
(identifier_original_location) identifier_original_location
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(try_statement
(block
(expression_statement
(call
(identifier_move) identifier_move
(argument_list
(identifier_original_location) identifier_original_location
(identifier_new_location) identifier_new_location
)argument_list
)call
)expression_statement
)block
(except_clause
(as_pattern
(identifier_OSError) identifier_OSError
(as_pattern_target
(identifier_ex) identifier_ex
)as_pattern_target
)as_pattern
(block
(expression_statement
(call
(attribute
(identifier_log) identifier_log
(identifier_warning) identifier_warning
)attribute
(argument_list
(identifier_ex) identifier_ex
)argument_list
)call
)expression_statement
(pass_statement
)pass_statement
)block
)except_clause
)try_statement
)block
)if_statement
)block
)if_statement
)block
)with_statement
)block
)function_definition
)module | Moves card to new gssha working directory |
(module
(function_definition
(function_name_iter_generic_bases) function_name_iter_generic_bases
(parameters
(identifier_type_) identifier_type_
)parameters
(block
(for_statement
(identifier_t) identifier_t
(attribute
(identifier_type_) identifier_type_
(identifier___mro__) identifier___mro__
)attribute
(block
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_t) identifier_t
(attribute
(identifier_typing) identifier_typing
(identifier_GenericMeta) identifier_GenericMeta
)attribute
)argument_list
)call
)not_operator
(block
(continue_statement
)continue_statement
)block
)if_statement
(expression_statement
(yield
(identifier_t) identifier_t
)yield
)expression_statement
(expression_statement
(assignment
(identifier_t) identifier_t
(attribute
(identifier_t) identifier_t
(identifier___origin__) identifier___origin__
)attribute
)assignment
)expression_statement
(while_statement
(identifier_t) identifier_t
(block
(expression_statement
(yield
(identifier_t) identifier_t
)yield
)expression_statement
(expression_statement
(assignment
(identifier_t) identifier_t
(attribute
(identifier_t) identifier_t
(identifier___origin__) identifier___origin__
)attribute
)assignment
)expression_statement
)block
)while_statement
)block
)for_statement
)block
)function_definition
)module | Iterates over all generics `type_` derives from, including origins.
This function is only necessary because, in typing 3.5.0, a generic doesn't
get included in the list of bases when it constructs a parameterized version
of itself. This was fixed in aab2c59; now it would be enough to just iterate
over the MRO. |
(module
(function_definition
(function_name_resolve_deps) function_name_resolve_deps
(parameters
(identifier_self) identifier_self
(identifier_obj) identifier_obj
)parameters
(block
(expression_statement
(assignment
(identifier_deps) identifier_deps
(call
(attribute
(identifier_self) identifier_self
(identifier_get_deps) identifier_get_deps
)attribute
(argument_list
(identifier_obj) identifier_obj
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(identifier_list) identifier_list
(argument_list
(call
(attribute
(identifier_self) identifier_self
(identifier_iresolve) identifier_iresolve
)attribute
(argument_list
(list_splat
(identifier_deps) identifier_deps
)list_splat
)argument_list
)call
)argument_list
)call
)return_statement
)block
)function_definition
)module | Returns list of resolved dependencies for given obj.
:param obj: Object to lookup dependencies for
:type obj: object
:return: Resolved dependencies
:rtype: list |
(module
(function_definition
(function_name_authenticate) function_name_authenticate
(parameters
(identifier_self) identifier_self
(identifier_username) identifier_username
(identifier_password) identifier_password
)parameters
(block
(if_statement
(boolean_operator
(comparison_operator
(identifier_username) identifier_username
(None) None
)comparison_operator
(comparison_operator
(identifier_password) identifier_password
(None) None
)comparison_operator
)boolean_operator
(block
(return_statement
(False) False
)return_statement
)block
)if_statement
(if_statement
(not_operator
(call
(attribute
(identifier_re) identifier_re
(identifier_match) identifier_match
)attribute
(argument_list
(string_"^[A-Za-z0-9_-]*$") string_"^[A-Za-z0-9_-]*$"
(identifier_username) identifier_username
)argument_list
)call
)not_operator
(block
(return_statement
(False) False
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_user_dn) identifier_user_dn
(call
(attribute
(identifier_self) identifier_self
(identifier_get_user_dn) identifier_get_user_dn
)attribute
(argument_list
(identifier_username) identifier_username
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_server) identifier_server
(call
(attribute
(identifier_ldap3) identifier_ldap3
(identifier_Server) identifier_Server
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_uri) identifier_uri
)attribute
(keyword_argument
(identifier_use_ssl) identifier_use_ssl
(attribute
(identifier_self) identifier_self
(identifier_use_ssl) identifier_use_ssl
)attribute
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_connection) identifier_connection
(call
(attribute
(identifier_ldap3) identifier_ldap3
(identifier_Connection) identifier_Connection
)attribute
(argument_list
(identifier_server) identifier_server
(keyword_argument
(identifier_user) identifier_user
(identifier_user_dn) identifier_user_dn
)keyword_argument
(keyword_argument
(identifier_password) identifier_password
(identifier_password) identifier_password
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_connection) identifier_connection
(identifier_bind) identifier_bind
)attribute
(argument_list
)argument_list
)call
)return_statement
)block
)function_definition
)module | Authenticate the user with a bind on the LDAP server |
(module
(function_definition
(function_name_class_name_to_resource_name) function_name_class_name_to_resource_name
(parameters
(typed_parameter
(identifier_class_name) identifier_class_name
(type
(identifier_str) identifier_str
)type
)typed_parameter
)parameters
(type
(identifier_str) identifier_str
)type
(block
(expression_statement
(assignment
(identifier_s) identifier_s
(call
(attribute
(identifier_re) identifier_re
(identifier_sub) identifier_sub
)attribute
(argument_list
(string_'(.)([A-Z][a-z]+)') string_'(.)([A-Z][a-z]+)'
(string_r'\1 \2') string_r'\1 \2'
(identifier_class_name) identifier_class_name
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_re) identifier_re
(identifier_sub) identifier_sub
)attribute
(argument_list
(string_'([a-z0-9])([A-Z])') string_'([a-z0-9])([A-Z])'
(string_r'\1 \2') string_r'\1 \2'
(identifier_s) identifier_s
)argument_list
)call
)return_statement
)block
)function_definition
)module | Converts a camel case class name to a resource name with spaces.
>>> class_name_to_resource_name('FooBarObject')
'Foo Bar Object'
:param class_name: The name to convert.
:returns: The resource name. |
(module
(function_definition
(function_name__run_argparser) function_name__run_argparser
(parameters
(identifier_self) identifier_self
(identifier_argv) identifier_argv
)parameters
(block
(if_statement
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier__parser) identifier__parser
)attribute
(None) None
)comparison_operator
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(string_'Link was not given a parser on initialization') string_'Link was not given a parser on initialization'
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_args) identifier_args
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__parser) identifier__parser
)attribute
(identifier_parse_args) identifier_parse_args
)attribute
(argument_list
(identifier_argv) identifier_argv
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_update_args) identifier_update_args
)attribute
(argument_list
(attribute
(identifier_args) identifier_args
(identifier___dict__) identifier___dict__
)attribute
)argument_list
)call
)expression_statement
(return_statement
(identifier_args) identifier_args
)return_statement
)block
)function_definition
)module | Initialize a link with a set of arguments using an `argparser.ArgumentParser` |
(module
(function_definition
(function_name_secret_absent) function_name_secret_absent
(parameters
(identifier_name) identifier_name
(default_parameter
(identifier_namespace) identifier_namespace
(string_'default') string_'default'
)default_parameter
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(expression_statement
(assignment
(identifier_ret) identifier_ret
(dictionary
(pair
(string_'name') string_'name'
(identifier_name) identifier_name
)pair
(pair
(string_'changes') string_'changes'
(dictionary
)dictionary
)pair
(pair
(string_'result') string_'result'
(False) False
)pair
(pair
(string_'comment') string_'comment'
(string_'') string_''
)pair
)dictionary
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_secret) identifier_secret
(call
(subscript
(identifier___salt__) identifier___salt__
(string_'kubernetes.show_secret') string_'kubernetes.show_secret'
)subscript
(argument_list
(identifier_name) identifier_name
(identifier_namespace) identifier_namespace
(dictionary_splat
(identifier_kwargs) identifier_kwargs
)dictionary_splat
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_secret) identifier_secret
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(subscript
(identifier_ret) identifier_ret
(string_'result') string_'result'
)subscript
(conditional_expression
(True) True
(not_operator
(subscript
(identifier___opts__) identifier___opts__
(string_'test') string_'test'
)subscript
)not_operator
(None) None
)conditional_expression
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_ret) identifier_ret
(string_'comment') string_'comment'
)subscript
(string_'The secret does not exist') string_'The secret does not exist'
)assignment
)expression_statement
(return_statement
(identifier_ret) identifier_ret
)return_statement
)block
)if_statement
(if_statement
(subscript
(identifier___opts__) identifier___opts__
(string_'test') string_'test'
)subscript
(block
(expression_statement
(assignment
(subscript
(identifier_ret) identifier_ret
(string_'comment') string_'comment'
)subscript
(string_'The secret is going to be deleted') string_'The secret is going to be deleted'
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_ret) identifier_ret
(string_'result') string_'result'
)subscript
(None) None
)assignment
)expression_statement
(return_statement
(identifier_ret) identifier_ret
)return_statement
)block
)if_statement
(expression_statement
(call
(subscript
(identifier___salt__) identifier___salt__
(string_'kubernetes.delete_secret') string_'kubernetes.delete_secret'
)subscript
(argument_list
(identifier_name) identifier_name
(identifier_namespace) identifier_namespace
(dictionary_splat
(identifier_kwargs) identifier_kwargs
)dictionary_splat
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_ret) identifier_ret
(string_'result') string_'result'
)subscript
(True) True
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_ret) identifier_ret
(string_'changes') string_'changes'
)subscript
(dictionary
(pair
(string_'kubernetes.secret') string_'kubernetes.secret'
(dictionary
(pair
(string_'new') string_'new'
(string_'absent') string_'absent'
)pair
(pair
(string_'old') string_'old'
(string_'present') string_'present'
)pair
)dictionary
)pair
)dictionary
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_ret) identifier_ret
(string_'comment') string_'comment'
)subscript
(string_'Secret deleted') string_'Secret deleted'
)assignment
)expression_statement
(return_statement
(identifier_ret) identifier_ret
)return_statement
)block
)function_definition
)module | Ensures that the named secret is absent from the given namespace.
name
The name of the secret
namespace
The name of the namespace |
(module
(function_definition
(function_name_from_raw_message) function_name_from_raw_message
(parameters
(identifier_cls) identifier_cls
(identifier_rawmessage) identifier_rawmessage
)parameters
(block
(expression_statement
(assignment
(identifier_empty) identifier_empty
(call
(attribute
(identifier_cls) identifier_cls
(identifier_create_empty) identifier_create_empty
)attribute
(argument_list
(integer_0x00) integer_0x00
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_userdata_dict) identifier_userdata_dict
(call
(attribute
(identifier_cls) identifier_cls
(identifier_normalize) identifier_normalize
)attribute
(argument_list
(identifier_empty) identifier_empty
(identifier_rawmessage) identifier_rawmessage
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(identifier_Userdata) identifier_Userdata
(argument_list
(identifier_userdata_dict) identifier_userdata_dict
)argument_list
)call
)return_statement
)block
)function_definition
)module | Create a user data instance from a raw byte stream. |
(module
(function_definition
(function_name_update) function_name_update
(parameters
(identifier_self) identifier_self
(identifier_batch_size) identifier_batch_size
(default_parameter
(identifier_ignore_stale_grad) identifier_ignore_stale_grad
(False) False
)default_parameter
)parameters
(block
(if_statement
(not_operator
(attribute
(identifier_self) identifier_self
(identifier__kv_initialized) identifier__kv_initialized
)attribute
)not_operator
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__init_kvstore) identifier__init_kvstore
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)if_statement
(if_statement
(attribute
(identifier_self) identifier_self
(identifier__params_to_init) identifier__params_to_init
)attribute
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__init_params) identifier__init_params
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)if_statement
(assert_statement
(not_operator
(parenthesized_expression
(boolean_operator
(attribute
(identifier_self) identifier_self
(identifier__kvstore) identifier__kvstore
)attribute
(attribute
(identifier_self) identifier_self
(identifier__update_on_kvstore) identifier__update_on_kvstore
)attribute
)boolean_operator
)parenthesized_expression
)not_operator
(concatenated_string
(string_'update() when parameters are updated on kvstore ') string_'update() when parameters are updated on kvstore '
(string_'is not supported. Try setting `update_on_kvstore` ') string_'is not supported. Try setting `update_on_kvstore` '
(string_'to False when creating trainer.') string_'to False when creating trainer.'
)concatenated_string
)assert_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__check_and_rescale_grad) identifier__check_and_rescale_grad
)attribute
(argument_list
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier__scale) identifier__scale
)attribute
(identifier_batch_size) identifier_batch_size
)binary_operator
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__update) identifier__update
)attribute
(argument_list
(identifier_ignore_stale_grad) identifier_ignore_stale_grad
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Makes one step of parameter update.
Should be called after `autograd.backward()` and outside of `record()` scope,
and after `trainer.update()`.
For normal parameter updates, `step()` should be used, which internally calls
`allreduce_grads()` and then `update()`. However, if you need to get the reduced
gradients to perform certain transformation, such as in gradient clipping, then
you may want to manually call `allreduce_grads()` and `update()` separately.
Parameters
----------
batch_size : int
Batch size of data processed. Gradient will be normalized by `1/batch_size`.
Set this to 1 if you normalized loss manually with `loss = mean(loss)`.
ignore_stale_grad : bool, optional, default=False
If true, ignores Parameters with stale gradient (gradient that has not
been updated by `backward` after last step) and skip update. |
(module
(function_definition
(function_name_get_entry) function_name_get_entry
(parameters
(identifier_user) identifier_user
(default_parameter
(identifier_identifier) identifier_identifier
(None) None
)default_parameter
(default_parameter
(identifier_cmd) identifier_cmd
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_cron_entries) identifier_cron_entries
(call
(attribute
(call
(identifier_list_tab) identifier_list_tab
(argument_list
(identifier_user) identifier_user
)argument_list
)call
(identifier_get) identifier_get
)attribute
(argument_list
(string_'crons') string_'crons'
(False) False
)argument_list
)call
)assignment
)expression_statement
(for_statement
(identifier_cron_entry) identifier_cron_entry
(identifier_cron_entries) identifier_cron_entries
(block
(if_statement
(boolean_operator
(identifier_identifier) identifier_identifier
(comparison_operator
(call
(attribute
(identifier_cron_entry) identifier_cron_entry
(identifier_get) identifier_get
)attribute
(argument_list
(string_'identifier') string_'identifier'
)argument_list
)call
(identifier_identifier) identifier_identifier
)comparison_operator
)boolean_operator
(block
(return_statement
(identifier_cron_entry) identifier_cron_entry
)return_statement
)block
(elif_clause
(boolean_operator
(identifier_cmd) identifier_cmd
(comparison_operator
(call
(attribute
(identifier_cron_entry) identifier_cron_entry
(identifier_get) identifier_get
)attribute
(argument_list
(string_'cmd') string_'cmd'
)argument_list
)call
(identifier_cmd) identifier_cmd
)comparison_operator
)boolean_operator
(block
(return_statement
(identifier_cron_entry) identifier_cron_entry
)return_statement
)block
)elif_clause
)if_statement
)block
)for_statement
(return_statement
(False) False
)return_statement
)block
)function_definition
)module | Return the specified entry from user's crontab.
identifier will be used if specified, otherwise will lookup cmd
Either identifier or cmd should be specified.
user:
User's crontab to query
identifier:
Search for line with identifier
cmd:
Search for cron line with cmd
CLI Example:
.. code-block:: bash
salt '*' cron.identifier_exists root identifier=task1 |
(module
(function_definition
(function_name_get_render_language) function_name_get_render_language
(parameters
(identifier_contentitem) identifier_contentitem
)parameters
(block
(expression_statement
(assignment
(identifier_plugin) identifier_plugin
(attribute
(identifier_contentitem) identifier_contentitem
(identifier_plugin) identifier_plugin
)attribute
)assignment
)expression_statement
(if_statement
(boolean_operator
(attribute
(identifier_plugin) identifier_plugin
(identifier_render_ignore_item_language) identifier_render_ignore_item_language
)attribute
(line_continuation_\) line_continuation_\
(parenthesized_expression
(boolean_operator
(attribute
(identifier_plugin) identifier_plugin
(identifier_cache_output) identifier_cache_output
)attribute
(attribute
(identifier_plugin) identifier_plugin
(identifier_cache_output_per_language) identifier_cache_output_per_language
)attribute
)boolean_operator
)parenthesized_expression
)boolean_operator
(block
(return_statement
(call
(identifier_get_language) identifier_get_language
(argument_list
)argument_list
)call
)return_statement
)block
(else_clause
(block
(return_statement
(attribute
(identifier_contentitem) identifier_contentitem
(identifier_language_code) identifier_language_code
)attribute
)return_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module | Tell which language should be used to render the content item. |
(module
(function_definition
(function_name_get_action_cache) function_name_get_action_cache
(parameters
(identifier_self) identifier_self
(identifier_action_key) identifier_action_key
)parameters
(block
(expression_statement
(assignment
(identifier_data) identifier_data
(None) None
)assignment
)expression_statement
(if_statement
(attribute
(identifier_self) identifier_self
(identifier_cache) identifier_cache
)attribute
(block
(expression_statement
(assignment
(identifier_data) identifier_data
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_cache) identifier_cache
)attribute
(identifier_get) identifier_get
)attribute
(argument_list
(binary_operator
(subscript
(attribute
(attribute
(identifier_self) identifier_self
(identifier_app) identifier_app
)attribute
(identifier_config) identifier_config
)attribute
(string_'ACCESS_ACTION_CACHE_PREFIX') string_'ACCESS_ACTION_CACHE_PREFIX'
)subscript
(identifier_action_key) identifier_action_key
)binary_operator
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(return_statement
(identifier_data) identifier_data
)return_statement
)block
)function_definition
)module | Get action needs and excludes from cache.
.. note:: It returns the action if a cache system is defined.
:param action_key: The unique action name.
:returns: The action stored in cache or ``None``. |
(module
(function_definition
(function_name__disabled) function_name__disabled
(parameters
(identifier_funs) identifier_funs
)parameters
(block
(expression_statement
(assignment
(identifier_ret) identifier_ret
(list
)list
)assignment
)expression_statement
(expression_statement
(assignment
(identifier__disabled) identifier__disabled
(call
(subscript
(identifier___salt__) identifier___salt__
(string_'grains.get') string_'grains.get'
)subscript
(argument_list
(string_'state_runs_disabled') string_'state_runs_disabled'
)argument_list
)call
)assignment
)expression_statement
(for_statement
(identifier_state) identifier_state
(identifier_funs) identifier_funs
(block
(for_statement
(identifier__state) identifier__state
(identifier__disabled) identifier__disabled
(block
(if_statement
(comparison_operator
(string_'.*') string_'.*'
(identifier__state) identifier__state
)comparison_operator
(block
(expression_statement
(assignment
(identifier_target_state) identifier_target_state
(subscript
(call
(attribute
(identifier__state) identifier__state
(identifier_split) identifier_split
)attribute
(argument_list
(string_'.') string_'.'
)argument_list
)call
(integer_0) integer_0
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_target_state) identifier_target_state
(conditional_expression
(binary_operator
(identifier_target_state) identifier_target_state
(string_'.') string_'.'
)binary_operator
(not_operator
(call
(attribute
(identifier_target_state) identifier_target_state
(identifier_endswith) identifier_endswith
)attribute
(argument_list
(string_'.') string_'.'
)argument_list
)call
)not_operator
(identifier_target_state) identifier_target_state
)conditional_expression
)assignment
)expression_statement
(if_statement
(call
(attribute
(identifier_state) identifier_state
(identifier_startswith) identifier_startswith
)attribute
(argument_list
(identifier_target_state) identifier_target_state
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_err) identifier_err
(call
(attribute
(parenthesized_expression
(concatenated_string
(string_'The state file "{0}" is currently disabled by "{1}", ') string_'The state file "{0}" is currently disabled by "{1}", '
(string_'to re-enable, run state.enable {1}.') string_'to re-enable, run state.enable {1}.'
)concatenated_string
)parenthesized_expression
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_state) identifier_state
(identifier__state) identifier__state
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_ret) identifier_ret
(identifier_append) identifier_append
)attribute
(argument_list
(identifier_err) identifier_err
)argument_list
)call
)expression_statement
(continue_statement
)continue_statement
)block
)if_statement
)block
(else_clause
(block
(if_statement
(comparison_operator
(identifier__state) identifier__state
(identifier_state) identifier_state
)comparison_operator
(block
(expression_statement
(assignment
(identifier_err) identifier_err
(call
(attribute
(parenthesized_expression
(concatenated_string
(string_'The state file "{0}" is currently disabled, ') string_'The state file "{0}" is currently disabled, '
(string_'to re-enable, run state.enable {0}.') string_'to re-enable, run state.enable {0}.'
)concatenated_string
)parenthesized_expression
(identifier_format) identifier_format
)attribute
(argument_list
(identifier__state) identifier__state
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_ret) identifier_ret
(identifier_append) identifier_append
)attribute
(argument_list
(identifier_err) identifier_err
)argument_list
)call
)expression_statement
(continue_statement
)continue_statement
)block
)if_statement
)block
)else_clause
)if_statement
)block
)for_statement
)block
)for_statement
(return_statement
(identifier_ret) identifier_ret
)return_statement
)block
)function_definition
)module | Return messages for disabled states
that match state functions in funs. |
(module
(function_definition
(function_name_authenticate_request) function_name_authenticate_request
(parameters
(identifier_self) identifier_self
(identifier_method) identifier_method
(default_parameter
(identifier_bucket) identifier_bucket
(string_'') string_''
)default_parameter
(default_parameter
(identifier_key) identifier_key
(string_'') string_''
)default_parameter
(default_parameter
(identifier_headers) identifier_headers
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_path) identifier_path
(call
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier_conn) identifier_conn
)attribute
(identifier_calling_format) identifier_calling_format
)attribute
(identifier_build_path_base) identifier_build_path_base
)attribute
(argument_list
(identifier_bucket) identifier_bucket
(identifier_key) identifier_key
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_auth_path) identifier_auth_path
(call
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier_conn) identifier_conn
)attribute
(identifier_calling_format) identifier_calling_format
)attribute
(identifier_build_auth_path) identifier_build_auth_path
)attribute
(argument_list
(identifier_bucket) identifier_bucket
(identifier_key) identifier_key
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_http_request) identifier_http_request
(call
(attribute
(attribute
(attribute
(identifier_boto) identifier_boto
(identifier_connection) identifier_connection
)attribute
(identifier_AWSAuthConnection) identifier_AWSAuthConnection
)attribute
(identifier_build_base_http_request) identifier_build_base_http_request
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_conn) identifier_conn
)attribute
(identifier_method) identifier_method
(identifier_path) identifier_path
(identifier_auth_path) identifier_auth_path
(dictionary
)dictionary
(identifier_headers) identifier_headers
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_http_request) identifier_http_request
(identifier_authorize) identifier_authorize
)attribute
(argument_list
(keyword_argument
(identifier_connection) identifier_connection
(attribute
(identifier_self) identifier_self
(identifier_conn) identifier_conn
)attribute
)keyword_argument
)argument_list
)call
)expression_statement
(return_statement
(identifier_http_request) identifier_http_request
)return_statement
)block
)function_definition
)module | Authenticate a HTTP request by filling in Authorization field header.
:param method: HTTP method (e.g. GET, PUT, POST)
:param bucket: name of the bucket.
:param key: name of key within bucket.
:param headers: dictionary of additional HTTP headers.
:return: boto.connection.HTTPRequest object with Authorization header
filled (NB: will also have a Date field if none before and a User-Agent
field will be set to Boto). |
(module
(function_definition
(function_name_filenames) function_name_filenames
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(attribute
(identifier_self) identifier_self
(identifier__is_reader) identifier__is_reader
)attribute
(block
(assert_statement
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier__filenames) identifier__filenames
)attribute
(None) None
)comparison_operator
)assert_statement
(return_statement
(attribute
(identifier_self) identifier_self
(identifier__filenames) identifier__filenames
)attribute
)return_statement
)block
(else_clause
(block
(return_statement
(attribute
(attribute
(identifier_self) identifier_self
(identifier_data_producer) identifier_data_producer
)attribute
(identifier_filenames) identifier_filenames
)attribute
)return_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module | list of file names the data is originally being read from.
Returns
-------
names : list of str
list of file names at the beginning of the input chain. |
(module
(function_definition
(function_name_index) function_name_index
(parameters
)parameters
(block
(expression_statement
(assignment
(identifier_crawlers) identifier_crawlers
(list
)list
)assignment
)expression_statement
(for_statement
(identifier_crawler) identifier_crawler
(identifier_manager) identifier_manager
(block
(expression_statement
(assignment
(identifier_data) identifier_data
(call
(attribute
(identifier_Event) identifier_Event
(identifier_get_counts) identifier_get_counts
)attribute
(argument_list
(identifier_crawler) identifier_crawler
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_data) identifier_data
(string_'last_active') string_'last_active'
)subscript
(attribute
(identifier_crawler) identifier_crawler
(identifier_last_run) identifier_last_run
)attribute
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_data) identifier_data
(string_'total_ops') string_'total_ops'
)subscript
(attribute
(identifier_crawler) identifier_crawler
(identifier_op_count) identifier_op_count
)attribute
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_data) identifier_data
(string_'running') string_'running'
)subscript
(attribute
(identifier_crawler) identifier_crawler
(identifier_is_running) identifier_is_running
)attribute
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_data) identifier_data
(string_'crawler') string_'crawler'
)subscript
(identifier_crawler) identifier_crawler
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_crawlers) identifier_crawlers
(identifier_append) identifier_append
)attribute
(argument_list
(identifier_data) identifier_data
)argument_list
)call
)expression_statement
)block
)for_statement
(return_statement
(call
(identifier_render_template) identifier_render_template
(argument_list
(string_'index.html') string_'index.html'
(keyword_argument
(identifier_crawlers) identifier_crawlers
(identifier_crawlers) identifier_crawlers
)keyword_argument
)argument_list
)call
)return_statement
)block
)function_definition
)module | Generate a list of all crawlers, alphabetically, with op counts. |
(module
(function_definition
(function_name_keys_to_snake_case) function_name_keys_to_snake_case
(parameters
(identifier_camel_case_dict) identifier_camel_case_dict
)parameters
(block
(return_statement
(call
(identifier_dict) identifier_dict
(generator_expression
(tuple
(call
(identifier_to_snake_case) identifier_to_snake_case
(argument_list
(identifier_key) identifier_key
)argument_list
)call
(identifier_value) identifier_value
)tuple
(for_in_clause
(tuple_pattern
(identifier_key) identifier_key
(identifier_value) identifier_value
)tuple_pattern
(call
(attribute
(identifier_camel_case_dict) identifier_camel_case_dict
(identifier_items) identifier_items
)attribute
(argument_list
)argument_list
)call
)for_in_clause
)generator_expression
)call
)return_statement
)block
)function_definition
)module | Make a copy of a dictionary with all keys converted to snake case. This is just calls to_snake_case on
each of the keys in the dictionary and returns a new dictionary.
:param camel_case_dict: Dictionary with the keys to convert.
:type camel_case_dict: Dictionary.
:return: Dictionary with the keys converted to snake case. |
(module
(function_definition
(function_name__process_m2m_through) function_name__process_m2m_through
(parameters
(identifier_self) identifier_self
(identifier_obj) identifier_obj
(identifier_action) identifier_action
)parameters
(block
(expression_statement
(assignment
(identifier_source) identifier_source
(call
(identifier_getattr) identifier_getattr
(argument_list
(identifier_obj) identifier_obj
(call
(attribute
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier_field) identifier_field
)attribute
(identifier_rel) identifier_rel
)attribute
(identifier_field) identifier_field
)attribute
(identifier_m2m_field_name) identifier_m2m_field_name
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_target) identifier_target
(call
(identifier_getattr) identifier_getattr
(argument_list
(identifier_obj) identifier_obj
(call
(attribute
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier_field) identifier_field
)attribute
(identifier_rel) identifier_rel
)attribute
(identifier_field) identifier_field
)attribute
(identifier_m2m_reverse_field_name) identifier_m2m_reverse_field_name
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_pk_set) identifier_pk_set
(call
(identifier_set) identifier_set
(argument_list
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_target) identifier_target
(block
(expression_statement
(call
(attribute
(identifier_pk_set) identifier_pk_set
(identifier_add) identifier_add
)attribute
(argument_list
(attribute
(identifier_target) identifier_target
(identifier_pk) identifier_pk
)attribute
)argument_list
)call
)expression_statement
)block
)if_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_process_m2m) identifier_process_m2m
)attribute
(argument_list
(identifier_source) identifier_source
(identifier_pk_set) identifier_pk_set
(keyword_argument
(identifier_action) identifier_action
(identifier_action) identifier_action
)keyword_argument
(keyword_argument
(identifier_reverse) identifier_reverse
(False) False
)keyword_argument
(keyword_argument
(identifier_cache_key) identifier_cache_key
(identifier_obj) identifier_obj
)keyword_argument
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Process custom M2M through model actions. |
(module
(function_definition
(function_name_convert_money) function_name_convert_money
(parameters
(identifier_amount) identifier_amount
(identifier_currency_from) identifier_currency_from
(identifier_currency_to) identifier_currency_to
)parameters
(block
(expression_statement
(assignment
(identifier_new_amount) identifier_new_amount
(call
(identifier_base_convert_money) identifier_base_convert_money
(argument_list
(identifier_amount) identifier_amount
(identifier_currency_from) identifier_currency_from
(identifier_currency_to) identifier_currency_to
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_moneyed) identifier_moneyed
(identifier_Money) identifier_Money
)attribute
(argument_list
(identifier_new_amount) identifier_new_amount
(identifier_currency_to) identifier_currency_to
)argument_list
)call
)return_statement
)block
)function_definition
)module | Convert 'amount' from 'currency_from' to 'currency_to' and return a Money
instance of the converted amount. |
(module
(function_definition
(function_name_pull) function_name_pull
(parameters
(identifier_self) identifier_self
(identifier_key) identifier_key
(default_parameter
(identifier_default) identifier_default
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_val) identifier_val
(call
(attribute
(identifier_self) identifier_self
(identifier_get) identifier_get
)attribute
(argument_list
(identifier_key) identifier_key
(identifier_default) identifier_default
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_forget) identifier_forget
)attribute
(argument_list
(identifier_key) identifier_key
)argument_list
)call
)expression_statement
(return_statement
(identifier_val) identifier_val
)return_statement
)block
)function_definition
)module | Pulls an item from the collection.
:param key: The key
:type key: mixed
:param default: The default value
:type default: mixed
:rtype: mixed |
(module
(function_definition
(function_name_get_queryset) function_name_get_queryset
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_author) identifier_author
)attribute
(call
(identifier_get_object_or_404) identifier_get_object_or_404
(argument_list
(identifier_Author) identifier_Author
(dictionary_splat
(dictionary
(pair
(attribute
(identifier_Author) identifier_Author
(identifier_USERNAME_FIELD) identifier_USERNAME_FIELD
)attribute
(subscript
(attribute
(identifier_self) identifier_self
(identifier_kwargs) identifier_kwargs
)attribute
(string_'username') string_'username'
)subscript
)pair
)dictionary
)dictionary_splat
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_author) identifier_author
)attribute
(identifier_entries_published) identifier_entries_published
)attribute
(argument_list
)argument_list
)call
)return_statement
)block
)function_definition
)module | Retrieve the author by his username and
build a queryset of his published entries. |
(module
(function_definition
(function_name_f) function_name_f
(parameters
(typed_parameter
(identifier_field) identifier_field
(type
(identifier_str) identifier_str
)type
)typed_parameter
(typed_parameter
(identifier_kwargs) identifier_kwargs
(type
(generic_type
(identifier_Dict) identifier_Dict
(type_parameter
(type
(identifier_str) identifier_str
)type
(type
(identifier_Any) identifier_Any
)type
)type_parameter
)generic_type
)type
)typed_parameter
(typed_default_parameter
(identifier_default) identifier_default
(type
(generic_type
(identifier_Optional) identifier_Optional
(type_parameter
(type
(identifier_Any) identifier_Any
)type
)type_parameter
)generic_type
)type
(None) None
)typed_default_parameter
)parameters
(type
(identifier_str) identifier_str
)type
(block
(if_statement
(comparison_operator
(identifier_default) identifier_default
(None) None
)comparison_operator
(block
(return_statement
(call
(identifier_str) identifier_str
(argument_list
(call
(attribute
(identifier_kwargs) identifier_kwargs
(identifier_get) identifier_get
)attribute
(argument_list
(identifier_field) identifier_field
(identifier_default) identifier_default
)argument_list
)call
)argument_list
)call
)return_statement
)block
)if_statement
(return_statement
(call
(identifier_str) identifier_str
(argument_list
(subscript
(identifier_kwargs) identifier_kwargs
(identifier_field) identifier_field
)subscript
)argument_list
)call
)return_statement
)block
)function_definition
)module | Alias for more readable command construction |
(module
(function_definition
(function_name_prt_results) function_name_prt_results
(parameters
(identifier_self) identifier_self
(identifier_goea_results) identifier_goea_results
)parameters
(block
(if_statement
(comparison_operator
(attribute
(attribute
(identifier_self) identifier_self
(identifier_args) identifier_args
)attribute
(identifier_outfile) identifier_outfile
)attribute
(None) None
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__prt_results) identifier__prt_results
)attribute
(argument_list
(identifier_goea_results) identifier_goea_results
)argument_list
)call
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_outfiles) identifier_outfiles
(call
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier_args) identifier_args
)attribute
(identifier_outfile) identifier_outfile
)attribute
(identifier_split) identifier_split
)attribute
(argument_list
(string_",") string_","
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_grpwr) identifier_grpwr
(conditional_expression
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_prepgrp) identifier_prepgrp
)attribute
(identifier_get_objgrpwr) identifier_get_objgrpwr
)attribute
(argument_list
(identifier_goea_results) identifier_goea_results
)argument_list
)call
(attribute
(identifier_self) identifier_self
(identifier_prepgrp) identifier_prepgrp
)attribute
(None) None
)conditional_expression
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_grpwr) identifier_grpwr
(None) None
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_prt_outfiles_flat) identifier_prt_outfiles_flat
)attribute
(argument_list
(identifier_goea_results) identifier_goea_results
(identifier_outfiles) identifier_outfiles
)argument_list
)call
)expression_statement
)block
(else_clause
(block
(expression_statement
(call
(attribute
(identifier_grpwr) identifier_grpwr
(identifier_prt_outfiles_grouped) identifier_prt_outfiles_grouped
)attribute
(argument_list
(identifier_outfiles) identifier_outfiles
)argument_list
)call
)expression_statement
)block
)else_clause
)if_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module | Print GOEA results to the screen or to a file. |
(module
(function_definition
(function_name__send_request) function_name__send_request
(parameters
(identifier_self) identifier_self
(identifier_operation) identifier_operation
(identifier_url) identifier_url
(identifier_payload) identifier_payload
(identifier_desc) identifier_desc
)parameters
(block
(expression_statement
(assignment
(identifier_res) identifier_res
(None) None
)assignment
)expression_statement
(try_statement
(block
(expression_statement
(assignment
(identifier_payload_json) identifier_payload_json
(None) None
)assignment
)expression_statement
(if_statement
(boolean_operator
(identifier_payload) identifier_payload
(comparison_operator
(identifier_payload) identifier_payload
(string_'') string_''
)comparison_operator
)boolean_operator
(block
(expression_statement
(assignment
(identifier_payload_json) identifier_payload_json
(call
(attribute
(identifier_jsonutils) identifier_jsonutils
(identifier_dumps) identifier_dumps
)attribute
(argument_list
(identifier_payload) identifier_payload
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__login) identifier__login
)attribute
(argument_list
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_desc_lookup) identifier_desc_lookup
(dictionary
(pair
(string_'POST') string_'POST'
(string_' creation') string_' creation'
)pair
(pair
(string_'PUT') string_'PUT'
(string_' update') string_' update'
)pair
(pair
(string_'DELETE') string_'DELETE'
(string_' deletion') string_' deletion'
)pair
(pair
(string_'GET') string_'GET'
(string_' get') string_' get'
)pair
)dictionary
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_res) identifier_res
(call
(attribute
(identifier_requests) identifier_requests
(identifier_request) identifier_request
)attribute
(argument_list
(identifier_operation) identifier_operation
(identifier_url) identifier_url
(keyword_argument
(identifier_data) identifier_data
(identifier_payload_json) identifier_payload_json
)keyword_argument
(keyword_argument
(identifier_headers) identifier_headers
(attribute
(identifier_self) identifier_self
(identifier__req_headers) identifier__req_headers
)attribute
)keyword_argument
(keyword_argument
(identifier_timeout) identifier_timeout
(attribute
(identifier_self) identifier_self
(identifier_timeout_resp) identifier_timeout_resp
)attribute
)keyword_argument
(keyword_argument
(identifier_verify) identifier_verify
(False) False
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(augmented_assignment
(identifier_desc) identifier_desc
(call
(attribute
(identifier_desc_lookup) identifier_desc_lookup
(identifier_get) identifier_get
)attribute
(argument_list
(identifier_operation) identifier_operation
(call
(attribute
(identifier_operation) identifier_operation
(identifier_lower) identifier_lower
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)augmented_assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_LOG) identifier_LOG
(identifier_info) identifier_info
)attribute
(argument_list
(string_"DCNM-send_request: %(desc)s %(url)s %(pld)s") string_"DCNM-send_request: %(desc)s %(url)s %(pld)s"
(dictionary
(pair
(string_'desc') string_'desc'
(identifier_desc) identifier_desc
)pair
(pair
(string_'url') string_'url'
(identifier_url) identifier_url
)pair
(pair
(string_'pld') string_'pld'
(identifier_payload) identifier_payload
)pair
)dictionary
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__logout) identifier__logout
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
(except_clause
(as_pattern
(tuple
(attribute
(identifier_requests) identifier_requests
(identifier_HTTPError) identifier_HTTPError
)attribute
(attribute
(identifier_requests) identifier_requests
(identifier_Timeout) identifier_Timeout
)attribute
(attribute
(identifier_requests) identifier_requests
(identifier_ConnectionError) identifier_ConnectionError
)attribute
)tuple
(as_pattern_target
(identifier_exc) identifier_exc
)as_pattern_target
)as_pattern
(block
(expression_statement
(call
(attribute
(identifier_LOG) identifier_LOG
(identifier_exception) identifier_exception
)attribute
(argument_list
(string_'Error during request: %s') string_'Error during request: %s'
(identifier_exc) identifier_exc
)argument_list
)call
)expression_statement
(raise_statement
(call
(attribute
(identifier_dexc) identifier_dexc
(identifier_DfaClientRequestFailed) identifier_DfaClientRequestFailed
)attribute
(argument_list
(keyword_argument
(identifier_reason) identifier_reason
(identifier_exc) identifier_exc
)keyword_argument
)argument_list
)call
)raise_statement
)block
)except_clause
)try_statement
(return_statement
(identifier_res) identifier_res
)return_statement
)block
)function_definition
)module | Send request to DCNM. |
(module
(function_definition
(function_name_filter_regex) function_name_filter_regex
(parameters
(identifier_names) identifier_names
(identifier_regex) identifier_regex
)parameters
(block
(return_statement
(call
(identifier_tuple) identifier_tuple
(generator_expression
(identifier_name) identifier_name
(for_in_clause
(identifier_name) identifier_name
(identifier_names) identifier_names
)for_in_clause
(if_clause
(comparison_operator
(call
(attribute
(identifier_regex) identifier_regex
(identifier_search) identifier_search
)attribute
(argument_list
(identifier_name) identifier_name
)argument_list
)call
(None) None
)comparison_operator
)if_clause
)generator_expression
)call
)return_statement
)block
)function_definition
)module | Return a tuple of strings that match the regular expression pattern. |
(module
(function_definition
(function_name_del_host) function_name_del_host
(parameters
(identifier_self) identifier_self
(identifier_mac) identifier_mac
)parameters
(block
(expression_statement
(assignment
(identifier_msg) identifier_msg
(call
(attribute
(identifier_OmapiMessage) identifier_OmapiMessage
(identifier_open) identifier_open
)attribute
(argument_list
(string_b"host") string_b"host"
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_msg) identifier_msg
(identifier_obj) identifier_obj
)attribute
(identifier_append) identifier_append
)attribute
(argument_list
(tuple
(string_b"hardware-address") string_b"hardware-address"
(call
(identifier_pack_mac) identifier_pack_mac
(argument_list
(identifier_mac) identifier_mac
)argument_list
)call
)tuple
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_msg) identifier_msg
(identifier_obj) identifier_obj
)attribute
(identifier_append) identifier_append
)attribute
(argument_list
(tuple
(string_b"hardware-type") string_b"hardware-type"
(call
(attribute
(identifier_struct) identifier_struct
(identifier_pack) identifier_pack
)attribute
(argument_list
(string_"!I") string_"!I"
(integer_1) integer_1
)argument_list
)call
)tuple
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_response) identifier_response
(call
(attribute
(identifier_self) identifier_self
(identifier_query_server) identifier_query_server
)attribute
(argument_list
(identifier_msg) identifier_msg
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(attribute
(identifier_response) identifier_response
(identifier_opcode) identifier_opcode
)attribute
(identifier_OMAPI_OP_UPDATE) identifier_OMAPI_OP_UPDATE
)comparison_operator
(block
(raise_statement
(call
(identifier_OmapiErrorNotFound) identifier_OmapiErrorNotFound
(argument_list
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(comparison_operator
(attribute
(identifier_response) identifier_response
(identifier_handle) identifier_handle
)attribute
(integer_0) integer_0
)comparison_operator
(block
(raise_statement
(call
(identifier_OmapiError) identifier_OmapiError
(argument_list
(string_"received invalid handle from server") string_"received invalid handle from server"
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_response) identifier_response
(call
(attribute
(identifier_self) identifier_self
(identifier_query_server) identifier_query_server
)attribute
(argument_list
(call
(attribute
(identifier_OmapiMessage) identifier_OmapiMessage
(identifier_delete) identifier_delete
)attribute
(argument_list
(attribute
(identifier_response) identifier_response
(identifier_handle) identifier_handle
)attribute
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(attribute
(identifier_response) identifier_response
(identifier_opcode) identifier_opcode
)attribute
(identifier_OMAPI_OP_STATUS) identifier_OMAPI_OP_STATUS
)comparison_operator
(block
(raise_statement
(call
(identifier_OmapiError) identifier_OmapiError
(argument_list
(string_"delete failed") string_"delete failed"
)argument_list
)call
)raise_statement
)block
)if_statement
)block
)function_definition
)module | Delete a host object with with given mac address.
@type mac: str
@raises ValueError:
@raises OmapiError:
@raises OmapiErrorNotFound: if no lease object with the given
mac address could be found
@raises socket.error: |
(module
(function_definition
(function_name_keyring_auth) function_name_keyring_auth
(parameters
(default_parameter
(identifier_username) identifier_username
(None) None
)default_parameter
(default_parameter
(identifier_region) identifier_region
(None) None
)default_parameter
(default_parameter
(identifier_authenticate) identifier_authenticate
(True) True
)default_parameter
)parameters
(block
(if_statement
(not_operator
(identifier_keyring) identifier_keyring
)not_operator
(block
(raise_statement
(call
(attribute
(identifier_exc) identifier_exc
(identifier_KeyringModuleNotInstalled) identifier_KeyringModuleNotInstalled
)attribute
(argument_list
(concatenated_string
(string_"The 'keyring' Python module is ") string_"The 'keyring' Python module is "
(string_"not installed on this system.") string_"not installed on this system."
)concatenated_string
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(comparison_operator
(identifier_username) identifier_username
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(identifier_username) identifier_username
(call
(attribute
(identifier_settings) identifier_settings
(identifier_get) identifier_get
)attribute
(argument_list
(string_"keyring_username") string_"keyring_username"
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(if_statement
(not_operator
(identifier_username) identifier_username
)not_operator
(block
(raise_statement
(call
(attribute
(identifier_exc) identifier_exc
(identifier_KeyringUsernameMissing) identifier_KeyringUsernameMissing
)attribute
(argument_list
(concatenated_string
(string_"No username specified for keyring ") string_"No username specified for keyring "
(string_"authentication.") string_"authentication."
)concatenated_string
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_password) identifier_password
(call
(attribute
(identifier_keyring) identifier_keyring
(identifier_get_password) identifier_get_password
)attribute
(argument_list
(string_"pyrax") string_"pyrax"
(identifier_username) identifier_username
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_password) identifier_password
(None) None
)comparison_operator
(block
(raise_statement
(call
(attribute
(identifier_exc) identifier_exc
(identifier_KeyringPasswordNotFound) identifier_KeyringPasswordNotFound
)attribute
(argument_list
(binary_operator
(concatenated_string
(string_"No password was found for the ") string_"No password was found for the "
(string_"username '%s'.") string_"username '%s'."
)concatenated_string
(identifier_username) identifier_username
)binary_operator
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(call
(identifier_set_credentials) identifier_set_credentials
(argument_list
(identifier_username) identifier_username
(identifier_password) identifier_password
(keyword_argument
(identifier_region) identifier_region
(identifier_region) identifier_region
)keyword_argument
(keyword_argument
(identifier_authenticate) identifier_authenticate
(identifier_authenticate) identifier_authenticate
)keyword_argument
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Use the password stored within the keyring to authenticate. If a username
is supplied, that name is used; otherwise, the keyring_username value
from the config file is used.
If there is no username defined, or if the keyring module is not installed,
or there is no password set for the given username, the appropriate errors
will be raised.
If the region is passed, it will authenticate against the proper endpoint
for that region, and set the default region for connections. |
(module
(function_definition
(function_name_set_color_temp) function_name_set_color_temp
(parameters
(identifier_self) identifier_self
(identifier_color_temp) identifier_color_temp
)parameters
(block
(if_statement
(subscript
(attribute
(identifier_self) identifier_self
(identifier__json_state) identifier__json_state
)attribute
(string_'control_url') string_'control_url'
)subscript
(block
(expression_statement
(assignment
(identifier_url) identifier_url
(binary_operator
(attribute
(identifier_CONST) identifier_CONST
(identifier_INTEGRATIONS_URL) identifier_INTEGRATIONS_URL
)attribute
(attribute
(identifier_self) identifier_self
(identifier__device_uuid) identifier__device_uuid
)attribute
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_color_data) identifier_color_data
(dictionary
(pair
(string_'action') string_'action'
(string_'setcolortemperature') string_'setcolortemperature'
)pair
(pair
(string_'colorTemperature') string_'colorTemperature'
(call
(identifier_int) identifier_int
(argument_list
(identifier_color_temp) identifier_color_temp
)argument_list
)call
)pair
)dictionary
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_response) identifier_response
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__abode) identifier__abode
)attribute
(identifier_send_request) identifier_send_request
)attribute
(argument_list
(string_"post") string_"post"
(identifier_url) identifier_url
(keyword_argument
(identifier_data) identifier_data
(identifier_color_data) identifier_color_data
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_response_object) identifier_response_object
(call
(attribute
(identifier_json) identifier_json
(identifier_loads) identifier_loads
)attribute
(argument_list
(attribute
(identifier_response) identifier_response
(identifier_text) identifier_text
)attribute
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier__LOGGER) identifier__LOGGER
(identifier_debug) identifier_debug
)attribute
(argument_list
(string_"Set Color Temp Response: %s") string_"Set Color Temp Response: %s"
(attribute
(identifier_response) identifier_response
(identifier_text) identifier_text
)attribute
)argument_list
)call
)expression_statement
(if_statement
(comparison_operator
(subscript
(identifier_response_object) identifier_response_object
(string_'idForPanel') string_'idForPanel'
)subscript
(attribute
(identifier_self) identifier_self
(identifier_device_id) identifier_device_id
)attribute
)comparison_operator
(block
(raise_statement
(call
(identifier_AbodeException) identifier_AbodeException
(argument_list
(parenthesized_expression
(attribute
(identifier_ERROR) identifier_ERROR
(identifier_SET_STATUS_DEV_ID) identifier_SET_STATUS_DEV_ID
)attribute
)parenthesized_expression
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(comparison_operator
(subscript
(identifier_response_object) identifier_response_object
(string_'colorTemperature') string_'colorTemperature'
)subscript
(call
(identifier_int) identifier_int
(argument_list
(identifier_color_temp) identifier_color_temp
)argument_list
)call
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier__LOGGER) identifier__LOGGER
(identifier_warning) identifier_warning
)attribute
(argument_list
(parenthesized_expression
(concatenated_string
(string_"Set color temp mismatch for device %s. ") string_"Set color temp mismatch for device %s. "
(string_"Request val: %s, Response val: %s ") string_"Request val: %s, Response val: %s "
)concatenated_string
)parenthesized_expression
(attribute
(identifier_self) identifier_self
(identifier_device_id) identifier_device_id
)attribute
(identifier_color_temp) identifier_color_temp
(subscript
(identifier_response_object) identifier_response_object
(string_'colorTemperature') string_'colorTemperature'
)subscript
)argument_list
)call
)expression_statement
)block
)if_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_update) identifier_update
)attribute
(argument_list
(identifier_response_object) identifier_response_object
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier__LOGGER) identifier__LOGGER
(identifier_info) identifier_info
)attribute
(argument_list
(string_"Set device %s color_temp to: %s") string_"Set device %s color_temp to: %s"
(attribute
(identifier_self) identifier_self
(identifier_device_id) identifier_device_id
)attribute
(identifier_color_temp) identifier_color_temp
)argument_list
)call
)expression_statement
(return_statement
(True) True
)return_statement
)block
)if_statement
(return_statement
(False) False
)return_statement
)block
)function_definition
)module | Set device color. |
(module
(function_definition
(function_name_infer_from_frame_stack) function_name_infer_from_frame_stack
(parameters
(identifier_self) identifier_self
(identifier_ob_stack) identifier_ob_stack
)parameters
(block
(expression_statement
(assignment
(pattern_list
(identifier_logits) identifier_logits
(identifier_vf) identifier_vf
)pattern_list
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_sess) identifier_sess
)attribute
(identifier_run) identifier_run
)attribute
(argument_list
(list
(attribute
(identifier_self) identifier_self
(identifier_logits_t) identifier_logits_t
)attribute
(attribute
(identifier_self) identifier_self
(identifier_value_function_t) identifier_value_function_t
)attribute
)list
(keyword_argument
(identifier_feed_dict) identifier_feed_dict
(dictionary
(pair
(attribute
(identifier_self) identifier_self
(identifier_obs_t) identifier_obs_t
)attribute
(identifier_ob_stack) identifier_ob_stack
)pair
)dictionary
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(return_statement
(expression_list
(identifier_logits) identifier_logits
(identifier_vf) identifier_vf
)expression_list
)return_statement
)block
)function_definition
)module | Infer policy from stack of observations.
Args:
ob_stack: array of shape (1, frame_stack_size, height, width, channels)
Returns:
logits and vf. |
(module
(function_definition
(function_name__is_gpg2) function_name__is_gpg2
(parameters
(identifier_version) identifier_version
)parameters
(block
(expression_statement
(assignment
(tuple_pattern
(identifier_major) identifier_major
(identifier_minor) identifier_minor
(identifier_micro) identifier_micro
)tuple_pattern
(call
(identifier__match_version_string) identifier__match_version_string
(argument_list
(identifier_version) identifier_version
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_major) identifier_major
(integer_2) integer_2
)comparison_operator
(block
(return_statement
(True) True
)return_statement
)block
)if_statement
(return_statement
(False) False
)return_statement
)block
)function_definition
)module | Returns True if using GnuPG version 2.x.
:param tuple version: A tuple of three integers indication major, minor,
and micro version numbers. |
(module
(function_definition
(function_name_apply_patches) function_name_apply_patches
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_success) identifier_success
(True) True
)assignment
)expression_statement
(for_statement
(pattern_list
(identifier_name) identifier_name
(identifier_patch) identifier_patch
)pattern_list
(call
(identifier_sorted) identifier_sorted
(argument_list
(identifier_self) identifier_self
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_success) identifier_success
(call
(attribute
(identifier_self) identifier_self
(identifier_apply_patch) identifier_apply_patch
)attribute
(argument_list
(identifier_patch) identifier_patch
)argument_list
)call
)assignment
)expression_statement
)block
)for_statement
(return_statement
(identifier_success) identifier_success
)return_statement
)block
)function_definition
)module | Applies the patches.
:return: Method success.
:rtype: bool |
(module
(function_definition
(function_name_get_xy_name) function_name_get_xy_name
(parameters
(identifier_self) identifier_self
(identifier_yidx) identifier_yidx
(default_parameter
(identifier_xidx) identifier_xidx
(integer_0) integer_0
)default_parameter
)parameters
(block
(assert_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_xidx) identifier_xidx
(identifier_int) identifier_int
)argument_list
)call
)assert_statement
(if_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_yidx) identifier_yidx
(identifier_int) identifier_int
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_yidx) identifier_yidx
(list
(identifier_yidx) identifier_yidx
)list
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_uname) identifier_uname
(binary_operator
(list
(string_'Time [s]') string_'Time [s]'
)list
(attribute
(identifier_self) identifier_self
(identifier_uname) identifier_uname
)attribute
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_fname) identifier_fname
(binary_operator
(list
(string_'$Time\\ [s]$') string_'$Time\\ [s]$'
)list
(attribute
(identifier_self) identifier_self
(identifier_fname) identifier_fname
)attribute
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_xname) identifier_xname
(list
(call
(identifier_list) identifier_list
(argument_list
)argument_list
)call
(call
(identifier_list) identifier_list
(argument_list
)argument_list
)call
)list
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_yname) identifier_yname
(list
(call
(identifier_list) identifier_list
(argument_list
)argument_list
)call
(call
(identifier_list) identifier_list
(argument_list
)argument_list
)call
)list
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_xname) identifier_xname
(integer_0) integer_0
)subscript
(subscript
(identifier_uname) identifier_uname
(identifier_xidx) identifier_xidx
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_xname) identifier_xname
(integer_1) integer_1
)subscript
(subscript
(identifier_fname) identifier_fname
(identifier_xidx) identifier_xidx
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_yname) identifier_yname
(integer_0) integer_0
)subscript
(list_comprehension
(subscript
(identifier_uname) identifier_uname
(identifier_i) identifier_i
)subscript
(for_in_clause
(identifier_i) identifier_i
(identifier_yidx) identifier_yidx
)for_in_clause
)list_comprehension
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_yname) identifier_yname
(integer_1) integer_1
)subscript
(list_comprehension
(subscript
(identifier_fname) identifier_fname
(identifier_i) identifier_i
)subscript
(for_in_clause
(identifier_i) identifier_i
(identifier_yidx) identifier_yidx
)for_in_clause
)list_comprehension
)assignment
)expression_statement
(return_statement
(expression_list
(identifier_xname) identifier_xname
(identifier_yname) identifier_yname
)expression_list
)return_statement
)block
)function_definition
)module | Return variable names for the given indices
:param yidx:
:param xidx:
:return: |
(module
(function_definition
(function_name_validate) function_name_validate
(parameters
(identifier_document) identifier_document
(identifier_spec) identifier_spec
)parameters
(block
(if_statement
(not_operator
(identifier_spec) identifier_spec
)not_operator
(block
(return_statement
(True) True
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_missing) identifier_missing
(list
)list
)assignment
)expression_statement
(for_statement
(pattern_list
(identifier_key) identifier_key
(identifier_field) identifier_field
)pattern_list
(call
(attribute
(identifier_spec) identifier_spec
(identifier_iteritems) identifier_iteritems
)attribute
(argument_list
)argument_list
)call
(block
(if_statement
(boolean_operator
(attribute
(identifier_field) identifier_field
(identifier_required) identifier_required
)attribute
(comparison_operator
(identifier_key) identifier_key
(identifier_document) identifier_document
)comparison_operator
)boolean_operator
(block
(expression_statement
(call
(attribute
(identifier_missing) identifier_missing
(identifier_append) identifier_append
)attribute
(argument_list
(identifier_key) identifier_key
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)for_statement
(expression_statement
(assignment
(identifier_failed) identifier_failed
(list
)list
)assignment
)expression_statement
(for_statement
(pattern_list
(identifier_key) identifier_key
(identifier_field) identifier_field
)pattern_list
(call
(attribute
(identifier_spec) identifier_spec
(identifier_iteritems) identifier_iteritems
)attribute
(argument_list
)argument_list
)call
(block
(if_statement
(comparison_operator
(identifier_key) identifier_key
(identifier_document) identifier_document
)comparison_operator
(block
(try_statement
(block
(expression_statement
(assignment
(subscript
(identifier_document) identifier_document
(identifier_key) identifier_key
)subscript
(call
(attribute
(identifier_field) identifier_field
(identifier_validate) identifier_validate
)attribute
(argument_list
(subscript
(identifier_document) identifier_document
(identifier_key) identifier_key
)subscript
)argument_list
)call
)assignment
)expression_statement
)block
(except_clause
(identifier_ValueError) identifier_ValueError
(block
(expression_statement
(call
(attribute
(identifier_failed) identifier_failed
(identifier_append) identifier_append
)attribute
(argument_list
(identifier_key) identifier_key
)argument_list
)call
)expression_statement
)block
)except_clause
)try_statement
)block
)if_statement
)block
)for_statement
(if_statement
(boolean_operator
(identifier_missing) identifier_missing
(identifier_failed) identifier_failed
)boolean_operator
(block
(if_statement
(boolean_operator
(identifier_missing) identifier_missing
(not_operator
(identifier_failed) identifier_failed
)not_operator
)boolean_operator
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(binary_operator
(string_"Required fields missing: %s") string_"Required fields missing: %s"
(parenthesized_expression
(identifier_missing) identifier_missing
)parenthesized_expression
)binary_operator
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(boolean_operator
(identifier_failed) identifier_failed
(not_operator
(identifier_missing) identifier_missing
)not_operator
)boolean_operator
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(binary_operator
(string_"Keys did not match spec: %s") string_"Keys did not match spec: %s"
(parenthesized_expression
(identifier_failed) identifier_failed
)parenthesized_expression
)binary_operator
)argument_list
)call
)raise_statement
)block
)if_statement
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(binary_operator
(string_"Missing fields: %s, Invalid fields: %s") string_"Missing fields: %s, Invalid fields: %s"
(tuple
(identifier_missing) identifier_missing
(identifier_failed) identifier_failed
)tuple
)binary_operator
)argument_list
)call
)raise_statement
)block
)if_statement
(return_statement
(True) True
)return_statement
)block
)function_definition
)module | Validate that a document meets a specification. Returns True if
validation was successful, but otherwise raises a ValueError. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.