sequence stringlengths 557 12.7k | docstring stringlengths 4 15.2k |
|---|---|
(module
(function_definition
(function_name_mbar_objective_and_gradient) function_name_mbar_objective_and_gradient
(parameters
(identifier_u_kn) identifier_u_kn
(identifier_N_k) identifier_N_k
(identifier_f_k) identifier_f_k
)parameters
(block
(expression_statement
(assignment
(pattern_list
(identifier_u_kn) identifier_u_kn
(identifier_N_k) identifier_N_k
(identifier_f_k) identifier_f_k
)pattern_list
(call
(identifier_validate_inputs) identifier_validate_inputs
(argument_list
(identifier_u_kn) identifier_u_kn
(identifier_N_k) identifier_N_k
(identifier_f_k) identifier_f_k
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_log_denominator_n) identifier_log_denominator_n
(call
(identifier_logsumexp) identifier_logsumexp
(argument_list
(binary_operator
(identifier_f_k) identifier_f_k
(attribute
(identifier_u_kn) identifier_u_kn
(identifier_T) identifier_T
)attribute
)binary_operator
(keyword_argument
(identifier_b) identifier_b
(identifier_N_k) identifier_N_k
)keyword_argument
(keyword_argument
(identifier_axis) identifier_axis
(integer_1) integer_1
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_log_numerator_k) identifier_log_numerator_k
(call
(identifier_logsumexp) identifier_logsumexp
(argument_list
(binary_operator
(unary_operator
(identifier_log_denominator_n) identifier_log_denominator_n
)unary_operator
(identifier_u_kn) identifier_u_kn
)binary_operator
(keyword_argument
(identifier_axis) identifier_axis
(integer_1) integer_1
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_grad) identifier_grad
(binary_operator
(binary_operator
(unary_operator
(integer_1) integer_1
)unary_operator
(identifier_N_k) identifier_N_k
)binary_operator
(parenthesized_expression
(binary_operator
(float_1.0) float_1.0
(call
(attribute
(identifier_np) identifier_np
(identifier_exp) identifier_exp
)attribute
(argument_list
(binary_operator
(identifier_f_k) identifier_f_k
(identifier_log_numerator_k) identifier_log_numerator_k
)binary_operator
)argument_list
)call
)binary_operator
)parenthesized_expression
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_obj) identifier_obj
(binary_operator
(call
(attribute
(identifier_math) identifier_math
(identifier_fsum) identifier_fsum
)attribute
(argument_list
(identifier_log_denominator_n) identifier_log_denominator_n
)argument_list
)call
(call
(attribute
(identifier_N_k) identifier_N_k
(identifier_dot) identifier_dot
)attribute
(argument_list
(identifier_f_k) identifier_f_k
)argument_list
)call
)binary_operator
)assignment
)expression_statement
(return_statement
(expression_list
(identifier_obj) identifier_obj
(identifier_grad) identifier_grad
)expression_list
)return_statement
)block
)function_definition
)module | Calculates both objective function and gradient for MBAR.
Parameters
----------
u_kn : np.ndarray, shape=(n_states, n_samples), dtype='float'
The reduced potential energies, i.e. -log unnormalized probabilities
N_k : np.ndarray, shape=(n_states), dtype='int'
The number of samples in each state
f_k : np.ndarray, shape=(n_states), dtype='float'
The reduced free energies of each state
Returns
-------
obj : float
Objective function
grad : np.ndarray, dtype=float, shape=(n_states)
Gradient of objective function
Notes
-----
This objective function is essentially a doubly-summed partition function and is
quite sensitive to precision loss from both overflow and underflow. For optimal
results, u_kn can be preconditioned by subtracting out a `n` dependent
vector.
More optimal precision, the objective function uses math.fsum for the
outermost sum and logsumexp for the inner sum.
The gradient is equation C6 in the JCP MBAR paper; the objective
function is its integral. |
(module
(function_definition
(function_name_path) function_name_path
(parameters
(identifier_self) identifier_self
(list_splat_pattern
(identifier_names) identifier_names
)list_splat_pattern
)parameters
(block
(expression_statement
(assignment
(identifier_path) identifier_path
(list
(identifier_self) identifier_self
)list
)assignment
)expression_statement
(for_statement
(identifier_name) identifier_name
(identifier_names) identifier_names
(block
(expression_statement
(call
(attribute
(identifier_path) identifier_path
(identifier_append) identifier_append
)attribute
(argument_list
(subscript
(subscript
(identifier_path) identifier_path
(unary_operator
(integer_1) integer_1
)unary_operator
)subscript
(identifier_name) identifier_name
)subscript
)argument_list
)call
)expression_statement
)block
)for_statement
(return_statement
(subscript
(identifier_path) identifier_path
(slice
(integer_1) integer_1
(colon) colon
)slice
)subscript
)return_statement
)block
)function_definition
)module | Look up and return the complete path of an atom.
For example, atoms.path('moov', 'udta', 'meta') will return a
list of three atoms, corresponding to the moov, udta, and meta
atoms. |
(module
(function_definition
(function_name_status) function_name_status
(parameters
(identifier_self) identifier_self
(identifier_agreement_id) identifier_agreement_id
)parameters
(block
(expression_statement
(assignment
(identifier_condition_ids) identifier_condition_ids
(attribute
(call
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier__keeper) identifier__keeper
)attribute
(identifier_agreement_manager) identifier_agreement_manager
)attribute
(identifier_get_agreement) identifier_get_agreement
)attribute
(argument_list
(identifier_agreement_id) identifier_agreement_id
)argument_list
)call
(identifier_condition_ids) identifier_condition_ids
)attribute
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_result) identifier_result
(dictionary
(pair
(string_"agreementId") string_"agreementId"
(identifier_agreement_id) identifier_agreement_id
)pair
)dictionary
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_conditions) identifier_conditions
(call
(identifier_dict) identifier_dict
(argument_list
)argument_list
)call
)assignment
)expression_statement
(for_statement
(identifier_i) identifier_i
(identifier_condition_ids) identifier_condition_ids
(block
(expression_statement
(assignment
(subscript
(identifier_conditions) identifier_conditions
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__keeper) identifier__keeper
)attribute
(identifier_get_condition_name_by_address) identifier_get_condition_name_by_address
)attribute
(argument_list
(attribute
(call
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier__keeper) identifier__keeper
)attribute
(identifier_condition_manager) identifier_condition_manager
)attribute
(identifier_get_condition) identifier_get_condition
)attribute
(argument_list
(identifier_i) identifier_i
)argument_list
)call
(identifier_type_ref) identifier_type_ref
)attribute
)argument_list
)call
)subscript
(call
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier__keeper) identifier__keeper
)attribute
(identifier_condition_manager) identifier_condition_manager
)attribute
(identifier_get_condition_state) identifier_get_condition_state
)attribute
(argument_list
(identifier_i) identifier_i
)argument_list
)call
)assignment
)expression_statement
)block
)for_statement
(expression_statement
(assignment
(subscript
(identifier_result) identifier_result
(string_"conditions") string_"conditions"
)subscript
(identifier_conditions) identifier_conditions
)assignment
)expression_statement
(return_statement
(identifier_result) identifier_result
)return_statement
)block
)function_definition
)module | Get the status of a service agreement.
:param agreement_id: id of the agreement, hex str
:return: dict with condition status of each of the agreement's conditions or None if the
agreement is invalid. |
(module
(function_definition
(function_name_get_ip_address) function_name_get_ip_address
(parameters
(identifier_ifname) identifier_ifname
)parameters
(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_DGRAM) identifier_SOCK_DGRAM
)attribute
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_socket) identifier_socket
(identifier_inet_ntoa) identifier_inet_ntoa
)attribute
(argument_list
(subscript
(call
(attribute
(identifier_fcntl) identifier_fcntl
(identifier_ioctl) identifier_ioctl
)attribute
(argument_list
(call
(attribute
(identifier_s) identifier_s
(identifier_fileno) identifier_fileno
)attribute
(argument_list
)argument_list
)call
(integer_0x8915) integer_0x8915
(call
(attribute
(identifier_struct) identifier_struct
(identifier_pack) identifier_pack
)attribute
(argument_list
(string_'256s') string_'256s'
(subscript
(identifier_ifname) identifier_ifname
(slice
(colon) colon
(integer_15) integer_15
)slice
)subscript
)argument_list
)call
)argument_list
)call
(slice
(integer_20) integer_20
(colon) colon
(integer_24) integer_24
)slice
)subscript
)argument_list
)call
)return_statement
)block
)function_definition
)module | Hack to get IP address from the interface |
(module
(function_definition
(function_name_make_iterable) function_name_make_iterable
(parameters
(identifier_value) identifier_value
)parameters
(block
(if_statement
(comparison_operator
(attribute
(identifier_sys) identifier_sys
(identifier_version_info) identifier_version_info
)attribute
(tuple
(integer_3) integer_3
(integer_0) integer_0
)tuple
)comparison_operator
(block
(if_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_value) identifier_value
(identifier_unicode) identifier_unicode
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_value) identifier_value
(call
(identifier_str) identifier_str
(argument_list
(identifier_value) identifier_value
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
)block
)if_statement
(if_statement
(boolean_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_value) identifier_value
(identifier_str) identifier_str
)argument_list
)call
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_value) identifier_value
(identifier_dict) identifier_dict
)argument_list
)call
)boolean_operator
(block
(expression_statement
(assignment
(identifier_value) identifier_value
(list
(identifier_value) identifier_value
)list
)assignment
)expression_statement
)block
)if_statement
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_value) identifier_value
(attribute
(identifier_collections) identifier_collections
(identifier_Iterable) identifier_Iterable
)attribute
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(identifier_TypeError) identifier_TypeError
(argument_list
(string_'value must be an iterable object') string_'value must be an iterable object'
)argument_list
)call
)raise_statement
)block
)if_statement
(return_statement
(identifier_value) identifier_value
)return_statement
)block
)function_definition
)module | Converts the supplied value to a list object
This function will inspect the supplied value and return an
iterable in the form of a list.
Args:
value (object): An valid Python object
Returns:
An iterable object of type list |
(module
(function_definition
(function_name_hash_tags) function_name_hash_tags
(parameters
(identifier_text) identifier_text
(identifier_hashes) identifier_hashes
)parameters
(block
(function_definition
(function_name_sub) function_name_sub
(parameters
(identifier_match) identifier_match
)parameters
(block
(expression_statement
(assignment
(identifier_hashed) identifier_hashed
(call
(identifier_hash_text) identifier_hash_text
(argument_list
(call
(attribute
(identifier_match) identifier_match
(identifier_group) identifier_group
)attribute
(argument_list
(integer_0) integer_0
)argument_list
)call
(string_'tag') string_'tag'
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_hashes) identifier_hashes
(identifier_hashed) identifier_hashed
)subscript
(call
(attribute
(identifier_match) identifier_match
(identifier_group) identifier_group
)attribute
(argument_list
(integer_0) integer_0
)argument_list
)call
)assignment
)expression_statement
(return_statement
(identifier_hashed) identifier_hashed
)return_statement
)block
)function_definition
(return_statement
(call
(attribute
(identifier_re_tag) identifier_re_tag
(identifier_sub) identifier_sub
)attribute
(argument_list
(identifier_sub) identifier_sub
(identifier_text) identifier_text
)argument_list
)call
)return_statement
)block
)function_definition
)module | Hashes any non-block tags.
Only the tags themselves are hashed -- the contains surrounded
by tags are not touched. Indeed, there is no notion of "contained"
text for non-block tags.
Inline tags that are to be hashed are not white-listed, which
allows users to define their own tags. These user-defined tags
will also be preserved in their original form until the controller
(see link.py) is applied to them. |
(module
(function_definition
(function_name__load_secret) function_name__load_secret
(parameters
(identifier_self) identifier_self
(identifier_creds_file) identifier_creds_file
)parameters
(block
(try_statement
(block
(with_statement
(with_clause
(with_item
(as_pattern
(call
(identifier_open) identifier_open
(argument_list
(identifier_creds_file) identifier_creds_file
)argument_list
)call
(as_pattern_target
(identifier_fp) identifier_fp
)as_pattern_target
)as_pattern
)with_item
)with_clause
(block
(expression_statement
(assignment
(identifier_creds) identifier_creds
(call
(attribute
(identifier_json) identifier_json
(identifier_load) identifier_load
)attribute
(argument_list
(identifier_fp) identifier_fp
)argument_list
)call
)assignment
)expression_statement
)block
)with_statement
(return_statement
(identifier_creds) identifier_creds
)return_statement
)block
(except_clause
(as_pattern
(identifier_Exception) identifier_Exception
(as_pattern_target
(identifier_e) identifier_e
)as_pattern_target
)as_pattern
(block
(expression_statement
(call
(attribute
(attribute
(identifier_sys) identifier_sys
(identifier_stderr) identifier_stderr
)attribute
(identifier_write) identifier_write
)attribute
(argument_list
(call
(attribute
(string_"Error loading oauth secret from local file called '{0}'\n") string_"Error loading oauth secret from local file called '{0}'\n"
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_creds_file) identifier_creds_file
)argument_list
)call
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_sys) identifier_sys
(identifier_stderr) identifier_stderr
)attribute
(identifier_write) identifier_write
)attribute
(argument_list
(string_"\tThere should be a local OAuth credentials file \n") string_"\tThere should be a local OAuth credentials file \n"
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_sys) identifier_sys
(identifier_stderr) identifier_stderr
)attribute
(identifier_write) identifier_write
)attribute
(argument_list
(string_"\twhich has contents like this:\n") string_"\twhich has contents like this:\n"
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_sys) identifier_sys
(identifier_stderr) identifier_stderr
)attribute
(identifier_write) identifier_write
)attribute
(argument_list
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_sys) identifier_sys
(identifier_stderr) identifier_stderr
)attribute
(identifier_write) identifier_write
)attribute
(argument_list
(string_"\n") string_"\n"
)argument_list
)call
)expression_statement
(raise_statement
(identifier_e) identifier_e
)raise_statement
)block
)except_clause
)try_statement
)block
)function_definition
)module | read the oauth secrets and account ID from a credentials configuration file |
(module
(function_definition
(function_name_prepare) function_name_prepare
(parameters
(identifier_self) identifier_self
(identifier_params) identifier_params
)parameters
(block
(expression_statement
(assignment
(identifier_jsonparams) identifier_jsonparams
(call
(attribute
(identifier_json) identifier_json
(identifier_dumps) identifier_dumps
)attribute
(argument_list
(identifier_params) identifier_params
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_payload) identifier_payload
(call
(attribute
(identifier_base64) identifier_base64
(identifier_b64encode) identifier_b64encode
)attribute
(argument_list
(call
(attribute
(identifier_jsonparams) identifier_jsonparams
(identifier_encode) identifier_encode
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_signature) identifier_signature
(call
(attribute
(call
(attribute
(identifier_hmac) identifier_hmac
(identifier_new) identifier_new
)attribute
(argument_list
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_secret_key) identifier_secret_key
)attribute
(identifier_encode) identifier_encode
)attribute
(argument_list
)argument_list
)call
(identifier_payload) identifier_payload
(attribute
(identifier_hashlib) identifier_hashlib
(identifier_sha384) identifier_sha384
)attribute
)argument_list
)call
(identifier_hexdigest) identifier_hexdigest
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(return_statement
(dictionary
(pair
(string_'X-GEMINI-APIKEY') string_'X-GEMINI-APIKEY'
(attribute
(identifier_self) identifier_self
(identifier_api_key) identifier_api_key
)attribute
)pair
(pair
(string_'X-GEMINI-PAYLOAD') string_'X-GEMINI-PAYLOAD'
(identifier_payload) identifier_payload
)pair
(pair
(string_'X-GEMINI-SIGNATURE') string_'X-GEMINI-SIGNATURE'
(identifier_signature) identifier_signature
)pair
)dictionary
)return_statement
)block
)function_definition
)module | Prepare, return the required HTTP headers.
Base 64 encode the parameters, sign it with the secret key,
create the HTTP headers, return the whole payload.
Arguments:
params -- a dictionary of parameters |
(module
(function_definition
(function_name_default_settings) function_name_default_settings
(parameters
(identifier_params) identifier_params
)parameters
(block
(function_definition
(function_name__default_settings) function_name__default_settings
(parameters
(identifier_fn) identifier_fn
(identifier_command) identifier_command
)parameters
(block
(for_statement
(pattern_list
(identifier_k) identifier_k
(identifier_w) identifier_w
)pattern_list
(call
(attribute
(identifier_params) identifier_params
(identifier_items) identifier_items
)attribute
(argument_list
)argument_list
)call
(block
(expression_statement
(call
(attribute
(identifier_settings) identifier_settings
(identifier_setdefault) identifier_setdefault
)attribute
(argument_list
(identifier_k) identifier_k
(identifier_w) identifier_w
)argument_list
)call
)expression_statement
)block
)for_statement
(return_statement
(call
(identifier_fn) identifier_fn
(argument_list
(identifier_command) identifier_command
)argument_list
)call
)return_statement
)block
)function_definition
(return_statement
(call
(identifier_decorator) identifier_decorator
(argument_list
(identifier__default_settings) identifier__default_settings
)argument_list
)call
)return_statement
)block
)function_definition
)module | Adds default values to settings if it not presented.
Usage:
@default_settings({'apt': '/usr/bin/apt'})
def match(command):
print(settings.apt) |
(module
(function_definition
(function_name_fric) function_name_fric
(parameters
(identifier_FlowRate) identifier_FlowRate
(identifier_Diam) identifier_Diam
(identifier_Nu) identifier_Nu
(identifier_PipeRough) identifier_PipeRough
)parameters
(block
(expression_statement
(call
(attribute
(identifier_ut) identifier_ut
(identifier_check_range) identifier_check_range
)attribute
(argument_list
(list
(identifier_PipeRough) identifier_PipeRough
(string_"0-1") string_"0-1"
(string_"Pipe roughness") string_"Pipe roughness"
)list
)argument_list
)call
)expression_statement
(if_statement
(comparison_operator
(call
(identifier_re_pipe) identifier_re_pipe
(argument_list
(identifier_FlowRate) identifier_FlowRate
(identifier_Diam) identifier_Diam
(identifier_Nu) identifier_Nu
)argument_list
)call
(identifier_RE_TRANSITION_PIPE) identifier_RE_TRANSITION_PIPE
)comparison_operator
(block
(expression_statement
(assignment
(identifier_f) identifier_f
(parenthesized_expression
(binary_operator
(float_0.25) float_0.25
(binary_operator
(parenthesized_expression
(call
(attribute
(identifier_np) identifier_np
(identifier_log10) identifier_log10
)attribute
(argument_list
(binary_operator
(binary_operator
(identifier_PipeRough) identifier_PipeRough
(parenthesized_expression
(binary_operator
(float_3.7) float_3.7
(identifier_Diam) identifier_Diam
)binary_operator
)parenthesized_expression
)binary_operator
(binary_operator
(float_5.74) float_5.74
(binary_operator
(call
(identifier_re_pipe) identifier_re_pipe
(argument_list
(identifier_FlowRate) identifier_FlowRate
(identifier_Diam) identifier_Diam
(identifier_Nu) identifier_Nu
)argument_list
)call
(float_0.9) float_0.9
)binary_operator
)binary_operator
)binary_operator
)argument_list
)call
)parenthesized_expression
(integer_2) integer_2
)binary_operator
)binary_operator
)parenthesized_expression
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_f) identifier_f
(binary_operator
(integer_64) integer_64
(call
(identifier_re_pipe) identifier_re_pipe
(argument_list
(identifier_FlowRate) identifier_FlowRate
(identifier_Diam) identifier_Diam
(identifier_Nu) identifier_Nu
)argument_list
)call
)binary_operator
)assignment
)expression_statement
)block
)else_clause
)if_statement
(return_statement
(identifier_f) identifier_f
)return_statement
)block
)function_definition
)module | Return the friction factor for pipe flow.
This equation applies to both laminar and turbulent flows. |
(module
(function_definition
(function_name_plot_target) function_name_plot_target
(parameters
(identifier_target) identifier_target
(identifier_ax) identifier_ax
)parameters
(block
(expression_statement
(call
(attribute
(identifier_ax) identifier_ax
(identifier_scatter) identifier_scatter
)attribute
(argument_list
(subscript
(identifier_target) identifier_target
(integer_0) integer_0
)subscript
(subscript
(identifier_target) identifier_target
(integer_1) integer_1
)subscript
(subscript
(identifier_target) identifier_target
(integer_2) integer_2
)subscript
(keyword_argument
(identifier_c) identifier_c
(string_"red") string_"red"
)keyword_argument
(keyword_argument
(identifier_s) identifier_s
(integer_80) integer_80
)keyword_argument
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Ajoute la target au plot |
(module
(function_definition
(function_name__MakeMethodDescriptor) function_name__MakeMethodDescriptor
(parameters
(identifier_self) identifier_self
(identifier_method_proto) identifier_method_proto
(identifier_service_name) identifier_service_name
(identifier_package) identifier_package
(identifier_scope) identifier_scope
(identifier_index) identifier_index
)parameters
(block
(expression_statement
(assignment
(identifier_full_name) identifier_full_name
(call
(attribute
(string_'.') string_'.'
(identifier_join) identifier_join
)attribute
(argument_list
(tuple
(identifier_service_name) identifier_service_name
(attribute
(identifier_method_proto) identifier_method_proto
(identifier_name) identifier_name
)attribute
)tuple
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_input_type) identifier_input_type
(call
(attribute
(identifier_self) identifier_self
(identifier__GetTypeFromScope) identifier__GetTypeFromScope
)attribute
(argument_list
(identifier_package) identifier_package
(attribute
(identifier_method_proto) identifier_method_proto
(identifier_input_type) identifier_input_type
)attribute
(identifier_scope) identifier_scope
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_output_type) identifier_output_type
(call
(attribute
(identifier_self) identifier_self
(identifier__GetTypeFromScope) identifier__GetTypeFromScope
)attribute
(argument_list
(identifier_package) identifier_package
(attribute
(identifier_method_proto) identifier_method_proto
(identifier_output_type) identifier_output_type
)attribute
(identifier_scope) identifier_scope
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_descriptor) identifier_descriptor
(identifier_MethodDescriptor) identifier_MethodDescriptor
)attribute
(argument_list
(keyword_argument
(identifier_name) identifier_name
(attribute
(identifier_method_proto) identifier_method_proto
(identifier_name) identifier_name
)attribute
)keyword_argument
(keyword_argument
(identifier_full_name) identifier_full_name
(identifier_full_name) identifier_full_name
)keyword_argument
(keyword_argument
(identifier_index) identifier_index
(identifier_index) identifier_index
)keyword_argument
(keyword_argument
(identifier_containing_service) identifier_containing_service
(None) None
)keyword_argument
(keyword_argument
(identifier_input_type) identifier_input_type
(identifier_input_type) identifier_input_type
)keyword_argument
(keyword_argument
(identifier_output_type) identifier_output_type
(identifier_output_type) identifier_output_type
)keyword_argument
(keyword_argument
(identifier_options) identifier_options
(call
(identifier__OptionsOrNone) identifier__OptionsOrNone
(argument_list
(identifier_method_proto) identifier_method_proto
)argument_list
)call
)keyword_argument
)argument_list
)call
)return_statement
)block
)function_definition
)module | Creates a method descriptor from a MethodDescriptorProto.
Args:
method_proto: The proto describing the method.
service_name: The name of the containing service.
package: Optional package name to look up for types.
scope: Scope containing available types.
index: Index of the method in the service.
Returns:
An initialized MethodDescriptor object. |
(module
(function_definition
(function_name_clear_candidates) function_name_clear_candidates
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_clear_env) identifier_clear_env
(True) True
)default_parameter
)parameters
(block
(function_definition
(function_name_slave_task) function_name_slave_task
(parameters
(identifier_addr) identifier_addr
)parameters
(block
(expression_statement
(assignment
(identifier_r_manager) identifier_r_manager
(await
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_env) identifier_env
)attribute
(identifier_connect) identifier_connect
)attribute
(argument_list
(identifier_addr) identifier_addr
)argument_list
)call
)await
)assignment
)expression_statement
(return_statement
(await
(call
(attribute
(identifier_r_manager) identifier_r_manager
(identifier_clear_candidates) identifier_clear_candidates
)attribute
(argument_list
)argument_list
)call
)await
)return_statement
)block
)function_definition
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier__candidates) identifier__candidates
)attribute
(list
)list
)assignment
)expression_statement
(if_statement
(identifier_clear_env) identifier_clear_env
(block
(if_statement
(attribute
(identifier_self) identifier_self
(identifier__single_env) identifier__single_env
)attribute
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_env) identifier_env
)attribute
(identifier_clear_candidates) identifier_clear_candidates
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_mgrs) identifier_mgrs
(call
(attribute
(identifier_self) identifier_self
(identifier_get_managers) identifier_get_managers
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(identifier_run) identifier_run
(argument_list
(call
(identifier_create_tasks) identifier_create_tasks
(argument_list
(identifier_slave_task) identifier_slave_task
(identifier_mgrs) identifier_mgrs
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)else_clause
)if_statement
)block
)if_statement
)block
)function_definition
)module | Clear the current candidates.
:param bool clear_env:
If ``True``, clears also environment's (or its underlying slave
environments') candidates. |
(module
(function_definition
(function_name_page_not_found) function_name_page_not_found
(parameters
(identifier_request) identifier_request
(default_parameter
(identifier_template_name) identifier_template_name
(string_'404.html') string_'404.html'
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_response) identifier_response
(call
(identifier_render_in_page) identifier_render_in_page
(argument_list
(identifier_request) identifier_request
(identifier_template_name) identifier_template_name
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_response) identifier_response
(block
(return_statement
(identifier_response) identifier_response
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_template) identifier_template
(call
(identifier_Template) identifier_Template
(argument_list
(concatenated_string
(string_'<h1>Not Found</h1>') string_'<h1>Not Found</h1>'
(string_'<p>The requested URL {{ request_path }} was not found on this server.</p>') string_'<p>The requested URL {{ request_path }} was not found on this server.</p>'
)concatenated_string
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_body) identifier_body
(call
(attribute
(identifier_template) identifier_template
(identifier_render) identifier_render
)attribute
(argument_list
(call
(identifier_RequestContext) identifier_RequestContext
(argument_list
(identifier_request) identifier_request
(dictionary
(pair
(string_'request_path') string_'request_path'
(attribute
(identifier_request) identifier_request
(identifier_path) identifier_path
)attribute
)pair
)dictionary
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_http) identifier_http
(identifier_HttpResponseNotFound) identifier_HttpResponseNotFound
)attribute
(argument_list
(identifier_body) identifier_body
(keyword_argument
(identifier_content_type) identifier_content_type
(identifier_CONTENT_TYPE) identifier_CONTENT_TYPE
)keyword_argument
)argument_list
)call
)return_statement
)block
)function_definition
)module | Default 404 handler.
Templates: :template:`404.html`
Context:
request_path
The path of the requested URL (e.g., '/app/pages/bad_page/') |
(module
(function_definition
(function_name_landsat_c1_toa_cloud_mask) function_name_landsat_c1_toa_cloud_mask
(parameters
(identifier_input_img) identifier_input_img
(default_parameter
(identifier_snow_flag) identifier_snow_flag
(False) False
)default_parameter
(default_parameter
(identifier_cirrus_flag) identifier_cirrus_flag
(False) False
)default_parameter
(default_parameter
(identifier_cloud_confidence) identifier_cloud_confidence
(integer_2) integer_2
)default_parameter
(default_parameter
(identifier_shadow_confidence) identifier_shadow_confidence
(integer_3) integer_3
)default_parameter
(default_parameter
(identifier_snow_confidence) identifier_snow_confidence
(integer_3) integer_3
)default_parameter
(default_parameter
(identifier_cirrus_confidence) identifier_cirrus_confidence
(integer_3) integer_3
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_qa_img) identifier_qa_img
(call
(attribute
(identifier_input_img) identifier_input_img
(identifier_select) identifier_select
)attribute
(argument_list
(list
(string_'BQA') string_'BQA'
)list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_cloud_mask) identifier_cloud_mask
(call
(attribute
(call
(attribute
(call
(attribute
(call
(attribute
(call
(attribute
(identifier_qa_img) identifier_qa_img
(identifier_rightShift) identifier_rightShift
)attribute
(argument_list
(integer_4) integer_4
)argument_list
)call
(identifier_bitwiseAnd) identifier_bitwiseAnd
)attribute
(argument_list
(integer_1) integer_1
)argument_list
)call
(identifier_neq) identifier_neq
)attribute
(argument_list
(integer_0) integer_0
)argument_list
)call
(line_continuation_\) line_continuation_\
(identifier_And) identifier_And
)attribute
(argument_list
(call
(attribute
(call
(attribute
(call
(attribute
(identifier_qa_img) identifier_qa_img
(identifier_rightShift) identifier_rightShift
)attribute
(argument_list
(integer_5) integer_5
)argument_list
)call
(identifier_bitwiseAnd) identifier_bitwiseAnd
)attribute
(argument_list
(integer_3) integer_3
)argument_list
)call
(identifier_gte) identifier_gte
)attribute
(argument_list
(identifier_cloud_confidence) identifier_cloud_confidence
)argument_list
)call
)argument_list
)call
(line_continuation_\) line_continuation_\
(identifier_Or) identifier_Or
)attribute
(argument_list
(call
(attribute
(call
(attribute
(call
(attribute
(identifier_qa_img) identifier_qa_img
(identifier_rightShift) identifier_rightShift
)attribute
(argument_list
(integer_7) integer_7
)argument_list
)call
(identifier_bitwiseAnd) identifier_bitwiseAnd
)attribute
(argument_list
(integer_3) integer_3
)argument_list
)call
(identifier_gte) identifier_gte
)attribute
(argument_list
(identifier_shadow_confidence) identifier_shadow_confidence
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_snow_flag) identifier_snow_flag
(block
(expression_statement
(assignment
(identifier_cloud_mask) identifier_cloud_mask
(call
(attribute
(identifier_cloud_mask) identifier_cloud_mask
(identifier_Or) identifier_Or
)attribute
(argument_list
(call
(attribute
(call
(attribute
(call
(attribute
(identifier_qa_img) identifier_qa_img
(identifier_rightShift) identifier_rightShift
)attribute
(argument_list
(integer_9) integer_9
)argument_list
)call
(identifier_bitwiseAnd) identifier_bitwiseAnd
)attribute
(argument_list
(integer_3) integer_3
)argument_list
)call
(identifier_gte) identifier_gte
)attribute
(argument_list
(identifier_snow_confidence) identifier_snow_confidence
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(if_statement
(identifier_cirrus_flag) identifier_cirrus_flag
(block
(expression_statement
(assignment
(identifier_cloud_mask) identifier_cloud_mask
(call
(attribute
(identifier_cloud_mask) identifier_cloud_mask
(identifier_Or) identifier_Or
)attribute
(argument_list
(call
(attribute
(call
(attribute
(call
(attribute
(identifier_qa_img) identifier_qa_img
(identifier_rightShift) identifier_rightShift
)attribute
(argument_list
(integer_11) integer_11
)argument_list
)call
(identifier_bitwiseAnd) identifier_bitwiseAnd
)attribute
(argument_list
(integer_3) integer_3
)argument_list
)call
(identifier_gte) identifier_gte
)attribute
(argument_list
(identifier_cirrus_confidence) identifier_cirrus_confidence
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(return_statement
(call
(attribute
(identifier_cloud_mask) identifier_cloud_mask
(identifier_Not) identifier_Not
)attribute
(argument_list
)argument_list
)call
)return_statement
)block
)function_definition
)module | Extract cloud mask from the Landsat Collection 1 TOA BQA band
Parameters
----------
input_img : ee.Image
Image from a Landsat Collection 1 TOA collection with a BQA band
(e.g. LANDSAT/LE07/C01/T1_TOA).
snow_flag : bool
If true, mask snow pixels (the default is False).
cirrus_flag : bool
If true, mask cirrus pixels (the default is False).
Note, cirrus bits are only set for Landsat 8 (OLI) images.
cloud_confidence : int
Minimum cloud confidence value (the default is 2).
shadow_confidence : int
Minimum cloud confidence value (the default is 3).
snow_confidence : int
Minimum snow confidence value (the default is 3). Only used if
snow_flag is True.
cirrus_confidence : int
Minimum cirrus confidence value (the default is 3). Only used if
cirrus_flag is True.
Returns
-------
ee.Image
Notes
-----
Output image is structured to be applied directly with updateMask()
i.e. 0 is cloud, 1 is cloud free
Assuming Cloud must be set to check Cloud Confidence
Bits
0: Designated Fill
1: Terrain Occlusion (OLI) / Dropped Pixel (TM, ETM+)
2-3: Radiometric Saturation
4: Cloud
5-6: Cloud Confidence
7-8: Cloud Shadow Confidence
9-10: Snow/Ice Confidence
11-12: Cirrus Confidence (Landsat 8 only)
Confidence values
00: "Not Determined", algorithm did not determine the status of this
condition
01: "No", algorithm has low to no confidence that this condition exists
(0-33 percent confidence)
10: "Maybe", algorithm has medium confidence that this condition exists
(34-66 percent confidence)
11: "Yes", algorithm has high confidence that this condition exists
(67-100 percent confidence)
References
----------
https://landsat.usgs.gov/collectionqualityband |
(module
(function_definition
(function_name_check_read_permission) function_name_check_read_permission
(parameters
(identifier_self) identifier_self
(identifier_user_id) identifier_user_id
(default_parameter
(identifier_do_raise) identifier_do_raise
(True) True
)default_parameter
)parameters
(block
(if_statement
(call
(identifier__is_admin) identifier__is_admin
(argument_list
(identifier_user_id) identifier_user_id
)argument_list
)call
(block
(return_statement
(True) True
)return_statement
)block
)if_statement
(if_statement
(comparison_operator
(call
(identifier_int) identifier_int
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_created_by) identifier_created_by
)attribute
)argument_list
)call
(call
(identifier_int) identifier_int
(argument_list
(identifier_user_id) identifier_user_id
)argument_list
)call
)comparison_operator
(block
(return_statement
(True) True
)return_statement
)block
)if_statement
(for_statement
(identifier_owner) identifier_owner
(attribute
(identifier_self) identifier_self
(identifier_owners) identifier_owners
)attribute
(block
(if_statement
(comparison_operator
(call
(identifier_int) identifier_int
(argument_list
(attribute
(identifier_owner) identifier_owner
(identifier_user_id) identifier_user_id
)attribute
)argument_list
)call
(call
(identifier_int) identifier_int
(argument_list
(identifier_user_id) identifier_user_id
)argument_list
)call
)comparison_operator
(block
(if_statement
(comparison_operator
(attribute
(identifier_owner) identifier_owner
(identifier_view) identifier_view
)attribute
(string_'Y') string_'Y'
)comparison_operator
(block
(break_statement
)break_statement
)block
)if_statement
)block
)if_statement
)block
(else_clause
(block
(if_statement
(comparison_operator
(identifier_do_raise) identifier_do_raise
(True) True
)comparison_operator
(block
(raise_statement
(call
(identifier_PermissionError) identifier_PermissionError
(argument_list
(binary_operator
(concatenated_string
(string_"Permission denied. User %s does not have read") string_"Permission denied. User %s does not have read"
(string_" access on network %s") string_" access on network %s"
)concatenated_string
(tuple
(identifier_user_id) identifier_user_id
(attribute
(identifier_self) identifier_self
(identifier_id) identifier_id
)attribute
)tuple
)binary_operator
)argument_list
)call
)raise_statement
)block
(else_clause
(block
(return_statement
(False) False
)return_statement
)block
)else_clause
)if_statement
)block
)else_clause
)for_statement
(return_statement
(True) True
)return_statement
)block
)function_definition
)module | Check whether this user can read this network |
(module
(function_definition
(function_name_get_leads) function_name_get_leads
(parameters
(identifier_self) identifier_self
(list_splat_pattern
(identifier_guids) identifier_guids
)list_splat_pattern
(dictionary_splat_pattern
(identifier_options) identifier_options
)dictionary_splat_pattern
)parameters
(block
(expression_statement
(assignment
(identifier_original_options) identifier_original_options
(identifier_options) identifier_options
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_options) identifier_options
(call
(attribute
(identifier_self) identifier_self
(identifier_camelcase_search_options) identifier_camelcase_search_options
)attribute
(argument_list
(call
(attribute
(identifier_options) identifier_options
(identifier_copy) identifier_copy
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_params) identifier_params
(dictionary
)dictionary
)assignment
)expression_statement
(for_statement
(identifier_i) identifier_i
(call
(identifier_xrange) identifier_xrange
(argument_list
(call
(identifier_len) identifier_len
(argument_list
(identifier_guids) identifier_guids
)argument_list
)call
)argument_list
)call
(block
(expression_statement
(assignment
(subscript
(identifier_params) identifier_params
(binary_operator
(string_'guids[%s]') string_'guids[%s]'
(identifier_i) identifier_i
)binary_operator
)subscript
(subscript
(identifier_guids) identifier_guids
(identifier_i) identifier_i
)subscript
)assignment
)expression_statement
)block
)for_statement
(for_statement
(identifier_k) identifier_k
(call
(attribute
(identifier_options) identifier_options
(identifier_keys) identifier_keys
)attribute
(argument_list
)argument_list
)call
(block
(if_statement
(comparison_operator
(identifier_k) identifier_k
(identifier_SEARCH_OPTIONS) identifier_SEARCH_OPTIONS
)comparison_operator
(block
(expression_statement
(assignment
(subscript
(identifier_params) identifier_params
(identifier_k) identifier_k
)subscript
(subscript
(identifier_options) identifier_options
(identifier_k) identifier_k
)subscript
)assignment
)expression_statement
(delete_statement
(subscript
(identifier_options) identifier_options
(identifier_k) identifier_k
)subscript
)delete_statement
)block
)if_statement
)block
)for_statement
(expression_statement
(assignment
(identifier_leads) identifier_leads
(call
(attribute
(identifier_self) identifier_self
(identifier__call) identifier__call
)attribute
(argument_list
(string_'list/') string_'list/'
(identifier_params) identifier_params
(dictionary_splat
(identifier_options) identifier_options
)dictionary_splat
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_log) identifier_log
)attribute
(identifier_info) identifier_info
)attribute
(argument_list
(binary_operator
(string_"retrieved %s leads through API ( %soptions=%s )") string_"retrieved %s leads through API ( %soptions=%s )"
(tuple
(call
(identifier_len) identifier_len
(argument_list
(identifier_leads) identifier_leads
)argument_list
)call
(boolean_operator
(boolean_operator
(identifier_guids) identifier_guids
(binary_operator
(string_'guids=%s, ') string_'guids=%s, '
(identifier_guids) identifier_guids
)binary_operator
)boolean_operator
(string_'') string_''
)boolean_operator
(identifier_original_options) identifier_original_options
)tuple
)binary_operator
)argument_list
)call
)expression_statement
(return_statement
(identifier_leads) identifier_leads
)return_statement
)block
)function_definition
)module | Supports all the search parameters in the API as well as python underscored variants |
(module
(function_definition
(function_name_geturl) function_name_geturl
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(boolean_operator
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_retries) identifier_retries
)attribute
(None) None
)comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(attribute
(attribute
(identifier_self) identifier_self
(identifier_retries) identifier_retries
)attribute
(identifier_history) identifier_history
)attribute
)argument_list
)call
)boolean_operator
(block
(return_statement
(attribute
(subscript
(attribute
(attribute
(identifier_self) identifier_self
(identifier_retries) identifier_retries
)attribute
(identifier_history) identifier_history
)attribute
(unary_operator
(integer_1) integer_1
)unary_operator
)subscript
(identifier_redirect_location) identifier_redirect_location
)attribute
)return_statement
)block
(else_clause
(block
(return_statement
(attribute
(identifier_self) identifier_self
(identifier__request_url) identifier__request_url
)attribute
)return_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module | Returns the URL that was the source of this response.
If the request that generated this response redirected, this method
will return the final redirect location. |
(module
(function_definition
(function_name_clone_and_merge_sub) function_name_clone_and_merge_sub
(parameters
(identifier_self) identifier_self
(identifier_key) identifier_key
)parameters
(block
(expression_statement
(assignment
(identifier_new_comp) identifier_new_comp
(call
(attribute
(identifier_copy) identifier_copy
(identifier_deepcopy) identifier_deepcopy
)attribute
(argument_list
(identifier_self) identifier_self
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_new_comp) identifier_new_comp
(identifier_components) identifier_components
)attribute
(None) None
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_new_comp) identifier_new_comp
(identifier_comp_key) identifier_comp_key
)attribute
(identifier_key) identifier_key
)assignment
)expression_statement
(return_statement
(identifier_new_comp) identifier_new_comp
)return_statement
)block
)function_definition
)module | Clones self and merges clone with sub-component specific information
Parameters
----------
key : str
Key specifying which sub-component
Returns `ModelComponentInfo` object |
(module
(function_definition
(function_name_out_degree) function_name_out_degree
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_nbunch) identifier_nbunch
(None) None
)default_parameter
(default_parameter
(identifier_t) identifier_t
(None) None
)default_parameter
)parameters
(block
(if_statement
(comparison_operator
(identifier_nbunch) identifier_nbunch
(identifier_self) identifier_self
)comparison_operator
(block
(return_statement
(subscript
(call
(identifier_next) identifier_next
(argument_list
(call
(attribute
(identifier_self) identifier_self
(identifier_out_degree_iter) identifier_out_degree_iter
)attribute
(argument_list
(identifier_nbunch) identifier_nbunch
(identifier_t) identifier_t
)argument_list
)call
)argument_list
)call
(integer_1) integer_1
)subscript
)return_statement
)block
(else_clause
(block
(return_statement
(call
(identifier_dict) identifier_dict
(argument_list
(call
(attribute
(identifier_self) identifier_self
(identifier_out_degree_iter) identifier_out_degree_iter
)attribute
(argument_list
(identifier_nbunch) identifier_nbunch
(identifier_t) identifier_t
)argument_list
)call
)argument_list
)call
)return_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module | Return the out degree of a node or nodes at time t.
The node degree is the number of interaction outgoing from that node in a given time frame.
Parameters
----------
nbunch : iterable container, optional (default=all nodes)
A container of nodes. The container will be iterated
through once.
t : snapshot id (default=None)
If None will be returned the degree of nodes on the flattened graph.
Returns
-------
nd : dictionary, or number
A dictionary with nodes as keys and degree as values or
a number if a single node is specified.
Examples
--------
>>> G = dn.DynDiGraph()
>>> G.add_interactions(0,1, t=0)
>>> G.add_interactions(1,2, t=0)
>>> G.add_interactions(2,3, t=0)
>>> G.out_degree(0, t=0)
1
>>> G.out_degree([0,1], t=1)
{0: 0, 1: 0}
>>> list(G.out_degree([0,1], t=0).values())
[1, 2] |
(module
(function_definition
(function_name_stripArgs) function_name_stripArgs
(parameters
(identifier_args) identifier_args
(identifier_blacklist) identifier_blacklist
)parameters
(block
(expression_statement
(assignment
(identifier_blacklist) identifier_blacklist
(list_comprehension
(call
(attribute
(identifier_b) identifier_b
(identifier_lower) identifier_lower
)attribute
(argument_list
)argument_list
)call
(for_in_clause
(identifier_b) identifier_b
(identifier_blacklist) identifier_blacklist
)for_in_clause
)list_comprehension
)assignment
)expression_statement
(return_statement
(call
(identifier_list) identifier_list
(argument_list
(list_comprehension
(identifier_arg) identifier_arg
(for_in_clause
(identifier_arg) identifier_arg
(identifier_args) identifier_args
)for_in_clause
(if_clause
(comparison_operator
(call
(attribute
(identifier_arg) identifier_arg
(identifier_lower) identifier_lower
)attribute
(argument_list
)argument_list
)call
(identifier_blacklist) identifier_blacklist
)comparison_operator
)if_clause
)list_comprehension
)argument_list
)call
)return_statement
)block
)function_definition
)module | Removes any arguments in the supplied list that are contained in the specified blacklist |
(module
(function_definition
(function_name_role_required) function_name_role_required
(parameters
(default_parameter
(identifier_role_name) identifier_role_name
(None) None
)default_parameter
)parameters
(block
(function_definition
(function_name__role_required) function_name__role_required
(parameters
(identifier_http_method_handler) identifier_http_method_handler
)parameters
(block
(decorated_definition
(decorator
(call
(identifier_wraps) identifier_wraps
(argument_list
(identifier_http_method_handler) identifier_http_method_handler
)argument_list
)call
)decorator
(function_definition
(function_name_secure_http_method_handler) function_name_secure_http_method_handler
(parameters
(identifier_self) identifier_self
(list_splat_pattern
(identifier_args) identifier_args
)list_splat_pattern
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(if_statement
(comparison_operator
(identifier_role_name) identifier_role_name
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(identifier__message) identifier__message
(string_"Role name must be provided") string_"Role name must be provided"
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_authorization_error) identifier_authorization_error
(call
(attribute
(attribute
(identifier_prestans) identifier_prestans
(identifier_exception) identifier_exception
)attribute
(identifier_AuthorizationError) identifier_AuthorizationError
)attribute
(argument_list
(identifier__message) identifier__message
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_authorization_error) identifier_authorization_error
(identifier_request) identifier_request
)attribute
(attribute
(identifier_self) identifier_self
(identifier_request) identifier_request
)attribute
)assignment
)expression_statement
(raise_statement
(identifier_authorization_error) identifier_authorization_error
)raise_statement
)block
)if_statement
(if_statement
(not_operator
(attribute
(attribute
(identifier_self) identifier_self
(identifier___provider_config__) identifier___provider_config__
)attribute
(identifier_authentication) identifier_authentication
)attribute
)not_operator
(block
(expression_statement
(assignment
(identifier__message) identifier__message
(string_"Service available to authenticated users only, no auth context provider set in handler") string_"Service available to authenticated users only, no auth context provider set in handler"
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_authentication_error) identifier_authentication_error
(call
(attribute
(attribute
(identifier_prestans) identifier_prestans
(identifier_exception) identifier_exception
)attribute
(identifier_AuthenticationError) identifier_AuthenticationError
)attribute
(argument_list
(identifier__message) identifier__message
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_authentication_error) identifier_authentication_error
(identifier_request) identifier_request
)attribute
(attribute
(identifier_self) identifier_self
(identifier_request) identifier_request
)attribute
)assignment
)expression_statement
(raise_statement
(identifier_authentication_error) identifier_authentication_error
)raise_statement
)block
)if_statement
(if_statement
(not_operator
(call
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier___provider_config__) identifier___provider_config__
)attribute
(identifier_authentication) identifier_authentication
)attribute
(identifier_current_user_has_role) identifier_current_user_has_role
)attribute
(argument_list
(identifier_role_name) identifier_role_name
)argument_list
)call
)not_operator
(block
(expression_statement
(assignment
(identifier_authorization_error) identifier_authorization_error
(call
(attribute
(attribute
(identifier_prestans) identifier_prestans
(identifier_exception) identifier_exception
)attribute
(identifier_AuthorizationError) identifier_AuthorizationError
)attribute
(argument_list
(identifier_role_name) identifier_role_name
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_authorization_error) identifier_authorization_error
(identifier_request) identifier_request
)attribute
(attribute
(identifier_self) identifier_self
(identifier_request) identifier_request
)attribute
)assignment
)expression_statement
(raise_statement
(identifier_authorization_error) identifier_authorization_error
)raise_statement
)block
)if_statement
(expression_statement
(call
(identifier_http_method_handler) identifier_http_method_handler
(argument_list
(identifier_self) identifier_self
(list_splat
(identifier_args) identifier_args
)list_splat
(dictionary_splat
(identifier_kwargs) identifier_kwargs
)dictionary_splat
)argument_list
)call
)expression_statement
)block
)function_definition
)decorated_definition
(return_statement
(call
(call
(identifier_wraps) identifier_wraps
(argument_list
(identifier_http_method_handler) identifier_http_method_handler
)argument_list
)call
(argument_list
(identifier_secure_http_method_handler) identifier_secure_http_method_handler
)argument_list
)call
)return_statement
)block
)function_definition
(return_statement
(identifier__role_required) identifier__role_required
)return_statement
)block
)function_definition
)module | Authenticates a HTTP method handler based on a provided role
With a little help from Peter Cole's Blog
http://mrcoles.com/blog/3-decorator-examples-and-awesome-python/ |
(module
(function_definition
(function_name_run_hook) function_name_run_hook
(parameters
(identifier_hook_name) identifier_hook_name
(identifier_project_dir) identifier_project_dir
(identifier_context) identifier_context
)parameters
(block
(expression_statement
(assignment
(identifier_script) identifier_script
(call
(identifier_find_hook) identifier_find_hook
(argument_list
(identifier_hook_name) identifier_hook_name
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_script) identifier_script
(None) None
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_logger) identifier_logger
(identifier_debug) identifier_debug
)attribute
(argument_list
(call
(attribute
(string_'No {} hook found') string_'No {} hook found'
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_hook_name) identifier_hook_name
)argument_list
)call
)argument_list
)call
)expression_statement
(return_statement
)return_statement
)block
)if_statement
(expression_statement
(call
(attribute
(identifier_logger) identifier_logger
(identifier_debug) identifier_debug
)attribute
(argument_list
(call
(attribute
(string_'Running hook {}') string_'Running hook {}'
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_hook_name) identifier_hook_name
)argument_list
)call
)argument_list
)call
)expression_statement
(expression_statement
(call
(identifier_run_script_with_context) identifier_run_script_with_context
(argument_list
(identifier_script) identifier_script
(identifier_project_dir) identifier_project_dir
(identifier_context) identifier_context
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Try to find and execute a hook from the specified project directory.
:param hook_name: The hook to execute.
:param project_dir: The directory to execute the script from.
:param context: Cookiecutter project context. |
(module
(function_definition
(function_name_bqsr_table) function_name_bqsr_table
(parameters
(identifier_data) identifier_data
)parameters
(block
(expression_statement
(assignment
(identifier_in_file) identifier_in_file
(call
(attribute
(identifier_dd) identifier_dd
(identifier_get_align_bam) identifier_get_align_bam
)attribute
(argument_list
(identifier_data) identifier_data
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_out_file) identifier_out_file
(binary_operator
(string_"%s-recal-table.txt") string_"%s-recal-table.txt"
(subscript
(call
(attribute
(identifier_utils) identifier_utils
(identifier_splitext_plus) identifier_splitext_plus
)attribute
(argument_list
(identifier_in_file) identifier_in_file
)argument_list
)call
(integer_0) integer_0
)subscript
)binary_operator
)assignment
)expression_statement
(if_statement
(not_operator
(call
(attribute
(identifier_utils) identifier_utils
(identifier_file_uptodate) identifier_file_uptodate
)attribute
(argument_list
(identifier_out_file) identifier_out_file
(identifier_in_file) identifier_in_file
)argument_list
)call
)not_operator
(block
(with_statement
(with_clause
(with_item
(as_pattern
(call
(identifier_file_transaction) identifier_file_transaction
(argument_list
(identifier_data) identifier_data
(identifier_out_file) identifier_out_file
)argument_list
)call
(as_pattern_target
(identifier_tx_out_file) identifier_tx_out_file
)as_pattern_target
)as_pattern
)with_item
)with_clause
(block
(expression_statement
(assignment
(identifier_assoc_files) identifier_assoc_files
(call
(attribute
(identifier_dd) identifier_dd
(identifier_get_variation_resources) identifier_get_variation_resources
)attribute
(argument_list
(identifier_data) identifier_data
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_known) identifier_known
(conditional_expression
(binary_operator
(string_"-k %s") string_"-k %s"
(parenthesized_expression
(call
(attribute
(identifier_assoc_files) identifier_assoc_files
(identifier_get) identifier_get
)attribute
(argument_list
(string_"dbsnp") string_"dbsnp"
)argument_list
)call
)parenthesized_expression
)binary_operator
(comparison_operator
(string_"dbsnp") string_"dbsnp"
(identifier_assoc_files) identifier_assoc_files
)comparison_operator
(string_"") string_""
)conditional_expression
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_license) identifier_license
(call
(identifier_license_export) identifier_license_export
(argument_list
(identifier_data) identifier_data
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_cores) identifier_cores
(call
(attribute
(identifier_dd) identifier_dd
(identifier_get_num_cores) identifier_get_num_cores
)attribute
(argument_list
(identifier_data) identifier_data
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_ref_file) identifier_ref_file
(call
(attribute
(identifier_dd) identifier_dd
(identifier_get_ref_file) identifier_get_ref_file
)attribute
(argument_list
(identifier_data) identifier_data
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_cmd) identifier_cmd
(parenthesized_expression
(concatenated_string
(string_"{license}sentieon driver -t {cores} -r {ref_file} ") string_"{license}sentieon driver -t {cores} -r {ref_file} "
(string_"-i {in_file} --algo QualCal {known} {tx_out_file}") string_"-i {in_file} --algo QualCal {known} {tx_out_file}"
)concatenated_string
)parenthesized_expression
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_do) identifier_do
(identifier_run) identifier_run
)attribute
(argument_list
(call
(attribute
(identifier_cmd) identifier_cmd
(identifier_format) identifier_format
)attribute
(argument_list
(dictionary_splat
(call
(identifier_locals) identifier_locals
(argument_list
)argument_list
)call
)dictionary_splat
)argument_list
)call
(string_"Sentieon QualCal generate table") string_"Sentieon QualCal generate table"
)argument_list
)call
)expression_statement
)block
)with_statement
)block
)if_statement
(return_statement
(identifier_out_file) identifier_out_file
)return_statement
)block
)function_definition
)module | Generate recalibration tables as inputs to BQSR. |
(module
(function_definition
(function_name_get_user) function_name_get_user
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_query) identifier_query
(assignment
(identifier_data) identifier_data
(subscript
(subscript
(call
(attribute
(identifier_self) identifier_self
(identifier_raw_query) identifier_raw_query
)attribute
(argument_list
(identifier_query) identifier_query
(keyword_argument
(identifier_authorization) identifier_authorization
(True) True
)keyword_argument
)argument_list
)call
(string_'data') string_'data'
)subscript
(string_'user') string_'user'
)subscript
)assignment
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_utils) identifier_utils
(identifier_replace) identifier_replace
)attribute
(argument_list
(identifier_data) identifier_data
(string_"insertedAt") string_"insertedAt"
(attribute
(identifier_utils) identifier_utils
(identifier_parse_datetime_string) identifier_parse_datetime_string
)attribute
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_utils) identifier_utils
(identifier_replace) identifier_replace
)attribute
(argument_list
(identifier_data) identifier_data
(string_"availableUsd") string_"availableUsd"
(attribute
(identifier_utils) identifier_utils
(identifier_parse_float_string) identifier_parse_float_string
)attribute
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_utils) identifier_utils
(identifier_replace) identifier_replace
)attribute
(argument_list
(identifier_data) identifier_data
(string_"availableNmr") string_"availableNmr"
(attribute
(identifier_utils) identifier_utils
(identifier_parse_float_string) identifier_parse_float_string
)attribute
)argument_list
)call
)expression_statement
(return_statement
(identifier_data) identifier_data
)return_statement
)block
)function_definition
)module | Get all information about you!
Returns:
dict: user information including the following fields:
* assignedEthAddress (`str`)
* availableNmr (`decimal.Decimal`)
* availableUsd (`decimal.Decimal`)
* banned (`bool`)
* email (`str`)
* id (`str`)
* insertedAt (`datetime`)
* mfaEnabled (`bool`)
* status (`str`)
* username (`str`)
* country (`str)
* phoneNumber (`str`)
* apiTokens (`list`) each with the following fields:
* name (`str`)
* public_id (`str`)
* scopes (`list of str`)
Example:
>>> api = NumerAPI(secret_key="..", public_id="..")
>>> api.get_user()
{'apiTokens': [
{'name': 'tokenname',
'public_id': 'BLABLA',
'scopes': ['upload_submission', 'stake', ..]
}, ..],
'assignedEthAddress': '0x0000000000000000000000000001',
'availableNmr': Decimal('99.01'),
'availableUsd': Decimal('9.47'),
'banned': False,
'email': 'username@example.com',
'phoneNumber': '0123456',
'country': 'US',
'id': '1234-ABC..',
'insertedAt': datetime.datetime(2018, 1, 1, 2, 16, 48),
'mfaEnabled': False,
'status': 'VERIFIED',
'username': 'cool username'
} |
(module
(function_definition
(function_name_get_igraph_from_adjacency) function_name_get_igraph_from_adjacency
(parameters
(identifier_adjacency) identifier_adjacency
(default_parameter
(identifier_directed) identifier_directed
(None) None
)default_parameter
)parameters
(block
(import_statement
(aliased_import
(dotted_name
(identifier_igraph) identifier_igraph
)dotted_name
(identifier_ig) identifier_ig
)aliased_import
)import_statement
(expression_statement
(assignment
(pattern_list
(identifier_sources) identifier_sources
(identifier_targets) identifier_targets
)pattern_list
(call
(attribute
(identifier_adjacency) identifier_adjacency
(identifier_nonzero) identifier_nonzero
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_weights) identifier_weights
(subscript
(identifier_adjacency) identifier_adjacency
(identifier_sources) identifier_sources
(identifier_targets) identifier_targets
)subscript
)assignment
)expression_statement
(if_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_weights) identifier_weights
(attribute
(identifier_np) identifier_np
(identifier_matrix) identifier_matrix
)attribute
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_weights) identifier_weights
(attribute
(identifier_weights) identifier_weights
(identifier_A1) identifier_A1
)attribute
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_g) identifier_g
(call
(attribute
(identifier_ig) identifier_ig
(identifier_Graph) identifier_Graph
)attribute
(argument_list
(keyword_argument
(identifier_directed) identifier_directed
(identifier_directed) identifier_directed
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_g) identifier_g
(identifier_add_vertices) identifier_add_vertices
)attribute
(argument_list
(subscript
(attribute
(identifier_adjacency) identifier_adjacency
(identifier_shape) identifier_shape
)attribute
(integer_0) integer_0
)subscript
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_g) identifier_g
(identifier_add_edges) identifier_add_edges
)attribute
(argument_list
(call
(identifier_list) identifier_list
(argument_list
(call
(identifier_zip) identifier_zip
(argument_list
(identifier_sources) identifier_sources
(identifier_targets) identifier_targets
)argument_list
)call
)argument_list
)call
)argument_list
)call
)expression_statement
(try_statement
(block
(expression_statement
(assignment
(subscript
(attribute
(identifier_g) identifier_g
(identifier_es) identifier_es
)attribute
(string_'weight') string_'weight'
)subscript
(identifier_weights) identifier_weights
)assignment
)expression_statement
)block
(except_clause
(block
(pass_statement
)pass_statement
)block
)except_clause
)try_statement
(if_statement
(comparison_operator
(call
(attribute
(identifier_g) identifier_g
(identifier_vcount) identifier_vcount
)attribute
(argument_list
)argument_list
)call
(subscript
(attribute
(identifier_adjacency) identifier_adjacency
(identifier_shape) identifier_shape
)attribute
(integer_0) integer_0
)subscript
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_logg) identifier_logg
(identifier_warn) identifier_warn
)attribute
(argument_list
(call
(attribute
(concatenated_string
(string_'The constructed graph has only {} nodes. ') string_'The constructed graph has only {} nodes. '
(string_'Your adjacency matrix contained redundant nodes.') string_'Your adjacency matrix contained redundant nodes.'
)concatenated_string
(identifier_format) identifier_format
)attribute
(argument_list
(call
(attribute
(identifier_g) identifier_g
(identifier_vcount) identifier_vcount
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)if_statement
(return_statement
(identifier_g) identifier_g
)return_statement
)block
)function_definition
)module | Get igraph graph from adjacency matrix. |
(module
(function_definition
(function_name__resize) function_name__resize
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_lines) identifier_lines
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_text) identifier_text
)attribute
(identifier_split) identifier_split
)attribute
(argument_list
(string_'\n') string_'\n'
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(pattern_list
(identifier_xsize) identifier_xsize
(identifier_ysize) identifier_ysize
)pattern_list
(expression_list
(integer_0) integer_0
(integer_0) integer_0
)expression_list
)assignment
)expression_statement
(for_statement
(identifier_line) identifier_line
(identifier_lines) identifier_lines
(block
(expression_statement
(assignment
(identifier_size) identifier_size
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_textctrl) identifier_textctrl
)attribute
(identifier_GetTextExtent) identifier_GetTextExtent
)attribute
(argument_list
(identifier_line) identifier_line
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_xsize) identifier_xsize
(call
(identifier_max) identifier_max
(argument_list
(identifier_xsize) identifier_xsize
(subscript
(identifier_size) identifier_size
(integer_0) integer_0
)subscript
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_ysize) identifier_ysize
(binary_operator
(identifier_ysize) identifier_ysize
(subscript
(identifier_size) identifier_size
(integer_1) integer_1
)subscript
)binary_operator
)assignment
)expression_statement
)block
)for_statement
(expression_statement
(assignment
(identifier_xsize) identifier_xsize
(call
(identifier_int) identifier_int
(argument_list
(binary_operator
(identifier_xsize) identifier_xsize
(float_1.2) float_1.2
)binary_operator
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_textctrl) identifier_textctrl
)attribute
(identifier_SetSize) identifier_SetSize
)attribute
(argument_list
(tuple
(identifier_xsize) identifier_xsize
(identifier_ysize) identifier_ysize
)tuple
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_textctrl) identifier_textctrl
)attribute
(identifier_SetMinSize) identifier_SetMinSize
)attribute
(argument_list
(tuple
(identifier_xsize) identifier_xsize
(identifier_ysize) identifier_ysize
)tuple
)argument_list
)call
)expression_statement
)block
)function_definition
)module | calculate and set text size, handling multi-line |
(module
(function_definition
(function_name_fetch_meta_by_name) function_name_fetch_meta_by_name
(parameters
(identifier_name) identifier_name
(default_parameter
(identifier_filter_context) identifier_filter_context
(None) None
)default_parameter
(default_parameter
(identifier_exact_match) identifier_exact_match
(True) True
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_result) identifier_result
(call
(attribute
(call
(identifier_SMCRequest) identifier_SMCRequest
(argument_list
(keyword_argument
(identifier_params) identifier_params
(dictionary
(pair
(string_'filter') string_'filter'
(identifier_name) identifier_name
)pair
(pair
(string_'filter_context') string_'filter_context'
(identifier_filter_context) identifier_filter_context
)pair
(pair
(string_'exact_match') string_'exact_match'
(identifier_exact_match) identifier_exact_match
)pair
)dictionary
)keyword_argument
)argument_list
)call
(identifier_read) identifier_read
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(if_statement
(not_operator
(attribute
(identifier_result) identifier_result
(identifier_json) identifier_json
)attribute
)not_operator
(block
(expression_statement
(assignment
(attribute
(identifier_result) identifier_result
(identifier_json) identifier_json
)attribute
(list
)list
)assignment
)expression_statement
)block
)if_statement
(return_statement
(identifier_result) identifier_result
)return_statement
)block
)function_definition
)module | Find the element based on name and optional filters. By default, the
name provided uses the standard filter query. Additional filters can
be used based on supported collections in the SMC API.
:method: GET
:param str name: element name, can use * as wildcard
:param str filter_context: further filter request, i.e. 'host', 'group',
'single_fw', 'network_elements', 'services',
'services_and_applications'
:param bool exact_match: Do an exact match by name, note this still can
return multiple entries
:rtype: SMCResult |
(module
(function_definition
(function_name_asynchronous) function_name_asynchronous
(parameters
(identifier_self) identifier_self
(identifier_fun) identifier_fun
(identifier_low) identifier_low
(default_parameter
(identifier_user) identifier_user
(string_'UNKNOWN') string_'UNKNOWN'
)default_parameter
(default_parameter
(identifier_pub) identifier_pub
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_async_pub) identifier_async_pub
(conditional_expression
(identifier_pub) identifier_pub
(comparison_operator
(identifier_pub) identifier_pub
(None) None
)comparison_operator
(call
(attribute
(identifier_self) identifier_self
(identifier__gen_async_pub) identifier__gen_async_pub
)attribute
(argument_list
)argument_list
)call
)conditional_expression
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_proc) identifier_proc
(call
(attribute
(attribute
(attribute
(identifier_salt) identifier_salt
(identifier_utils) identifier_utils
)attribute
(identifier_process) identifier_process
)attribute
(identifier_SignalHandlingMultiprocessingProcess) identifier_SignalHandlingMultiprocessingProcess
)attribute
(argument_list
(keyword_argument
(identifier_target) identifier_target
(attribute
(identifier_self) identifier_self
(identifier__proc_function) identifier__proc_function
)attribute
)keyword_argument
(keyword_argument
(identifier_args) identifier_args
(tuple
(identifier_fun) identifier_fun
(identifier_low) identifier_low
(identifier_user) identifier_user
(subscript
(identifier_async_pub) identifier_async_pub
(string_'tag') string_'tag'
)subscript
(subscript
(identifier_async_pub) identifier_async_pub
(string_'jid') string_'jid'
)subscript
)tuple
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(with_statement
(with_clause
(with_item
(call
(attribute
(attribute
(attribute
(identifier_salt) identifier_salt
(identifier_utils) identifier_utils
)attribute
(identifier_process) identifier_process
)attribute
(identifier_default_signals) identifier_default_signals
)attribute
(argument_list
(attribute
(identifier_signal) identifier_signal
(identifier_SIGINT) identifier_SIGINT
)attribute
(attribute
(identifier_signal) identifier_signal
(identifier_SIGTERM) identifier_SIGTERM
)attribute
)argument_list
)call
)with_item
)with_clause
(block
(expression_statement
(call
(attribute
(identifier_proc) identifier_proc
(identifier_start) identifier_start
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)with_statement
(expression_statement
(call
(attribute
(identifier_proc) identifier_proc
(identifier_join) identifier_join
)attribute
(argument_list
)argument_list
)call
)expression_statement
(return_statement
(identifier_async_pub) identifier_async_pub
)return_statement
)block
)function_definition
)module | Execute the function in a multiprocess and return the event tag to use
to watch for the return |
(module
(function_definition
(function_name_reject) function_name_reject
(parameters
(identifier_self) identifier_self
(identifier_delivery_tag) identifier_delivery_tag
(default_parameter
(identifier_requeue) identifier_requeue
(False) False
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_args) identifier_args
(call
(identifier_Writer) identifier_Writer
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(call
(attribute
(identifier_args) identifier_args
(identifier_write_longlong) identifier_write_longlong
)attribute
(argument_list
(identifier_delivery_tag) identifier_delivery_tag
)argument_list
)call
(line_continuation_\) line_continuation_\
(identifier_write_bit) identifier_write_bit
)attribute
(argument_list
(identifier_requeue) identifier_requeue
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_send_frame) identifier_send_frame
)attribute
(argument_list
(call
(identifier_MethodFrame) identifier_MethodFrame
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_channel_id) identifier_channel_id
)attribute
(integer_60) integer_60
(integer_90) integer_90
(identifier_args) identifier_args
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Reject a message. |
(module
(function_definition
(function_name_uninstall) function_name_uninstall
(parameters
(identifier_ctx) identifier_ctx
(identifier_state) identifier_state
(default_parameter
(identifier_all_dev) identifier_all_dev
(False) False
)default_parameter
(default_parameter
(identifier_all) identifier_all
(False) False
)default_parameter
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(import_from_statement
(relative_import
(import_prefix
)import_prefix
(dotted_name
(identifier_core) identifier_core
)dotted_name
)relative_import
(dotted_name
(identifier_do_uninstall) identifier_do_uninstall
)dotted_name
)import_from_statement
(expression_statement
(assignment
(identifier_retcode) identifier_retcode
(call
(identifier_do_uninstall) identifier_do_uninstall
(argument_list
(keyword_argument
(identifier_packages) identifier_packages
(attribute
(attribute
(identifier_state) identifier_state
(identifier_installstate) identifier_installstate
)attribute
(identifier_packages) identifier_packages
)attribute
)keyword_argument
(keyword_argument
(identifier_editable_packages) identifier_editable_packages
(attribute
(attribute
(identifier_state) identifier_state
(identifier_installstate) identifier_installstate
)attribute
(identifier_editables) identifier_editables
)attribute
)keyword_argument
(keyword_argument
(identifier_three) identifier_three
(attribute
(identifier_state) identifier_state
(identifier_three) identifier_three
)attribute
)keyword_argument
(keyword_argument
(identifier_python) identifier_python
(attribute
(identifier_state) identifier_state
(identifier_python) identifier_python
)attribute
)keyword_argument
(keyword_argument
(identifier_system) identifier_system
(attribute
(identifier_state) identifier_state
(identifier_system) identifier_system
)attribute
)keyword_argument
(keyword_argument
(identifier_lock) identifier_lock
(not_operator
(attribute
(attribute
(identifier_state) identifier_state
(identifier_installstate) identifier_installstate
)attribute
(identifier_skip_lock) identifier_skip_lock
)attribute
)not_operator
)keyword_argument
(keyword_argument
(identifier_all_dev) identifier_all_dev
(identifier_all_dev) identifier_all_dev
)keyword_argument
(keyword_argument
(identifier_all) identifier_all
(identifier_all) identifier_all
)keyword_argument
(keyword_argument
(identifier_keep_outdated) identifier_keep_outdated
(attribute
(attribute
(identifier_state) identifier_state
(identifier_installstate) identifier_installstate
)attribute
(identifier_keep_outdated) identifier_keep_outdated
)attribute
)keyword_argument
(keyword_argument
(identifier_pypi_mirror) identifier_pypi_mirror
(attribute
(identifier_state) identifier_state
(identifier_pypi_mirror) identifier_pypi_mirror
)attribute
)keyword_argument
(keyword_argument
(identifier_ctx) identifier_ctx
(identifier_ctx) identifier_ctx
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_retcode) identifier_retcode
(block
(expression_statement
(call
(attribute
(identifier_sys) identifier_sys
(identifier_exit) identifier_exit
)attribute
(argument_list
(identifier_retcode) identifier_retcode
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)function_definition
)module | Un-installs a provided package and removes it from Pipfile. |
(module
(function_definition
(function_name_new) function_name_new
(parameters
(typed_parameter
(identifier_filename) identifier_filename
(type
(identifier_str) identifier_str
)type
)typed_parameter
(keyword_separator
)keyword_separator
(typed_default_parameter
(identifier_file_attrs) identifier_file_attrs
(type
(generic_type
(identifier_Optional) identifier_Optional
(type_parameter
(type
(generic_type
(identifier_Dict) identifier_Dict
(type_parameter
(type
(identifier_str) identifier_str
)type
(type
(identifier_str) identifier_str
)type
)type_parameter
)generic_type
)type
)type_parameter
)generic_type
)type
(None) None
)typed_default_parameter
)parameters
(type
(identifier_LoomConnection) identifier_LoomConnection
)type
(block
(if_statement
(call
(attribute
(identifier_filename) identifier_filename
(identifier_startswith) identifier_startswith
)attribute
(argument_list
(string_"~/") string_"~/"
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_filename) identifier_filename
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_expanduser) identifier_expanduser
)attribute
(argument_list
(identifier_filename) identifier_filename
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(if_statement
(comparison_operator
(identifier_file_attrs) identifier_file_attrs
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(identifier_file_attrs) identifier_file_attrs
(dictionary
)dictionary
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_f) identifier_f
(call
(attribute
(identifier_h5py) identifier_h5py
(identifier_File) identifier_File
)attribute
(argument_list
(keyword_argument
(identifier_name) identifier_name
(identifier_filename) identifier_filename
)keyword_argument
(keyword_argument
(identifier_mode) identifier_mode
(string_'w') string_'w'
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_f) identifier_f
(identifier_create_group) identifier_create_group
)attribute
(argument_list
(string_'/layers') string_'/layers'
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_f) identifier_f
(identifier_create_group) identifier_create_group
)attribute
(argument_list
(string_'/row_attrs') string_'/row_attrs'
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_f) identifier_f
(identifier_create_group) identifier_create_group
)attribute
(argument_list
(string_'/col_attrs') string_'/col_attrs'
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_f) identifier_f
(identifier_create_group) identifier_create_group
)attribute
(argument_list
(string_'/row_graphs') string_'/row_graphs'
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_f) identifier_f
(identifier_create_group) identifier_create_group
)attribute
(argument_list
(string_'/col_graphs') string_'/col_graphs'
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_f) identifier_f
(identifier_flush) identifier_flush
)attribute
(argument_list
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_f) identifier_f
(identifier_close) identifier_close
)attribute
(argument_list
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_ds) identifier_ds
(call
(identifier_connect) identifier_connect
(argument_list
(identifier_filename) identifier_filename
(keyword_argument
(identifier_validate) identifier_validate
(False) False
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(for_statement
(identifier_vals) identifier_vals
(identifier_file_attrs) identifier_file_attrs
(block
(expression_statement
(assignment
(subscript
(attribute
(identifier_ds) identifier_ds
(identifier_attrs) identifier_attrs
)attribute
(identifier_vals) identifier_vals
)subscript
(subscript
(identifier_file_attrs) identifier_file_attrs
(identifier_vals) identifier_vals
)subscript
)assignment
)expression_statement
)block
)for_statement
(expression_statement
(assignment
(identifier_currentTime) identifier_currentTime
(call
(attribute
(identifier_time) identifier_time
(identifier_localtime) identifier_localtime
)attribute
(argument_list
(call
(attribute
(identifier_time) identifier_time
(identifier_time) identifier_time
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(attribute
(identifier_ds) identifier_ds
(identifier_attrs) identifier_attrs
)attribute
(string_'CreationDate') string_'CreationDate'
)subscript
(call
(identifier_timestamp) identifier_timestamp
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(attribute
(identifier_ds) identifier_ds
(identifier_attrs) identifier_attrs
)attribute
(string_"LOOM_SPEC_VERSION") string_"LOOM_SPEC_VERSION"
)subscript
(attribute
(identifier_loompy) identifier_loompy
(identifier_loom_spec_version) identifier_loom_spec_version
)attribute
)assignment
)expression_statement
(return_statement
(identifier_ds) identifier_ds
)return_statement
)block
)function_definition
)module | Create an empty Loom file, and return it as a context manager. |
(module
(function_definition
(function_name_copy_layer_keywords) function_name_copy_layer_keywords
(parameters
(identifier_layer_keywords) identifier_layer_keywords
)parameters
(block
(expression_statement
(assignment
(identifier_copy_keywords) identifier_copy_keywords
(dictionary
)dictionary
)assignment
)expression_statement
(for_statement
(pattern_list
(identifier_key) identifier_key
(identifier_value) identifier_value
)pattern_list
(call
(identifier_list) identifier_list
(argument_list
(call
(attribute
(identifier_layer_keywords) identifier_layer_keywords
(identifier_items) identifier_items
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
(block
(if_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_value) identifier_value
(identifier_QUrl) identifier_QUrl
)argument_list
)call
(block
(expression_statement
(assignment
(subscript
(identifier_copy_keywords) identifier_copy_keywords
(identifier_key) identifier_key
)subscript
(call
(attribute
(identifier_value) identifier_value
(identifier_toString) identifier_toString
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
)block
(elif_clause
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_value) identifier_value
(identifier_datetime) identifier_datetime
)argument_list
)call
(block
(expression_statement
(assignment
(subscript
(identifier_copy_keywords) identifier_copy_keywords
(identifier_key) identifier_key
)subscript
(call
(attribute
(call
(attribute
(identifier_value) identifier_value
(identifier_date) identifier_date
)attribute
(argument_list
)argument_list
)call
(identifier_isoformat) identifier_isoformat
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
)block
)elif_clause
(elif_clause
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_value) identifier_value
(identifier_QDate) identifier_QDate
)argument_list
)call
(block
(expression_statement
(assignment
(subscript
(identifier_copy_keywords) identifier_copy_keywords
(identifier_key) identifier_key
)subscript
(call
(attribute
(identifier_value) identifier_value
(identifier_toString) identifier_toString
)attribute
(argument_list
(attribute
(identifier_Qt) identifier_Qt
(identifier_ISODate) identifier_ISODate
)attribute
)argument_list
)call
)assignment
)expression_statement
)block
)elif_clause
(elif_clause
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_value) identifier_value
(identifier_QDateTime) identifier_QDateTime
)argument_list
)call
(block
(expression_statement
(assignment
(subscript
(identifier_copy_keywords) identifier_copy_keywords
(identifier_key) identifier_key
)subscript
(call
(attribute
(identifier_value) identifier_value
(identifier_toString) identifier_toString
)attribute
(argument_list
(attribute
(identifier_Qt) identifier_Qt
(identifier_ISODate) identifier_ISODate
)attribute
)argument_list
)call
)assignment
)expression_statement
)block
)elif_clause
(elif_clause
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_value) identifier_value
(identifier_date) identifier_date
)argument_list
)call
(block
(expression_statement
(assignment
(subscript
(identifier_copy_keywords) identifier_copy_keywords
(identifier_key) identifier_key
)subscript
(call
(attribute
(identifier_value) identifier_value
(identifier_isoformat) identifier_isoformat
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
)block
)elif_clause
(else_clause
(block
(expression_statement
(assignment
(subscript
(identifier_copy_keywords) identifier_copy_keywords
(identifier_key) identifier_key
)subscript
(call
(identifier_deepcopy) identifier_deepcopy
(argument_list
(identifier_value) identifier_value
)argument_list
)call
)assignment
)expression_statement
)block
)else_clause
)if_statement
)block
)for_statement
(return_statement
(identifier_copy_keywords) identifier_copy_keywords
)return_statement
)block
)function_definition
)module | Helper to make a deep copy of a layer keywords.
:param layer_keywords: A dictionary of layer's keywords.
:type layer_keywords: dict
:returns: A deep copy of layer keywords.
:rtype: dict |
(module
(function_definition
(function_name_get_analyses) function_name_get_analyses
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_analyses) identifier_analyses
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_context) identifier_context
)attribute
(identifier_getAnalyses) identifier_getAnalyses
)attribute
(argument_list
(keyword_argument
(identifier_full_objects) identifier_full_objects
(True) True
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(identifier_filter) identifier_filter
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_is_analysis_attachment_allowed) identifier_is_analysis_attachment_allowed
)attribute
(identifier_analyses) identifier_analyses
)argument_list
)call
)return_statement
)block
)function_definition
)module | Returns a list of analyses from the AR |
(module
(function_definition
(function_name_decrypt_block) function_name_decrypt_block
(parameters
(identifier_self) identifier_self
(identifier_cipherText) identifier_cipherText
)parameters
(block
(if_statement
(not_operator
(attribute
(identifier_self) identifier_self
(identifier_initialized) identifier_initialized
)attribute
)not_operator
(block
(raise_statement
(call
(identifier_TypeError) identifier_TypeError
(argument_list
(string_"CamCrypt object has not been initialized") string_"CamCrypt object has not been initialized"
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_cipherText) identifier_cipherText
)argument_list
)call
(identifier_BLOCK_SIZE) identifier_BLOCK_SIZE
)comparison_operator
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(binary_operator
(string_"cipherText must be %d bytes long (received %d bytes)") string_"cipherText must be %d bytes long (received %d bytes)"
(tuple
(identifier_BLOCK_SIZE) identifier_BLOCK_SIZE
(call
(identifier_len) identifier_len
(argument_list
(identifier_cipherText) identifier_cipherText
)argument_list
)call
)tuple
)binary_operator
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_plain) identifier_plain
(call
(attribute
(identifier_ctypes) identifier_ctypes
(identifier_create_string_buffer) identifier_create_string_buffer
)attribute
(argument_list
(identifier_BLOCK_SIZE) identifier_BLOCK_SIZE
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_decblock) identifier_decblock
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_bitlen) identifier_bitlen
)attribute
(identifier_cipherText) identifier_cipherText
(attribute
(identifier_self) identifier_self
(identifier_keytable) identifier_keytable
)attribute
(identifier_plain) identifier_plain
)argument_list
)call
)expression_statement
(return_statement
(attribute
(identifier_plain) identifier_plain
(identifier_raw) identifier_raw
)attribute
)return_statement
)block
)function_definition
)module | Decrypt a 16-byte block of data.
NOTE: This function was formerly called `decrypt`, but was changed when
support for decrypting arbitrary-length strings was added.
Args:
cipherText (str): 16-byte data.
Returns:
16-byte str.
Raises:
TypeError if CamCrypt object has not been initialized.
ValueError if `cipherText` is not BLOCK_SIZE (i.e. 16) bytes. |
(module
(function_definition
(function_name_enable_repositories) function_name_enable_repositories
(parameters
(identifier_self) identifier_self
(identifier_repositories) identifier_repositories
)parameters
(block
(for_statement
(identifier_r) identifier_r
(identifier_repositories) identifier_repositories
(block
(if_statement
(comparison_operator
(subscript
(identifier_r) identifier_r
(string_'type') string_'type'
)subscript
(string_'rhsm_channel') string_'rhsm_channel'
)comparison_operator
(block
(continue_statement
)continue_statement
)block
)if_statement
(if_statement
(comparison_operator
(subscript
(identifier_r) identifier_r
(string_'name') string_'name'
)subscript
(attribute
(identifier_self) identifier_self
(identifier_rhsm_channels) identifier_rhsm_channels
)attribute
)comparison_operator
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_rhsm_channels) identifier_rhsm_channels
)attribute
(identifier_append) identifier_append
)attribute
(argument_list
(subscript
(identifier_r) identifier_r
(string_'name') string_'name'
)subscript
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)for_statement
(if_statement
(attribute
(identifier_self) identifier_self
(identifier_rhsm_active) identifier_rhsm_active
)attribute
(block
(expression_statement
(assignment
(identifier_subscription_cmd) identifier_subscription_cmd
(binary_operator
(string_"subscription-manager repos '--disable=*' --enable=") string_"subscription-manager repos '--disable=*' --enable="
(call
(attribute
(string_' --enable=') string_' --enable='
(identifier_join) identifier_join
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_rhsm_channels) identifier_rhsm_channels
)attribute
)argument_list
)call
)binary_operator
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_run) identifier_run
)attribute
(argument_list
(identifier_subscription_cmd) identifier_subscription_cmd
)argument_list
)call
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_repo_files) identifier_repo_files
(list_comprehension
(identifier_r) identifier_r
(for_in_clause
(identifier_r) identifier_r
(identifier_repositories) identifier_repositories
)for_in_clause
(if_clause
(comparison_operator
(subscript
(identifier_r) identifier_r
(string_'type') string_'type'
)subscript
(string_'yum_repo') string_'yum_repo'
)comparison_operator
)if_clause
)list_comprehension
)assignment
)expression_statement
(for_statement
(identifier_repo_file) identifier_repo_file
(identifier_repo_files) identifier_repo_files
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_create_file) identifier_create_file
)attribute
(argument_list
(subscript
(identifier_repo_file) identifier_repo_file
(string_'dest') string_'dest'
)subscript
(subscript
(identifier_repo_file) identifier_repo_file
(string_'content') string_'content'
)subscript
)argument_list
)call
)expression_statement
)block
)for_statement
(expression_statement
(assignment
(identifier_packages) identifier_packages
(list_comprehension
(subscript
(identifier_r) identifier_r
(string_'name') string_'name'
)subscript
(for_in_clause
(identifier_r) identifier_r
(identifier_repositories) identifier_repositories
)for_in_clause
(if_clause
(comparison_operator
(subscript
(identifier_r) identifier_r
(string_'type') string_'type'
)subscript
(string_'package') string_'package'
)comparison_operator
)if_clause
)list_comprehension
)assignment
)expression_statement
(if_statement
(identifier_packages) identifier_packages
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_yum_install) identifier_yum_install
)attribute
(argument_list
(identifier_packages) identifier_packages
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)function_definition
)module | Enable a list of RHSM repositories.
:param repositories: a dict in this format:
[{'type': 'rhsm_channel', 'name': 'rhel-7-server-rpms'}] |
(module
(function_definition
(function_name__handle_dumps) function_name__handle_dumps
(parameters
(identifier_self) identifier_self
(identifier_handler) identifier_handler
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(return_statement
(call
(attribute
(identifier_handler) identifier_handler
(identifier_dumps) identifier_dumps
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier___class__) identifier___class__
)attribute
(call
(identifier_to_dict) identifier_to_dict
(argument_list
(identifier_self) identifier_self
)argument_list
)call
(dictionary_splat
(identifier_kwargs) identifier_kwargs
)dictionary_splat
)argument_list
)call
)return_statement
)block
)function_definition
)module | Dumps caller, used by partial method for dynamic handler assignments.
:param object handler: The dump handler
:return: The dumped string
:rtype: str |
(module
(function_definition
(function_name_until) function_name_until
(parameters
(identifier_self) identifier_self
(identifier_method) identifier_method
(default_parameter
(identifier_message) identifier_message
(string_'') string_''
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_screen) identifier_screen
(None) None
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_stacktrace) identifier_stacktrace
(None) None
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_end_time) identifier_end_time
(binary_operator
(call
(attribute
(identifier_time) identifier_time
(identifier_time) identifier_time
)attribute
(argument_list
)argument_list
)call
(attribute
(identifier_self) identifier_self
(identifier__timeout) identifier__timeout
)attribute
)binary_operator
)assignment
)expression_statement
(while_statement
(True) True
(block
(try_statement
(block
(expression_statement
(assignment
(identifier_value) identifier_value
(call
(identifier_method) identifier_method
(argument_list
(attribute
(identifier_self) identifier_self
(identifier__driver) identifier__driver
)attribute
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_value) identifier_value
(block
(return_statement
(identifier_value) identifier_value
)return_statement
)block
)if_statement
)block
(except_clause
(as_pattern
(attribute
(identifier_self) identifier_self
(identifier__ignored_exceptions) identifier__ignored_exceptions
)attribute
(as_pattern_target
(identifier_exc) identifier_exc
)as_pattern_target
)as_pattern
(block
(expression_statement
(assignment
(identifier_screen) identifier_screen
(call
(identifier_getattr) identifier_getattr
(argument_list
(identifier_exc) identifier_exc
(string_'screen') string_'screen'
(None) None
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_stacktrace) identifier_stacktrace
(call
(identifier_getattr) identifier_getattr
(argument_list
(identifier_exc) identifier_exc
(string_'stacktrace') string_'stacktrace'
(None) None
)argument_list
)call
)assignment
)expression_statement
)block
)except_clause
)try_statement
(expression_statement
(call
(attribute
(identifier_time) identifier_time
(identifier_sleep) identifier_sleep
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier__poll) identifier__poll
)attribute
)argument_list
)call
)expression_statement
(if_statement
(comparison_operator
(call
(attribute
(identifier_time) identifier_time
(identifier_time) identifier_time
)attribute
(argument_list
)argument_list
)call
(identifier_end_time) identifier_end_time
)comparison_operator
(block
(break_statement
)break_statement
)block
)if_statement
)block
)while_statement
(raise_statement
(call
(identifier_TimeoutException) identifier_TimeoutException
(argument_list
(identifier_message) identifier_message
(identifier_screen) identifier_screen
(identifier_stacktrace) identifier_stacktrace
)argument_list
)call
)raise_statement
)block
)function_definition
)module | Calls the method provided with the driver as an argument until the \
return value does not evaluate to ``False``.
:param method: callable(WebDriver)
:param message: optional message for :exc:`TimeoutException`
:returns: the result of the last call to `method`
:raises: :exc:`selenium.common.exceptions.TimeoutException` if timeout occurs |
(module
(function_definition
(function_name_read_local_manifest) function_name_read_local_manifest
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_manifest) identifier_manifest
(call
(identifier_file_or_default) identifier_file_or_default
(argument_list
(call
(attribute
(identifier_self) identifier_self
(identifier_get_full_file_path) identifier_get_full_file_path
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_manifest_file) identifier_manifest_file
)attribute
)argument_list
)call
(dictionary
(pair
(string_'format_version') string_'format_version'
(integer_2) integer_2
)pair
(pair
(string_'root') string_'root'
(string_'/') string_'/'
)pair
(pair
(string_'have_revision') string_'have_revision'
(string_'root') string_'root'
)pair
(pair
(string_'files') string_'files'
(dictionary
)dictionary
)pair
)dictionary
(attribute
(identifier_json) identifier_json
(identifier_loads) identifier_loads
)attribute
)argument_list
)call
)assignment
)expression_statement
(if_statement
(boolean_operator
(comparison_operator
(string_'format_version') string_'format_version'
(identifier_manifest) identifier_manifest
)comparison_operator
(comparison_operator
(subscript
(identifier_manifest) identifier_manifest
(string_'format_version') string_'format_version'
)subscript
(integer_2) integer_2
)comparison_operator
)boolean_operator
(block
(raise_statement
(call
(identifier_SystemExit) identifier_SystemExit
(argument_list
(string_'Please update the client manifest format') string_'Please update the client manifest format'
)argument_list
)call
)raise_statement
)block
)if_statement
(return_statement
(identifier_manifest) identifier_manifest
)return_statement
)block
)function_definition
)module | Read the file manifest, or create a new one if there isn't one already |
(module
(function_definition
(function_name_platform_path) function_name_platform_path
(parameters
(identifier_path) identifier_path
)parameters
(block
(expression_statement
(identifier_r) identifier_r
)expression_statement
(try_statement
(block
(if_statement
(comparison_operator
(identifier_path) identifier_path
(string_'') string_''
)comparison_operator
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(string_'path cannot be the empty string') string_'path cannot be the empty string'
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_path1) identifier_path1
(call
(identifier_truepath_relative) identifier_truepath_relative
(argument_list
(identifier_path) identifier_path
)argument_list
)call
)assignment
)expression_statement
(if_statement
(call
(attribute
(attribute
(identifier_sys) identifier_sys
(identifier_platform) identifier_platform
)attribute
(identifier_startswith) identifier_startswith
)attribute
(argument_list
(string_'win32') string_'win32'
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_path2) identifier_path2
(call
(identifier_expand_win32_shortname) identifier_expand_win32_shortname
(argument_list
(identifier_path1) identifier_path1
)argument_list
)call
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_path2) identifier_path2
(identifier_path1) identifier_path1
)assignment
)expression_statement
)block
)else_clause
)if_statement
)block
(except_clause
(as_pattern
(identifier_Exception) identifier_Exception
(as_pattern_target
(identifier_ex) identifier_ex
)as_pattern_target
)as_pattern
(block
(expression_statement
(call
(attribute
(identifier_util_dbg) identifier_util_dbg
(identifier_printex) identifier_printex
)attribute
(argument_list
(identifier_ex) identifier_ex
(keyword_argument
(identifier_keys) identifier_keys
(list
(string_'path') string_'path'
(string_'path1') string_'path1'
(string_'path2') string_'path2'
)list
)keyword_argument
)argument_list
)call
)expression_statement
(raise_statement
)raise_statement
)block
)except_clause
)try_statement
(return_statement
(identifier_path2) identifier_path2
)return_statement
)block
)function_definition
)module | r"""
Returns platform specific path for pyinstaller usage
Args:
path (str):
Returns:
str: path2
CommandLine:
python -m utool.util_path --test-platform_path
Example:
>>> # ENABLE_DOCTEST
>>> # FIXME: find examples of the wird paths this fixes (mostly on win32 i think)
>>> from utool.util_path import * # NOQA
>>> import utool as ut
>>> path = 'some/odd/../weird/path'
>>> path2 = platform_path(path)
>>> result = str(path2)
>>> if ut.WIN32:
... ut.assert_eq(path2, r'some\weird\path')
... else:
... ut.assert_eq(path2, r'some/weird/path')
Example:
>>> # ENABLE_DOCTEST
>>> from utool.util_path import * # NOQA
>>> import utool as ut # NOQA
>>> if ut.WIN32:
... path = 'C:/PROGRA~2'
... path2 = platform_path(path)
... assert path2 == u'..\\..\\..\\..\\Program Files (x86)' |
(module
(function_definition
(function_name_setPrefix) function_name_setPrefix
(parameters
(identifier_self) identifier_self
(identifier_p) identifier_p
(default_parameter
(identifier_u) identifier_u
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_prefix) identifier_prefix
)attribute
(identifier_p) identifier_p
)assignment
)expression_statement
(if_statement
(boolean_operator
(comparison_operator
(identifier_p) identifier_p
(None) None
)comparison_operator
(comparison_operator
(identifier_u) identifier_u
(None) None
)comparison_operator
)boolean_operator
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_addPrefix) identifier_addPrefix
)attribute
(argument_list
(identifier_p) identifier_p
(identifier_u) identifier_u
)argument_list
)call
)expression_statement
)block
)if_statement
(return_statement
(identifier_self) identifier_self
)return_statement
)block
)function_definition
)module | Set the element namespace prefix.
@param p: A new prefix for the element.
@type p: basestring
@param u: A namespace URI to be mapped to the prefix.
@type u: basestring
@return: self
@rtype: L{Element} |
(module
(function_definition
(function_name_dir2) function_name_dir2
(parameters
(identifier_obj) identifier_obj
)parameters
(block
(expression_statement
(assignment
(identifier_attrs) identifier_attrs
(call
(identifier_set) identifier_set
(argument_list
)argument_list
)call
)assignment
)expression_statement
(if_statement
(not_operator
(call
(identifier_hasattr) identifier_hasattr
(argument_list
(identifier_obj) identifier_obj
(string_'__bases__') string_'__bases__'
)argument_list
)call
)not_operator
(block
(if_statement
(not_operator
(call
(identifier_hasattr) identifier_hasattr
(argument_list
(identifier_obj) identifier_obj
(string_'__class__') string_'__class__'
)argument_list
)call
)not_operator
(block
(return_statement
(call
(identifier_sorted) identifier_sorted
(argument_list
(call
(identifier_get_attrs) identifier_get_attrs
(argument_list
(identifier_obj) identifier_obj
)argument_list
)call
)argument_list
)call
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_klass) identifier_klass
(attribute
(identifier_obj) identifier_obj
(identifier___class__) identifier___class__
)attribute
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_attrs) identifier_attrs
(identifier_update) identifier_update
)attribute
(argument_list
(call
(identifier_get_attrs) identifier_get_attrs
(argument_list
(identifier_klass) identifier_klass
)argument_list
)call
)argument_list
)call
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_klass) identifier_klass
(identifier_obj) identifier_obj
)assignment
)expression_statement
)block
)else_clause
)if_statement
(for_statement
(identifier_cls) identifier_cls
(attribute
(identifier_klass) identifier_klass
(identifier___bases__) identifier___bases__
)attribute
(block
(expression_statement
(call
(attribute
(identifier_attrs) identifier_attrs
(identifier_update) identifier_update
)attribute
(argument_list
(call
(identifier_get_attrs) identifier_get_attrs
(argument_list
(identifier_cls) identifier_cls
)argument_list
)call
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_attrs) identifier_attrs
(identifier_update) identifier_update
)attribute
(argument_list
(call
(identifier_dir2) identifier_dir2
(argument_list
(identifier_cls) identifier_cls
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)for_statement
(expression_statement
(call
(attribute
(identifier_attrs) identifier_attrs
(identifier_update) identifier_update
)attribute
(argument_list
(call
(identifier_get_attrs) identifier_get_attrs
(argument_list
(identifier_obj) identifier_obj
)argument_list
)call
)argument_list
)call
)expression_statement
(return_statement
(call
(identifier_list) identifier_list
(argument_list
(identifier_attrs) identifier_attrs
)argument_list
)call
)return_statement
)block
)function_definition
)module | Default dir implementation.
Inspired by gist: katyukha/dirmixin.py
https://gist.github.com/katyukha/c6e5e2b829e247c9b009 |
(module
(function_definition
(function_name_list_templates) function_name_list_templates
(parameters
)parameters
(block
(expression_statement
(assignment
(identifier_templates) identifier_templates
(list_comprehension
(identifier_f) identifier_f
(for_in_clause
(identifier_f) identifier_f
(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_template_path) identifier_template_path
(string_'*.yaml') string_'*.yaml'
)argument_list
)call
)argument_list
)call
)for_in_clause
)list_comprehension
)assignment
)expression_statement
(return_statement
(identifier_templates) identifier_templates
)return_statement
)block
)function_definition
)module | Returns a list of all templates. |
(module
(function_definition
(function_name_replace) function_name_replace
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_year) identifier_year
(None) None
)default_parameter
(default_parameter
(identifier_week) identifier_week
(None) None
)default_parameter
)parameters
(block
(return_statement
(call
(attribute
(identifier_self) identifier_self
(identifier___class__) identifier___class__
)attribute
(argument_list
(conditional_expression
(attribute
(identifier_self) identifier_self
(identifier_year) identifier_year
)attribute
(comparison_operator
(identifier_year) identifier_year
(None) None
)comparison_operator
(identifier_year) identifier_year
)conditional_expression
(conditional_expression
(attribute
(identifier_self) identifier_self
(identifier_week) identifier_week
)attribute
(comparison_operator
(identifier_week) identifier_week
(None) None
)comparison_operator
(identifier_week) identifier_week
)conditional_expression
)argument_list
)call
)return_statement
)block
)function_definition
)module | Return a Week with either the year or week attribute value replaced |
(module
(function_definition
(function_name_get_version_manifest) function_name_get_version_manifest
(parameters
(identifier_name) identifier_name
(default_parameter
(identifier_data) identifier_data
(None) None
)default_parameter
(default_parameter
(identifier_required) identifier_required
(False) False
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_manifest_dir) identifier_manifest_dir
(call
(identifier__get_manifest_dir) identifier__get_manifest_dir
(argument_list
(identifier_data) identifier_data
(identifier_name) identifier_name
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_manifest_vs) identifier_manifest_vs
(boolean_operator
(call
(identifier__get_versions_manifest) identifier__get_versions_manifest
(argument_list
(identifier_manifest_dir) identifier_manifest_dir
)argument_list
)call
(list
)list
)boolean_operator
)assignment
)expression_statement
(for_statement
(identifier_x) identifier_x
(identifier_manifest_vs) identifier_manifest_vs
(block
(if_statement
(comparison_operator
(subscript
(identifier_x) identifier_x
(string_"program") string_"program"
)subscript
(identifier_name) identifier_name
)comparison_operator
(block
(expression_statement
(assignment
(identifier_v) identifier_v
(call
(attribute
(identifier_x) identifier_x
(identifier_get) identifier_get
)attribute
(argument_list
(string_"version") string_"version"
(string_"") string_""
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_v) identifier_v
(block
(return_statement
(identifier_v) identifier_v
)return_statement
)block
)if_statement
)block
)if_statement
)block
)for_statement
(if_statement
(identifier_required) identifier_required
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(binary_operator
(string_"Did not find %s in install manifest. Could not check version.") string_"Did not find %s in install manifest. Could not check version."
(identifier_name) identifier_name
)binary_operator
)argument_list
)call
)raise_statement
)block
)if_statement
(return_statement
(string_"") string_""
)return_statement
)block
)function_definition
)module | Retrieve a version from the currently installed manifest. |
(module
(function_definition
(function_name_get_convert_dist) function_name_get_convert_dist
(parameters
(typed_parameter
(identifier_dist_units_in) identifier_dist_units_in
(type
(identifier_str) identifier_str
)type
)typed_parameter
(typed_parameter
(identifier_dist_units_out) identifier_dist_units_out
(type
(identifier_str) identifier_str
)type
)typed_parameter
)parameters
(type
(generic_type
(identifier_Callable) identifier_Callable
(type_parameter
(type
(list
(identifier_float) identifier_float
)list
)type
(type
(identifier_float) identifier_float
)type
)type_parameter
)generic_type
)type
(block
(expression_statement
(assignment
(pattern_list
(identifier_di) identifier_di
(identifier_do) identifier_do
)pattern_list
(expression_list
(identifier_dist_units_in) identifier_dist_units_in
(identifier_dist_units_out) identifier_dist_units_out
)expression_list
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_DU) identifier_DU
(attribute
(identifier_cs) identifier_cs
(identifier_DIST_UNITS) identifier_DIST_UNITS
)attribute
)assignment
)expression_statement
(if_statement
(not_operator
(parenthesized_expression
(boolean_operator
(comparison_operator
(identifier_di) identifier_di
(identifier_DU) identifier_DU
)comparison_operator
(comparison_operator
(identifier_do) identifier_do
(identifier_DU) identifier_DU
)comparison_operator
)boolean_operator
)parenthesized_expression
)not_operator
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(string_f"Distance units must lie in {DU}") string_f"Distance units must lie in {DU}"
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_d) identifier_d
(dictionary
(pair
(string_"ft") string_"ft"
(dictionary
(pair
(string_"ft") string_"ft"
(integer_1) integer_1
)pair
(pair
(string_"m") string_"m"
(float_0.3048) float_0.3048
)pair
(pair
(string_"mi") string_"mi"
(binary_operator
(integer_1) integer_1
(integer_5280) integer_5280
)binary_operator
)pair
(pair
(string_"km") string_"km"
(float_0.0003048) float_0.0003048
)pair
)dictionary
)pair
(pair
(string_"m") string_"m"
(dictionary
(pair
(string_"ft") string_"ft"
(binary_operator
(integer_1) integer_1
(float_0.3048) float_0.3048
)binary_operator
)pair
(pair
(string_"m") string_"m"
(integer_1) integer_1
)pair
(pair
(string_"mi") string_"mi"
(binary_operator
(integer_1) integer_1
(float_1609.344) float_1609.344
)binary_operator
)pair
(pair
(string_"km") string_"km"
(binary_operator
(integer_1) integer_1
(integer_1000) integer_1000
)binary_operator
)pair
)dictionary
)pair
(pair
(string_"mi") string_"mi"
(dictionary
(pair
(string_"ft") string_"ft"
(integer_5280) integer_5280
)pair
(pair
(string_"m") string_"m"
(float_1609.344) float_1609.344
)pair
(pair
(string_"mi") string_"mi"
(integer_1) integer_1
)pair
(pair
(string_"km") string_"km"
(float_1.609344) float_1.609344
)pair
)dictionary
)pair
(pair
(string_"km") string_"km"
(dictionary
(pair
(string_"ft") string_"ft"
(binary_operator
(integer_1) integer_1
(float_0.0003048) float_0.0003048
)binary_operator
)pair
(pair
(string_"m") string_"m"
(integer_1000) integer_1000
)pair
(pair
(string_"mi") string_"mi"
(binary_operator
(integer_1) integer_1
(float_1.609344) float_1.609344
)binary_operator
)pair
(pair
(string_"km") string_"km"
(integer_1) integer_1
)pair
)dictionary
)pair
)dictionary
)assignment
)expression_statement
(return_statement
(lambda
(lambda_parameters
(identifier_x) identifier_x
)lambda_parameters
(binary_operator
(subscript
(subscript
(identifier_d) identifier_d
(identifier_di) identifier_di
)subscript
(identifier_do) identifier_do
)subscript
(identifier_x) identifier_x
)binary_operator
)lambda
)return_statement
)block
)function_definition
)module | Return a function of the form
distance in the units ``dist_units_in`` ->
distance in the units ``dist_units_out``
Only supports distance units in :const:`constants.DIST_UNITS`. |
(module
(function_definition
(function_name_assemble_points) function_name_assemble_points
(parameters
(identifier_graph) identifier_graph
(identifier_assemblies) identifier_assemblies
(identifier_multicolor) identifier_multicolor
(default_parameter
(identifier_verbose) identifier_verbose
(False) False
)default_parameter
(default_parameter
(identifier_verbose_destination) identifier_verbose_destination
(None) None
)default_parameter
)parameters
(block
(if_statement
(identifier_verbose) identifier_verbose
(block
(expression_statement
(call
(identifier_print) identifier_print
(argument_list
(string_">>Assembling for multicolor") string_">>Assembling for multicolor"
(list_comprehension
(attribute
(identifier_e) identifier_e
(identifier_name) identifier_name
)attribute
(for_in_clause
(identifier_e) identifier_e
(call
(attribute
(attribute
(identifier_multicolor) identifier_multicolor
(identifier_multicolors) identifier_multicolors
)attribute
(identifier_elements) identifier_elements
)attribute
(argument_list
)argument_list
)call
)for_in_clause
)list_comprehension
(keyword_argument
(identifier_file) identifier_file
(identifier_verbose_destination) identifier_verbose_destination
)keyword_argument
)argument_list
)call
)expression_statement
)block
)if_statement
(for_statement
(identifier_assembly) identifier_assembly
(identifier_assemblies) identifier_assemblies
(block
(expression_statement
(assignment
(pattern_list
(identifier_v1) identifier_v1
(identifier_v2) identifier_v2
(tuple_pattern
(identifier_before) identifier_before
(identifier_after) identifier_after
(identifier_ex_data) identifier_ex_data
)tuple_pattern
)pattern_list
(identifier_assembly) identifier_assembly
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_iv1) identifier_iv1
(call
(identifier_get_irregular_vertex) identifier_get_irregular_vertex
(argument_list
(call
(identifier_get_irregular_edge_by_vertex) identifier_get_irregular_edge_by_vertex
(argument_list
(identifier_graph) identifier_graph
(keyword_argument
(identifier_vertex) identifier_vertex
(identifier_v1) identifier_v1
)keyword_argument
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_iv2) identifier_iv2
(call
(identifier_get_irregular_vertex) identifier_get_irregular_vertex
(argument_list
(call
(identifier_get_irregular_edge_by_vertex) identifier_get_irregular_edge_by_vertex
(argument_list
(identifier_graph) identifier_graph
(keyword_argument
(identifier_vertex) identifier_vertex
(identifier_v2) identifier_v2
)keyword_argument
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_kbreak) identifier_kbreak
(call
(identifier_KBreak) identifier_KBreak
(argument_list
(keyword_argument
(identifier_start_edges) identifier_start_edges
(list
(tuple
(identifier_v1) identifier_v1
(identifier_iv1) identifier_iv1
)tuple
(tuple
(identifier_v2) identifier_v2
(identifier_iv2) identifier_iv2
)tuple
)list
)keyword_argument
(keyword_argument
(identifier_result_edges) identifier_result_edges
(list
(tuple
(identifier_v1) identifier_v1
(identifier_v2) identifier_v2
)tuple
(tuple
(identifier_iv1) identifier_iv1
(identifier_iv2) identifier_iv2
)tuple
)list
)keyword_argument
(keyword_argument
(identifier_multicolor) identifier_multicolor
(identifier_multicolor) identifier_multicolor
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_verbose) identifier_verbose
(block
(expression_statement
(call
(identifier_print) identifier_print
(argument_list
(string_"(") string_"("
(attribute
(identifier_v1) identifier_v1
(identifier_name) identifier_name
)attribute
(string_",") string_","
(attribute
(identifier_iv1) identifier_iv1
(identifier_name) identifier_name
)attribute
(string_")x(") string_")x("
(attribute
(identifier_v2) identifier_v2
(identifier_name) identifier_name
)attribute
(string_",") string_","
(attribute
(identifier_iv2) identifier_iv2
(identifier_name) identifier_name
)attribute
(string_")") string_")"
(string_" score=") string_" score="
(binary_operator
(identifier_before) identifier_before
(identifier_after) identifier_after
)binary_operator
(keyword_argument
(identifier_sep) identifier_sep
(string_"") string_""
)keyword_argument
(keyword_argument
(identifier_file) identifier_file
(identifier_verbose_destination) identifier_verbose_destination
)keyword_argument
)argument_list
)call
)expression_statement
)block
)if_statement
(expression_statement
(call
(attribute
(identifier_graph) identifier_graph
(identifier_apply_kbreak) identifier_apply_kbreak
)attribute
(argument_list
(keyword_argument
(identifier_kbreak) identifier_kbreak
(identifier_kbreak) identifier_kbreak
)keyword_argument
(keyword_argument
(identifier_merge) identifier_merge
(True) True
)keyword_argument
)argument_list
)call
)expression_statement
)block
)for_statement
)block
)function_definition
)module | This function actually does assembling being provided
a graph, to play with
a list of assembly points
and a multicolor, which to assemble |
(module
(function_definition
(function_name__parse_methods) function_name__parse_methods
(parameters
(identifier_cls) identifier_cls
(identifier_list_string) identifier_list_string
)parameters
(block
(if_statement
(comparison_operator
(identifier_list_string) identifier_list_string
(None) None
)comparison_operator
(block
(return_statement
(attribute
(identifier_APIServer) identifier_APIServer
(identifier_DEFAULT_METHODS) identifier_DEFAULT_METHODS
)attribute
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_json_list) identifier_json_list
(call
(attribute
(identifier_list_string) identifier_list_string
(identifier_replace) identifier_replace
)attribute
(argument_list
(string_"'") string_"'"
(string_'"') string_'"'
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_json) identifier_json
(identifier_loads) identifier_loads
)attribute
(argument_list
(identifier_json_list) identifier_json_list
)argument_list
)call
)return_statement
)block
)function_definition
)module | Return HTTP method list. Use json for security reasons. |
(module
(function_definition
(function_name_breslauer_corrections) function_name_breslauer_corrections
(parameters
(identifier_seq) identifier_seq
(identifier_pars_error) identifier_pars_error
)parameters
(block
(expression_statement
(assignment
(identifier_deltas_corr) identifier_deltas_corr
(list
(integer_0) integer_0
(integer_0) integer_0
)list
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_contains_gc) identifier_contains_gc
(boolean_operator
(comparison_operator
(string_'G') string_'G'
(call
(identifier_str) identifier_str
(argument_list
(identifier_seq) identifier_seq
)argument_list
)call
)comparison_operator
(comparison_operator
(string_'C') string_'C'
(call
(identifier_str) identifier_str
(argument_list
(identifier_seq) identifier_seq
)argument_list
)call
)comparison_operator
)boolean_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_only_at) identifier_only_at
(comparison_operator
(binary_operator
(call
(attribute
(call
(identifier_str) identifier_str
(argument_list
(identifier_seq) identifier_seq
)argument_list
)call
(identifier_count) identifier_count
)attribute
(argument_list
(string_'A') string_'A'
)argument_list
)call
(call
(attribute
(call
(identifier_str) identifier_str
(argument_list
(identifier_seq) identifier_seq
)argument_list
)call
(identifier_count) identifier_count
)attribute
(argument_list
(string_'T') string_'T'
)argument_list
)call
)binary_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_seq) identifier_seq
)argument_list
)call
)comparison_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_symmetric) identifier_symmetric
(comparison_operator
(identifier_seq) identifier_seq
(call
(attribute
(identifier_seq) identifier_seq
(identifier_reverse_complement) identifier_reverse_complement
)attribute
(argument_list
)argument_list
)call
)comparison_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_terminal_t) identifier_terminal_t
(comparison_operator
(subscript
(call
(identifier_str) identifier_str
(argument_list
(identifier_seq) identifier_seq
)argument_list
)call
(integer_0) integer_0
)subscript
(binary_operator
(string_'T') string_'T'
(subscript
(call
(identifier_str) identifier_str
(argument_list
(identifier_seq) identifier_seq
)argument_list
)call
(unary_operator
(integer_1) integer_1
)unary_operator
)subscript
)binary_operator
(string_'T') string_'T'
)comparison_operator
)assignment
)expression_statement
(for_statement
(pattern_list
(identifier_i) identifier_i
(identifier_delta) identifier_delta
)pattern_list
(call
(identifier_enumerate) identifier_enumerate
(argument_list
(list
(string_'delta_h') string_'delta_h'
(string_'delta_s') string_'delta_s'
)list
)argument_list
)call
(block
(if_statement
(identifier_contains_gc) identifier_contains_gc
(block
(expression_statement
(augmented_assignment
(subscript
(identifier_deltas_corr) identifier_deltas_corr
(identifier_i) identifier_i
)subscript
(subscript
(subscript
(identifier_pars_error) identifier_pars_error
(identifier_delta) identifier_delta
)subscript
(string_'anyGC') string_'anyGC'
)subscript
)augmented_assignment
)expression_statement
)block
)if_statement
(if_statement
(identifier_only_at) identifier_only_at
(block
(expression_statement
(augmented_assignment
(subscript
(identifier_deltas_corr) identifier_deltas_corr
(identifier_i) identifier_i
)subscript
(subscript
(subscript
(identifier_pars_error) identifier_pars_error
(identifier_delta) identifier_delta
)subscript
(string_'onlyAT') string_'onlyAT'
)subscript
)augmented_assignment
)expression_statement
)block
)if_statement
(if_statement
(identifier_symmetric) identifier_symmetric
(block
(expression_statement
(augmented_assignment
(subscript
(identifier_deltas_corr) identifier_deltas_corr
(identifier_i) identifier_i
)subscript
(subscript
(subscript
(identifier_pars_error) identifier_pars_error
(identifier_delta) identifier_delta
)subscript
(string_'symmetry') string_'symmetry'
)subscript
)augmented_assignment
)expression_statement
)block
)if_statement
(if_statement
(boolean_operator
(identifier_terminal_t) identifier_terminal_t
(comparison_operator
(identifier_delta) identifier_delta
(string_'delta_h') string_'delta_h'
)comparison_operator
)boolean_operator
(block
(expression_statement
(augmented_assignment
(subscript
(identifier_deltas_corr) identifier_deltas_corr
(identifier_i) identifier_i
)subscript
(binary_operator
(subscript
(subscript
(identifier_pars_error) identifier_pars_error
(identifier_delta) identifier_delta
)subscript
(string_'terminalT') string_'terminalT'
)subscript
(identifier_terminal_t) identifier_terminal_t
)binary_operator
)augmented_assignment
)expression_statement
)block
)if_statement
)block
)for_statement
(return_statement
(identifier_deltas_corr) identifier_deltas_corr
)return_statement
)block
)function_definition
)module | Sum corrections for Breslauer '84 method.
:param seq: sequence for which to calculate corrections.
:type seq: str
:param pars_error: dictionary of error corrections
:type pars_error: dict
:returns: Corrected delta_H and delta_S parameters
:rtype: list of floats |
(module
(function_definition
(function_name_get_title) function_name_get_title
(parameters
(identifier_self) identifier_self
(identifier_entry) identifier_entry
)parameters
(block
(expression_statement
(assignment
(identifier_title) identifier_title
(binary_operator
(call
(identifier__) identifier__
(argument_list
(string_'%(title)s (%(word_count)i words)') string_'%(title)s (%(word_count)i words)'
)argument_list
)call
(line_continuation_\) line_continuation_\
(dictionary
(pair
(string_'title') string_'title'
(attribute
(identifier_entry) identifier_entry
(identifier_title) identifier_title
)attribute
)pair
(pair
(string_'word_count') string_'word_count'
(attribute
(identifier_entry) identifier_entry
(identifier_word_count) identifier_word_count
)attribute
)pair
)dictionary
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_reaction_count) identifier_reaction_count
(call
(identifier_int) identifier_int
(argument_list
(binary_operator
(binary_operator
(attribute
(identifier_entry) identifier_entry
(identifier_comment_count) identifier_comment_count
)attribute
(attribute
(identifier_entry) identifier_entry
(identifier_pingback_count) identifier_pingback_count
)attribute
)binary_operator
(attribute
(identifier_entry) identifier_entry
(identifier_trackback_count) identifier_trackback_count
)attribute
)binary_operator
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_reaction_count) identifier_reaction_count
(block
(return_statement
(binary_operator
(call
(identifier_ungettext_lazy) identifier_ungettext_lazy
(argument_list
(string_'%(title)s (%(reactions)i reaction)') string_'%(title)s (%(reactions)i reaction)'
(string_'%(title)s (%(reactions)i reactions)') string_'%(title)s (%(reactions)i reactions)'
(identifier_reaction_count) identifier_reaction_count
)argument_list
)call
(line_continuation_\) line_continuation_\
(dictionary
(pair
(string_'title') string_'title'
(identifier_title) identifier_title
)pair
(pair
(string_'reactions') string_'reactions'
(identifier_reaction_count) identifier_reaction_count
)pair
)dictionary
)binary_operator
)return_statement
)block
)if_statement
(return_statement
(identifier_title) identifier_title
)return_statement
)block
)function_definition
)module | Return the title with word count and number of comments. |
(module
(function_definition
(function_name_safe_shake) function_name_safe_shake
(parameters
(identifier_self) identifier_self
(identifier_x) identifier_x
(identifier_fun) identifier_fun
(identifier_fmax) identifier_fmax
)parameters
(block
(expression_statement
(assignment
(subscript
(attribute
(identifier_self) identifier_self
(identifier_lock) identifier_lock
)attribute
(slice
(colon) colon
)slice
)subscript
(False) False
)assignment
)expression_statement
(function_definition
(function_name_extra_equation) function_name_extra_equation
(parameters
(identifier_xx) identifier_xx
)parameters
(block
(expression_statement
(assignment
(pattern_list
(identifier_f) identifier_f
(identifier_g) identifier_g
)pattern_list
(call
(identifier_fun) identifier_fun
(argument_list
(identifier_xx) identifier_xx
(keyword_argument
(identifier_do_gradient) identifier_do_gradient
(True) True
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(return_statement
(expression_list
(binary_operator
(parenthesized_expression
(binary_operator
(identifier_f) identifier_f
(identifier_fmax) identifier_fmax
)binary_operator
)parenthesized_expression
(call
(identifier_abs) identifier_abs
(argument_list
(identifier_fmax) identifier_fmax
)argument_list
)call
)binary_operator
(binary_operator
(identifier_g) identifier_g
(call
(identifier_abs) identifier_abs
(argument_list
(identifier_fmax) identifier_fmax
)argument_list
)call
)binary_operator
)expression_list
)return_statement
)block
)function_definition
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_equations) identifier_equations
)attribute
(identifier_append) identifier_append
)attribute
(argument_list
(tuple
(unary_operator
(integer_1) integer_1
)unary_operator
(identifier_extra_equation) identifier_extra_equation
)tuple
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(pattern_list
(identifier_x) identifier_x
(identifier_shake_counter) identifier_shake_counter
(identifier_constraint_couter) identifier_constraint_couter
)pattern_list
(call
(attribute
(identifier_self) identifier_self
(identifier_free_shake) identifier_free_shake
)attribute
(argument_list
(identifier_x) identifier_x
)argument_list
)call
)assignment
)expression_statement
(delete_statement
(subscript
(attribute
(identifier_self) identifier_self
(identifier_equations) identifier_equations
)attribute
(unary_operator
(integer_1) integer_1
)unary_operator
)subscript
)delete_statement
(return_statement
(expression_list
(identifier_x) identifier_x
(identifier_shake_counter) identifier_shake_counter
(identifier_constraint_couter) identifier_constraint_couter
)expression_list
)return_statement
)block
)function_definition
)module | Brings unknowns to the constraints, without increasing fun above fmax.
Arguments:
| ``x`` -- The unknowns.
| ``fun`` -- The function being minimized.
| ``fmax`` -- The highest allowed value of the function being
minimized.
The function ``fun`` takes a mandatory argument ``x`` and an optional
argument ``do_gradient``:
| ``x`` -- the arguments of the function to be tested
| ``do_gradient`` -- when False, only the function value is
returned. when True, a 2-tuple with the
function value and the gradient are returned
[default=False] |
(module
(function_definition
(function_name__hasViewChangeQuorum) function_name__hasViewChangeQuorum
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_num_of_ready_nodes) identifier_num_of_ready_nodes
(call
(identifier_len) identifier_len
(argument_list
(attribute
(identifier_self) identifier_self
(identifier__view_change_done) identifier__view_change_done
)attribute
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_diff) identifier_diff
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier_quorum) identifier_quorum
)attribute
(identifier_num_of_ready_nodes) identifier_num_of_ready_nodes
)binary_operator
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_diff) identifier_diff
(integer_0) integer_0
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_logger) identifier_logger
(identifier_info) identifier_info
)attribute
(argument_list
(call
(attribute
(string_'{} needs {} ViewChangeDone messages') string_'{} needs {} ViewChangeDone messages'
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_self) identifier_self
(identifier_diff) identifier_diff
)argument_list
)call
)argument_list
)call
)expression_statement
(return_statement
(False) False
)return_statement
)block
)if_statement
(expression_statement
(call
(attribute
(identifier_logger) identifier_logger
(identifier_info) identifier_info
)attribute
(argument_list
(call
(attribute
(string_"{} got view change quorum ({} >= {})") string_"{} got view change quorum ({} >= {})"
(identifier_format) identifier_format
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_name) identifier_name
)attribute
(identifier_num_of_ready_nodes) identifier_num_of_ready_nodes
(attribute
(identifier_self) identifier_self
(identifier_quorum) identifier_quorum
)attribute
)argument_list
)call
)argument_list
)call
)expression_statement
(return_statement
(True) True
)return_statement
)block
)function_definition
)module | Checks whether n-f nodes completed view change and whether one
of them is the next primary |
(module
(function_definition
(function_name_multiple_packaged_versions) function_name_multiple_packaged_versions
(parameters
(identifier_package_name) identifier_package_name
)parameters
(block
(expression_statement
(assignment
(identifier_dist_files) identifier_dist_files
(call
(attribute
(identifier_os) identifier_os
(identifier_listdir) identifier_listdir
)attribute
(argument_list
(string_'dist') string_'dist'
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_versions) identifier_versions
(call
(identifier_set) identifier_set
(argument_list
)argument_list
)call
)assignment
)expression_statement
(for_statement
(identifier_filename) identifier_filename
(identifier_dist_files) identifier_dist_files
(block
(expression_statement
(assignment
(identifier_version) identifier_version
(call
(attribute
(identifier_funcy) identifier_funcy
(identifier_re_find) identifier_re_find
)attribute
(argument_list
(call
(attribute
(string_r'{}-(.+).tar.gz') string_r'{}-(.+).tar.gz'
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_package_name) identifier_package_name
)argument_list
)call
(identifier_filename) identifier_filename
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_version) identifier_version
(block
(expression_statement
(call
(attribute
(identifier_versions) identifier_versions
(identifier_add) identifier_add
)attribute
(argument_list
(identifier_version) identifier_version
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)for_statement
(return_statement
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_versions) identifier_versions
)argument_list
)call
(integer_1) integer_1
)comparison_operator
)return_statement
)block
)function_definition
)module | Look through built package directory and see if there are multiple versions there |
(module
(function_definition
(function_name_get_vault_query_session) function_name_get_vault_query_session
(parameters
(identifier_self) identifier_self
(identifier_proxy) identifier_proxy
)parameters
(block
(if_statement
(not_operator
(call
(attribute
(identifier_self) identifier_self
(identifier_supports_vault_query) identifier_supports_vault_query
)attribute
(argument_list
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(attribute
(identifier_errors) identifier_errors
(identifier_Unimplemented) identifier_Unimplemented
)attribute
(argument_list
)argument_list
)call
)raise_statement
)block
)if_statement
(return_statement
(call
(attribute
(identifier_sessions) identifier_sessions
(identifier_VaultQuerySession) identifier_VaultQuerySession
)attribute
(argument_list
(keyword_argument
(identifier_proxy) identifier_proxy
(identifier_proxy) identifier_proxy
)keyword_argument
(keyword_argument
(identifier_runtime) identifier_runtime
(attribute
(identifier_self) identifier_self
(identifier__runtime) identifier__runtime
)attribute
)keyword_argument
)argument_list
)call
)return_statement
)block
)function_definition
)module | Gets the OsidSession associated with the vault query service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.authorization.VaultQuerySession) - a
``VaultQuerySession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_vault_query() is false``
*compliance: optional -- This method must be implemented if
``supports_vault_query()`` is true.* |
(module
(function_definition
(function_name_url_unquote_plus) function_name_url_unquote_plus
(parameters
(identifier_s) identifier_s
(default_parameter
(identifier_charset) identifier_charset
(string_'utf-8') string_'utf-8'
)default_parameter
(default_parameter
(identifier_errors) identifier_errors
(string_'replace') string_'replace'
)default_parameter
)parameters
(block
(if_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_s) identifier_s
(identifier_unicode) identifier_unicode
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_s) identifier_s
(call
(attribute
(identifier_s) identifier_s
(identifier_encode) identifier_encode
)attribute
(argument_list
(identifier_charset) identifier_charset
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(return_statement
(call
(identifier__decode_unicode) identifier__decode_unicode
(argument_list
(call
(identifier__unquote_plus) identifier__unquote_plus
(argument_list
(identifier_s) identifier_s
)argument_list
)call
(identifier_charset) identifier_charset
(identifier_errors) identifier_errors
)argument_list
)call
)return_statement
)block
)function_definition
)module | URL decode a single string with the given decoding and decode
a "+" to whitespace.
Per default encoding errors are ignored. If you want a different behavior
you can set `errors` to ``'replace'`` or ``'strict'``. In strict mode a
`HTTPUnicodeError` is raised.
:param s: the string to unquote.
:param charset: the charset to be used.
:param errors: the error handling for the charset decoding. |
(module
(function_definition
(function_name_set_language) function_name_set_language
(parameters
(identifier_self) identifier_self
(identifier_editor) identifier_editor
(identifier_language) identifier_language
)parameters
(block
(expression_statement
(call
(attribute
(identifier_LOGGER) identifier_LOGGER
(identifier_debug) identifier_debug
)attribute
(argument_list
(call
(attribute
(string_"> Setting '{0}' language to '{1}' editor.") string_"> Setting '{0}' language to '{1}' editor."
(identifier_format) identifier_format
)attribute
(argument_list
(attribute
(identifier_language) identifier_language
(identifier_name) identifier_name
)attribute
(identifier_editor) identifier_editor
)argument_list
)call
)argument_list
)call
)expression_statement
(return_statement
(call
(attribute
(identifier_editor) identifier_editor
(identifier_set_language) identifier_set_language
)attribute
(argument_list
(identifier_language) identifier_language
)argument_list
)call
)return_statement
)block
)function_definition
)module | Sets given language to given Model editor.
:param editor: Editor to set language to.
:type editor: Editor
:param language: Language to set.
:type language: Language
:return: Method success.
:rtype: bool |
(module
(function_definition
(function_name_new_logger) function_name_new_logger
(parameters
(identifier_name) identifier_name
)parameters
(block
(expression_statement
(assignment
(identifier_log) identifier_log
(call
(identifier_get_task_logger) identifier_get_task_logger
(argument_list
(identifier_name) identifier_name
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_handler) identifier_handler
(call
(attribute
(identifier_logstash) identifier_logstash
(identifier_LogstashHandler) identifier_LogstashHandler
)attribute
(argument_list
(attribute
(attribute
(identifier_config) identifier_config
(identifier_logstash) identifier_logstash
)attribute
(identifier_host) identifier_host
)attribute
(attribute
(attribute
(identifier_config) identifier_config
(identifier_logstash) identifier_logstash
)attribute
(identifier_port) identifier_port
)attribute
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_log) identifier_log
(identifier_addHandler) identifier_addHandler
)attribute
(argument_list
(identifier_handler) identifier_handler
)argument_list
)call
)expression_statement
(expression_statement
(call
(identifier_create_logdir) identifier_create_logdir
(argument_list
(attribute
(identifier_config) identifier_config
(identifier_logdir) identifier_logdir
)attribute
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_handler) identifier_handler
(call
(identifier_TimedRotatingFileHandler) identifier_TimedRotatingFileHandler
(argument_list
(binary_operator
(string_'%s.json') string_'%s.json'
(call
(identifier_join) identifier_join
(argument_list
(attribute
(identifier_config) identifier_config
(identifier_logdir) identifier_logdir
)attribute
(identifier_name) identifier_name
)argument_list
)call
)binary_operator
(keyword_argument
(identifier_when) identifier_when
(string_'midnight') string_'midnight'
)keyword_argument
(keyword_argument
(identifier_utc) identifier_utc
(True) True
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_handler) identifier_handler
(identifier_setFormatter) identifier_setFormatter
)attribute
(argument_list
(call
(identifier_JSONFormatter) identifier_JSONFormatter
(argument_list
)argument_list
)call
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_log) identifier_log
(identifier_addHandler) identifier_addHandler
)attribute
(argument_list
(identifier_handler) identifier_handler
)argument_list
)call
)expression_statement
(return_statement
(call
(identifier_TaskCtxAdapter) identifier_TaskCtxAdapter
(argument_list
(identifier_log) identifier_log
(dictionary
)dictionary
)argument_list
)call
)return_statement
)block
)function_definition
)module | Return new logger which will log both to logstash and to file in JSON
format.
Log files are stored in <logdir>/name.json |
(module
(function_definition
(function_name_print_prompt_values) function_name_print_prompt_values
(parameters
(identifier_values) identifier_values
(default_parameter
(identifier_message) identifier_message
(None) None
)default_parameter
(default_parameter
(identifier_sub_attr) identifier_sub_attr
(None) None
)default_parameter
)parameters
(block
(if_statement
(identifier_message) identifier_message
(block
(expression_statement
(call
(identifier_prompt_message) identifier_prompt_message
(argument_list
(identifier_message) identifier_message
)argument_list
)call
)expression_statement
)block
)if_statement
(for_statement
(pattern_list
(identifier_index) identifier_index
(identifier_entry) identifier_entry
)pattern_list
(call
(identifier_enumerate) identifier_enumerate
(argument_list
(identifier_values) identifier_values
)argument_list
)call
(block
(if_statement
(identifier_sub_attr) identifier_sub_attr
(block
(expression_statement
(assignment
(identifier_line) identifier_line
(call
(attribute
(string_'{:2d}: {}') string_'{:2d}: {}'
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_index) identifier_index
(call
(identifier_getattr) identifier_getattr
(argument_list
(call
(identifier_utf8) identifier_utf8
(argument_list
(identifier_entry) identifier_entry
)argument_list
)call
(identifier_sub_attr) identifier_sub_attr
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_line) identifier_line
(call
(attribute
(string_'{:2d}: {}') string_'{:2d}: {}'
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_index) identifier_index
(call
(identifier_utf8) identifier_utf8
(argument_list
(identifier_entry) identifier_entry
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
)block
)else_clause
)if_statement
(with_statement
(with_clause
(with_item
(call
(identifier_indent) identifier_indent
(argument_list
(integer_3) integer_3
)argument_list
)call
)with_item
)with_clause
(block
(expression_statement
(call
(identifier_print_message) identifier_print_message
(argument_list
(identifier_line) identifier_line
)argument_list
)call
)expression_statement
)block
)with_statement
)block
)for_statement
)block
)function_definition
)module | Prints prompt title and choices with a bit of formatting. |
(module
(function_definition
(function_name_get_temp_filename) function_name_get_temp_filename
(parameters
(identifier_content) identifier_content
)parameters
(block
(expression_statement
(assignment
(pattern_list
(identifier_fd) identifier_fd
(identifier_filename) identifier_filename
)pattern_list
(call
(attribute
(identifier_fileutil) identifier_fileutil
(identifier_get_temp_file) identifier_get_temp_file
)attribute
(argument_list
(keyword_argument
(identifier_mode) identifier_mode
(string_'wb') string_'wb'
)keyword_argument
(keyword_argument
(identifier_suffix) identifier_suffix
(string_'.doc') string_'.doc'
)keyword_argument
(keyword_argument
(identifier_prefix) identifier_prefix
(string_'lc_') string_'lc_'
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(try_statement
(block
(expression_statement
(call
(attribute
(identifier_fd) identifier_fd
(identifier_write) identifier_write
)attribute
(argument_list
(identifier_content) identifier_content
)argument_list
)call
)expression_statement
)block
(finally_clause
(block
(expression_statement
(call
(attribute
(identifier_fd) identifier_fd
(identifier_close) identifier_close
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)finally_clause
)try_statement
(return_statement
(identifier_filename) identifier_filename
)return_statement
)block
)function_definition
)module | Get temporary filename for content to parse. |
(module
(function_definition
(function_name_queryTypesDescriptions) function_name_queryTypesDescriptions
(parameters
(identifier_self) identifier_self
(identifier_types) identifier_types
)parameters
(block
(expression_statement
(assignment
(identifier_types) identifier_types
(call
(identifier_list) identifier_list
(argument_list
(identifier_types) identifier_types
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_types) identifier_types
(block
(expression_statement
(assignment
(identifier_types_descs) identifier_types_descs
(call
(attribute
(identifier_self) identifier_self
(identifier_describeSObjects) identifier_describeSObjects
)attribute
(argument_list
(identifier_types) identifier_types
)argument_list
)call
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_types_descs) identifier_types_descs
(list
)list
)assignment
)expression_statement
)block
)else_clause
)if_statement
(return_statement
(call
(identifier_dict) identifier_dict
(argument_list
(call
(identifier_map) identifier_map
(argument_list
(lambda
(lambda_parameters
(identifier_t) identifier_t
(identifier_d) identifier_d
)lambda_parameters
(tuple
(identifier_t) identifier_t
(identifier_d) identifier_d
)tuple
)lambda
(identifier_types) identifier_types
(identifier_types_descs) identifier_types_descs
)argument_list
)call
)argument_list
)call
)return_statement
)block
)function_definition
)module | Given a list of types, construct a dictionary such that
each key is a type, and each value is the corresponding sObject
for that type. |
(module
(function_definition
(function_name_sort) function_name_sort
(parameters
(identifier_self) identifier_self
(identifier_request) identifier_request
(default_parameter
(identifier_reverse) identifier_reverse
(False) False
)default_parameter
)parameters
(block
(return_statement
(call
(identifier_sorted) identifier_sorted
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_collection) identifier_collection
)attribute
(keyword_argument
(identifier_key) identifier_key
(lambda
(lambda_parameters
(identifier_o) identifier_o
)lambda_parameters
(call
(identifier_getattr) identifier_getattr
(argument_list
(identifier_o) identifier_o
(attribute
(identifier_self) identifier_self
(identifier_columns_sort) identifier_columns_sort
)attribute
(integer_0) integer_0
)argument_list
)call
)lambda
)keyword_argument
(keyword_argument
(identifier_reverse) identifier_reverse
(identifier_reverse) identifier_reverse
)keyword_argument
)argument_list
)call
)return_statement
)block
)function_definition
)module | Sort collection. |
(module
(function_definition
(function_name_is_email) function_name_is_email
(parameters
(identifier_potential_email_address) identifier_potential_email_address
)parameters
(block
(expression_statement
(assignment
(pattern_list
(identifier_context) identifier_context
(identifier_mail) identifier_mail
)pattern_list
(call
(identifier_parseaddr) identifier_parseaddr
(argument_list
(identifier_potential_email_address) identifier_potential_email_address
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_first_condition) identifier_first_condition
(boolean_operator
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_context) identifier_context
)argument_list
)call
(integer_0) integer_0
)comparison_operator
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_mail) identifier_mail
)argument_list
)call
(integer_0) integer_0
)comparison_operator
)boolean_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_dot_after_at) identifier_dot_after_at
(parenthesized_expression
(boolean_operator
(comparison_operator
(string_'@') string_'@'
(identifier_potential_email_address) identifier_potential_email_address
)comparison_operator
(comparison_operator
(string_'.') string_'.'
(subscript
(call
(attribute
(identifier_potential_email_address) identifier_potential_email_address
(identifier_split) identifier_split
)attribute
(argument_list
(string_'@') string_'@'
)argument_list
)call
(integer_1) integer_1
)subscript
)comparison_operator
)boolean_operator
)parenthesized_expression
)assignment
)expression_statement
(return_statement
(boolean_operator
(identifier_first_condition) identifier_first_condition
(identifier_dot_after_at) identifier_dot_after_at
)boolean_operator
)return_statement
)block
)function_definition
)module | Check if potential_email_address is a valid e-mail address.
Please note that this function has no false-negatives but many
false-positives. So if it returns that the input is not a valid
e-mail adress, it certainly isn't. If it returns True, it might still be
invalid. For example, the domain could not be registered.
Parameters
----------
potential_email_address : str
Returns
-------
is_email : bool
Examples
--------
>>> is_email('')
False
>>> is_email('info@martin-thoma.de')
True
>>> is_email('info@math.martin-thoma.de')
True
>>> is_email('Martin Thoma <info@martin-thoma.de>')
False
>>> is_email('info@martin-thoma')
False |
(module
(function_definition
(function_name_connection) function_name_connection
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_commit) identifier_commit
(False) False
)default_parameter
)parameters
(block
(if_statement
(identifier_commit) identifier_commit
(block
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier__need_commit) identifier__need_commit
)attribute
(True) True
)assignment
)expression_statement
)block
)if_statement
(if_statement
(attribute
(identifier_self) identifier_self
(identifier__db) identifier__db
)attribute
(block
(expression_statement
(yield
(attribute
(identifier_self) identifier_self
(identifier__db) identifier__db
)attribute
)yield
)expression_statement
)block
(else_clause
(block
(try_statement
(block
(with_statement
(with_clause
(with_item
(as_pattern
(call
(attribute
(identifier_self) identifier_self
(identifier__get_db) identifier__get_db
)attribute
(argument_list
)argument_list
)call
(as_pattern_target
(identifier_db) identifier_db
)as_pattern_target
)as_pattern
)with_item
)with_clause
(block
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier__db) identifier__db
)attribute
(identifier_db) identifier_db
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_db) identifier_db
(identifier_create_function) identifier_create_function
)attribute
(argument_list
(string_"REGEXP") string_"REGEXP"
(integer_2) integer_2
(identifier_sql_regexp_func) identifier_sql_regexp_func
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_db) identifier_db
(identifier_create_function) identifier_create_function
)attribute
(argument_list
(string_"PROGRAM_NAME") string_"PROGRAM_NAME"
(integer_1) integer_1
(identifier_sql_program_name_func) identifier_sql_program_name_func
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_db) identifier_db
(identifier_create_function) identifier_create_function
)attribute
(argument_list
(string_"PATHDIST") string_"PATHDIST"
(integer_2) integer_2
(identifier_sql_pathdist_func) identifier_sql_pathdist_func
)argument_list
)call
)expression_statement
(expression_statement
(yield
(attribute
(identifier_self) identifier_self
(identifier__db) identifier__db
)attribute
)yield
)expression_statement
(if_statement
(attribute
(identifier_self) identifier_self
(identifier__need_commit) identifier__need_commit
)attribute
(block
(expression_statement
(call
(attribute
(identifier_db) identifier_db
(identifier_commit) identifier_commit
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)with_statement
)block
(finally_clause
(block
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier__db) identifier__db
)attribute
(None) None
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier__need_commit) identifier__need_commit
)attribute
(False) False
)assignment
)expression_statement
)block
)finally_clause
)try_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module | Context manager to keep around DB connection.
:rtype: sqlite3.Connection
SOMEDAY: Get rid of this function. Keeping connection around as
an argument to the method using this context manager is
probably better as it is more explicit.
Also, holding "global state" as instance attribute is bad for
supporting threaded search, which is required for more fluent
percol integration. |
(module
(function_definition
(function_name__ts_parse) function_name__ts_parse
(parameters
(identifier_ts) identifier_ts
)parameters
(block
(expression_statement
(assignment
(identifier_dt) identifier_dt
(call
(attribute
(identifier_datetime) identifier_datetime
(identifier_strptime) identifier_strptime
)attribute
(argument_list
(subscript
(identifier_ts) identifier_ts
(slice
(colon) colon
(integer_19) integer_19
)slice
)subscript
(string_"%Y-%m-%dT%H:%M:%S") string_"%Y-%m-%dT%H:%M:%S"
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(subscript
(identifier_ts) identifier_ts
(integer_19) integer_19
)subscript
(string_'+') string_'+'
)comparison_operator
(block
(expression_statement
(augmented_assignment
(identifier_dt) identifier_dt
(call
(identifier_timedelta) identifier_timedelta
(argument_list
(keyword_argument
(identifier_hours) identifier_hours
(call
(identifier_int) identifier_int
(argument_list
(subscript
(identifier_ts) identifier_ts
(slice
(integer_20) integer_20
(colon) colon
(integer_22) integer_22
)slice
)subscript
)argument_list
)call
)keyword_argument
(keyword_argument
(identifier_minutes) identifier_minutes
(call
(identifier_int) identifier_int
(argument_list
(subscript
(identifier_ts) identifier_ts
(slice
(integer_23) integer_23
(colon) colon
)slice
)subscript
)argument_list
)call
)keyword_argument
)argument_list
)call
)augmented_assignment
)expression_statement
)block
(elif_clause
(comparison_operator
(subscript
(identifier_ts) identifier_ts
(integer_19) integer_19
)subscript
(string_'-') string_'-'
)comparison_operator
(block
(expression_statement
(augmented_assignment
(identifier_dt) identifier_dt
(call
(identifier_timedelta) identifier_timedelta
(argument_list
(keyword_argument
(identifier_hours) identifier_hours
(call
(identifier_int) identifier_int
(argument_list
(subscript
(identifier_ts) identifier_ts
(slice
(integer_20) integer_20
(colon) colon
(integer_22) integer_22
)slice
)subscript
)argument_list
)call
)keyword_argument
(keyword_argument
(identifier_minutes) identifier_minutes
(call
(identifier_int) identifier_int
(argument_list
(subscript
(identifier_ts) identifier_ts
(slice
(integer_23) integer_23
(colon) colon
)slice
)subscript
)argument_list
)call
)keyword_argument
)argument_list
)call
)augmented_assignment
)expression_statement
)block
)elif_clause
)if_statement
(return_statement
(call
(attribute
(identifier_dt) identifier_dt
(identifier_replace) identifier_replace
)attribute
(argument_list
(keyword_argument
(identifier_tzinfo) identifier_tzinfo
(attribute
(identifier_pytz) identifier_pytz
(identifier_UTC) identifier_UTC
)attribute
)keyword_argument
)argument_list
)call
)return_statement
)block
)function_definition
)module | Parse alert timestamp, return UTC datetime object to maintain Python 2 compatibility. |
(module
(function_definition
(function_name_server) function_name_server
(parameters
(identifier_port) identifier_port
)parameters
(block
(expression_statement
(assignment
(identifier_args) identifier_args
(list
(string_'python') string_'python'
(string_'manage.py') string_'manage.py'
(string_'runserver') string_'runserver'
)list
)assignment
)expression_statement
(if_statement
(identifier_port) identifier_port
(block
(expression_statement
(call
(attribute
(identifier_args) identifier_args
(identifier_append) identifier_append
)attribute
(argument_list
(identifier_port) identifier_port
)argument_list
)call
)expression_statement
)block
)if_statement
(expression_statement
(call
(attribute
(identifier_run) identifier_run
(identifier_main) identifier_main
)attribute
(argument_list
(identifier_args) identifier_args
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Start the Django dev server. |
(module
(function_definition
(function_name__get_subnet_explicit_route_table) function_name__get_subnet_explicit_route_table
(parameters
(identifier_subnet_id) identifier_subnet_id
(identifier_vpc_id) identifier_vpc_id
(default_parameter
(identifier_conn) identifier_conn
(None) None
)default_parameter
(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
(if_statement
(not_operator
(identifier_conn) identifier_conn
)not_operator
(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
)block
)if_statement
(if_statement
(identifier_conn) identifier_conn
(block
(expression_statement
(assignment
(identifier_vpc_route_tables) identifier_vpc_route_tables
(call
(attribute
(identifier_conn) identifier_conn
(identifier_get_all_route_tables) identifier_get_all_route_tables
)attribute
(argument_list
(keyword_argument
(identifier_filters) identifier_filters
(dictionary
(pair
(string_'vpc_id') string_'vpc_id'
(identifier_vpc_id) identifier_vpc_id
)pair
)dictionary
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(for_statement
(identifier_vpc_route_table) identifier_vpc_route_table
(identifier_vpc_route_tables) identifier_vpc_route_tables
(block
(for_statement
(identifier_rt_association) identifier_rt_association
(attribute
(identifier_vpc_route_table) identifier_vpc_route_table
(identifier_associations) identifier_associations
)attribute
(block
(if_statement
(boolean_operator
(comparison_operator
(attribute
(identifier_rt_association) identifier_rt_association
(identifier_subnet_id) identifier_subnet_id
)attribute
(identifier_subnet_id) identifier_subnet_id
)comparison_operator
(not_operator
(attribute
(identifier_rt_association) identifier_rt_association
(identifier_main) identifier_main
)attribute
)not_operator
)boolean_operator
(block
(return_statement
(attribute
(identifier_rt_association) identifier_rt_association
(identifier_id) identifier_id
)attribute
)return_statement
)block
)if_statement
)block
)for_statement
)block
)for_statement
)block
)if_statement
(return_statement
(None) None
)return_statement
)block
)function_definition
)module | helper function to find subnet explicit route table associations
.. versionadded:: 2016.11.0 |
(module
(function_definition
(function_name_endswith) function_name_endswith
(parameters
(identifier_self) identifier_self
(identifier_search_str) identifier_search_str
)parameters
(block
(for_statement
(identifier_entry) identifier_entry
(call
(identifier_reversed) identifier_reversed
(argument_list
(subscript
(call
(identifier_list) identifier_list
(argument_list
(call
(identifier_open) identifier_open
(argument_list
(attribute
(identifier_self) identifier_self
(identifier__jrnl_file) identifier__jrnl_file
)attribute
(string_'r') string_'r'
)argument_list
)call
)argument_list
)call
(slice
(unary_operator
(integer_5) integer_5
)unary_operator
(colon) colon
)slice
)subscript
)argument_list
)call
(block
(if_statement
(comparison_operator
(identifier_search_str) identifier_search_str
(identifier_entry) identifier_entry
)comparison_operator
(block
(return_statement
(True) True
)return_statement
)block
)if_statement
)block
)for_statement
(return_statement
(False) False
)return_statement
)block
)function_definition
)module | Check whether the provided string exists in Journal file.
Only checks the last 5 lines of the journal file. This method is
usually used when tracking a journal from an active Revit session.
Args:
search_str (str): string to search for
Returns:
bool: if True the search string is found |
(module
(function_definition
(function_name_load_recipe) function_name_load_recipe
(parameters
(identifier_self) identifier_self
(identifier_recipe) identifier_recipe
)parameters
(block
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_recipe) identifier_recipe
)attribute
(identifier_recipe) identifier_recipe
)assignment
)expression_statement
(for_statement
(identifier_module_description) identifier_module_description
(subscript
(identifier_recipe) identifier_recipe
(string_'modules') string_'modules'
)subscript
(block
(expression_statement
(assignment
(identifier_module_name) identifier_module_name
(subscript
(identifier_module_description) identifier_module_description
(string_'name') string_'name'
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_module) identifier_module
(call
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_config) identifier_config
)attribute
(identifier_get_module) identifier_get_module
)attribute
(argument_list
(identifier_module_name) identifier_module_name
)argument_list
)call
(argument_list
(identifier_self) identifier_self
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(attribute
(identifier_self) identifier_self
(identifier__module_pool) identifier__module_pool
)attribute
(identifier_module_name) identifier_module_name
)subscript
(identifier_module) identifier_module
)assignment
)expression_statement
)block
)for_statement
)block
)function_definition
)module | Populates the internal module pool with modules declared in a recipe.
Args:
recipe: Dict, recipe declaring modules to load. |
(module
(function_definition
(function_name_load_config) function_name_load_config
(parameters
(identifier_self) identifier_self
(identifier_config_file_name) identifier_config_file_name
)parameters
(block
(with_statement
(with_clause
(with_item
(as_pattern
(call
(identifier_open) identifier_open
(argument_list
(identifier_config_file_name) identifier_config_file_name
)argument_list
)call
(as_pattern_target
(identifier_f) identifier_f
)as_pattern_target
)as_pattern
)with_item
)with_clause
(block
(expression_statement
(assignment
(identifier_commands) identifier_commands
(call
(attribute
(call
(attribute
(identifier_f) identifier_f
(identifier_read) identifier_read
)attribute
(argument_list
)argument_list
)call
(identifier_splitlines) identifier_splitlines
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
)block
)with_statement
(for_statement
(identifier_command) identifier_command
(identifier_commands) identifier_commands
(block
(if_statement
(not_operator
(call
(attribute
(identifier_command) identifier_command
(identifier_startswith) identifier_startswith
)attribute
(argument_list
(string_';') string_';'
)argument_list
)call
)not_operator
(block
(try_statement
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_send_command) identifier_send_command
)attribute
(argument_list
(identifier_command) identifier_command
)argument_list
)call
)expression_statement
)block
(except_clause
(as_pattern
(identifier_XenaCommandException) identifier_XenaCommandException
(as_pattern_target
(identifier_e) identifier_e
)as_pattern_target
)as_pattern
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_logger) identifier_logger
)attribute
(identifier_warning) identifier_warning
)attribute
(argument_list
(call
(identifier_str) identifier_str
(argument_list
(identifier_e) identifier_e
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)except_clause
)try_statement
)block
)if_statement
)block
)for_statement
)block
)function_definition
)module | Load configuration file from xpc file.
:param config_file_name: full path to the configuration file. |
(module
(function_definition
(function_name_register_array) function_name_register_array
(parameters
(identifier_self) identifier_self
(identifier_name) identifier_name
(identifier_shape) identifier_shape
(identifier_dtype) identifier_dtype
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(if_statement
(comparison_operator
(identifier_name) identifier_name
(attribute
(identifier_self) identifier_self
(identifier__arrays) identifier__arrays
)attribute
)comparison_operator
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(binary_operator
(parenthesized_expression
(concatenated_string
(string_'Array %s is already registered ') string_'Array %s is already registered '
(string_'on this cube object.') string_'on this cube object.'
)concatenated_string
)parenthesized_expression
(identifier_name) identifier_name
)binary_operator
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_A) identifier_A
(assignment
(subscript
(attribute
(identifier_self) identifier_self
(identifier__arrays) identifier__arrays
)attribute
(identifier_name) identifier_name
)subscript
(call
(identifier_AttrDict) identifier_AttrDict
(argument_list
(keyword_argument
(identifier_name) identifier_name
(identifier_name) identifier_name
)keyword_argument
(keyword_argument
(identifier_dtype) identifier_dtype
(identifier_dtype) identifier_dtype
)keyword_argument
(keyword_argument
(identifier_shape) identifier_shape
(identifier_shape) identifier_shape
)keyword_argument
(dictionary_splat
(identifier_kwargs) identifier_kwargs
)dictionary_splat
)argument_list
)call
)assignment
)assignment
)expression_statement
(return_statement
(identifier_A) identifier_A
)return_statement
)block
)function_definition
)module | Register an array with this cube.
.. code-block:: python
cube.register_array("model_vis", ("ntime", "nbl", "nchan", 4), np.complex128)
Parameters
----------
name : str
Array name
shape : A tuple containing either Dimension names or ints
Array shape schema
dtype :
Array data type |
(module
(function_definition
(function_name_business_days) function_name_business_days
(parameters
(identifier_start) identifier_start
(identifier_stop) identifier_stop
)parameters
(block
(expression_statement
(assignment
(identifier_dates) identifier_dates
(call
(attribute
(identifier_rrule) identifier_rrule
(identifier_rruleset) identifier_rruleset
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_dates) identifier_dates
(identifier_rrule) identifier_rrule
)attribute
(argument_list
(call
(attribute
(identifier_rrule) identifier_rrule
(identifier_rrule) identifier_rrule
)attribute
(argument_list
(attribute
(identifier_rrule) identifier_rrule
(identifier_DAILY) identifier_DAILY
)attribute
(keyword_argument
(identifier_dtstart) identifier_dtstart
(identifier_start) identifier_start
)keyword_argument
(keyword_argument
(identifier_until) identifier_until
(identifier_stop) identifier_stop
)keyword_argument
)argument_list
)call
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_dates) identifier_dates
(identifier_exrule) identifier_exrule
)attribute
(argument_list
(call
(attribute
(identifier_rrule) identifier_rrule
(identifier_rrule) identifier_rrule
)attribute
(argument_list
(attribute
(identifier_rrule) identifier_rrule
(identifier_DAILY) identifier_DAILY
)attribute
(keyword_argument
(identifier_byweekday) identifier_byweekday
(tuple
(attribute
(identifier_rrule) identifier_rrule
(identifier_SA) identifier_SA
)attribute
(attribute
(identifier_rrule) identifier_rrule
(identifier_SU) identifier_SU
)attribute
)tuple
)keyword_argument
(keyword_argument
(identifier_dtstart) identifier_dtstart
(identifier_start) identifier_start
)keyword_argument
)argument_list
)call
)argument_list
)call
)expression_statement
(return_statement
(call
(attribute
(identifier_dates) identifier_dates
(identifier_count) identifier_count
)attribute
(argument_list
)argument_list
)call
)return_statement
)block
)function_definition
)module | Return business days between two inclusive dates - ignoring public holidays.
Note that start must be less than stop or else 0 is returned.
@param start: Start date
@param stop: Stop date
@return int |
(module
(function_definition
(function_name_get_pipeline) function_name_get_pipeline
(parameters
(typed_parameter
(identifier_node) identifier_node
(type
(identifier_Node) identifier_Node
)type
)typed_parameter
)parameters
(type
(identifier_RenderingPipeline) identifier_RenderingPipeline
)type
(block
(expression_statement
(assignment
(identifier_pipeline) identifier_pipeline
(call
(identifier__get_registered_pipeline) identifier__get_registered_pipeline
(argument_list
(identifier_node) identifier_node
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_pipeline) identifier_pipeline
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(identifier_msg) identifier_msg
(call
(identifier__get_pipeline_registration_error_message) identifier__get_pipeline_registration_error_message
(argument_list
(identifier_node) identifier_node
)argument_list
)call
)assignment
)expression_statement
(raise_statement
(call
(identifier_RenderingError) identifier_RenderingError
(argument_list
(identifier_msg) identifier_msg
)argument_list
)call
)raise_statement
)block
)if_statement
(return_statement
(identifier_pipeline) identifier_pipeline
)return_statement
)block
)function_definition
)module | Gets rendering pipeline for passed node |
(module
(function_definition
(function_name__checker_mixer) function_name__checker_mixer
(parameters
(identifier_slice1) identifier_slice1
(identifier_slice2) identifier_slice2
(default_parameter
(identifier_checker_size) identifier_checker_size
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_checkers) identifier_checkers
(call
(identifier__get_checkers) identifier__get_checkers
(argument_list
(attribute
(identifier_slice1) identifier_slice1
(identifier_shape) identifier_shape
)attribute
(identifier_checker_size) identifier_checker_size
)argument_list
)call
)assignment
)expression_statement
(if_statement
(boolean_operator
(comparison_operator
(attribute
(identifier_slice1) identifier_slice1
(identifier_shape) identifier_shape
)attribute
(attribute
(identifier_slice2) identifier_slice2
(identifier_shape) identifier_shape
)attribute
)comparison_operator
(comparison_operator
(attribute
(identifier_slice2) identifier_slice2
(identifier_shape) identifier_shape
)attribute
(attribute
(identifier_checkers) identifier_checkers
(identifier_shape) identifier_shape
)attribute
)comparison_operator
)boolean_operator
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(string_'size mismatch between cropped slices and checkers!!!') string_'size mismatch between cropped slices and checkers!!!'
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_mixed) identifier_mixed
(call
(attribute
(identifier_slice1) identifier_slice1
(identifier_copy) identifier_copy
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_mixed) identifier_mixed
(comparison_operator
(identifier_checkers) identifier_checkers
(integer_0) integer_0
)comparison_operator
)subscript
(subscript
(identifier_slice2) identifier_slice2
(comparison_operator
(identifier_checkers) identifier_checkers
(integer_0) integer_0
)comparison_operator
)subscript
)assignment
)expression_statement
(return_statement
(identifier_mixed) identifier_mixed
)return_statement
)block
)function_definition
)module | Mixes the two slices in alternating areas specified by checkers |
(module
(function_definition
(function_name_url_encode) function_name_url_encode
(parameters
(identifier_url) identifier_url
)parameters
(block
(if_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_url) identifier_url
(identifier_text_type) identifier_text_type
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_url) identifier_url
(call
(attribute
(identifier_url) identifier_url
(identifier_encode) identifier_encode
)attribute
(argument_list
(string_'utf8') string_'utf8'
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(return_statement
(call
(identifier_quote) identifier_quote
(argument_list
(identifier_url) identifier_url
(string_':/%?&=') string_':/%?&='
)argument_list
)call
)return_statement
)block
)function_definition
)module | Convert special characters using %xx escape.
:param url: str
:return: str - encoded url |
(module
(function_definition
(function_name_to_text) function_name_to_text
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_text) identifier_text
)attribute
(string_'') string_''
)comparison_operator
(block
(return_statement
(binary_operator
(string_'::%s') string_'::%s'
(attribute
(identifier_self) identifier_self
(identifier_uri) identifier_uri
)attribute
)binary_operator
)return_statement
)block
)if_statement
(return_statement
(binary_operator
(string_'::%s [%s]') string_'::%s [%s]'
(tuple
(attribute
(identifier_self) identifier_self
(identifier_text) identifier_text
)attribute
(attribute
(identifier_self) identifier_self
(identifier_uri) identifier_uri
)attribute
)tuple
)binary_operator
)return_statement
)block
)function_definition
)module | Render as plain text. |
(module
(function_definition
(function_name_format) function_name_format
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(call
(identifier_hasattr) identifier_hasattr
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_image) identifier_image
)attribute
(string_'_getexif') string_'_getexif'
)argument_list
)call
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_rotate_exif) identifier_rotate_exif
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_crop_box) identifier_crop_box
(call
(attribute
(identifier_self) identifier_self
(identifier_crop_to_ratio) identifier_crop_to_ratio
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_resize) identifier_resize
)attribute
(argument_list
)argument_list
)call
)expression_statement
(return_statement
(expression_list
(attribute
(identifier_self) identifier_self
(identifier_image) identifier_image
)attribute
(identifier_crop_box) identifier_crop_box
)expression_list
)return_statement
)block
)function_definition
)module | Crop and resize the supplied image. Return the image and the crop_box used.
If the input format is JPEG and in EXIF there is information about rotation, use it and rotate resulting image. |
(module
(function_definition
(function_name_combine_kwargs) function_name_combine_kwargs
(parameters
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(expression_statement
(assignment
(identifier_combined_kwargs) identifier_combined_kwargs
(list
)list
)assignment
)expression_statement
(for_statement
(pattern_list
(identifier_kw) identifier_kw
(identifier_arg) identifier_arg
)pattern_list
(call
(attribute
(identifier_kwargs) identifier_kwargs
(identifier_items) identifier_items
)attribute
(argument_list
)argument_list
)call
(block
(if_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_arg) identifier_arg
(identifier_dict) identifier_dict
)argument_list
)call
(block
(for_statement
(pattern_list
(identifier_k) identifier_k
(identifier_v) identifier_v
)pattern_list
(call
(attribute
(identifier_arg) identifier_arg
(identifier_items) identifier_items
)attribute
(argument_list
)argument_list
)call
(block
(for_statement
(identifier_tup) identifier_tup
(call
(identifier_flatten_kwarg) identifier_flatten_kwarg
(argument_list
(identifier_k) identifier_k
(identifier_v) identifier_v
)argument_list
)call
(block
(expression_statement
(call
(attribute
(identifier_combined_kwargs) identifier_combined_kwargs
(identifier_append) identifier_append
)attribute
(argument_list
(tuple
(call
(attribute
(string_'{}{}') string_'{}{}'
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_kw) identifier_kw
(subscript
(identifier_tup) identifier_tup
(integer_0) integer_0
)subscript
)argument_list
)call
(subscript
(identifier_tup) identifier_tup
(integer_1) integer_1
)subscript
)tuple
)argument_list
)call
)expression_statement
)block
)for_statement
)block
)for_statement
)block
(elif_clause
(call
(identifier_is_multivalued) identifier_is_multivalued
(argument_list
(identifier_arg) identifier_arg
)argument_list
)call
(block
(for_statement
(identifier_i) identifier_i
(identifier_arg) identifier_arg
(block
(for_statement
(identifier_tup) identifier_tup
(call
(identifier_flatten_kwarg) identifier_flatten_kwarg
(argument_list
(string_'') string_''
(identifier_i) identifier_i
)argument_list
)call
(block
(expression_statement
(call
(attribute
(identifier_combined_kwargs) identifier_combined_kwargs
(identifier_append) identifier_append
)attribute
(argument_list
(tuple
(call
(attribute
(string_'{}{}') string_'{}{}'
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_kw) identifier_kw
(subscript
(identifier_tup) identifier_tup
(integer_0) integer_0
)subscript
)argument_list
)call
(subscript
(identifier_tup) identifier_tup
(integer_1) integer_1
)subscript
)tuple
)argument_list
)call
)expression_statement
)block
)for_statement
)block
)for_statement
)block
)elif_clause
(else_clause
(block
(expression_statement
(call
(attribute
(identifier_combined_kwargs) identifier_combined_kwargs
(identifier_append) identifier_append
)attribute
(argument_list
(tuple
(call
(identifier_text_type) identifier_text_type
(argument_list
(identifier_kw) identifier_kw
)argument_list
)call
(identifier_arg) identifier_arg
)tuple
)argument_list
)call
)expression_statement
)block
)else_clause
)if_statement
)block
)for_statement
(return_statement
(identifier_combined_kwargs) identifier_combined_kwargs
)return_statement
)block
)function_definition
)module | Flatten a series of keyword arguments from complex combinations of
dictionaries and lists into a list of tuples representing
properly-formatted parameters to pass to the Requester object.
:param kwargs: A dictionary containing keyword arguments to be
flattened into properly-formatted parameters.
:type kwargs: dict
:returns: A list of tuples that represent flattened kwargs. The
first element is a string representing the key. The second
element is the value.
:rtype: `list` of `tuple` |
(module
(function_definition
(function_name__get_subject_public_key) function_name__get_subject_public_key
(parameters
(identifier_cert) identifier_cert
)parameters
(block
(expression_statement
(assignment
(identifier_public_key) identifier_public_key
(call
(attribute
(identifier_cert) identifier_cert
(identifier_get_pubkey) identifier_get_pubkey
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_cryptographic_key) identifier_cryptographic_key
(call
(attribute
(identifier_public_key) identifier_public_key
(identifier_to_cryptography_key) identifier_to_cryptography_key
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_subject_public_key) identifier_subject_public_key
(call
(attribute
(identifier_cryptographic_key) identifier_cryptographic_key
(identifier_public_bytes) identifier_public_bytes
)attribute
(argument_list
(attribute
(identifier_Encoding) identifier_Encoding
(identifier_DER) identifier_DER
)attribute
(attribute
(identifier_PublicFormat) identifier_PublicFormat
(identifier_PKCS1) identifier_PKCS1
)attribute
)argument_list
)call
)assignment
)expression_statement
(return_statement
(identifier_subject_public_key) identifier_subject_public_key
)return_statement
)block
)function_definition
)module | Returns the SubjectPublicKey asn.1 field of the SubjectPublicKeyInfo
field of the server's certificate. This is used in the server
verification steps to thwart MitM attacks.
:param cert: X509 certificate from pyOpenSSL .get_peer_certificate()
:return: byte string of the asn.1 DER encoded SubjectPublicKey field |
(module
(function_definition
(function_name_limit) function_name_limit
(parameters
(identifier_self) identifier_self
(identifier_value) identifier_value
)parameters
(block
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier__query) identifier__query
)attribute
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__query) identifier__query
)attribute
(identifier_limit) identifier_limit
)attribute
(argument_list
(identifier_value) identifier_value
)argument_list
)call
)assignment
)expression_statement
(return_statement
(identifier_self) identifier_self
)return_statement
)block
)function_definition
)module | Allows for limiting number of results returned for query. Useful
for pagination. |
(module
(function_definition
(function_name_list_private_repos) function_name_list_private_repos
(parameters
(default_parameter
(identifier_profile) identifier_profile
(string_'github') string_'github'
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_repos) identifier_repos
(list
)list
)assignment
)expression_statement
(for_statement
(identifier_repo) identifier_repo
(call
(identifier__get_repos) identifier__get_repos
(argument_list
(identifier_profile) identifier_profile
)argument_list
)call
(block
(if_statement
(comparison_operator
(attribute
(identifier_repo) identifier_repo
(identifier_private) identifier_private
)attribute
(True) True
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_repos) identifier_repos
(identifier_append) identifier_append
)attribute
(argument_list
(attribute
(identifier_repo) identifier_repo
(identifier_name) identifier_name
)attribute
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)for_statement
(return_statement
(identifier_repos) identifier_repos
)return_statement
)block
)function_definition
)module | List private repositories within the organization. Dependent upon the access
rights of the profile token.
.. versionadded:: 2016.11.0
profile
The name of the profile configuration to use. Defaults to ``github``.
CLI Example:
.. code-block:: bash
salt myminion github.list_private_repos
salt myminion github.list_private_repos profile='my-github-profile' |
(module
(function_definition
(function_name_map) function_name_map
(parameters
(identifier_self) identifier_self
(identifier_f) identifier_f
(default_parameter
(identifier_preservesPartitioning) identifier_preservesPartitioning
(False) False
)default_parameter
)parameters
(block
(return_statement
(parenthesized_expression
(call
(attribute
(call
(attribute
(identifier_self) identifier_self
(identifier_mapPartitions) identifier_mapPartitions
)attribute
(argument_list
(lambda
(lambda_parameters
(identifier_p) identifier_p
)lambda_parameters
(generator_expression
(call
(identifier_f) identifier_f
(argument_list
(identifier_e) identifier_e
)argument_list
)call
(for_in_clause
(identifier_e) identifier_e
(identifier_p) identifier_p
)for_in_clause
)generator_expression
)lambda
(identifier_preservesPartitioning) identifier_preservesPartitioning
)argument_list
)call
(identifier_transform) identifier_transform
)attribute
(argument_list
(lambda
(lambda_parameters
(identifier_rdd) identifier_rdd
)lambda_parameters
(call
(attribute
(identifier_rdd) identifier_rdd
(identifier_setName) identifier_setName
)attribute
(argument_list
(call
(attribute
(string_'{}:{}') string_'{}:{}'
(identifier_format) identifier_format
)attribute
(argument_list
(call
(attribute
(attribute
(identifier_rdd) identifier_rdd
(identifier_prev) identifier_prev
)attribute
(identifier_name) identifier_name
)attribute
(argument_list
)argument_list
)call
(identifier_f) identifier_f
)argument_list
)call
)argument_list
)call
)lambda
)argument_list
)call
)parenthesized_expression
)return_statement
)block
)function_definition
)module | Apply function f
:param f: mapping function
:rtype: DStream
Example:
>>> import pysparkling
>>> sc = pysparkling.Context()
>>> ssc = pysparkling.streaming.StreamingContext(sc, 0.1)
>>> (
... ssc
... .queueStream([[4], [2], [7]])
... .map(lambda e: e + 1)
... .foreachRDD(lambda rdd: print(rdd.collect()))
... )
>>> ssc.start()
>>> ssc.awaitTermination(0.35)
[5]
[3]
[8] |
(module
(function_definition
(function_name_with_name) function_name_with_name
(parameters
(identifier_cls) identifier_cls
(identifier_name) identifier_name
(default_parameter
(identifier_id_user) identifier_id_user
(integer_0) integer_0
)default_parameter
(dictionary_splat_pattern
(identifier_extra_data) identifier_extra_data
)dictionary_splat_pattern
)parameters
(block
(return_statement
(call
(identifier_cls) identifier_cls
(argument_list
(keyword_argument
(identifier_name) identifier_name
(identifier_name) identifier_name
)keyword_argument
(keyword_argument
(identifier_id_user) identifier_id_user
(integer_0) integer_0
)keyword_argument
(dictionary_splat
(identifier_extra_data) identifier_extra_data
)dictionary_splat
)argument_list
)call
)return_statement
)block
)function_definition
)module | Instantiate a WorkflowEngine given a name or UUID.
:param name: name of workflow to run.
:type name: str
:param id_user: id of user to associate with workflow
:type id_user: int
:param module_name: label used to query groups of workflows.
:type module_name: str |
(module
(function_definition
(function_name_cv_error) function_name_cv_error
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_cv) identifier_cv
(True) True
)default_parameter
(default_parameter
(identifier_skip_endpoints) identifier_skip_endpoints
(True) True
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_resids) identifier_resids
(call
(attribute
(identifier_self) identifier_self
(identifier_cv_residuals) identifier_cv_residuals
)attribute
(argument_list
(identifier_cv) identifier_cv
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_skip_endpoints) identifier_skip_endpoints
(block
(expression_statement
(assignment
(identifier_resids) identifier_resids
(subscript
(identifier_resids) identifier_resids
(slice
(integer_1) integer_1
(colon) colon
(unary_operator
(integer_1) integer_1
)unary_operator
)slice
)subscript
)assignment
)expression_statement
)block
)if_statement
(return_statement
(call
(attribute
(identifier_np) identifier_np
(identifier_mean) identifier_mean
)attribute
(argument_list
(call
(identifier_abs) identifier_abs
(argument_list
(identifier_resids) identifier_resids
)argument_list
)call
)argument_list
)call
)return_statement
)block
)function_definition
)module | Return the sum of cross-validation residuals for the input data |
(module
(function_definition
(function_name_decodes) function_name_decodes
(parameters
(identifier_self) identifier_self
(typed_parameter
(identifier_s) identifier_s
(type
(identifier_str) identifier_str
)type
)typed_parameter
)parameters
(type
(identifier_BioCCollection) identifier_BioCCollection
)type
(block
(expression_statement
(assignment
(identifier_tree) identifier_tree
(call
(attribute
(identifier_etree) identifier_etree
(identifier_parse) identifier_parse
)attribute
(argument_list
(call
(attribute
(identifier_io) identifier_io
(identifier_BytesIO) identifier_BytesIO
)attribute
(argument_list
(call
(identifier_bytes) identifier_bytes
(argument_list
(identifier_s) identifier_s
(keyword_argument
(identifier_encoding) identifier_encoding
(string_'UTF-8') string_'UTF-8'
)keyword_argument
)argument_list
)call
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_collection) identifier_collection
(call
(attribute
(identifier_self) identifier_self
(identifier___parse_collection) identifier___parse_collection
)attribute
(argument_list
(call
(attribute
(identifier_tree) identifier_tree
(identifier_getroot) identifier_getroot
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_collection) identifier_collection
(identifier_encoding) identifier_encoding
)attribute
(attribute
(attribute
(identifier_tree) identifier_tree
(identifier_docinfo) identifier_docinfo
)attribute
(identifier_encoding) identifier_encoding
)attribute
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_collection) identifier_collection
(identifier_standalone) identifier_standalone
)attribute
(attribute
(attribute
(identifier_tree) identifier_tree
(identifier_docinfo) identifier_docinfo
)attribute
(identifier_standalone) identifier_standalone
)attribute
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_collection) identifier_collection
(identifier_version) identifier_version
)attribute
(attribute
(attribute
(identifier_tree) identifier_tree
(identifier_docinfo) identifier_docinfo
)attribute
(identifier_xml_version) identifier_xml_version
)attribute
)assignment
)expression_statement
(return_statement
(identifier_collection) identifier_collection
)return_statement
)block
)function_definition
)module | Deserialize ``s`` to a BioC collection object.
Args:
s: a "str" instance containing a BioC collection
Returns:
an object of BioCollection |
(module
(function_definition
(function_name_create_guest_screen_info) function_name_create_guest_screen_info
(parameters
(identifier_self) identifier_self
(identifier_display) identifier_display
(identifier_status) identifier_status
(identifier_primary) identifier_primary
(identifier_change_origin) identifier_change_origin
(identifier_origin_x) identifier_origin_x
(identifier_origin_y) identifier_origin_y
(identifier_width) identifier_width
(identifier_height) identifier_height
(identifier_bits_per_pixel) identifier_bits_per_pixel
)parameters
(block
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_display) identifier_display
(identifier_baseinteger) identifier_baseinteger
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(identifier_TypeError) identifier_TypeError
(argument_list
(string_"display can only be an instance of type baseinteger") string_"display can only be an instance of type baseinteger"
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_status) identifier_status
(identifier_GuestMonitorStatus) identifier_GuestMonitorStatus
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(identifier_TypeError) identifier_TypeError
(argument_list
(string_"status can only be an instance of type GuestMonitorStatus") string_"status can only be an instance of type GuestMonitorStatus"
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_primary) identifier_primary
(identifier_bool) identifier_bool
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(identifier_TypeError) identifier_TypeError
(argument_list
(string_"primary can only be an instance of type bool") string_"primary can only be an instance of type bool"
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_change_origin) identifier_change_origin
(identifier_bool) identifier_bool
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(identifier_TypeError) identifier_TypeError
(argument_list
(string_"change_origin can only be an instance of type bool") string_"change_origin can only be an instance of type bool"
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_origin_x) identifier_origin_x
(identifier_baseinteger) identifier_baseinteger
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(identifier_TypeError) identifier_TypeError
(argument_list
(string_"origin_x can only be an instance of type baseinteger") string_"origin_x can only be an instance of type baseinteger"
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_origin_y) identifier_origin_y
(identifier_baseinteger) identifier_baseinteger
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(identifier_TypeError) identifier_TypeError
(argument_list
(string_"origin_y can only be an instance of type baseinteger") string_"origin_y can only be an instance of type baseinteger"
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_width) identifier_width
(identifier_baseinteger) identifier_baseinteger
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(identifier_TypeError) identifier_TypeError
(argument_list
(string_"width can only be an instance of type baseinteger") string_"width can only be an instance of type baseinteger"
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_height) identifier_height
(identifier_baseinteger) identifier_baseinteger
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(identifier_TypeError) identifier_TypeError
(argument_list
(string_"height can only be an instance of type baseinteger") string_"height can only be an instance of type baseinteger"
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_bits_per_pixel) identifier_bits_per_pixel
(identifier_baseinteger) identifier_baseinteger
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(identifier_TypeError) identifier_TypeError
(argument_list
(string_"bits_per_pixel can only be an instance of type baseinteger") string_"bits_per_pixel can only be an instance of type baseinteger"
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_guest_screen_info) identifier_guest_screen_info
(call
(attribute
(identifier_self) identifier_self
(identifier__call) identifier__call
)attribute
(argument_list
(string_"createGuestScreenInfo") string_"createGuestScreenInfo"
(keyword_argument
(identifier_in_p) identifier_in_p
(list
(identifier_display) identifier_display
(identifier_status) identifier_status
(identifier_primary) identifier_primary
(identifier_change_origin) identifier_change_origin
(identifier_origin_x) identifier_origin_x
(identifier_origin_y) identifier_origin_y
(identifier_width) identifier_width
(identifier_height) identifier_height
(identifier_bits_per_pixel) identifier_bits_per_pixel
)list
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_guest_screen_info) identifier_guest_screen_info
(call
(identifier_IGuestScreenInfo) identifier_IGuestScreenInfo
(argument_list
(identifier_guest_screen_info) identifier_guest_screen_info
)argument_list
)call
)assignment
)expression_statement
(return_statement
(identifier_guest_screen_info) identifier_guest_screen_info
)return_statement
)block
)function_definition
)module | Make a IGuestScreenInfo object with the provided parameters.
in display of type int
The number of the guest display.
in status of type :class:`GuestMonitorStatus`
@c True, if this guest screen is enabled,
@c False otherwise.
in primary of type bool
Whether this guest monitor must be primary.
in change_origin of type bool
@c True, if the origin of the guest screen should be changed,
@c False otherwise.
in origin_x of type int
The X origin of the guest screen.
in origin_y of type int
The Y origin of the guest screen.
in width of type int
The width of the guest screen.
in height of type int
The height of the guest screen.
in bits_per_pixel of type int
The number of bits per pixel of the guest screen.
return guest_screen_info of type :class:`IGuestScreenInfo`
The created object. |
(module
(function_definition
(function_name_customer_gateway_exists) function_name_customer_gateway_exists
(parameters
(default_parameter
(identifier_customer_gateway_id) identifier_customer_gateway_id
(None) None
)default_parameter
(default_parameter
(identifier_customer_gateway_name) identifier_customer_gateway_name
(None) None
)default_parameter
(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
(return_statement
(call
(identifier_resource_exists) identifier_resource_exists
(argument_list
(string_'customer_gateway') string_'customer_gateway'
(keyword_argument
(identifier_name) identifier_name
(identifier_customer_gateway_name) identifier_customer_gateway_name
)keyword_argument
(keyword_argument
(identifier_resource_id) identifier_resource_id
(identifier_customer_gateway_id) identifier_customer_gateway_id
)keyword_argument
(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
)return_statement
)block
)function_definition
)module | Given a customer gateway ID, check if the customer gateway ID exists.
Returns True if the customer gateway ID exists; Returns False otherwise.
CLI Example:
.. code-block:: bash
salt myminion boto_vpc.customer_gateway_exists cgw-b6a247df
salt myminion boto_vpc.customer_gateway_exists customer_gatway_name=mycgw |
(module
(function_definition
(function_name_subdomain) function_name_subdomain
(parameters
(identifier_self) identifier_self
(identifier_hostname) identifier_hostname
)parameters
(block
(expression_statement
(assignment
(identifier_hostname) identifier_hostname
(subscript
(call
(attribute
(identifier_hostname) identifier_hostname
(identifier_split) identifier_split
)attribute
(argument_list
(string_":") string_":"
)argument_list
)call
(integer_0) integer_0
)subscript
)assignment
)expression_statement
(for_statement
(identifier_domain) identifier_domain
(call
(identifier_getDomainNames) identifier_getDomainNames
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_siteStore) identifier_siteStore
)attribute
)argument_list
)call
(block
(if_statement
(call
(attribute
(identifier_hostname) identifier_hostname
(identifier_endswith) identifier_endswith
)attribute
(argument_list
(binary_operator
(string_".") string_"."
(identifier_domain) identifier_domain
)binary_operator
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_username) identifier_username
(subscript
(identifier_hostname) identifier_hostname
(slice
(colon) colon
(binary_operator
(unary_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_domain) identifier_domain
)argument_list
)call
)unary_operator
(integer_1) integer_1
)binary_operator
)slice
)subscript
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_username) identifier_username
(string_"www") string_"www"
)comparison_operator
(block
(return_statement
(expression_list
(identifier_username) identifier_username
(identifier_domain) identifier_domain
)expression_list
)return_statement
)block
)if_statement
)block
)if_statement
)block
)for_statement
(return_statement
(None) None
)return_statement
)block
)function_definition
)module | Determine of which known domain the given hostname is a subdomain.
@return: A two-tuple giving the subdomain part and the domain part or
C{None} if the domain is not a subdomain of any known domain. |
(module
(function_definition
(function_name_intervention) function_name_intervention
(parameters
(identifier_self) identifier_self
(identifier_commit) identifier_commit
(identifier_conf) identifier_conf
)parameters
(block
(if_statement
(boolean_operator
(not_operator
(attribute
(attribute
(identifier_conf) identifier_conf
(identifier_harpoon) identifier_harpoon
)attribute
(identifier_interactive) identifier_interactive
)attribute
)not_operator
(attribute
(attribute
(identifier_conf) identifier_conf
(identifier_harpoon) identifier_harpoon
)attribute
(identifier_no_intervention) identifier_no_intervention
)attribute
)boolean_operator
(block
(expression_statement
(yield
)yield
)expression_statement
(return_statement
)return_statement
)block
)if_statement
(expression_statement
(call
(attribute
(identifier_hp) identifier_hp
(identifier_write_to) identifier_write_to
)attribute
(argument_list
(attribute
(attribute
(identifier_conf) identifier_conf
(identifier_harpoon) identifier_harpoon
)attribute
(identifier_stdout) identifier_stdout
)attribute
(string_"!!!!\n") string_"!!!!\n"
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_hp) identifier_hp
(identifier_write_to) identifier_write_to
)attribute
(argument_list
(attribute
(attribute
(identifier_conf) identifier_conf
(identifier_harpoon) identifier_harpoon
)attribute
(identifier_stdout) identifier_stdout
)attribute
(string_"It would appear building the image failed\n") string_"It would appear building the image failed\n"
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_hp) identifier_hp
(identifier_write_to) identifier_write_to
)attribute
(argument_list
(attribute
(attribute
(identifier_conf) identifier_conf
(identifier_harpoon) identifier_harpoon
)attribute
(identifier_stdout) identifier_stdout
)attribute
(call
(attribute
(string_"Do you want to run {0} where the build to help debug why it failed?\n") string_"Do you want to run {0} where the build to help debug why it failed?\n"
(identifier_format) identifier_format
)attribute
(argument_list
(attribute
(identifier_conf) identifier_conf
(identifier_resolved_shell) identifier_resolved_shell
)attribute
)argument_list
)call
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(attribute
(attribute
(identifier_conf) identifier_conf
(identifier_harpoon) identifier_harpoon
)attribute
(identifier_stdout) identifier_stdout
)attribute
(identifier_flush) identifier_flush
)attribute
(argument_list
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_answer) identifier_answer
(call
(identifier_input) identifier_input
(argument_list
(string_"[y]: ") string_"[y]: "
)argument_list
)call
)assignment
)expression_statement
(if_statement
(boolean_operator
(identifier_answer) identifier_answer
(not_operator
(call
(attribute
(call
(attribute
(identifier_answer) identifier_answer
(identifier_lower) identifier_lower
)attribute
(argument_list
)argument_list
)call
(identifier_startswith) identifier_startswith
)attribute
(argument_list
(string_"y") string_"y"
)argument_list
)call
)not_operator
)boolean_operator
(block
(expression_statement
(yield
)yield
)expression_statement
(return_statement
)return_statement
)block
)if_statement
(with_statement
(with_clause
(with_item
(call
(attribute
(identifier_self) identifier_self
(identifier_commit_and_run) identifier_commit_and_run
)attribute
(argument_list
(identifier_commit) identifier_commit
(identifier_conf) identifier_conf
(keyword_argument
(identifier_command) identifier_command
(attribute
(identifier_conf) identifier_conf
(identifier_resolved_shell) identifier_resolved_shell
)attribute
)keyword_argument
)argument_list
)call
)with_item
)with_clause
(block
(expression_statement
(yield
)yield
)expression_statement
)block
)with_statement
)block
)function_definition
)module | Ask the user if they want to commit this container and run sh in it |
(module
(function_definition
(function_name__put_chunk) function_name__put_chunk
(parameters
(identifier_cls) identifier_cls
(typed_parameter
(identifier_session) identifier_session
(type
(attribute
(identifier_aiohttp) identifier_aiohttp
(identifier_ClientSession) identifier_ClientSession
)attribute
)type
)typed_parameter
(typed_parameter
(identifier_upload_uri) identifier_upload_uri
(type
(identifier_str) identifier_str
)type
)typed_parameter
(typed_parameter
(identifier_buf) identifier_buf
(type
(identifier_bytes) identifier_bytes
)type
)typed_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_headers) identifier_headers
(dictionary
(pair
(string_'Content-Type') string_'Content-Type'
(string_'application/octet-stream') string_'application/octet-stream'
)pair
(pair
(string_'Content-Length') string_'Content-Length'
(binary_operator
(string_'%s') string_'%s'
(call
(identifier_len) identifier_len
(argument_list
(identifier_buf) identifier_buf
)argument_list
)call
)binary_operator
)pair
)dictionary
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_credentials) identifier_credentials
(attribute
(attribute
(attribute
(identifier_cls) identifier_cls
(identifier__handler) identifier__handler
)attribute
(identifier_session) identifier_session
)attribute
(identifier_credentials) identifier_credentials
)attribute
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_credentials) identifier_credentials
(None) None
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_utils) identifier_utils
(identifier_sign) identifier_sign
)attribute
(argument_list
(identifier_upload_uri) identifier_upload_uri
(identifier_headers) identifier_headers
(identifier_credentials) identifier_credentials
)argument_list
)call
)expression_statement
)block
)if_statement
(with_statement
(with_clause
(with_item
(as_pattern
(await
(call
(attribute
(identifier_session) identifier_session
(identifier_put) identifier_put
)attribute
(argument_list
(identifier_upload_uri) identifier_upload_uri
(keyword_argument
(identifier_data) identifier_data
(identifier_buf) identifier_buf
)keyword_argument
(keyword_argument
(identifier_headers) identifier_headers
(identifier_headers) identifier_headers
)keyword_argument
)argument_list
)call
)await
(as_pattern_target
(identifier_response) identifier_response
)as_pattern_target
)as_pattern
)with_item
)with_clause
(block
(if_statement
(comparison_operator
(attribute
(identifier_response) identifier_response
(identifier_status) identifier_status
)attribute
(integer_200) integer_200
)comparison_operator
(block
(expression_statement
(assignment
(identifier_content) identifier_content
(await
(call
(attribute
(identifier_response) identifier_response
(identifier_read) identifier_read
)attribute
(argument_list
)argument_list
)call
)await
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_request) identifier_request
(dictionary
(pair
(string_"body") string_"body"
(identifier_buf) identifier_buf
)pair
(pair
(string_"headers") string_"headers"
(identifier_headers) identifier_headers
)pair
(pair
(string_"method") string_"method"
(string_"PUT") string_"PUT"
)pair
(pair
(string_"uri") string_"uri"
(identifier_upload_uri) identifier_upload_uri
)pair
)dictionary
)assignment
)expression_statement
(raise_statement
(call
(identifier_CallError) identifier_CallError
(argument_list
(identifier_request) identifier_request
(identifier_response) identifier_response
(identifier_content) identifier_content
(None) None
)argument_list
)call
)raise_statement
)block
)if_statement
)block
)with_statement
)block
)function_definition
)module | Upload one chunk to `upload_uri`. |
(module
(function_definition
(function_name__ensure_tuple_or_list) function_name__ensure_tuple_or_list
(parameters
(identifier_arg_name) identifier_arg_name
(identifier_tuple_or_list) identifier_tuple_or_list
)parameters
(block
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_tuple_or_list) identifier_tuple_or_list
(tuple
(identifier_tuple) identifier_tuple
(identifier_list) identifier_list
)tuple
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(identifier_TypeError) identifier_TypeError
(argument_list
(binary_operator
(concatenated_string
(string_"Expected %s to be a tuple or list. ") string_"Expected %s to be a tuple or list. "
(string_"Received %r") string_"Received %r"
)concatenated_string
(tuple
(identifier_arg_name) identifier_arg_name
(identifier_tuple_or_list) identifier_tuple_or_list
)tuple
)binary_operator
)argument_list
)call
)raise_statement
)block
)if_statement
(return_statement
(call
(identifier_list) identifier_list
(argument_list
(identifier_tuple_or_list) identifier_tuple_or_list
)argument_list
)call
)return_statement
)block
)function_definition
)module | Ensures an input is a tuple or list.
This effectively reduces the iterable types allowed to a very short
whitelist: list and tuple.
:type arg_name: str
:param arg_name: Name of argument to use in error message.
:type tuple_or_list: sequence of str
:param tuple_or_list: Sequence to be verified.
:rtype: list of str
:returns: The ``tuple_or_list`` passed in cast to a ``list``.
:raises TypeError: if the ``tuple_or_list`` is not a tuple or list. |
(module
(function_definition
(function_name_multi_rpush) function_name_multi_rpush
(parameters
(identifier_self) identifier_self
(identifier_queue) identifier_queue
(identifier_values) identifier_values
(default_parameter
(identifier_bulk_size) identifier_bulk_size
(integer_0) integer_0
)default_parameter
(default_parameter
(identifier_transaction) identifier_transaction
(False) False
)default_parameter
)parameters
(block
(if_statement
(call
(identifier_hasattr) identifier_hasattr
(argument_list
(identifier_values) identifier_values
(string_'__iter__') string_'__iter__'
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_pipe) identifier_pipe
(call
(attribute
(identifier_self) identifier_self
(identifier_pipeline) identifier_pipeline
)attribute
(argument_list
(keyword_argument
(identifier_transaction) identifier_transaction
(identifier_transaction) identifier_transaction
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_pipe) identifier_pipe
(identifier_multi) identifier_multi
)attribute
(argument_list
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__multi_rpush_pipeline) identifier__multi_rpush_pipeline
)attribute
(argument_list
(identifier_pipe) identifier_pipe
(identifier_queue) identifier_queue
(identifier_values) identifier_values
(identifier_bulk_size) identifier_bulk_size
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_pipe) identifier_pipe
(identifier_execute) identifier_execute
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
(else_clause
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(string_'Expected an iterable') string_'Expected an iterable'
)argument_list
)call
)raise_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module | Pushes multiple elements to a list
If bulk_size is set it will execute the pipeline every bulk_size elements
This operation will be atomic if transaction=True is passed |
(module
(function_definition
(function_name_scale_subplots) function_name_scale_subplots
(parameters
(default_parameter
(identifier_subplots) identifier_subplots
(None) None
)default_parameter
(default_parameter
(identifier_xlim) identifier_xlim
(string_'auto') string_'auto'
)default_parameter
(default_parameter
(identifier_ylim) identifier_ylim
(string_'auto') string_'auto'
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_auto_axis) identifier_auto_axis
(string_'') string_''
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_xlim) identifier_xlim
(string_'auto') string_'auto'
)comparison_operator
(block
(expression_statement
(augmented_assignment
(identifier_auto_axis) identifier_auto_axis
(string_'x') string_'x'
)augmented_assignment
)expression_statement
)block
)if_statement
(if_statement
(comparison_operator
(identifier_ylim) identifier_ylim
(string_'auto') string_'auto'
)comparison_operator
(block
(expression_statement
(augmented_assignment
(identifier_auto_axis) identifier_auto_axis
(string_'y') string_'y'
)augmented_assignment
)expression_statement
)block
)if_statement
(expression_statement
(call
(identifier_autoscale_subplots) identifier_autoscale_subplots
(argument_list
(identifier_subplots) identifier_subplots
(identifier_auto_axis) identifier_auto_axis
)argument_list
)call
)expression_statement
(for_statement
(pattern_list
(identifier_loc) identifier_loc
(identifier_ax) identifier_ax
)pattern_list
(call
(attribute
(identifier_numpy) identifier_numpy
(identifier_ndenumerate) identifier_ndenumerate
)attribute
(argument_list
(identifier_subplots) identifier_subplots
)argument_list
)call
(block
(if_statement
(comparison_operator
(string_'x') string_'x'
(identifier_auto_axis) identifier_auto_axis
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_ax) identifier_ax
(identifier_set_xlim) identifier_set_xlim
)attribute
(argument_list
(identifier_xlim) identifier_xlim
)argument_list
)call
)expression_statement
)block
)if_statement
(if_statement
(comparison_operator
(string_'y') string_'y'
(identifier_auto_axis) identifier_auto_axis
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_ax) identifier_ax
(identifier_set_ylim) identifier_set_ylim
)attribute
(argument_list
(identifier_ylim) identifier_ylim
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)for_statement
)block
)function_definition
)module | Set the x and y axis limits for a collection of subplots.
Parameters
-----------
subplots : ndarray or list of matplotlib.axes.Axes
xlim : None | 'auto' | (xmin, xmax)
'auto' : sets the limits according to the most
extreme values of data encountered.
ylim : None | 'auto' | (ymin, ymax) |
(module
(function_definition
(function_name_add) function_name_add
(parameters
(identifier_self) identifier_self
(identifier_src) identifier_src
)parameters
(block
(if_statement
(not_operator
(call
(attribute
(identifier_audio) identifier_audio
(identifier_get_type) identifier_get_type
)attribute
(argument_list
(identifier_src) identifier_src
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(identifier_TypeError) identifier_TypeError
(argument_list
(string_'The type of this file is not supported.') string_'The type of this file is not supported.'
)argument_list
)call
)raise_statement
)block
)if_statement
(return_statement
(call
(attribute
(call
(identifier_super) identifier_super
(argument_list
)argument_list
)call
(identifier_add) identifier_add
)attribute
(argument_list
(identifier_src) identifier_src
)argument_list
)call
)return_statement
)block
)function_definition
)module | store an audio file to storage dir
:param src: audio file path
:return: checksum value |
(module
(function_definition
(function_name_newline) function_name_newline
(parameters
(identifier_self) identifier_self
(list_splat_pattern
(identifier_args) identifier_args
)list_splat_pattern
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(expression_statement
(assignment
(identifier_levelOverride) identifier_levelOverride
(boolean_operator
(call
(attribute
(identifier_kwargs) identifier_kwargs
(identifier_get) identifier_get
)attribute
(argument_list
(string_'level') string_'level'
)argument_list
)call
(attribute
(identifier_self) identifier_self
(identifier__lastlevel) identifier__lastlevel
)attribute
)boolean_operator
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__log) identifier__log
)attribute
(argument_list
(identifier_levelOverride) identifier_levelOverride
(string_'') string_''
(string_'newline') string_'newline'
(identifier_args) identifier_args
(identifier_kwargs) identifier_kwargs
)argument_list
)call
)expression_statement
)block
)function_definition
)module | Prints an empty line to the log. Uses the level of the last message
printed unless specified otherwise with the level= kwarg. |
(module
(function_definition
(function_name_get_by_hostname) function_name_get_by_hostname
(parameters
(identifier_self) identifier_self
(identifier_hostname) identifier_hostname
)parameters
(block
(expression_statement
(assignment
(identifier_resources) identifier_resources
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__client) identifier__client
)attribute
(identifier_get_all) identifier_get_all
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_resources_filtered) identifier_resources_filtered
(list_comprehension
(identifier_x) identifier_x
(for_in_clause
(identifier_x) identifier_x
(identifier_resources) identifier_resources
)for_in_clause
(if_clause
(comparison_operator
(subscript
(identifier_x) identifier_x
(string_'hostname') string_'hostname'
)subscript
(identifier_hostname) identifier_hostname
)comparison_operator
)if_clause
)list_comprehension
)assignment
)expression_statement
(if_statement
(identifier_resources_filtered) identifier_resources_filtered
(block
(return_statement
(subscript
(identifier_resources_filtered) identifier_resources_filtered
(integer_0) integer_0
)subscript
)return_statement
)block
(else_clause
(block
(return_statement
(None) None
)return_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module | Retrieve a storage system by its hostname.
Works only in API500 onwards.
Args:
hostname: Storage system hostname.
Returns:
dict |
(module
(function_definition
(function_name_weld_arrays_to_vec_of_struct) function_name_weld_arrays_to_vec_of_struct
(parameters
(identifier_arrays) identifier_arrays
(identifier_weld_types) identifier_weld_types
)parameters
(block
(expression_statement
(assignment
(identifier_weld_obj) identifier_weld_obj
(call
(identifier_create_empty_weld_object) identifier_create_empty_weld_object
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_obj_ids) identifier_obj_ids
(list_comprehension
(call
(identifier_get_weld_obj_id) identifier_get_weld_obj_id
(argument_list
(identifier_weld_obj) identifier_weld_obj
(identifier_array) identifier_array
)argument_list
)call
(for_in_clause
(identifier_array) identifier_array
(identifier_arrays) identifier_arrays
)for_in_clause
)list_comprehension
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_arrays) identifier_arrays
(conditional_expression
(call
(attribute
(string_'zip({})') string_'zip({})'
(identifier_format) identifier_format
)attribute
(argument_list
(call
(attribute
(string_', ') string_', '
(identifier_join) identifier_join
)attribute
(argument_list
(identifier_obj_ids) identifier_obj_ids
)argument_list
)call
)argument_list
)call
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_obj_ids) identifier_obj_ids
)argument_list
)call
(integer_1) integer_1
)comparison_operator
(call
(attribute
(string_'{}') string_'{}'
(identifier_format) identifier_format
)attribute
(argument_list
(subscript
(identifier_obj_ids) identifier_obj_ids
(integer_0) integer_0
)subscript
)argument_list
)call
)conditional_expression
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_input_types) identifier_input_types
(conditional_expression
(call
(identifier_struct_of) identifier_struct_of
(argument_list
(string_'{e}') string_'{e}'
(identifier_weld_types) identifier_weld_types
)argument_list
)call
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_obj_ids) identifier_obj_ids
)argument_list
)call
(integer_1) integer_1
)comparison_operator
(call
(attribute
(string_'{}') string_'{}'
(identifier_format) identifier_format
)attribute
(argument_list
(subscript
(identifier_weld_types) identifier_weld_types
(integer_0) integer_0
)subscript
)argument_list
)call
)conditional_expression
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_res_types) identifier_res_types
(call
(identifier_struct_of) identifier_struct_of
(argument_list
(string_'{e}') string_'{e}'
(identifier_weld_types) identifier_weld_types
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_to_merge) identifier_to_merge
(conditional_expression
(string_'e') string_'e'
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_obj_ids) identifier_obj_ids
)argument_list
)call
(integer_1) integer_1
)comparison_operator
(string_'{e}') string_'{e}'
)conditional_expression
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_weld_template) identifier_weld_template
(assignment
(attribute
(identifier_weld_obj) identifier_weld_obj
(identifier_weld_code) identifier_weld_code
)attribute
(call
(attribute
(identifier_weld_template) identifier_weld_template
(identifier_format) identifier_format
)attribute
(argument_list
(keyword_argument
(identifier_arrays) identifier_arrays
(identifier_arrays) identifier_arrays
)keyword_argument
(keyword_argument
(identifier_input_types) identifier_input_types
(identifier_input_types) identifier_input_types
)keyword_argument
(keyword_argument
(identifier_res_types) identifier_res_types
(identifier_res_types) identifier_res_types
)keyword_argument
(keyword_argument
(identifier_to_merge) identifier_to_merge
(identifier_to_merge) identifier_to_merge
)keyword_argument
)argument_list
)call
)assignment
)assignment
)expression_statement
(return_statement
(identifier_weld_obj) identifier_weld_obj
)return_statement
)block
)function_definition
)module | Create a vector of structs from multiple vectors.
Parameters
----------
arrays : list of (numpy.ndarray or WeldObject)
Arrays to put in a struct.
weld_types : list of WeldType
The Weld types of the arrays in the same order.
Returns
-------
WeldObject
Representation of this computation. |
(module
(function_definition
(function_name__split_stock_code) function_name__split_stock_code
(parameters
(identifier_self) identifier_self
(identifier_code) identifier_code
)parameters
(block
(expression_statement
(assignment
(identifier_stock_str) identifier_stock_str
(call
(identifier_str) identifier_str
(argument_list
(identifier_code) identifier_code
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_split_loc) identifier_split_loc
(call
(attribute
(identifier_stock_str) identifier_stock_str
(identifier_find) identifier_find
)attribute
(argument_list
(string_".") string_"."
)argument_list
)call
)assignment
)expression_statement
(if_statement
(boolean_operator
(comparison_operator
(integer_0) integer_0
(identifier_split_loc) identifier_split_loc
(binary_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_stock_str) identifier_stock_str
)argument_list
)call
(integer_1) integer_1
)binary_operator
)comparison_operator
(comparison_operator
(subscript
(identifier_stock_str) identifier_stock_str
(slice
(integer_0) integer_0
(colon) colon
(identifier_split_loc) identifier_split_loc
)slice
)subscript
(identifier_MKT_MAP) identifier_MKT_MAP
)comparison_operator
)boolean_operator
(block
(expression_statement
(assignment
(identifier_market_str) identifier_market_str
(subscript
(identifier_stock_str) identifier_stock_str
(slice
(integer_0) integer_0
(colon) colon
(identifier_split_loc) identifier_split_loc
)slice
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_partial_stock_str) identifier_partial_stock_str
(subscript
(identifier_stock_str) identifier_stock_str
(slice
(binary_operator
(identifier_split_loc) identifier_split_loc
(integer_1) integer_1
)binary_operator
(colon) colon
)slice
)subscript
)assignment
)expression_statement
(return_statement
(expression_list
(identifier_RET_OK) identifier_RET_OK
(tuple
(identifier_market_str) identifier_market_str
(identifier_partial_stock_str) identifier_partial_stock_str
)tuple
)expression_list
)return_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_error_str) identifier_error_str
(binary_operator
(identifier_ERROR_STR_PREFIX) identifier_ERROR_STR_PREFIX
(binary_operator
(string_"format of %s is wrong. (US.AAPL, HK.00700, SZ.000001)") string_"format of %s is wrong. (US.AAPL, HK.00700, SZ.000001)"
(identifier_stock_str) identifier_stock_str
)binary_operator
)binary_operator
)assignment
)expression_statement
(return_statement
(expression_list
(identifier_RET_ERROR) identifier_RET_ERROR
(identifier_error_str) identifier_error_str
)expression_list
)return_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module | do not use the built-in split function in python.
The built-in function cannot handle some stock strings correctly.
for instance, US..DJI, where the dot . itself is a part of original code |
(module
(function_definition
(function_name_getPolicyValue) function_name_getPolicyValue
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__cur) identifier__cur
)attribute
(identifier_execute) identifier_execute
)attribute
(argument_list
(string_"SELECT action FROM policy") string_"SELECT action FROM policy"
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_r) identifier_r
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__cur) identifier__cur
)attribute
(identifier_fetchall) identifier_fetchall
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_policy) identifier_policy
(list_comprehension
(subscript
(identifier_x) identifier_x
(integer_0) integer_0
)subscript
(for_in_clause
(identifier_x) identifier_x
(identifier_r) identifier_r
)for_in_clause
)list_comprehension
)assignment
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__cur) identifier__cur
)attribute
(identifier_execute) identifier_execute
)attribute
(argument_list
(string_"SELECT value FROM V") string_"SELECT value FROM V"
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_r) identifier_r
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__cur) identifier__cur
)attribute
(identifier_fetchall) identifier_fetchall
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_value) identifier_value
(list_comprehension
(subscript
(identifier_x) identifier_x
(integer_0) integer_0
)subscript
(for_in_clause
(identifier_x) identifier_x
(identifier_r) identifier_r
)for_in_clause
)list_comprehension
)assignment
)expression_statement
(return_statement
(expression_list
(identifier_policy) identifier_policy
(identifier_value) identifier_value
)expression_list
)return_statement
)block
)function_definition
)module | Get the policy and value vectors. |
(module
(function_definition
(function_name_columnSimilarities) function_name_columnSimilarities
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_threshold) identifier_threshold
(float_0.0) float_0.0
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_java_sims_mat) identifier_java_sims_mat
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__java_matrix_wrapper) identifier__java_matrix_wrapper
)attribute
(identifier_call) identifier_call
)attribute
(argument_list
(string_"columnSimilarities") string_"columnSimilarities"
(call
(identifier_float) identifier_float
(argument_list
(identifier_threshold) identifier_threshold
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(identifier_CoordinateMatrix) identifier_CoordinateMatrix
(argument_list
(identifier_java_sims_mat) identifier_java_sims_mat
)argument_list
)call
)return_statement
)block
)function_definition
)module | Compute similarities between columns of this matrix.
The threshold parameter is a trade-off knob between estimate
quality and computational cost.
The default threshold setting of 0 guarantees deterministically
correct results, but uses the brute-force approach of computing
normalized dot products.
Setting the threshold to positive values uses a sampling
approach and incurs strictly less computational cost than the
brute-force approach. However the similarities computed will
be estimates.
The sampling guarantees relative-error correctness for those
pairs of columns that have similarity greater than the given
similarity threshold.
To describe the guarantee, we set some notation:
* Let A be the smallest in magnitude non-zero element of
this matrix.
* Let B be the largest in magnitude non-zero element of
this matrix.
* Let L be the maximum number of non-zeros per row.
For example, for {0,1} matrices: A=B=1.
Another example, for the Netflix matrix: A=1, B=5
For those column pairs that are above the threshold, the
computed similarity is correct to within 20% relative error
with probability at least 1 - (0.981)^10/B^
The shuffle size is bounded by the *smaller* of the following
two expressions:
* O(n log(n) L / (threshold * A))
* O(m L^2^)
The latter is the cost of the brute-force approach, so for
non-zero thresholds, the cost is always cheaper than the
brute-force approach.
:param: threshold: Set to 0 for deterministic guaranteed
correctness. Similarities above this
threshold are estimated with the cost vs
estimate quality trade-off described above.
:return: An n x n sparse upper-triangular CoordinateMatrix of
cosine similarities between columns of this matrix.
>>> rows = sc.parallelize([[1, 2], [1, 5]])
>>> mat = RowMatrix(rows)
>>> sims = mat.columnSimilarities()
>>> sims.entries.first().value
0.91914503... |
(module
(function_definition
(function_name_validate_metadata) function_name_validate_metadata
(parameters
(identifier_self) identifier_self
(identifier_handler) identifier_handler
)parameters
(block
(if_statement
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_meta) identifier_meta
)attribute
(string_'category') string_'category'
)comparison_operator
(block
(expression_statement
(assignment
(identifier_new_metadata) identifier_new_metadata
(attribute
(identifier_self) identifier_self
(identifier_metadata) identifier_metadata
)attribute
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_cur_metadata) identifier_cur_metadata
(call
(attribute
(identifier_handler) identifier_handler
(identifier_read_metadata) identifier_read_metadata
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_cname) identifier_cname
)attribute
)argument_list
)call
)assignment
)expression_statement
(if_statement
(parenthesized_expression
(boolean_operator
(boolean_operator
(comparison_operator
(identifier_new_metadata) identifier_new_metadata
(None) None
)comparison_operator
(comparison_operator
(identifier_cur_metadata) identifier_cur_metadata
(None) None
)comparison_operator
)boolean_operator
(not_operator
(call
(identifier_array_equivalent) identifier_array_equivalent
(argument_list
(identifier_new_metadata) identifier_new_metadata
(identifier_cur_metadata) identifier_cur_metadata
)argument_list
)call
)not_operator
)boolean_operator
)parenthesized_expression
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(concatenated_string
(string_"cannot append a categorical with ") string_"cannot append a categorical with "
(string_"different categories to the existing") string_"different categories to the existing"
)concatenated_string
)argument_list
)call
)raise_statement
)block
)if_statement
)block
)if_statement
)block
)function_definition
)module | validate that kind=category does not change the categories |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.