sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_average) function_name_average (parameters (identifier_sequence) identifier_sequence (identifier_key) identifier_key )parameters (block (return_statement (binary_operator (call (identifier_sum) identifier_sum (argument_list (call (identifier_map) identifier_map (argument_list (identifier_key) identifier_key (identifier_sequence) identifier_sequence )argument_list )call )argument_list )call (call (identifier_float) identifier_float (argument_list (call (identifier_len) identifier_len (argument_list (identifier_sequence) identifier_sequence )argument_list )call )argument_list )call )binary_operator )return_statement )block )function_definition )module
Averages a sequence based on a key.
(module (function_definition (function_name_custom_scale_mixture_prior_builder) function_name_custom_scale_mixture_prior_builder (parameters (identifier_getter) identifier_getter (identifier_name) identifier_name (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (delete_statement (identifier_getter) identifier_getter )delete_statement (delete_statement (identifier_name) identifier_name )delete_statement (delete_statement (identifier_args) identifier_args )delete_statement (delete_statement (identifier_kwargs) identifier_kwargs )delete_statement (return_statement (call (identifier_CustomScaleMixture) identifier_CustomScaleMixture (argument_list (attribute (identifier_FLAGS) identifier_FLAGS (identifier_prior_pi) identifier_prior_pi )attribute (attribute (identifier_FLAGS) identifier_FLAGS (identifier_prior_sigma1) identifier_prior_sigma1 )attribute (attribute (identifier_FLAGS) identifier_FLAGS (identifier_prior_sigma2) identifier_prior_sigma2 )attribute )argument_list )call )return_statement )block )function_definition )module
A builder for the gaussian scale-mixture prior of Fortunato et al. Please see https://arxiv.org/abs/1704.02798, section 7.1 Args: getter: The `getter` passed to a `custom_getter`. Please see the documentation for `tf.get_variable`. name: The `name` argument passed to `tf.get_variable`. *args: Positional arguments forwarded by `tf.get_variable`. **kwargs: Keyword arguments forwarded by `tf.get_variable`. Returns: An instance of `tfp.distributions.Distribution` representing the prior distribution over the variable in question.
(module (function_definition (function_name_upper_camel) function_name_upper_camel (parameters (identifier_string) identifier_string (default_parameter (identifier_prefix) identifier_prefix (string_'') string_'' )default_parameter (default_parameter (identifier_suffix) identifier_suffix (string_'') string_'' )default_parameter )parameters (block (return_statement (call (identifier_require_valid) identifier_require_valid (argument_list (call (identifier_append_underscore_if_keyword) identifier_append_underscore_if_keyword (argument_list (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (generator_expression (call (identifier_upper_case_first_char) identifier_upper_case_first_char (argument_list (identifier_word) identifier_word )argument_list )call (for_in_clause (identifier_word) identifier_word (call (attribute (identifier_en) identifier_en (identifier_words) identifier_words )attribute (argument_list (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (list (identifier_prefix) identifier_prefix (identifier_string) identifier_string (identifier_suffix) identifier_suffix )list )argument_list )call )argument_list )call )for_in_clause )generator_expression )call )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Generate a camel-case identifier with the first word capitalised. Useful for class names. Takes a string, prefix, and optional suffix. `prefix` can be set to `''`, though be careful - without a prefix, the function will throw `InvalidIdentifier` when your string starts with a number. Example: >>> upper_camel("I'm a class", prefix='') 'IAmAClass'
(module (function_definition (function_name_map_hmms) function_name_map_hmms (parameters (identifier_input_model) identifier_input_model (identifier_mapping) identifier_mapping )parameters (block (expression_statement (assignment (identifier_output_model) identifier_output_model (call (attribute (identifier_copy) identifier_copy (identifier_copy) identifier_copy )attribute (argument_list (identifier_input_model) identifier_input_model )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_o_hmms) identifier_o_hmms (list )list )assignment )expression_statement (for_statement (identifier_i_hmm) identifier_i_hmm (subscript (identifier_input_model) identifier_input_model (string_'hmms') string_'hmms' )subscript (block (expression_statement (assignment (identifier_i_hmm_name) identifier_i_hmm_name (subscript (identifier_i_hmm) identifier_i_hmm (string_'name') string_'name' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_o_hmm_names) identifier_o_hmm_names (call (attribute (identifier_mapping) identifier_mapping (identifier_get) identifier_get )attribute (argument_list (identifier_i_hmm_name) identifier_i_hmm_name (list (identifier_i_hmm_name) identifier_i_hmm_name )list )argument_list )call )assignment )expression_statement (for_statement (identifier_o_hmm_name) identifier_o_hmm_name (identifier_o_hmm_names) identifier_o_hmm_names (block (expression_statement (assignment (identifier_o_hmm) identifier_o_hmm (call (attribute (identifier_copy) identifier_copy (identifier_copy) identifier_copy )attribute (argument_list (identifier_i_hmm) identifier_i_hmm )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_o_hmm) identifier_o_hmm (string_'name') string_'name' )subscript (identifier_o_hmm_name) identifier_o_hmm_name )assignment )expression_statement (expression_statement (call (attribute (identifier_o_hmms) identifier_o_hmms (identifier_append) identifier_append )attribute (argument_list (identifier_o_hmm) identifier_o_hmm )argument_list )call )expression_statement )block )for_statement )block )for_statement (expression_statement (assignment (subscript (identifier_output_model) identifier_output_model (string_'hmms') string_'hmms' )subscript (identifier_o_hmms) identifier_o_hmms )assignment )expression_statement (return_statement (identifier_output_model) identifier_output_model )return_statement )block )function_definition )module
Create a new HTK HMM model given a model and a mapping dictionary. :param input_model: The model to transform of type dict :param mapping: A dictionary from string -> list(string) :return: The transformed model of type dict
(module (function_definition (function_name_escape) function_name_escape (parameters (identifier_str) identifier_str )parameters (block (expression_statement (assignment (identifier_out) identifier_out (string_'') string_'' )assignment )expression_statement (for_statement (identifier_char) identifier_char (identifier_str) identifier_str (block (if_statement (comparison_operator (identifier_char) identifier_char (string_'\\ ') string_'\\ ' )comparison_operator (block (expression_statement (augmented_assignment (identifier_out) identifier_out (string_'\\') string_'\\' )augmented_assignment )expression_statement )block )if_statement (expression_statement (augmented_assignment (identifier_out) identifier_out (identifier_char) identifier_char )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Precede all special characters with a backslash.
(module (function_definition (function_name_graph_to_dot) function_name_graph_to_dot (parameters (identifier_graph) identifier_graph (default_parameter (identifier_node_renderer) identifier_node_renderer (None) None )default_parameter (default_parameter (identifier_edge_renderer) identifier_edge_renderer (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_node_pairs) identifier_node_pairs (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (identifier_graph) identifier_graph (identifier_nodes) identifier_nodes )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_edge_pairs) identifier_edge_pairs (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (identifier_graph) identifier_graph (identifier_edges) identifier_edges )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_node_renderer) identifier_node_renderer (None) None )comparison_operator (block (expression_statement (assignment (identifier_node_renderer_wrapper) identifier_node_renderer_wrapper (lambda (lambda_parameters (identifier_nid) identifier_nid )lambda_parameters (string_'') string_'' )lambda )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_node_renderer_wrapper) identifier_node_renderer_wrapper (lambda (lambda_parameters (identifier_nid) identifier_nid )lambda_parameters (binary_operator (string_' [%s]') string_' [%s]' (call (attribute (string_',') string_',' (identifier_join) identifier_join )attribute (argument_list (list_comprehension (binary_operator (string_'%s=%s') string_'%s=%s' (identifier_tpl) identifier_tpl )binary_operator (for_in_clause (identifier_tpl) identifier_tpl (call (identifier_list) identifier_list (argument_list (call (attribute (call (identifier_node_renderer) identifier_node_renderer (argument_list (identifier_graph) identifier_graph (identifier_nid) identifier_nid )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call )for_in_clause )list_comprehension )argument_list )call )binary_operator )lambda )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_graph_string) identifier_graph_string (string_'digraph G {\n') string_'digraph G {\n' )assignment )expression_statement (expression_statement (augmented_assignment (identifier_graph_string) identifier_graph_string (string_'overlap=scale;\n') string_'overlap=scale;\n' )augmented_assignment )expression_statement (for_statement (pattern_list (identifier_node_id) identifier_node_id (identifier_node) identifier_node )pattern_list (identifier_node_pairs) identifier_node_pairs (block (expression_statement (augmented_assignment (identifier_graph_string) identifier_graph_string (binary_operator (string_'%i%s;\n') string_'%i%s;\n' (tuple (identifier_node_id) identifier_node_id (call (identifier_node_renderer_wrapper) identifier_node_renderer_wrapper (argument_list (identifier_node_id) identifier_node_id )argument_list )call )tuple )binary_operator )augmented_assignment )expression_statement )block )for_statement (for_statement (pattern_list (identifier_edge_id) identifier_edge_id (identifier_edge) identifier_edge )pattern_list (identifier_edge_pairs) identifier_edge_pairs (block (expression_statement (assignment (identifier_node_a) identifier_node_a (subscript (subscript (identifier_edge) identifier_edge (string_'vertices') string_'vertices' )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_node_b) identifier_node_b (subscript (subscript (identifier_edge) identifier_edge (string_'vertices') string_'vertices' )subscript (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (augmented_assignment (identifier_graph_string) identifier_graph_string (binary_operator (string_'%i -> %i;\n') string_'%i -> %i;\n' (tuple (identifier_node_a) identifier_node_a (identifier_node_b) identifier_node_b )tuple )binary_operator )augmented_assignment )expression_statement )block )for_statement (expression_statement (augmented_assignment (identifier_graph_string) identifier_graph_string (string_'}') string_'}' )augmented_assignment )expression_statement (return_statement (identifier_graph_string) identifier_graph_string )return_statement )block )function_definition )module
Produces a DOT specification string from the provided graph.
(module (function_definition (function_name_ks_significance) function_name_ks_significance (parameters (identifier_fg_pos) identifier_fg_pos (default_parameter (identifier_bg_pos) identifier_bg_pos (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_p) identifier_p (call (identifier_ks_pvalue) identifier_ks_pvalue (argument_list (identifier_fg_pos) identifier_fg_pos (call (identifier_max) identifier_max (argument_list (identifier_fg_pos) identifier_fg_pos )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_p) identifier_p (integer_0) integer_0 )comparison_operator (block (return_statement (unary_operator (call (attribute (identifier_np) identifier_np (identifier_log10) identifier_log10 )attribute (argument_list (identifier_p) identifier_p )argument_list )call )unary_operator )return_statement )block (else_clause (block (return_statement (attribute (identifier_np) identifier_np (identifier_inf) identifier_inf )attribute )return_statement )block )else_clause )if_statement )block )function_definition )module
Computes the -log10 of Kolmogorov-Smirnov p-value of position distribution. Parameters ---------- fg_pos : array_like The list of values for the positive set. bg_pos : array_like, optional The list of values for the negative set. Returns ------- p : float -log10(KS p-value).
(module (function_definition (function_name_instantiate_client) function_name_instantiate_client (parameters (identifier__unused_client) identifier__unused_client (identifier__unused_to_delete) identifier__unused_to_delete )parameters (block (import_from_statement (dotted_name (identifier_google) identifier_google (identifier_cloud) identifier_cloud )dotted_name (dotted_name (identifier_logging) identifier_logging )dotted_name )import_from_statement (expression_statement (assignment (identifier_client) identifier_client (call (attribute (identifier_logging) identifier_logging (identifier_Client) identifier_Client )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_credentials) identifier_credentials (call (identifier_object) identifier_object (argument_list )argument_list )call )assignment )expression_statement (import_from_statement (dotted_name (identifier_google) identifier_google (identifier_cloud) identifier_cloud )dotted_name (dotted_name (identifier_logging) identifier_logging )dotted_name )import_from_statement (expression_statement (assignment (identifier_client) identifier_client (call (attribute (identifier_logging) identifier_logging (identifier_Client) identifier_Client )attribute (argument_list (keyword_argument (identifier_project) identifier_project (string_"my-project") string_"my-project" )keyword_argument (keyword_argument (identifier_credentials) identifier_credentials (identifier_credentials) identifier_credentials )keyword_argument )argument_list )call )assignment )expression_statement )block )function_definition )module
Instantiate client.
(module (function_definition (function_name_create_rflink_connection) function_name_create_rflink_connection (parameters (default_parameter (identifier_port) identifier_port (None) None )default_parameter (default_parameter (identifier_host) identifier_host (None) None )default_parameter (default_parameter (identifier_baud) identifier_baud (integer_57600) integer_57600 )default_parameter (default_parameter (identifier_protocol) identifier_protocol (identifier_RflinkProtocol) identifier_RflinkProtocol )default_parameter (default_parameter (identifier_packet_callback) identifier_packet_callback (None) None )default_parameter (default_parameter (identifier_event_callback) identifier_event_callback (None) None )default_parameter (default_parameter (identifier_disconnect_callback) identifier_disconnect_callback (None) None )default_parameter (default_parameter (identifier_ignore) identifier_ignore (None) None )default_parameter (default_parameter (identifier_loop) identifier_loop (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_protocol) identifier_protocol (call (identifier_partial) identifier_partial (argument_list (identifier_protocol) identifier_protocol (keyword_argument (identifier_loop) identifier_loop (conditional_expression (identifier_loop) identifier_loop (identifier_loop) identifier_loop (call (attribute (identifier_asyncio) identifier_asyncio (identifier_get_event_loop) identifier_get_event_loop )attribute (argument_list )argument_list )call )conditional_expression )keyword_argument (keyword_argument (identifier_packet_callback) identifier_packet_callback (identifier_packet_callback) identifier_packet_callback )keyword_argument (keyword_argument (identifier_event_callback) identifier_event_callback (identifier_event_callback) identifier_event_callback )keyword_argument (keyword_argument (identifier_disconnect_callback) identifier_disconnect_callback (identifier_disconnect_callback) identifier_disconnect_callback )keyword_argument (keyword_argument (identifier_ignore) identifier_ignore (conditional_expression (identifier_ignore) identifier_ignore (identifier_ignore) identifier_ignore (list )list )conditional_expression )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_host) identifier_host (block (expression_statement (assignment (identifier_conn) identifier_conn (call (attribute (identifier_loop) identifier_loop (identifier_create_connection) identifier_create_connection )attribute (argument_list (identifier_protocol) identifier_protocol (identifier_host) identifier_host (identifier_port) identifier_port )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_baud) identifier_baud (identifier_baud) identifier_baud )assignment )expression_statement (expression_statement (assignment (identifier_conn) identifier_conn (call (identifier_create_serial_connection) identifier_create_serial_connection (argument_list (identifier_loop) identifier_loop (identifier_protocol) identifier_protocol (identifier_port) identifier_port (identifier_baud) identifier_baud )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_conn) identifier_conn )return_statement )block )function_definition )module
Create Rflink manager class, returns transport coroutine.
(module (function_definition (function_name_new_type) function_name_new_type (parameters (typed_parameter (identifier_type_name) identifier_type_name (type (identifier_str) identifier_str )type )typed_parameter (typed_default_parameter (identifier_prefix) identifier_prefix (type (boolean_operator (identifier_str) identifier_str (None) None )boolean_operator )type (None) None )typed_default_parameter )parameters (type (identifier_str) identifier_str )type (block (if_statement (comparison_operator (attribute (identifier_Naming) identifier_Naming (identifier_TYPE_PREFIX) identifier_TYPE_PREFIX )attribute (identifier_type_name) identifier_type_name )comparison_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (string_'Cannot create new type: type {} is already prefixed.') string_'Cannot create new type: type {} is already prefixed.' (identifier_format) identifier_format )attribute (argument_list (identifier_type_name) identifier_type_name )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_prefix) identifier_prefix (conditional_expression (parenthesized_expression (binary_operator (identifier_prefix) identifier_prefix (attribute (identifier_Naming) identifier_Naming (identifier_TYPE_PREFIX) identifier_TYPE_PREFIX )attribute )binary_operator )parenthesized_expression (comparison_operator (identifier_prefix) identifier_prefix (None) None )comparison_operator (string_'') string_'' )conditional_expression )assignment )expression_statement (return_statement (binary_operator (identifier_prefix) identifier_prefix (identifier_type_name) identifier_type_name )binary_operator )return_statement )block )function_definition )module
Creates a resource type with optionally a prefix. Using the rules of JSON-LD, we use prefixes to disambiguate between different types with the same name: one can Accept a device or a project. In eReuse.org there are different events with the same names, in linked-data terms they have different URI. In eReuse.org, we solve this with the following: "@type": "devices:Accept" // the URI for these events is 'devices/events/accept' "@type": "projects:Accept" // the URI for these events is 'projects/events/accept ... Type is only used in events, when there are ambiguities. The rest of "@type": "devices:Accept" "@type": "Accept" But these not: "@type": "projects:Accept" // it is an event from a project "@type": "Accept" // it is an event from a device
(module (function_definition (function_name_right_shift_blockwise) function_name_right_shift_blockwise (parameters (identifier_x) identifier_x (identifier_query_shape) identifier_query_shape (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (with_statement (with_clause (with_item (call (attribute (identifier_tf) identifier_tf (identifier_variable_scope) identifier_variable_scope )attribute (argument_list (identifier_name) identifier_name (keyword_argument (identifier_default_name) identifier_default_name (string_"right_shift_blockwise") string_"right_shift_blockwise" )keyword_argument (keyword_argument (identifier_values) identifier_values (list (identifier_x) identifier_x )list )keyword_argument )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_x_list_shape) identifier_x_list_shape (call (attribute (call (attribute (identifier_x) identifier_x (identifier_get_shape) identifier_get_shape )attribute (argument_list )argument_list )call (identifier_as_list) identifier_as_list )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_x_shape) identifier_x_shape (call (attribute (identifier_common_layers) identifier_common_layers (identifier_shape_list) identifier_shape_list )attribute (argument_list (identifier_x) identifier_x )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_x) identifier_x (call (attribute (identifier_tf) identifier_tf (identifier_expand_dims) identifier_expand_dims )attribute (argument_list (identifier_x) identifier_x (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_x) identifier_x (call (identifier_pad_to_multiple_2d) identifier_pad_to_multiple_2d (argument_list (identifier_x) identifier_x (identifier_query_shape) identifier_query_shape )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_padded_x_shape) identifier_padded_x_shape (call (attribute (identifier_common_layers) identifier_common_layers (identifier_shape_list) identifier_shape_list )attribute (argument_list (identifier_x) identifier_x )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_x_indices) identifier_x_indices (call (identifier_gather_indices_2d) identifier_gather_indices_2d (argument_list (identifier_x) identifier_x (identifier_query_shape) identifier_query_shape (identifier_query_shape) identifier_query_shape )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_x_new) identifier_x_new (call (identifier_get_shifted_center_blocks) identifier_get_shifted_center_blocks (argument_list (identifier_x) identifier_x (identifier_x_indices) identifier_x_indices )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (call (identifier_scatter_blocks_2d) identifier_scatter_blocks_2d (argument_list (identifier_x_new) identifier_x_new (identifier_x_indices) identifier_x_indices (identifier_padded_x_shape) identifier_padded_x_shape )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (call (attribute (identifier_tf) identifier_tf (identifier_squeeze) identifier_squeeze )attribute (argument_list (identifier_output) identifier_output (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (call (attribute (identifier_tf) identifier_tf (identifier_slice) identifier_slice )attribute (argument_list (identifier_output) identifier_output (list (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 )list (list (unary_operator (integer_1) integer_1 )unary_operator (subscript (identifier_x_shape) identifier_x_shape (integer_1) integer_1 )subscript (subscript (identifier_x_shape) identifier_x_shape (integer_2) integer_2 )subscript (unary_operator (integer_1) integer_1 )unary_operator )list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_output) identifier_output (identifier_set_shape) identifier_set_shape )attribute (argument_list (identifier_x_list_shape) identifier_x_list_shape )argument_list )call )expression_statement (return_statement (identifier_output) identifier_output )return_statement )block )with_statement )block )function_definition )module
Right shifts once in every block. Args: x: a tensor of shape [batch, height, width, depth] query_shape: A 2d tuple of ints name: a string Returns: output: a tensor of the same shape as x
(module (function_definition (function_name_get_price) function_name_get_price (parameters (identifier_item) identifier_item )parameters (block (expression_statement (assignment (identifier_the_price) identifier_the_price (string_"No Default Pricing") string_"No Default Pricing" )assignment )expression_statement (for_statement (identifier_price) identifier_price (call (attribute (identifier_item) identifier_item (identifier_get) identifier_get )attribute (argument_list (string_'prices') string_'prices' (list )list )argument_list )call (block (if_statement (not_operator (call (attribute (identifier_price) identifier_price (identifier_get) identifier_get )attribute (argument_list (string_'locationGroupId') string_'locationGroupId' )argument_list )call )not_operator (block (expression_statement (assignment (identifier_the_price) identifier_the_price (binary_operator (string_"%0.4f") string_"%0.4f" (call (identifier_float) identifier_float (argument_list (subscript (identifier_price) identifier_price (string_'hourlyRecurringFee') string_'hourlyRecurringFee' )subscript )argument_list )call )binary_operator )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_the_price) identifier_the_price )return_statement )block )function_definition )module
Finds the price with the default locationGroupId
(module (function_definition (function_name__list_records) function_name__list_records (parameters (identifier_self) identifier_self (default_parameter (identifier_rtype) identifier_rtype (None) None )default_parameter (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_content) identifier_content (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_records) identifier_records (list_comprehension (dictionary (pair (string_'id') string_'id' (subscript (identifier_record) identifier_record (string_'id') string_'id' )subscript )pair (pair (string_'type') string_'type' (subscript (identifier_record) identifier_record (string_'type') string_'type' )subscript )pair (pair (string_'name') string_'name' (call (attribute (identifier_self) identifier_self (identifier__full_name) identifier__full_name )attribute (argument_list (subscript (identifier_record) identifier_record (string_'hostname') string_'hostname' )subscript )argument_list )call )pair (pair (string_'content') string_'content' (subscript (identifier_record) identifier_record (string_'destination') string_'destination' )subscript )pair (pair (string_'priority') string_'priority' (subscript (identifier_record) identifier_record (string_'priority') string_'priority' )subscript )pair (pair (string_'ttl') string_'ttl' (attribute (identifier_self) identifier_self (identifier_zone_ttl) identifier_zone_ttl )attribute )pair )dictionary (for_in_clause (identifier_record) identifier_record (call (attribute (identifier_self) identifier_self (identifier__raw_records) identifier__raw_records )attribute (argument_list (None) None (identifier_rtype) identifier_rtype (identifier_name) identifier_name (identifier_content) identifier_content )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'list_records: %s') string_'list_records: %s' (identifier_records) identifier_records )argument_list )call )expression_statement (return_statement (identifier_records) identifier_records )return_statement )block )function_definition )module
List all records. Return an empty list if no records found. ``rtype``, ``name`` and ``content`` are used to filter records.
(module (function_definition (function_name_connect) function_name_connect (parameters (default_parameter (identifier_uri) identifier_uri (None) None )default_parameter (default_parameter (identifier_user) identifier_user (None) None )default_parameter (default_parameter (identifier_password) identifier_password (None) None )default_parameter (default_parameter (identifier_host) identifier_host (None) None )default_parameter (default_parameter (identifier_port) identifier_port (integer_9091) integer_9091 )default_parameter (default_parameter (identifier_database) identifier_database (None) None )default_parameter (default_parameter (identifier_protocol) identifier_protocol (string_'binary') string_'binary' )default_parameter (default_parameter (identifier_execution_type) identifier_execution_type (identifier_EXECUTION_TYPE_CURSOR) identifier_EXECUTION_TYPE_CURSOR )default_parameter )parameters (block (expression_statement (assignment (identifier_client) identifier_client (call (identifier_MapDClient) identifier_MapDClient (argument_list (keyword_argument (identifier_uri) identifier_uri (identifier_uri) identifier_uri )keyword_argument (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument (keyword_argument (identifier_password) identifier_password (identifier_password) identifier_password )keyword_argument (keyword_argument (identifier_host) identifier_host (identifier_host) identifier_host )keyword_argument (keyword_argument (identifier_port) identifier_port (identifier_port) identifier_port )keyword_argument (keyword_argument (identifier_database) identifier_database (identifier_database) identifier_database )keyword_argument (keyword_argument (identifier_protocol) identifier_protocol (identifier_protocol) identifier_protocol )keyword_argument (keyword_argument (identifier_execution_type) identifier_execution_type (identifier_execution_type) identifier_execution_type )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_options) identifier_options (identifier_default_backend) identifier_default_backend )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_options) identifier_options (identifier_default_backend) identifier_default_backend )attribute (identifier_client) identifier_client )assignment )expression_statement )block )if_statement (return_statement (identifier_client) identifier_client )return_statement )block )function_definition )module
Create a MapDClient for use with Ibis Parameters could be :param uri: str :param user: str :param password: str :param host: str :param port: int :param database: str :param protocol: str :param execution_type: int Returns ------- MapDClient
(module (function_definition (function_name_get_grade_system_lookup_session) function_name_get_grade_system_lookup_session (parameters (identifier_self) identifier_self (identifier_proxy) identifier_proxy )parameters (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_supports_grade_system_lookup) identifier_supports_grade_system_lookup )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_GradeSystemLookupSession) identifier_GradeSystemLookupSession )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 grade system lookup service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.grading.GradeSystemLookupSession) - a ``GradeSystemLookupSession`` raise: NullArgument - ``proxy`` is ``null`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_grade_system_lookup()`` is ``false`` *compliance: optional -- This method must be implemented if ``supports_grade_system_lookup()`` is ``true``.*
(module (function_definition (function_name__parse_result) function_name__parse_result (parameters (identifier_self) identifier_self (identifier_result) identifier_result )parameters (block (expression_statement (identifier_u) identifier_u )expression_statement (if_statement (comparison_operator (identifier_result) identifier_result (True) True )comparison_operator (block (for_statement (pattern_list (identifier_section) identifier_section (identifier_errors) identifier_errors )pattern_list (call (attribute (identifier_result) identifier_result (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call (block (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_errors) identifier_errors (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_value) identifier_value (True) True )comparison_operator (block (expression_statement (assignment (identifier_message) identifier_message (parenthesized_expression (call (attribute (concatenated_string (string_'"{0}" option in [{1}] is invalid value. {2}') string_'"{0}" option in [{1}] is invalid value. {2}' (string_'') string_'' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_key) identifier_key (identifier_section) identifier_section (identifier_value) identifier_value )argument_list )call )parenthesized_expression )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_message) identifier_message )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )for_statement (expression_statement (assignment (identifier_err_message) identifier_err_message (parenthesized_expression (string_'Some options are invalid!!! Please see the log!!!') string_'Some options are invalid!!! Please see the log!!!' )parenthesized_expression )assignment )expression_statement (raise_statement (call (attribute (identifier_validate) identifier_validate (identifier_ValidateError) identifier_ValidateError )attribute (argument_list (identifier_err_message) identifier_err_message )argument_list )call )raise_statement )block (else_clause (block (return_statement (True) True )return_statement )block )else_clause )if_statement )block )function_definition )module
u""" This method parses validation results. If result is True, then do nothing. if include even one false to result, this method parse result and raise Exception.
(module (function_definition (function_name_print_lamps) function_name_print_lamps (parameters )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Printing information about all lamps paired to the Gateway") string_"Printing information about all lamps paired to the Gateway" )argument_list )call )expression_statement (expression_statement (assignment (identifier_lights) identifier_lights (list_comprehension (identifier_dev) identifier_dev (for_in_clause (identifier_dev) identifier_dev (identifier_devices) identifier_devices )for_in_clause (if_clause (attribute (identifier_dev) identifier_dev (identifier_has_light_control) identifier_has_light_control )attribute )if_clause )list_comprehension )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_lights) identifier_lights )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (call (identifier_exit) identifier_exit (argument_list (call (identifier_bold) identifier_bold (argument_list (string_"No lamps paired") string_"No lamps paired" )argument_list )call )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_container) identifier_container (list )list )assignment )expression_statement (for_statement (identifier_l) identifier_l (identifier_lights) identifier_lights (block (expression_statement (call (attribute (identifier_container) identifier_container (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_l) identifier_l (identifier_raw) identifier_raw )attribute )argument_list )call )expression_statement )block )for_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (identifier_jsonify) identifier_jsonify (argument_list (identifier_container) identifier_container )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Print all lamp devices as JSON
(module (function_definition (function_name_text_assert) function_name_text_assert (parameters (identifier_self) identifier_self (identifier_anchor) identifier_anchor (default_parameter (identifier_byte) identifier_byte (False) False )default_parameter )parameters (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_text_search) identifier_text_search )attribute (argument_list (identifier_anchor) identifier_anchor (keyword_argument (identifier_byte) identifier_byte (identifier_byte) identifier_byte )keyword_argument )argument_list )call )not_operator (block (raise_statement (call (identifier_DataNotFound) identifier_DataNotFound (argument_list (binary_operator (string_u'Substring not found: %s') string_u'Substring not found: %s' (identifier_anchor) identifier_anchor )binary_operator )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
If `anchor` is not found then raise `DataNotFound` exception.
(module (function_definition (function_name_all_lemmas) function_name_all_lemmas (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_lemma_dict) identifier_lemma_dict (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier__mongo_db) identifier__mongo_db )attribute (identifier_lexunits) identifier_lexunits )attribute (identifier_find) identifier_find )attribute (argument_list )argument_list )call (block (expression_statement (yield (call (identifier_Lemma) identifier_Lemma (argument_list (identifier_self) identifier_self (identifier_lemma_dict) identifier_lemma_dict )argument_list )call )yield )expression_statement )block )for_statement )block )function_definition )module
A generator over all the lemmas in the GermaNet database.
(module (function_definition (function_name_by_geopoint) function_name_by_geopoint (parameters (identifier_self) identifier_self (identifier_lat) identifier_lat (identifier_long) identifier_long )parameters (block (expression_statement (assignment (pattern_list (identifier_header) identifier_header (identifier_content) identifier_content )pattern_list (call (attribute (identifier_self) identifier_self (identifier__http_request) identifier__http_request )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_BASE_URL) identifier_BASE_URL )attribute (keyword_argument (identifier_lat) identifier_lat (identifier_lat) identifier_lat )keyword_argument (keyword_argument (identifier_long) identifier_long (identifier_long) identifier_long )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_content) identifier_content )argument_list )call )return_statement )block )function_definition )module
Perform a Yelp Neighborhood API Search based on a geopoint. Args: lat - geopoint latitude long - geopoint longitude
(module (function_definition (function_name_read_ip_ranges) function_name_read_ip_ranges (parameters (identifier_filename) identifier_filename (default_parameter (identifier_local_file) identifier_local_file (True) True )default_parameter (default_parameter (identifier_ip_only) identifier_ip_only (False) False )default_parameter (default_parameter (identifier_conditions) identifier_conditions (list )list )default_parameter )parameters (block (expression_statement (assignment (identifier_targets) identifier_targets (list )list )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (identifier_load_data) identifier_load_data (argument_list (identifier_filename) identifier_filename (keyword_argument (identifier_local_file) identifier_local_file (identifier_local_file) identifier_local_file )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'source') string_'source' (identifier_data) identifier_data )comparison_operator (block (expression_statement (assignment (identifier_conditions) identifier_conditions (subscript (identifier_data) identifier_data (string_'conditions') string_'conditions' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_local_file) identifier_local_file (conditional_expression (subscript (identifier_data) identifier_data (string_'local_file') string_'local_file' )subscript (comparison_operator (string_'local_file') string_'local_file' (identifier_data) identifier_data )comparison_operator (False) False )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (identifier_load_data) identifier_load_data (argument_list (subscript (identifier_data) identifier_data (string_'source') string_'source' )subscript (keyword_argument (identifier_local_file) identifier_local_file (identifier_local_file) identifier_local_file )keyword_argument (keyword_argument (identifier_key_name) identifier_key_name (string_'prefixes') string_'prefixes' )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_data) identifier_data (subscript (identifier_data) identifier_data (string_'prefixes') string_'prefixes' )subscript )assignment )expression_statement )block )else_clause )if_statement (for_statement (identifier_d) identifier_d (identifier_data) identifier_data (block (expression_statement (assignment (identifier_condition_passed) identifier_condition_passed (True) True )assignment )expression_statement (for_statement (identifier_condition) identifier_condition (identifier_conditions) identifier_conditions (block (if_statement (boolean_operator (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_condition) identifier_condition )argument_list )call (identifier_list) identifier_list )comparison_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_condition) identifier_condition )argument_list )call (integer_3) integer_3 )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_condition_passed) identifier_condition_passed (call (identifier_pass_condition) identifier_pass_condition (argument_list (subscript (identifier_d) identifier_d (subscript (identifier_condition) identifier_condition (integer_0) integer_0 )subscript )subscript (subscript (identifier_condition) identifier_condition (integer_1) integer_1 )subscript (subscript (identifier_condition) identifier_condition (integer_2) integer_2 )subscript )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_condition_passed) identifier_condition_passed )not_operator (block (break_statement )break_statement )block )if_statement )block )for_statement (if_statement (identifier_condition_passed) identifier_condition_passed (block (expression_statement (call (attribute (identifier_targets) identifier_targets (identifier_append) identifier_append )attribute (argument_list (identifier_d) identifier_d )argument_list )call )expression_statement )block )if_statement )block )for_statement (if_statement (identifier_ip_only) identifier_ip_only (block (expression_statement (assignment (identifier_ips) identifier_ips (list )list )assignment )expression_statement (for_statement (identifier_t) identifier_t (identifier_targets) identifier_targets (block (expression_statement (call (attribute (identifier_ips) identifier_ips (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_t) identifier_t (string_'ip_prefix') string_'ip_prefix' )subscript )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_ips) identifier_ips )return_statement )block (else_clause (block (return_statement (identifier_targets) identifier_targets )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns the list of IP prefixes from an ip-ranges file :param filename: :param local_file: :param conditions: :param ip_only: :return:
(module (function_definition (function_name_do_filter) function_name_do_filter (parameters (identifier_qs) identifier_qs (identifier_qdata) identifier_qdata (default_parameter (identifier_quick_query_fields) identifier_quick_query_fields (list )list )default_parameter (default_parameter (identifier_int_quick_query_fields) identifier_int_quick_query_fields (list )list )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_qs) identifier_qs (call (attribute (identifier_qs) identifier_qs (identifier_filter) identifier_filter )attribute (argument_list (call (identifier___gen_quick_query_params) identifier___gen_quick_query_params (argument_list (call (attribute (identifier_qdata) identifier_qdata (identifier_get) identifier_get )attribute (argument_list (string_'q_quick_search_kw') string_'q_quick_search_kw' )argument_list )call (identifier_quick_query_fields) identifier_quick_query_fields (identifier_int_quick_query_fields) identifier_int_quick_query_fields )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_q) identifier_q (identifier_kw_query_params) identifier_kw_query_params )pattern_list (call (identifier___gen_query_params) identifier___gen_query_params (argument_list (identifier_qdata) identifier_qdata )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_qs) identifier_qs (call (attribute (identifier_qs) identifier_qs (identifier_filter) identifier_filter )attribute (argument_list (identifier_q) identifier_q (dictionary_splat (identifier_kw_query_params) identifier_kw_query_params )dictionary_splat )argument_list )call )assignment )expression_statement )block (except_clause (block (import_statement (dotted_name (identifier_traceback) identifier_traceback )dotted_name )import_statement (expression_statement (call (attribute (identifier_traceback) identifier_traceback (identifier_print_exc) identifier_print_exc )attribute (argument_list )argument_list )call )expression_statement )block )except_clause )try_statement (return_statement (identifier_qs) identifier_qs )return_statement )block )function_definition )module
auto filter queryset by dict. qs: queryset need to filter. qdata: quick_query_fields: int_quick_query_fields:
(module (function_definition (function_name_parseRangeString) function_name_parseRangeString (parameters (identifier_s) identifier_s (default_parameter (identifier_convertToZeroBased) identifier_convertToZeroBased (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier__range) identifier__range (call (attribute (identifier_s) identifier_s (identifier_split) identifier_split )attribute (argument_list (string_',') string_',' )argument_list )call (block (expression_statement (assignment (identifier_match) identifier_match (call (attribute (identifier__rangeRegex) identifier__rangeRegex (identifier_match) identifier_match )attribute (argument_list (identifier__range) identifier__range )argument_list )call )assignment )expression_statement (if_statement (identifier_match) identifier_match (block (expression_statement (assignment (pattern_list (identifier_start) identifier_start (identifier_end) identifier_end )pattern_list (call (attribute (identifier_match) identifier_match (identifier_groups) identifier_groups )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_start) identifier_start (call (identifier_int) identifier_int (argument_list (identifier_start) identifier_start )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_end) identifier_end (None) None )comparison_operator (block (expression_statement (assignment (identifier_end) identifier_end (identifier_start) identifier_start )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_end) identifier_end (call (identifier_int) identifier_int (argument_list (identifier_end) identifier_end )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_start) identifier_start (identifier_end) identifier_end )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_start) identifier_start (identifier_end) identifier_end )pattern_list (expression_list (identifier_end) identifier_end (identifier_start) identifier_start )expression_list )assignment )expression_statement )block )if_statement (if_statement (identifier_convertToZeroBased) identifier_convertToZeroBased (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_update) identifier_update )attribute (argument_list (call (identifier_range) identifier_range (argument_list (binary_operator (identifier_start) identifier_start (integer_1) integer_1 )binary_operator (identifier_end) identifier_end )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_update) identifier_update )attribute (argument_list (call (identifier_range) identifier_range (argument_list (identifier_start) identifier_start (binary_operator (identifier_end) identifier_end (integer_1) integer_1 )binary_operator )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (concatenated_string (string_'Illegal range %r. Ranges must single numbers or ') string_'Illegal range %r. Ranges must single numbers or ' (string_'number-number.') string_'number-number.' )concatenated_string (identifier__range) identifier__range )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Parse a range string of the form 1-5,12,100-200. @param s: A C{str} specifiying a set of numbers, given in the form of comma separated numeric ranges or individual indices. @param convertToZeroBased: If C{True} all indices will have one subtracted from them. @return: A C{set} of all C{int}s in the specified set.
(module (function_definition (function_name_cos) function_name_cos (parameters (identifier_cls) identifier_cls (typed_parameter (identifier_x) identifier_x (type (string_'TensorFluent') string_'TensorFluent' )type )typed_parameter )parameters (type (string_'TensorFluent') string_'TensorFluent' )type (block (return_statement (call (attribute (identifier_cls) identifier_cls (identifier__unary_op) identifier__unary_op )attribute (argument_list (identifier_x) identifier_x (attribute (identifier_tf) identifier_tf (identifier_cos) identifier_cos )attribute (attribute (identifier_tf) identifier_tf (identifier_float32) identifier_float32 )attribute )argument_list )call )return_statement )block )function_definition )module
Returns a TensorFluent for the cos function. Args: x: The input fluent. Returns: A TensorFluent wrapping the cos function.
(module (function_definition (function_name__downgrade_v1) function_name__downgrade_v1 (parameters (identifier_op) identifier_op )parameters (block (expression_statement (call (attribute (identifier_op) identifier_op (identifier_drop_index) identifier_drop_index )attribute (argument_list (string_'ix_futures_contracts_root_symbol') string_'ix_futures_contracts_root_symbol' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_op) identifier_op (identifier_drop_index) identifier_drop_index )attribute (argument_list (string_'ix_futures_contracts_symbol') string_'ix_futures_contracts_symbol' )argument_list )call )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_op) identifier_op (identifier_batch_alter_table) identifier_batch_alter_table )attribute (argument_list (string_'futures_contracts') string_'futures_contracts' )argument_list )call (as_pattern_target (identifier_batch_op) identifier_batch_op )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_batch_op) identifier_batch_op (identifier_alter_column) identifier_alter_column )attribute (argument_list (keyword_argument (identifier_column_name) identifier_column_name (string_'multiplier') string_'multiplier' )keyword_argument (keyword_argument (identifier_new_column_name) identifier_new_column_name (string_'contract_multiplier') string_'contract_multiplier' )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_batch_op) identifier_batch_op (identifier_drop_column) identifier_drop_column )attribute (argument_list (string_'tick_size') string_'tick_size' )argument_list )call )expression_statement )block )with_statement (expression_statement (call (attribute (identifier_op) identifier_op (identifier_create_index) identifier_create_index )attribute (argument_list (string_'ix_futures_contracts_root_symbol') string_'ix_futures_contracts_root_symbol' (keyword_argument (identifier_table_name) identifier_table_name (string_'futures_contracts') string_'futures_contracts' )keyword_argument (keyword_argument (identifier_columns) identifier_columns (list (string_'root_symbol') string_'root_symbol' )list )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_op) identifier_op (identifier_create_index) identifier_create_index )attribute (argument_list (string_'ix_futures_contracts_symbol') string_'ix_futures_contracts_symbol' (keyword_argument (identifier_table_name) identifier_table_name (string_'futures_contracts') string_'futures_contracts' )keyword_argument (keyword_argument (identifier_columns) identifier_columns (list (string_'symbol') string_'symbol' )list )keyword_argument (keyword_argument (identifier_unique) identifier_unique (True) True )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Downgrade assets db by removing the 'tick_size' column and renaming the 'multiplier' column.
(module (function_definition (function_name_contribute_to_class) function_name_contribute_to_class (parameters (identifier_model_class) identifier_model_class (default_parameter (identifier_name) identifier_name (string_'slots') string_'slots' )default_parameter (default_parameter (identifier_descriptor) identifier_descriptor (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_rel_obj) identifier_rel_obj (boolean_operator (identifier_descriptor) identifier_descriptor (call (identifier_PlaceholderDescriptor) identifier_PlaceholderDescriptor (argument_list )argument_list )call )boolean_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_rel_obj) identifier_rel_obj (identifier_contribute_to_class) identifier_contribute_to_class )attribute (argument_list (identifier_model_class) identifier_model_class (identifier_name) identifier_name )argument_list )call )expression_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_model_class) identifier_model_class (identifier_name) identifier_name (identifier_rel_obj) identifier_rel_obj )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Function that adds a description to a model Class. :param model_class: The model class the descriptor is to be added to. :param name: The attribute name the descriptor will be assigned to. :param descriptor: The descriptor instance to be used. If none is specified it will default to ``icekit.plugins.descriptors.PlaceholderDescriptor``. :return: True
(module (function_definition (function_name_measure) function_name_measure (parameters (typed_parameter (list_splat_pattern (identifier_qubits) identifier_qubits )list_splat_pattern (type (attribute (identifier_raw_types) identifier_raw_types (identifier_Qid) identifier_Qid )attribute )type )typed_parameter (typed_default_parameter (identifier_key) identifier_key (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (None) None )typed_default_parameter (typed_default_parameter (identifier_invert_mask) identifier_invert_mask (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_bool) identifier_bool )type (type (ellipsis_...) ellipsis_... )type )type_parameter )generic_type )type (tuple )tuple )typed_default_parameter )parameters (type (attribute (identifier_gate_operation) identifier_gate_operation (identifier_GateOperation) identifier_GateOperation )attribute )type (block (for_statement (identifier_qubit) identifier_qubit (identifier_qubits) identifier_qubits (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_qubit) identifier_qubit (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )argument_list )call (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_'measure() was called a numpy ndarray. Perhaps you meant ') string_'measure() was called a numpy ndarray. Perhaps you meant ' (string_'to call measure_state_vector on numpy array?') string_'to call measure_state_vector on numpy array?' )concatenated_string )argument_list )call )raise_statement )block (elif_clause (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_qubit) identifier_qubit (attribute (identifier_raw_types) identifier_raw_types (identifier_Qid) identifier_Qid )attribute )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'measure() was called with type different than Qid.') string_'measure() was called with type different than Qid.' )argument_list )call )raise_statement )block )elif_clause )if_statement )block )for_statement (if_statement (comparison_operator (identifier_key) identifier_key (None) None )comparison_operator (block (expression_statement (assignment (identifier_key) identifier_key (call (identifier__default_measurement_key) identifier__default_measurement_key (argument_list (identifier_qubits) identifier_qubits )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (call (identifier_MeasurementGate) identifier_MeasurementGate (argument_list (call (identifier_len) identifier_len (argument_list (identifier_qubits) identifier_qubits )argument_list )call (identifier_key) identifier_key (identifier_invert_mask) identifier_invert_mask )argument_list )call (identifier_on) identifier_on )attribute (argument_list (list_splat (identifier_qubits) identifier_qubits )list_splat )argument_list )call )return_statement )block )function_definition )module
Returns a single MeasurementGate applied to all the given qubits. The qubits are measured in the computational basis. Args: *qubits: The qubits that the measurement gate should measure. key: The string key of the measurement. If this is None, it defaults to a comma-separated list of the target qubits' str values. invert_mask: A list of Truthy or Falsey values indicating whether the corresponding qubits should be flipped. None indicates no inverting should be done. Returns: An operation targeting the given qubits with a measurement. Raises: ValueError if the qubits are not instances of Qid.
(module (function_definition (function_name_commit) function_name_commit (parameters (identifier_self) identifier_self (default_parameter (identifier_cont) identifier_cont (False) False )default_parameter )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_journal) identifier_journal )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_journal) identifier_journal )attribute (None) None )assignment )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_j_file) identifier_j_file )attribute )argument_list )call )expression_statement (for_statement (identifier_itm) identifier_itm (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_tmp_dir) identifier_tmp_dir )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (call (identifier_cpjoin) identifier_cpjoin (argument_list (attribute (identifier_self) identifier_self (identifier_tmp_dir) identifier_tmp_dir )attribute (identifier_itm) identifier_itm )argument_list )call )argument_list )call )expression_statement )block )for_statement (if_statement (comparison_operator (identifier_cont) identifier_cont (True) True )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_begin) identifier_begin )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Finish a transaction
(module (function_definition (function_name_to_OrderedDict) function_name_to_OrderedDict (parameters (identifier_self) identifier_self (default_parameter (identifier_include_null) identifier_include_null (True) True )default_parameter )parameters (block (if_statement (identifier_include_null) identifier_include_null (block (return_statement (call (identifier_OrderedDict) identifier_OrderedDict (argument_list (call (attribute (identifier_self) identifier_self (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block (else_clause (block (expression_statement (assignment (identifier_items) identifier_items (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_c) identifier_c (attribute (attribute (identifier_self) identifier_self (identifier___table__) identifier___table__ )attribute (identifier__columns) identifier__columns )attribute (block (try_statement (block (expression_statement (call (attribute (identifier_items) identifier_items (identifier_append) identifier_append )attribute (argument_list (tuple (attribute (identifier_c) identifier_c (identifier_name) identifier_name )attribute (subscript (attribute (identifier_self) identifier_self (identifier___dict__) identifier___dict__ )attribute (attribute (identifier_c) identifier_c (identifier_name) identifier_name )attribute )subscript )tuple )argument_list )call )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (return_statement (call (identifier_OrderedDict) identifier_OrderedDict (argument_list (identifier_items) identifier_items )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Convert to OrderedDict.
(module (function_definition (function_name_post) function_name_post (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 (try_statement (block (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_post) identifier_post )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_resp) identifier_resp (identifier_status_code) identifier_status_code )attribute (identifier__EXCEPTIONS_BY_CODE) identifier__EXCEPTIONS_BY_CODE )comparison_operator (block (raise_statement (call (subscript (identifier__EXCEPTIONS_BY_CODE) identifier__EXCEPTIONS_BY_CODE (attribute (identifier_resp) identifier_resp (identifier_status_code) identifier_status_code )attribute )subscript (argument_list (attribute (identifier_resp) identifier_resp (identifier_reason) identifier_reason )attribute )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_resp) identifier_resp (identifier_status_code) identifier_status_code )attribute (subscript (attribute (identifier_requests) identifier_requests (identifier_codes) identifier_codes )attribute (string_'ok') string_'ok' )subscript )comparison_operator (block (raise_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_Etcd3Exception) identifier_Etcd3Exception )attribute (argument_list (attribute (identifier_resp) identifier_resp (identifier_reason) identifier_reason )attribute )argument_list )call )raise_statement )block )if_statement )block (except_clause (as_pattern (attribute (attribute (identifier_requests) identifier_requests (identifier_exceptions) identifier_exceptions )attribute (identifier_Timeout) identifier_Timeout )attribute (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (raise_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_ConnectionTimeoutError) identifier_ConnectionTimeoutError )attribute (argument_list (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_ex) identifier_ex )argument_list )call )argument_list )call )raise_statement )block )except_clause (except_clause (as_pattern (attribute (attribute (identifier_requests) identifier_requests (identifier_exceptions) identifier_exceptions )attribute (identifier_ConnectionError) identifier_ConnectionError )attribute (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (raise_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_ConnectionFailedError) identifier_ConnectionFailedError )attribute (argument_list (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_ex) identifier_ex )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (call (attribute (identifier_resp) identifier_resp (identifier_json) identifier_json )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
helper method for HTTP POST :param args: :param kwargs: :return: json response
(module (function_definition (function_name__get_symbol_by_slope) function_name__get_symbol_by_slope (parameters (identifier_self) identifier_self (identifier_slope) identifier_slope (identifier_default_symbol) identifier_default_symbol )parameters (block (if_statement (comparison_operator (identifier_slope) identifier_slope (call (attribute (identifier_math) identifier_math (identifier_tan) identifier_tan )attribute (argument_list (binary_operator (binary_operator (integer_3) integer_3 (attribute (identifier_math) identifier_math (identifier_pi) identifier_pi )attribute )binary_operator (integer_8) integer_8 )binary_operator )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_draw_symbol) identifier_draw_symbol (string_"|") string_"|" )assignment )expression_statement )block (elif_clause (comparison_operator (call (attribute (identifier_math) identifier_math (identifier_tan) identifier_tan )attribute (argument_list (binary_operator (attribute (identifier_math) identifier_math (identifier_pi) identifier_pi )attribute (integer_8) integer_8 )binary_operator )argument_list )call (identifier_slope) identifier_slope (call (attribute (identifier_math) identifier_math (identifier_tan) identifier_tan )attribute (argument_list (binary_operator (binary_operator (integer_3) integer_3 (attribute (identifier_math) identifier_math (identifier_pi) identifier_pi )attribute )binary_operator (integer_8) integer_8 )binary_operator )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_draw_symbol) identifier_draw_symbol (string_u"\u27cb") string_u"\u27cb" )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (call (identifier_abs) identifier_abs (argument_list (identifier_slope) identifier_slope )argument_list )call (call (attribute (identifier_math) identifier_math (identifier_tan) identifier_tan )attribute (argument_list (binary_operator (attribute (identifier_math) identifier_math (identifier_pi) identifier_pi )attribute (integer_8) integer_8 )binary_operator )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_draw_symbol) identifier_draw_symbol (string_"-") string_"-" )assignment )expression_statement )block )elif_clause (elif_clause (boolean_operator (comparison_operator (identifier_slope) identifier_slope (call (attribute (identifier_math) identifier_math (identifier_tan) identifier_tan )attribute (argument_list (binary_operator (unary_operator (attribute (identifier_math) identifier_math (identifier_pi) identifier_pi )attribute )unary_operator (integer_8) integer_8 )binary_operator )argument_list )call )comparison_operator (line_continuation_\) line_continuation_\ (comparison_operator (identifier_slope) identifier_slope (call (attribute (identifier_math) identifier_math (identifier_tan) identifier_tan )attribute (argument_list (binary_operator (binary_operator (unary_operator (integer_3) integer_3 )unary_operator (attribute (identifier_math) identifier_math (identifier_pi) identifier_pi )attribute )binary_operator (integer_8) integer_8 )binary_operator )argument_list )call )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_draw_symbol) identifier_draw_symbol (string_u"\u27CD") string_u"\u27CD" )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_slope) identifier_slope (call (attribute (identifier_math) identifier_math (identifier_tan) identifier_tan )attribute (argument_list (binary_operator (binary_operator (unary_operator (integer_3) integer_3 )unary_operator (attribute (identifier_math) identifier_math (identifier_pi) identifier_pi )attribute )binary_operator (integer_8) integer_8 )binary_operator )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_draw_symbol) identifier_draw_symbol (string_"|") string_"|" )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_draw_symbol) identifier_draw_symbol (identifier_default_symbol) identifier_default_symbol )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_draw_symbol) identifier_draw_symbol )return_statement )block )function_definition )module
return line oriented approximatively along the slope value
(module (function_definition (function_name_memory_read8) function_name_memory_read8 (parameters (identifier_self) identifier_self (identifier_addr) identifier_addr (identifier_num_bytes) identifier_num_bytes (default_parameter (identifier_zone) identifier_zone (None) None )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_memory_read) identifier_memory_read )attribute (argument_list (identifier_addr) identifier_addr (identifier_num_bytes) identifier_num_bytes (keyword_argument (identifier_zone) identifier_zone (identifier_zone) identifier_zone )keyword_argument (keyword_argument (identifier_nbits) identifier_nbits (integer_8) integer_8 )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Reads memory from the target system in units of bytes. Args: self (JLink): the ``JLink`` instance addr (int): start address to read from num_bytes (int): number of bytes to read zone (str): memory zone to read from Returns: List of bytes read from the target system. Raises: JLinkException: if memory could not be read.
(module (function_definition (function_name_get_driver_config) function_name_get_driver_config (parameters (identifier_driver) identifier_driver )parameters (block (expression_statement (assignment (identifier_response) identifier_response (call (identifier_errorIfUnauthorized) identifier_errorIfUnauthorized (argument_list (keyword_argument (identifier_role) identifier_role (string_'admin') string_'admin' )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_response) identifier_response (block (return_statement (identifier_response) identifier_response )return_statement )block (else_clause (block (expression_statement (assignment (identifier_response) identifier_response (call (identifier_ApitaxResponse) identifier_ApitaxResponse (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_Response) identifier_Response (argument_list (keyword_argument (identifier_status) identifier_status (integer_200) integer_200 )keyword_argument (keyword_argument (identifier_body) identifier_body (call (attribute (identifier_response) identifier_response (identifier_getResponseBody) identifier_getResponseBody )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Retrieve the config of a loaded driver Retrieve the config of a loaded driver # noqa: E501 :param driver: The driver to use for the request. ie. github :type driver: str :rtype: Response
(module (function_definition (function_name_validate) function_name_validate (parameters (identifier_self) identifier_self (identifier_value) identifier_value (identifier_redis) identifier_redis )parameters (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (call (identifier_super) identifier_super (argument_list )argument_list )call (identifier_validate) identifier_validate )attribute (argument_list (identifier_value) identifier_value (identifier_redis) identifier_redis )argument_list )call )assignment )expression_statement (if_statement (call (identifier_is_hashed) identifier_is_hashed (argument_list (identifier_value) identifier_value )argument_list )call (block (return_statement (identifier_value) identifier_value )return_statement )block )if_statement (return_statement (call (identifier_make_password) identifier_make_password (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block )function_definition )module
hash passwords given via http
(module (function_definition (function_name_sync) function_name_sync (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_xbin) identifier_xbin (call (attribute (attribute (identifier_self) identifier_self (identifier_xbin) identifier_xbin )attribute (identifier_value) identifier_value )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ybin) identifier_ybin (call (attribute (attribute (identifier_self) identifier_self (identifier_ybin) identifier_ybin )attribute (identifier_value) identifier_value )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_n) identifier_n (integer_0) integer_0 )assignment )expression_statement (for_statement (pattern_list (identifier_xsl) identifier_xsl (identifier_xsr) identifier_xsr (identifier_ys) identifier_ys (identifier_nx) identifier_nx (identifier_ny) identifier_ny )pattern_list (identifier_self) identifier_self (block (if_statement (comparison_operator (identifier_xbin) identifier_xbin (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_xsl) identifier_xsl (binary_operator (binary_operator (identifier_xbin) identifier_xbin (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (identifier_xsl) identifier_xsl (integer_1) integer_1 )binary_operator )parenthesized_expression (identifier_xbin) identifier_xbin )binary_operator )parenthesized_expression )binary_operator (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_xsl) identifier_xsl )attribute (identifier_n) identifier_n )subscript (identifier_set) identifier_set )attribute (argument_list (identifier_xsl) identifier_xsl )argument_list )call )expression_statement (expression_statement (assignment (identifier_xsr) identifier_xsr (binary_operator (binary_operator (identifier_xbin) identifier_xbin (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (identifier_xsr) identifier_xsr (integer_1025) integer_1025 )binary_operator )parenthesized_expression (identifier_xbin) identifier_xbin )binary_operator )parenthesized_expression )binary_operator (integer_1025) integer_1025 )binary_operator )assignment )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_xsr) identifier_xsr )attribute (identifier_n) identifier_n )subscript (identifier_set) identifier_set )attribute (argument_list (identifier_xsr) identifier_xsr )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_ybin) identifier_ybin (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_ys) identifier_ys (binary_operator (binary_operator (identifier_ybin) identifier_ybin (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (identifier_ys) identifier_ys (integer_1) integer_1 )binary_operator )parenthesized_expression (identifier_ybin) identifier_ybin )binary_operator )parenthesized_expression )binary_operator (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_ys) identifier_ys )attribute (identifier_n) identifier_n )subscript (identifier_set) identifier_set )attribute (argument_list (identifier_ys) identifier_ys )argument_list )call )expression_statement )block )if_statement (expression_statement (augmented_assignment (identifier_n) identifier_n (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_g) identifier_g (attribute (call (identifier_get_root) identifier_get_root (argument_list (identifier_self) identifier_self )argument_list )call (identifier_globals) identifier_globals )attribute )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_sbutt) identifier_sbutt )attribute (identifier_config) identifier_config )attribute (argument_list (keyword_argument (identifier_bg) identifier_bg (subscript (attribute (identifier_g) identifier_g (identifier_COL) identifier_COL )attribute (string_'main') string_'main' )subscript )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_sbutt) identifier_sbutt )attribute (identifier_config) identifier_config )attribute (argument_list (keyword_argument (identifier_state) identifier_state (string_'disable') string_'disable' )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Synchronise the settings. This means that the pixel start values are shifted downwards so that they are synchronised with a full-frame binned version. This does nothing if the binning factors == 1.
(module (function_definition (function_name_download_all) function_name_download_all (parameters (identifier_self) identifier_self (identifier_urls) identifier_urls (identifier_dir_path) identifier_dir_path )parameters (block (expression_statement (assignment (identifier_filenames) identifier_filenames (list )list )assignment )expression_statement (try_statement (block (for_statement (identifier_url) identifier_url (identifier_urls) identifier_urls (block (expression_statement (call (attribute (identifier_filenames) identifier_filenames (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_download) identifier_download )attribute (argument_list (identifier_url) identifier_url (identifier_dir_path) identifier_dir_path )argument_list )call )argument_list )call )expression_statement )block )for_statement )block (except_clause (as_pattern (identifier_DownloadError) identifier_DownloadError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (for_statement (identifier_filename) identifier_filename (identifier_filenames) identifier_filenames (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )expression_statement )block )for_statement (raise_statement (identifier_e) identifier_e )raise_statement )block )except_clause )try_statement (return_statement (identifier_filenames) identifier_filenames )return_statement )block )function_definition )module
Download all the resources specified by urls into dir_path. The resulting file paths is returned. DownloadError is raised if at least one of the resources cannot be downloaded. In the case already downloaded resources are erased.
(module (function_definition (function_name_from_array) function_name_from_array (parameters (identifier_array) identifier_array )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_array) identifier_array (None) None )comparison_operator (not_operator (identifier_array) identifier_array )not_operator )boolean_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (call (identifier_assert_type_or_raise) identifier_assert_type_or_raise (argument_list (identifier_array) identifier_array (identifier_dict) identifier_dict (keyword_argument (identifier_parameter_name) identifier_parameter_name (string_"array") string_"array" )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'file_id') string_'file_id' )subscript (call (identifier_u) identifier_u (argument_list (call (attribute (identifier_array) identifier_array (identifier_get) identifier_get )attribute (argument_list (string_'file_id') string_'file_id' )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'length') string_'length' )subscript (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_array) identifier_array (identifier_get) identifier_get )attribute (argument_list (string_'length') string_'length' )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'duration') string_'duration' )subscript (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_array) identifier_array (identifier_get) identifier_get )attribute (argument_list (string_'duration') string_'duration' )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'thumb') string_'thumb' )subscript (conditional_expression (call (attribute (identifier_PhotoSize) identifier_PhotoSize (identifier_from_array) identifier_from_array )attribute (argument_list (call (attribute (identifier_array) identifier_array (identifier_get) identifier_get )attribute (argument_list (string_'thumb') string_'thumb' )argument_list )call )argument_list )call (comparison_operator (call (attribute (identifier_array) identifier_array (identifier_get) identifier_get )attribute (argument_list (string_'thumb') string_'thumb' )argument_list )call (None) None )comparison_operator (None) None )conditional_expression )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'file_size') string_'file_size' )subscript (conditional_expression (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_array) identifier_array (identifier_get) identifier_get )attribute (argument_list (string_'file_size') string_'file_size' )argument_list )call )argument_list )call (comparison_operator (call (attribute (identifier_array) identifier_array (identifier_get) identifier_get )attribute (argument_list (string_'file_size') string_'file_size' )argument_list )call (None) None )comparison_operator (None) None )conditional_expression )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'_raw') string_'_raw' )subscript (identifier_array) identifier_array )assignment )expression_statement (return_statement (call (identifier_VideoNote) identifier_VideoNote (argument_list (dictionary_splat (identifier_data) identifier_data )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Deserialize a new VideoNote from a given dictionary. :return: new VideoNote instance. :rtype: VideoNote
(module (function_definition (function_name_is_type_sub_type_of) function_name_is_type_sub_type_of (parameters (typed_parameter (identifier_schema) identifier_schema (type (identifier_GraphQLSchema) identifier_GraphQLSchema )type )typed_parameter (typed_parameter (identifier_maybe_subtype) identifier_maybe_subtype (type (identifier_GraphQLType) identifier_GraphQLType )type )typed_parameter (typed_parameter (identifier_super_type) identifier_super_type (type (identifier_GraphQLType) identifier_GraphQLType )type )typed_parameter )parameters (type (identifier_bool) identifier_bool )type (block (if_statement (comparison_operator (identifier_maybe_subtype) identifier_maybe_subtype (identifier_super_type) identifier_super_type )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (call (identifier_is_non_null_type) identifier_is_non_null_type (argument_list (identifier_super_type) identifier_super_type )argument_list )call (block (if_statement (call (identifier_is_non_null_type) identifier_is_non_null_type (argument_list (identifier_maybe_subtype) identifier_maybe_subtype )argument_list )call (block (return_statement (call (identifier_is_type_sub_type_of) identifier_is_type_sub_type_of (argument_list (identifier_schema) identifier_schema (attribute (call (identifier_cast) identifier_cast (argument_list (identifier_GraphQLNonNull) identifier_GraphQLNonNull (identifier_maybe_subtype) identifier_maybe_subtype )argument_list )call (identifier_of_type) identifier_of_type )attribute (attribute (call (identifier_cast) identifier_cast (argument_list (identifier_GraphQLNonNull) identifier_GraphQLNonNull (identifier_super_type) identifier_super_type )argument_list )call (identifier_of_type) identifier_of_type )attribute )argument_list )call )return_statement )block )if_statement (return_statement (False) False )return_statement )block (elif_clause (call (identifier_is_non_null_type) identifier_is_non_null_type (argument_list (identifier_maybe_subtype) identifier_maybe_subtype )argument_list )call (block (return_statement (call (identifier_is_type_sub_type_of) identifier_is_type_sub_type_of (argument_list (identifier_schema) identifier_schema (attribute (call (identifier_cast) identifier_cast (argument_list (identifier_GraphQLNonNull) identifier_GraphQLNonNull (identifier_maybe_subtype) identifier_maybe_subtype )argument_list )call (identifier_of_type) identifier_of_type )attribute (identifier_super_type) identifier_super_type )argument_list )call )return_statement )block )elif_clause )if_statement (if_statement (call (identifier_is_list_type) identifier_is_list_type (argument_list (identifier_super_type) identifier_super_type )argument_list )call (block (if_statement (call (identifier_is_list_type) identifier_is_list_type (argument_list (identifier_maybe_subtype) identifier_maybe_subtype )argument_list )call (block (return_statement (call (identifier_is_type_sub_type_of) identifier_is_type_sub_type_of (argument_list (identifier_schema) identifier_schema (attribute (call (identifier_cast) identifier_cast (argument_list (identifier_GraphQLList) identifier_GraphQLList (identifier_maybe_subtype) identifier_maybe_subtype )argument_list )call (identifier_of_type) identifier_of_type )attribute (attribute (call (identifier_cast) identifier_cast (argument_list (identifier_GraphQLList) identifier_GraphQLList (identifier_super_type) identifier_super_type )argument_list )call (identifier_of_type) identifier_of_type )attribute )argument_list )call )return_statement )block )if_statement (return_statement (False) False )return_statement )block (elif_clause (call (identifier_is_list_type) identifier_is_list_type (argument_list (identifier_maybe_subtype) identifier_maybe_subtype )argument_list )call (block (return_statement (False) False )return_statement )block )elif_clause )if_statement (if_statement (parenthesized_expression (boolean_operator (boolean_operator (call (identifier_is_abstract_type) identifier_is_abstract_type (argument_list (identifier_super_type) identifier_super_type )argument_list )call (call (identifier_is_object_type) identifier_is_object_type (argument_list (identifier_maybe_subtype) identifier_maybe_subtype )argument_list )call )boolean_operator (call (attribute (identifier_schema) identifier_schema (identifier_is_possible_type) identifier_is_possible_type )attribute (argument_list (call (identifier_cast) identifier_cast (argument_list (identifier_GraphQLAbstractType) identifier_GraphQLAbstractType (identifier_super_type) identifier_super_type )argument_list )call (call (identifier_cast) identifier_cast (argument_list (identifier_GraphQLObjectType) identifier_GraphQLObjectType (identifier_maybe_subtype) identifier_maybe_subtype )argument_list )call )argument_list )call )boolean_operator )parenthesized_expression (block (return_statement (True) True )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Check whether a type is subtype of another type in a given schema. Provided a type and a super type, return true if the first type is either equal or a subset of the second super type (covariant).
(module (function_definition (function_name_age) function_name_age (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_exists) identifier_exists )attribute (block (return_statement (binary_operator (call (attribute (identifier_datetime) identifier_datetime (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call (call (attribute (identifier_datetime) identifier_datetime (identifier_utcfromtimestamp) identifier_utcfromtimestamp )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_getmtime) identifier_getmtime )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )argument_list )call )argument_list )call )binary_operator )return_statement )block )if_statement (return_statement (call (identifier_timedelta) identifier_timedelta (argument_list )argument_list )call )return_statement )block )function_definition )module
Age of the video
(module (function_definition (function_name_create_module) function_name_create_module (parameters (identifier_module) identifier_module (identifier_target) identifier_target )parameters (block (expression_statement (assignment (identifier_module_x) identifier_module_x (call (attribute (identifier_module) identifier_module (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cur_path) identifier_cur_path (string_'') string_'' )assignment )expression_statement (for_statement (identifier_path) identifier_path (identifier_module_x) identifier_module_x (block (expression_statement (assignment (identifier_cur_path) identifier_cur_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_cur_path) identifier_cur_path (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_target) identifier_target (identifier_cur_path) identifier_cur_path )argument_list )call )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_mkdir) identifier_mkdir )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_target) identifier_target (identifier_cur_path) identifier_cur_path )argument_list )call )argument_list )call )expression_statement )block )if_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_target) identifier_target (identifier_cur_path) identifier_cur_path (string_'__init__.py') string_'__init__.py' )argument_list )call )argument_list )call )not_operator (block (expression_statement (call (identifier_touch) identifier_touch (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_target) identifier_target (identifier_cur_path) identifier_cur_path (string_'__init__.py') string_'__init__.py' )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_cur_path) identifier_cur_path )return_statement )block )function_definition )module
Create a module directory structure into the target directory.
(module (function_definition (function_name_chunks) function_name_chunks (parameters (identifier_seq) identifier_seq (identifier_size) identifier_size )parameters (block (return_statement (generator_expression (subscript (identifier_seq) identifier_seq (slice (identifier_pos) identifier_pos (colon) colon (binary_operator (identifier_pos) identifier_pos (identifier_size) identifier_size )binary_operator )slice )subscript (for_in_clause (identifier_pos) identifier_pos (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (call (identifier_len) identifier_len (argument_list (identifier_seq) identifier_seq )argument_list )call (identifier_size) identifier_size )argument_list )call )for_in_clause )generator_expression )return_statement )block )function_definition )module
simple two-line alternative to `ubelt.chunks`
(module (function_definition (function_name__get_all_relationships) function_name__get_all_relationships (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_relationships_all) identifier_relationships_all (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_goterm) identifier_goterm (call (attribute (attribute (identifier_self) identifier_self (identifier_go2obj) identifier_go2obj )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (if_statement (attribute (identifier_goterm) identifier_goterm (identifier_relationship) identifier_relationship )attribute (block (expression_statement (call (attribute (identifier_relationships_all) identifier_relationships_all (identifier_update) identifier_update )attribute (argument_list (attribute (identifier_goterm) identifier_goterm (identifier_relationship) identifier_relationship )attribute )argument_list )call )expression_statement )block )if_statement (if_statement (attribute (identifier_goterm) identifier_goterm (identifier_relationship_rev) identifier_relationship_rev )attribute (block (expression_statement (call (attribute (identifier_relationships_all) identifier_relationships_all (identifier_update) identifier_update )attribute (argument_list (attribute (identifier_goterm) identifier_goterm (identifier_relationship_rev) identifier_relationship_rev )attribute )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_relationships_all) identifier_relationships_all )return_statement )block )function_definition )module
Return all relationships seen in GO Dag subset.
(module (function_definition (function_name_consumer_commit_for_times) function_name_consumer_commit_for_times (parameters (identifier_consumer) identifier_consumer (identifier_partition_to_offset) identifier_partition_to_offset (default_parameter (identifier_atomic) identifier_atomic (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_no_offsets) identifier_no_offsets (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_tp) identifier_tp (identifier_offset) identifier_offset )pattern_list (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (identifier_partition_to_offset) identifier_partition_to_offset )argument_list )call (block (if_statement (comparison_operator (identifier_offset) identifier_offset (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_error) identifier_error )attribute (argument_list (call (attribute (concatenated_string (string_"No offsets found for topic-partition {tp}. Either timestamps not supported") string_"No offsets found for topic-partition {tp}. Either timestamps not supported" (string_" for the topic {tp}, or no offsets found after timestamp specified, or there is no") string_" for the topic {tp}, or no offsets found after timestamp specified, or there is no" (string_" data in the topic-partition.") string_" data in the topic-partition." )concatenated_string (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_tp) identifier_tp (identifier_tp) identifier_tp )keyword_argument )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_no_offsets) identifier_no_offsets (identifier_add) identifier_add )attribute (argument_list (identifier_tp) identifier_tp )argument_list )call )expression_statement )block )if_statement )block )for_statement (if_statement (boolean_operator (identifier_atomic) identifier_atomic (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_no_offsets) identifier_no_offsets )argument_list )call (integer_0) integer_0 )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_error) identifier_error )attribute (argument_list (call (attribute (concatenated_string (string_"Commit aborted; offsets were not found for timestamps in") string_"Commit aborted; offsets were not found for timestamps in" (string_" topics {}") string_" topics {}" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (list_comprehension (call (identifier_str) identifier_str (argument_list (identifier_tp) identifier_tp )argument_list )call (for_in_clause (identifier_tp) identifier_tp (identifier_no_offsets) identifier_no_offsets )for_in_clause )list_comprehension )argument_list )call )argument_list )call )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_offsets_metadata) identifier_offsets_metadata (dictionary_comprehension (pair (identifier_tp) identifier_tp (call (identifier_OffsetAndMetadata) identifier_OffsetAndMetadata (argument_list (attribute (subscript (identifier_partition_to_offset) identifier_partition_to_offset (identifier_tp) identifier_tp )subscript (identifier_offset) identifier_offset )attribute (keyword_argument (identifier_metadata) identifier_metadata (None) None )keyword_argument )argument_list )call )pair (for_in_clause (identifier_tp) identifier_tp (call (attribute (identifier_six) identifier_six (identifier_iterkeys) identifier_iterkeys )attribute (argument_list (identifier_partition_to_offset) identifier_partition_to_offset )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_tp) identifier_tp (identifier_no_offsets) identifier_no_offsets )comparison_operator )if_clause )dictionary_comprehension )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_offsets_metadata) identifier_offsets_metadata )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_consumer) identifier_consumer (identifier_commit) identifier_commit )attribute (argument_list (identifier_offsets_metadata) identifier_offsets_metadata )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Commits offsets to Kafka using the given KafkaConsumer and offsets, a mapping of TopicPartition to Unix Epoch milliseconds timestamps. Arguments: consumer (KafkaConsumer): an initialized kafka-python consumer. partitions_to_offset (dict TopicPartition: OffsetAndTimestamp): Map of TopicPartition to OffsetAndTimestamp. Return value of offsets_for_times. atomic (bool): Flag to specify whether the commit should fail if offsets are not found for some TopicPartition: timestamp pairs.
(module (function_definition (function_name_post_file) function_name_post_file (parameters (identifier_self) identifier_self (identifier_url) identifier_url (identifier_filename) identifier_filename (identifier_file_stream) identifier_file_stream (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_res) identifier_res (call (attribute (attribute (identifier_self) identifier_self (identifier__conn) identifier__conn )attribute (identifier_post) identifier_post )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_files) identifier_files (dictionary (pair (identifier_filename) identifier_filename (identifier_file_stream) identifier_file_stream )pair )dictionary )keyword_argument (keyword_argument (identifier_headers) identifier_headers (call (attribute (identifier_self) identifier_self (identifier__prepare_headers) identifier__prepare_headers )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_res) identifier_res (identifier_status_code) identifier_status_code )attribute (integer_200) integer_200 )comparison_operator (comparison_operator (attribute (identifier_res) identifier_res (identifier_status_code) identifier_status_code )attribute (integer_201) integer_201 )comparison_operator )boolean_operator (block (return_statement (attribute (identifier_res) identifier_res (identifier_text) identifier_text )attribute )return_statement )block (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement )block )function_definition )module
Uploads file to provided url. Returns contents as text Args: **url**: address where to upload file **filename**: Name of the uploaded file **file_stream**: file like object to upload .. versionadded:: 0.3.2 **additional_headers**: (optional) Additional headers to be used with request Returns: string
(module (function_definition (function_name_guess_github_repo) function_name_guess_github_repo (parameters )parameters (block (expression_statement (assignment (identifier_p) identifier_p (call (attribute (identifier_subprocess) identifier_subprocess (identifier_run) identifier_run )attribute (argument_list (list (string_'git') string_'git' (string_'ls-remote') string_'ls-remote' (string_'--get-url') string_'--get-url' (string_'origin') string_'origin' )list (keyword_argument (identifier_stdout) identifier_stdout (attribute (identifier_subprocess) identifier_subprocess (identifier_PIPE) identifier_PIPE )attribute )keyword_argument (keyword_argument (identifier_stderr) identifier_stderr (attribute (identifier_subprocess) identifier_subprocess (identifier_PIPE) identifier_PIPE )attribute )keyword_argument (keyword_argument (identifier_check) identifier_check (False) False )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (attribute (identifier_p) identifier_p (identifier_stderr) identifier_stderr )attribute (attribute (identifier_p) identifier_p (identifier_returncode) identifier_returncode )attribute )boolean_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (call (attribute (attribute (identifier_p) identifier_p (identifier_stdout) identifier_stdout )attribute (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier_GIT_URL) identifier_GIT_URL (identifier_fullmatch) identifier_fullmatch )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_m) identifier_m )not_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (call (attribute (identifier_m) identifier_m (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )return_statement )block )function_definition )module
Guesses the github repo for the current directory Returns False if no guess can be made.
(module (function_definition (function_name_create_entry) function_name_create_entry (parameters (identifier_self) identifier_self (identifier_group) identifier_group (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (identifier_group) identifier_group (attribute (identifier_self) identifier_self (identifier_groups) identifier_groups )attribute )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Group doesn't exist / is not bound to this database.") string_"Group doesn't exist / is not bound to this database." )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_uuid) identifier_uuid (call (attribute (identifier_binascii) identifier_binascii (identifier_hexlify) identifier_hexlify )attribute (argument_list (call (identifier_get_random_bytes) identifier_get_random_bytes (argument_list (integer_16) integer_16 )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_entry) identifier_entry (call (identifier_Entry) identifier_Entry (argument_list (keyword_argument (identifier_uuid) identifier_uuid (identifier_uuid) identifier_uuid )keyword_argument (keyword_argument (identifier_group_id) identifier_group_id (attribute (identifier_group) identifier_group (identifier_id) identifier_id )attribute )keyword_argument (keyword_argument (identifier_created) identifier_created (call (attribute (identifier_util) identifier_util (identifier_now) identifier_now )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_modified) identifier_modified (call (attribute (identifier_util) identifier_util (identifier_now) identifier_now )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_accessed) identifier_accessed (call (attribute (identifier_util) identifier_util (identifier_now) identifier_now )attribute (argument_list )argument_list )call )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_entries) identifier_entries )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_entry) identifier_entry )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_group) identifier_group (identifier_entries) identifier_entries )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_entry) identifier_entry )argument_list )call )expression_statement (return_statement (identifier_entry) identifier_entry )return_statement )block )function_definition )module
Create a new Entry object. The group which should hold the entry is needed. image must be an unsigned int >0, group a Group. :param group: The associated group. :keyword title: :keyword icon: :keyword url: :keyword username: :keyword password: :keyword notes: :keyword expires: Expiration date (if None, entry will never expire). :type expires: datetime :return: The new entry. :rtype: :class:`keepassdb.model.Entry`
(module (function_definition (function_name_intersection) function_name_intersection (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_others) identifier_others )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__combine_variant_collections) identifier__combine_variant_collections )attribute (argument_list (keyword_argument (identifier_combine_fn) identifier_combine_fn (attribute (identifier_set) identifier_set (identifier_intersection) identifier_intersection )attribute )keyword_argument (keyword_argument (identifier_variant_collections) identifier_variant_collections (binary_operator (tuple (identifier_self) identifier_self )tuple (identifier_others) identifier_others )binary_operator )keyword_argument (keyword_argument (identifier_kwargs) identifier_kwargs (identifier_kwargs) identifier_kwargs )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns the intersection of variants in several VariantCollection objects.
(module (function_definition (function_name_get_services_health) function_name_get_services_health (parameters (identifier_self) identifier_self )parameters (type (identifier_dict) identifier_dict )type (block (expression_statement (assignment (identifier_services_health) identifier_services_health (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_services_ids) identifier_services_ids (call (attribute (identifier_self) identifier_self (identifier__get_services) identifier__get_services )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_service_id) identifier_service_id (identifier_services_ids) identifier_services_ids (block (expression_statement (assignment (identifier_service_name) identifier_service_name (call (attribute (identifier_DC) identifier_DC (identifier_get_service_name) identifier_get_service_name )attribute (argument_list (identifier_service_id) identifier_service_id )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_DC) identifier_DC (identifier_get_replicas) identifier_get_replicas )attribute (argument_list (identifier_service_id) identifier_service_id )argument_list )call (line_continuation_\) line_continuation_\ (call (attribute (identifier_DC) identifier_DC (identifier_get_actual_replica) identifier_get_actual_replica )attribute (argument_list (identifier_service_id) identifier_service_id )argument_list )call )comparison_operator (block (expression_statement (assignment (subscript (identifier_services_health) identifier_services_health (identifier_service_name) identifier_service_name )subscript (string_"Unhealthy") string_"Unhealthy" )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_services_health) identifier_services_health (identifier_service_name) identifier_service_name )subscript (string_"Healthy") string_"Healthy" )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_services_health) identifier_services_health )return_statement )block )function_definition )module
Get the health of all services. Returns: dict, services id and health status
(module (function_definition (function_name_text) function_name_text (parameters (identifier_self) identifier_self (identifier_selector) identifier_selector )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (attribute (identifier_self) identifier_self (identifier___bs4) identifier___bs4 )attribute (identifier_select) identifier_select )attribute (argument_list (identifier_selector) identifier_selector )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (list_comprehension (call (attribute (identifier_r) identifier_r (identifier_get_text) identifier_get_text )attribute (argument_list )argument_list )call (for_in_clause (identifier_r) identifier_r (identifier_result) identifier_result )for_in_clause )list_comprehension (line_continuation_\) line_continuation_\ (comparison_operator (call (attribute (identifier_result) identifier_result (identifier___len__) identifier___len__ )attribute (argument_list )argument_list )call (integer_1) integer_1 )comparison_operator (line_continuation_\) line_continuation_\ (conditional_expression (call (attribute (subscript (identifier_result) identifier_result (integer_0) integer_0 )subscript (identifier_get_text) identifier_get_text )attribute (argument_list )argument_list )call (comparison_operator (call (attribute (identifier_result) identifier_result (identifier___len__) identifier___len__ )attribute (argument_list )argument_list )call (integer_0) integer_0 )comparison_operator (None) None )conditional_expression )conditional_expression )return_statement )block )function_definition )module
Return text result that executed by given css selector :param selector: `str` css selector :return: `list` or `None`
(module (function_definition (function_name_get_readable_time_string) function_name_get_readable_time_string (parameters (identifier_seconds) identifier_seconds )parameters (block (expression_statement (assignment (identifier_seconds) identifier_seconds (call (identifier_int) identifier_int (argument_list (identifier_seconds) identifier_seconds )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_minutes) identifier_minutes (binary_operator (identifier_seconds) identifier_seconds (integer_60) integer_60 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_seconds) identifier_seconds (binary_operator (identifier_seconds) identifier_seconds (integer_60) integer_60 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_hours) identifier_hours (binary_operator (identifier_minutes) identifier_minutes (integer_60) integer_60 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_minutes) identifier_minutes (binary_operator (identifier_minutes) identifier_minutes (integer_60) integer_60 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_days) identifier_days (binary_operator (identifier_hours) identifier_hours (integer_24) integer_24 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_hours) identifier_hours (binary_operator (identifier_hours) identifier_hours (integer_24) integer_24 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (string_"") string_"" )assignment )expression_statement (if_statement (comparison_operator (identifier_days) identifier_days (integer_0) integer_0 )comparison_operator (block (expression_statement (augmented_assignment (identifier_result) identifier_result (binary_operator (string_"%d %s ") string_"%d %s " (tuple (identifier_days) identifier_days (conditional_expression (string_"Day") string_"Day" (parenthesized_expression (comparison_operator (identifier_days) identifier_days (integer_1) integer_1 )comparison_operator )parenthesized_expression (string_"Days") string_"Days" )conditional_expression )tuple )binary_operator )augmented_assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_hours) identifier_hours (integer_0) integer_0 )comparison_operator (block (expression_statement (augmented_assignment (identifier_result) identifier_result (binary_operator (string_"%d %s ") string_"%d %s " (tuple (identifier_hours) identifier_hours (conditional_expression (string_"Hour") string_"Hour" (parenthesized_expression (comparison_operator (identifier_hours) identifier_hours (integer_1) integer_1 )comparison_operator )parenthesized_expression (string_"Hours") string_"Hours" )conditional_expression )tuple )binary_operator )augmented_assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_minutes) identifier_minutes (integer_0) integer_0 )comparison_operator (block (expression_statement (augmented_assignment (identifier_result) identifier_result (binary_operator (string_"%d %s ") string_"%d %s " (tuple (identifier_minutes) identifier_minutes (conditional_expression (string_"Minute") string_"Minute" (parenthesized_expression (comparison_operator (identifier_minutes) identifier_minutes (integer_1) integer_1 )comparison_operator )parenthesized_expression (string_"Minutes") string_"Minutes" )conditional_expression )tuple )binary_operator )augmented_assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_seconds) identifier_seconds (integer_0) integer_0 )comparison_operator (block (expression_statement (augmented_assignment (identifier_result) identifier_result (binary_operator (string_"%d %s ") string_"%d %s " (tuple (identifier_seconds) identifier_seconds (conditional_expression (string_"Second") string_"Second" (parenthesized_expression (comparison_operator (identifier_seconds) identifier_seconds (integer_1) integer_1 )comparison_operator )parenthesized_expression (string_"Seconds") string_"Seconds" )conditional_expression )tuple )binary_operator )augmented_assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_result) identifier_result (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Returns human readable string from number of seconds
(module (function_definition (function_name_walk_nodes) function_name_walk_nodes (parameters (identifier_self) identifier_self (identifier_node) identifier_node (identifier_original) identifier_original )parameters (block (try_statement (block (expression_statement (assignment (identifier_nodelist) identifier_nodelist (call (attribute (attribute (identifier_self) identifier_self (identifier_parser) identifier_parser )attribute (identifier_get_nodelist) identifier_get_nodelist )attribute (argument_list (identifier_node) identifier_node (keyword_argument (identifier_original) identifier_original (identifier_original) identifier_original )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (expression_statement (assignment (identifier_nodelist) identifier_nodelist (call (attribute (attribute (identifier_self) identifier_self (identifier_parser) identifier_parser )attribute (identifier_get_nodelist) identifier_get_nodelist )attribute (argument_list (identifier_node) identifier_node (keyword_argument (identifier_original) identifier_original (identifier_original) identifier_original )keyword_argument (keyword_argument (identifier_context) identifier_context (None) None )keyword_argument )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (for_statement (identifier_node) identifier_node (identifier_nodelist) identifier_nodelist (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_node) identifier_node (identifier_SassSrcNode) identifier_SassSrcNode )argument_list )call (block (if_statement (attribute (identifier_node) identifier_node (identifier_is_sass) identifier_is_sass )attribute (block (expression_statement (yield (identifier_node) identifier_node )yield )expression_statement )block )if_statement )block (else_clause (block (for_statement (identifier_node) identifier_node (call (attribute (identifier_self) identifier_self (identifier_walk_nodes) identifier_walk_nodes )attribute (argument_list (identifier_node) identifier_node (keyword_argument (identifier_original) identifier_original (identifier_original) identifier_original )keyword_argument )argument_list )call (block (expression_statement (yield (identifier_node) identifier_node )yield )expression_statement )block )for_statement )block )else_clause )if_statement )block )for_statement )block )function_definition )module
Iterate over the nodes recursively yielding the templatetag 'sass_src'
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (identifier_id) identifier_id (dictionary_splat_pattern (identifier_options) identifier_options )dictionary_splat_pattern )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__item_path) identifier__item_path )attribute )not_operator (block (raise_statement (call (identifier_AttributeError) identifier_AttributeError (argument_list (binary_operator (string_'get is not available for %s') string_'get is not available for %s' (attribute (identifier_self) identifier_self (identifier__item_name) identifier__item_name )attribute )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_target) identifier_target (binary_operator (attribute (identifier_self) identifier_self (identifier__item_path) identifier__item_path )attribute (identifier_id) identifier_id )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_json_data) identifier_json_data (call (attribute (attribute (identifier_self) identifier_self (identifier__redmine) identifier__redmine )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_target) identifier_target (dictionary_splat (identifier_options) identifier_options )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (attribute (identifier_self) identifier_self (identifier__redmine) identifier__redmine )attribute (identifier_unwrap_json) identifier_unwrap_json )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__item_type) identifier__item_type )attribute (identifier_json_data) identifier_json_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (string_'_source_path') string_'_source_path' )subscript (identifier_target) identifier_target )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__objectify) identifier__objectify )attribute (argument_list (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get a single item with the given ID
(module (function_definition (function_name_check) function_name_check (parameters (identifier_text) identifier_text )parameters (block (expression_statement (assignment (identifier_err) identifier_err (string_"misc.suddenly") string_"misc.suddenly" )assignment )expression_statement (expression_statement (assignment (identifier_msg) identifier_msg (string_u"Suddenly is nondescript, slows the action, and warns your reader.") string_u"Suddenly is nondescript, slows the action, and warns your reader." )assignment )expression_statement (expression_statement (assignment (identifier_regex) identifier_regex (string_"Suddenly,") string_"Suddenly," )assignment )expression_statement (return_statement (call (identifier_existence_check) identifier_existence_check (argument_list (identifier_text) identifier_text (list (identifier_regex) identifier_regex )list (identifier_err) identifier_err (identifier_msg) identifier_msg (keyword_argument (identifier_max_errors) identifier_max_errors (integer_3) integer_3 )keyword_argument (keyword_argument (identifier_require_padding) identifier_require_padding (False) False )keyword_argument (keyword_argument (identifier_offset) identifier_offset (unary_operator (integer_1) integer_1 )unary_operator )keyword_argument (keyword_argument (identifier_ignore_case) identifier_ignore_case (False) False )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Advice on sudden vs suddenly.
(module (function_definition (function_name_get_cloud_from_metadata_endpoint) function_name_get_cloud_from_metadata_endpoint (parameters (identifier_arm_endpoint) identifier_arm_endpoint (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_session) identifier_session (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_cloud) identifier_cloud (call (identifier_Cloud) identifier_Cloud (argument_list (boolean_operator (identifier_name) identifier_name (identifier_arm_endpoint) identifier_arm_endpoint )boolean_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_cloud) identifier_cloud (identifier_endpoints) identifier_endpoints )attribute (identifier_management) identifier_management )attribute (identifier_arm_endpoint) identifier_arm_endpoint )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_cloud) identifier_cloud (identifier_endpoints) identifier_endpoints )attribute (identifier_resource_manager) identifier_resource_manager )attribute (identifier_arm_endpoint) identifier_arm_endpoint )assignment )expression_statement (expression_statement (call (identifier__populate_from_metadata_endpoint) identifier__populate_from_metadata_endpoint (argument_list (identifier_cloud) identifier_cloud (identifier_arm_endpoint) identifier_arm_endpoint (identifier_session) identifier_session )argument_list )call )expression_statement (return_statement (identifier_cloud) identifier_cloud )return_statement )block )function_definition )module
Get a Cloud object from an ARM endpoint. .. versionadded:: 0.4.11 :Example: .. code:: python get_cloud_from_metadata_endpoint(https://management.azure.com/, "Public Azure") :param str arm_endpoint: The ARM management endpoint :param str name: An optional name for the Cloud object. Otherwise it's the ARM endpoint :params requests.Session session: A requests session object if you need to configure proxy, cert, etc. :rtype Cloud: :returns: a Cloud object :raises: MetadataEndpointError if unable to build the Cloud object
(module (function_definition (function_name_process_part) function_name_process_part (parameters (identifier_self) identifier_self (identifier_char) identifier_char )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_char) identifier_char (attribute (identifier_self) identifier_self (identifier_whitespace) identifier_whitespace )attribute )comparison_operator (comparison_operator (identifier_char) identifier_char (attribute (identifier_self) identifier_self (identifier_eol_char) identifier_eol_char )attribute )comparison_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_parts) identifier_parts )attribute (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_part) identifier_part )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_part) identifier_part )attribute (list )list )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_process_char) identifier_process_char )attribute (attribute (identifier_self) identifier_self (identifier_process_delimiter) identifier_process_delimiter )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_char) identifier_char (attribute (identifier_self) identifier_self (identifier_eol_char) identifier_eol_char )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_complete) identifier_complete )attribute (True) True )assignment )expression_statement )block )if_statement (return_statement )return_statement )block )if_statement (if_statement (comparison_operator (identifier_char) identifier_char (attribute (identifier_self) identifier_self (identifier_quote_chars) identifier_quote_chars )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_inquote) identifier_inquote )attribute (identifier_char) identifier_char )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_process_char) identifier_process_char )attribute (attribute (identifier_self) identifier_self (identifier_process_quote) identifier_process_quote )attribute )assignment )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_part) identifier_part )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_char) identifier_char )argument_list )call )expression_statement )block )function_definition )module
Process chars while in a part
(module (function_definition (function_name_reverse) function_name_reverse (parameters (identifier_self) identifier_self (identifier_lon) identifier_lon (identifier_lat) identifier_lat (default_parameter (identifier_types) identifier_types (None) None )default_parameter (default_parameter (identifier_limit) identifier_limit (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_uri) identifier_uri (call (attribute (call (identifier_URITemplate) identifier_URITemplate (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_baseuri) identifier_baseuri )attribute (string_'/{dataset}/{lon},{lat}.json') string_'/{dataset}/{lon},{lat}.json' )binary_operator )argument_list )call (identifier_expand) identifier_expand )attribute (argument_list (keyword_argument (identifier_dataset) identifier_dataset (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )keyword_argument (keyword_argument (identifier_lon) identifier_lon (call (identifier_str) identifier_str (argument_list (call (identifier_round) identifier_round (argument_list (call (identifier_float) identifier_float (argument_list (identifier_lon) identifier_lon )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_precision) identifier_precision )attribute (identifier_get) identifier_get )attribute (argument_list (string_'reverse') string_'reverse' (integer_5) integer_5 )argument_list )call )argument_list )call )argument_list )call )keyword_argument (keyword_argument (identifier_lat) identifier_lat (call (identifier_str) identifier_str (argument_list (call (identifier_round) identifier_round (argument_list (call (identifier_float) identifier_float (argument_list (identifier_lat) identifier_lat )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_precision) identifier_precision )attribute (identifier_get) identifier_get )attribute (argument_list (string_'reverse') string_'reverse' (integer_5) integer_5 )argument_list )call )argument_list )call )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (if_statement (identifier_types) identifier_types (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 (expression_statement (call (attribute (identifier_params) identifier_params (identifier_update) identifier_update )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__validate_place_types) identifier__validate_place_types )attribute (argument_list (identifier_types) identifier_types )argument_list )call )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_limit) identifier_limit (None) None )comparison_operator (block (if_statement (boolean_operator (not_operator (identifier_types) identifier_types )not_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_types) identifier_types )argument_list )call (integer_1) integer_1 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_InvalidPlaceTypeError) identifier_InvalidPlaceTypeError (argument_list (string_'Specify a single type when using limit with reverse geocoding') string_'Specify a single type when using limit with reverse geocoding' )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_params) identifier_params (identifier_update) identifier_update )attribute (argument_list (keyword_argument (identifier_limit) identifier_limit (call (attribute (string_'{0}') string_'{0}' (identifier_format) identifier_format )attribute (argument_list (identifier_limit) identifier_limit )argument_list )call )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_uri) identifier_uri (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_handle_http_error) identifier_handle_http_error )attribute (argument_list (identifier_resp) identifier_resp )argument_list )call )expression_statement (function_definition (function_name_geojson) function_name_geojson (parameters )parameters (block (return_statement (call (attribute (identifier_resp) identifier_resp (identifier_json) identifier_json )attribute (argument_list )argument_list )call )return_statement )block )function_definition (expression_statement (assignment (attribute (identifier_resp) identifier_resp (identifier_geojson) identifier_geojson )attribute (identifier_geojson) identifier_geojson )assignment )expression_statement (return_statement (identifier_resp) identifier_resp )return_statement )block )function_definition )module
Returns a Requests response object that contains a GeoJSON collection of places near the given longitude and latitude. `response.geojson()` returns the geocoding result as GeoJSON. `response.status_code` returns the HTTP API status code. See: https://www.mapbox.com/api-documentation/search/#reverse-geocoding.
(module (function_definition (function_name__setuintbe) function_name__setuintbe (parameters (identifier_self) identifier_self (identifier_uintbe) identifier_uintbe (default_parameter (identifier_length) identifier_length (None) None )default_parameter )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_length) identifier_length (None) None )comparison_operator (comparison_operator (binary_operator (identifier_length) identifier_length (integer_8) integer_8 )binary_operator (integer_0) integer_0 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_CreationError) identifier_CreationError (argument_list (concatenated_string (string_"Big-endian integers must be whole-byte. ") string_"Big-endian integers must be whole-byte. " (string_"Length = {0} bits.") string_"Length = {0} bits." )concatenated_string (identifier_length) identifier_length )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__setuint) identifier__setuint )attribute (argument_list (identifier_uintbe) identifier_uintbe (identifier_length) identifier_length )argument_list )call )expression_statement )block )function_definition )module
Set the bitstring to a big-endian unsigned int interpretation.
(module (function_definition (function_name_output) function_name_output (parameters (identifier_id) identifier_id (identifier_url) identifier_url )parameters (block (try_statement (block (expression_statement (assignment (identifier_experiment) identifier_experiment (call (attribute (call (identifier_ExperimentClient) identifier_ExperimentClient (argument_list )argument_list )call (identifier_get) identifier_get )attribute (argument_list (call (identifier_normalize_job_name) identifier_normalize_job_name (argument_list (identifier_id) identifier_id )argument_list )call )argument_list )call )assignment )expression_statement )block (except_clause (identifier_FloydException) identifier_FloydException (block (expression_statement (assignment (identifier_experiment) identifier_experiment (call (attribute (call (identifier_ExperimentClient) identifier_ExperimentClient (argument_list )argument_list )call (identifier_get) identifier_get )attribute (argument_list (identifier_id) identifier_id )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_output_dir_url) identifier_output_dir_url (binary_operator (string_"%s/%s/files") string_"%s/%s/files" (tuple (attribute (identifier_floyd) identifier_floyd (identifier_floyd_web_host) identifier_floyd_web_host )attribute (attribute (identifier_experiment) identifier_experiment (identifier_name) identifier_name )attribute )tuple )binary_operator )assignment )expression_statement (if_statement (identifier_url) identifier_url (block (expression_statement (call (attribute (identifier_floyd_logger) identifier_floyd_logger (identifier_info) identifier_info )attribute (argument_list (identifier_output_dir_url) identifier_output_dir_url )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_floyd_logger) identifier_floyd_logger (identifier_info) identifier_info )attribute (argument_list (string_"Opening output path in your browser ...") string_"Opening output path in your browser ..." )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_webbrowser) identifier_webbrowser (identifier_open) identifier_open )attribute (argument_list (identifier_output_dir_url) identifier_output_dir_url )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
View the files from a job.
(module (function_definition (function_name_getFeatureById) function_name_getFeatureById (parameters (identifier_self) identifier_self (identifier_featureId) identifier_featureId )parameters (block (expression_statement (assignment (identifier_sql) identifier_sql (string_"SELECT * FROM FEATURE WHERE id = ?") string_"SELECT * FROM FEATURE WHERE id = ?" )assignment )expression_statement (expression_statement (assignment (identifier_query) identifier_query (call (attribute (attribute (identifier_self) identifier_self (identifier__dbconn) identifier__dbconn )attribute (identifier_execute) identifier_execute )attribute (argument_list (identifier_sql) identifier_sql (tuple (identifier_featureId) identifier_featureId )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ret) identifier_ret (call (attribute (identifier_query) identifier_query (identifier_fetchone) identifier_fetchone )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_ret) identifier_ret (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (return_statement (call (attribute (identifier_sqlite_backend) identifier_sqlite_backend (identifier_sqliteRowToDict) identifier_sqliteRowToDict )attribute (argument_list (identifier_ret) identifier_ret )argument_list )call )return_statement )block )function_definition )module
Fetch feature by featureID. :param featureId: the FeatureID as found in GFF3 records :return: dictionary representing a feature object, or None if no match is found.
(module (function_definition (function_name_op_match_funcdef_handle) function_name_op_match_funcdef_handle (parameters (identifier_self) identifier_self (identifier_original) identifier_original (identifier_loc) identifier_loc (identifier_tokens) identifier_tokens )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_tokens) identifier_tokens )argument_list )call (integer_3) integer_3 )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_func) identifier_func (identifier_args) identifier_args )pattern_list (call (identifier_get_infix_items) identifier_get_infix_items (argument_list (identifier_tokens) identifier_tokens )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cond) identifier_cond (None) None )assignment )expression_statement )block (elif_clause (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_tokens) identifier_tokens )argument_list )call (integer_4) integer_4 )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_func) identifier_func (identifier_args) identifier_args )pattern_list (call (identifier_get_infix_items) identifier_get_infix_items (argument_list (subscript (identifier_tokens) identifier_tokens (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cond) identifier_cond (subscript (identifier_tokens) identifier_tokens (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_CoconutInternalException) identifier_CoconutInternalException (argument_list (string_"invalid infix match function definition tokens") string_"invalid infix match function definition tokens" (identifier_tokens) identifier_tokens )argument_list )call )raise_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_name_tokens) identifier_name_tokens (list (identifier_func) identifier_func (identifier_args) identifier_args )list )assignment )expression_statement (if_statement (comparison_operator (identifier_cond) identifier_cond (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_name_tokens) identifier_name_tokens (identifier_append) identifier_append )attribute (argument_list (identifier_cond) identifier_cond )argument_list )call )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_name_match_funcdef_handle) identifier_name_match_funcdef_handle )attribute (argument_list (identifier_original) identifier_original (identifier_loc) identifier_loc (identifier_name_tokens) identifier_name_tokens )argument_list )call )return_statement )block )function_definition )module
Process infix match defs. Result must be passed to insert_docstring_handle.
(module (function_definition (function_name__get_timezone) function_name__get_timezone (parameters (identifier_self) identifier_self (identifier_root) identifier_root )parameters (block (expression_statement (assignment (identifier_tz_str) identifier_tz_str (attribute (subscript (call (attribute (identifier_root) identifier_root (identifier_xpath) identifier_xpath )attribute (argument_list (string_'//div[@class="smallfont" and @align="center"]') string_'//div[@class="smallfont" and @align="center"]' )argument_list )call (integer_0) integer_0 )subscript (identifier_text) identifier_text )attribute )assignment )expression_statement (expression_statement (assignment (identifier_hours) identifier_hours (call (identifier_int) identifier_int (argument_list (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__tz_re) identifier__tz_re )attribute (identifier_search) identifier_search )attribute (argument_list (identifier_tz_str) identifier_tz_str )argument_list )call (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (identifier_tzoffset) identifier_tzoffset (argument_list (identifier_tz_str) identifier_tz_str (binary_operator (identifier_hours) identifier_hours (integer_60) integer_60 )binary_operator )argument_list )call )return_statement )block )function_definition )module
Find timezone informatation on bottom of the page.
(module (function_definition (function_name_from_coo) function_name_from_coo (parameters (identifier_cls) identifier_cls (identifier_obj) identifier_obj (default_parameter (identifier_vartype) identifier_vartype (None) None )default_parameter )parameters (block (import_statement (aliased_import (dotted_name (identifier_dimod) identifier_dimod (identifier_serialization) identifier_serialization (identifier_coo) identifier_coo )dotted_name (identifier_coo) identifier_coo )aliased_import )import_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_str) identifier_str )argument_list )call (block (return_statement (call (attribute (identifier_coo) identifier_coo (identifier_loads) identifier_loads )attribute (argument_list (identifier_obj) identifier_obj (keyword_argument (identifier_cls) identifier_cls (identifier_cls) identifier_cls )keyword_argument (keyword_argument (identifier_vartype) identifier_vartype (identifier_vartype) identifier_vartype )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (identifier_coo) identifier_coo (identifier_load) identifier_load )attribute (argument_list (identifier_obj) identifier_obj (keyword_argument (identifier_cls) identifier_cls (identifier_cls) identifier_cls )keyword_argument (keyword_argument (identifier_vartype) identifier_vartype (identifier_vartype) identifier_vartype )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Deserialize a binary quadratic model from a COOrdinate_ format encoding. .. _COOrdinate: https://en.wikipedia.org/wiki/Sparse_matrix#Coordinate_list_(COO) Args: obj: (str/file): Either a string or a `.read()`-supporting `file object`_ that represents linear and quadratic biases for a binary quadratic model. This data is stored as a list of 3-tuples, (i, j, bias), where :math:`i=j` for linear biases. vartype (:class:`.Vartype`/str/set, optional): Variable type for the binary quadratic model. Accepted input values: * :class:`.Vartype.SPIN`, ``'SPIN'``, ``{-1, 1}`` * :class:`.Vartype.BINARY`, ``'BINARY'``, ``{0, 1}`` If not provided, the vartype must be specified with a header in the file. .. _file object: https://docs.python.org/3/glossary.html#term-file-object .. note:: Variables must use index lables (numeric lables). Binary quadratic models created from COOrdinate format encoding have offsets set to zero. Examples: An example of a binary quadratic model encoded in COOrdinate format. .. code-block:: none 0 0 0.50000 0 1 0.50000 1 1 -1.50000 The Coordinate format with a header .. code-block:: none # vartype=SPIN 0 0 0.50000 0 1 0.50000 1 1 -1.50000 This example saves a binary quadratic model to a COOrdinate-format file and creates a new model by reading the saved file. >>> import dimod >>> bqm = dimod.BinaryQuadraticModel({0: -1.0, 1: 1.0}, {(0, 1): -1.0}, 0.0, dimod.BINARY) >>> with open('tmp.qubo', 'w') as file: # doctest: +SKIP ... bqm.to_coo(file) >>> with open('tmp.qubo', 'r') as file: # doctest: +SKIP ... new_bqm = dimod.BinaryQuadraticModel.from_coo(file, dimod.BINARY) >>> any(new_bqm) # doctest: +SKIP True
(module (function_definition (function_name_hide_object) function_name_hide_object (parameters (identifier_self) identifier_self (identifier_key) identifier_key (default_parameter (identifier_hide) identifier_hide (True) True )default_parameter )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_object_queue) identifier_object_queue )attribute (identifier_put) identifier_put )attribute (argument_list (call (identifier_SlipHideObject) identifier_SlipHideObject (argument_list (identifier_key) identifier_key (identifier_hide) identifier_hide )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
hide an object on the map by key
(module (function_definition (function_name_get_task) function_name_get_task (parameters (identifier_config) identifier_config )parameters (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (subscript (identifier_config) identifier_config (string_'work_dir') string_'work_dir' )subscript (string_"task.json") string_"task.json" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_message) identifier_message (call (attribute (string_"Can't read task from {}!\n%(exc)s") string_"Can't read task from {}!\n%(exc)s" (identifier_format) identifier_format )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_contents) identifier_contents (call (identifier_load_json_or_yaml) identifier_load_json_or_yaml (argument_list (identifier_path) identifier_path (keyword_argument (identifier_is_path) identifier_is_path (True) True )keyword_argument (keyword_argument (identifier_message) identifier_message (identifier_message) identifier_message )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_contents) identifier_contents )return_statement )block )function_definition )module
Read the task.json from work_dir. Args: config (dict): the running config, to find work_dir. Returns: dict: the contents of task.json Raises: ScriptWorkerTaskException: on error.
(module (function_definition (function_name_get_airport_metars_hist) function_name_get_airport_metars_hist (parameters (identifier_self) identifier_self (identifier_iata) identifier_iata )parameters (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (call (attribute (identifier_AIRPORT_BASE) identifier_AIRPORT_BASE (identifier_format) identifier_format )attribute (argument_list (identifier_iata) identifier_iata )argument_list )call (string_"/weather") string_"/weather" )binary_operator )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__fr24) identifier__fr24 )attribute (identifier_get_airport_metars_hist) identifier_get_airport_metars_hist )attribute (argument_list (identifier_url) identifier_url )argument_list )call )return_statement )block )function_definition )module
Retrieve the metar data for past 72 hours. The data will not be parsed to readable format. Given the IATA code of an airport, this method returns the metar information for last 72 hours. Args: iata (str): The IATA code for an airport, e.g. HYD Returns: The metar data for the airport Example:: from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_metars_hist('HYD')
(module (function_definition (function_name_report_open_file) function_name_report_open_file (parameters (identifier_self) identifier_self (identifier_options) identifier_options )parameters (block (expression_statement (assignment (identifier_filename) identifier_filename (subscript (identifier_options) identifier_options (string_'filename') string_'filename' )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_'Call LSP for %s') string_'Call LSP for %s' (identifier_filename) identifier_filename )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_language) identifier_language (subscript (identifier_options) identifier_options (string_'language') string_'language' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_callback) identifier_callback (subscript (identifier_options) identifier_options (string_'codeeditor') string_'codeeditor' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_stat) identifier_stat (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_main) identifier_main )attribute (identifier_lspmanager) identifier_lspmanager )attribute (identifier_start_client) identifier_start_client )attribute (argument_list (call (attribute (identifier_language) identifier_language (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_main) identifier_main )attribute (identifier_lspmanager) identifier_lspmanager )attribute (identifier_register_file) identifier_register_file )attribute (argument_list (call (attribute (identifier_language) identifier_language (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_filename) identifier_filename (identifier_callback) identifier_callback )argument_list )call )expression_statement (if_statement (identifier_stat) identifier_stat (block (if_statement (comparison_operator (call (attribute (identifier_language) identifier_language (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (attribute (identifier_self) identifier_self (identifier_lsp_editor_settings) identifier_lsp_editor_settings )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_lsp_server_ready) identifier_lsp_server_ready )attribute (argument_list (call (attribute (identifier_language) identifier_language (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (subscript (attribute (identifier_self) identifier_self (identifier_lsp_editor_settings) identifier_lsp_editor_settings )attribute (call (attribute (identifier_language) identifier_language (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )subscript )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_editor) identifier_editor (call (attribute (identifier_self) identifier_self (identifier_get_current_editor) identifier_get_current_editor )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_editor) identifier_editor (identifier_lsp_ready) identifier_lsp_ready )attribute (False) False )assignment )expression_statement )block )else_clause )if_statement )block )if_statement )block )function_definition )module
Request to start a LSP server to attend a language.
(module (function_definition (function_name_to_string) function_name_to_string (parameters (identifier_mnemonic) identifier_mnemonic )parameters (block (expression_statement (assignment (identifier_strings) identifier_strings (dictionary (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_ADD) identifier_ADD )attribute (string_"add") string_"add" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_SUB) identifier_SUB )attribute (string_"sub") string_"sub" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_MUL) identifier_MUL )attribute (string_"mul") string_"mul" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_DIV) identifier_DIV )attribute (string_"div") string_"div" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_MOD) identifier_MOD )attribute (string_"mod") string_"mod" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_BSH) identifier_BSH )attribute (string_"bsh") string_"bsh" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_AND) identifier_AND )attribute (string_"and") string_"and" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_OR) identifier_OR )attribute (string_"or") string_"or" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_XOR) identifier_XOR )attribute (string_"xor") string_"xor" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_LDM) identifier_LDM )attribute (string_"ldm") string_"ldm" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_STM) identifier_STM )attribute (string_"stm") string_"stm" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_STR) identifier_STR )attribute (string_"str") string_"str" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_BISZ) identifier_BISZ )attribute (string_"bisz") string_"bisz" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_JCC) identifier_JCC )attribute (string_"jcc") string_"jcc" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_UNKN) identifier_UNKN )attribute (string_"unkn") string_"unkn" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_UNDEF) identifier_UNDEF )attribute (string_"undef") string_"undef" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_NOP) identifier_NOP )attribute (string_"nop") string_"nop" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_SEXT) identifier_SEXT )attribute (string_"sext") string_"sext" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_SDIV) identifier_SDIV )attribute (string_"sdiv") string_"sdiv" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_SMOD) identifier_SMOD )attribute (string_"smod") string_"smod" )pair (pair (attribute (identifier_ReilMnemonic) identifier_ReilMnemonic (identifier_SMUL) identifier_SMUL )attribute (string_"smul") string_"smul" )pair )dictionary )assignment )expression_statement (return_statement (subscript (identifier_strings) identifier_strings (identifier_mnemonic) identifier_mnemonic )subscript )return_statement )block )function_definition )module
Return the string representation of the given mnemonic.
(module (function_definition (function_name_vcard) function_name_vcard (parameters (identifier_self) identifier_self (identifier_qs) identifier_qs )parameters (block (try_statement (block (import_statement (dotted_name (identifier_vobject) identifier_vobject )dotted_name )import_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_style) identifier_style )attribute (identifier_ERROR) identifier_ERROR )attribute (argument_list (string_"Please install vobject to use the vcard export format.") string_"Please install vobject to use the vcard export format." )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_out) identifier_out (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute )assignment )expression_statement (for_statement (identifier_ent) identifier_ent (identifier_qs) identifier_qs (block (expression_statement (assignment (identifier_card) identifier_card (call (attribute (identifier_vobject) identifier_vobject (identifier_vCard) identifier_vCard )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (call (attribute (identifier_card) identifier_card (identifier_add) identifier_add )attribute (argument_list (string_'fn') string_'fn' )argument_list )call (identifier_value) identifier_value )attribute (call (identifier_full_name) identifier_full_name (argument_list (dictionary_splat (identifier_ent) identifier_ent )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (subscript (identifier_ent) identifier_ent (string_'last_name') string_'last_name' )subscript )not_operator (not_operator (subscript (identifier_ent) identifier_ent (string_'first_name') string_'first_name' )subscript )not_operator )boolean_operator (block (expression_statement (assignment (attribute (call (attribute (identifier_card) identifier_card (identifier_add) identifier_add )attribute (argument_list (string_'n') string_'n' )argument_list )call (identifier_value) identifier_value )attribute (call (attribute (attribute (identifier_vobject) identifier_vobject (identifier_vcard) identifier_vcard )attribute (identifier_Name) identifier_Name )attribute (argument_list (call (identifier_full_name) identifier_full_name (argument_list (dictionary_splat (identifier_ent) identifier_ent )dictionary_splat )argument_list )call )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (call (attribute (identifier_card) identifier_card (identifier_add) identifier_add )attribute (argument_list (string_'n') string_'n' )argument_list )call (identifier_value) identifier_value )attribute (call (attribute (attribute (identifier_vobject) identifier_vobject (identifier_vcard) identifier_vcard )attribute (identifier_Name) identifier_Name )attribute (argument_list (subscript (identifier_ent) identifier_ent (string_'last_name') string_'last_name' )subscript (subscript (identifier_ent) identifier_ent (string_'first_name') string_'first_name' )subscript )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_emailpart) identifier_emailpart (call (attribute (identifier_card) identifier_card (identifier_add) identifier_add )attribute (argument_list (string_'email') string_'email' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_emailpart) identifier_emailpart (identifier_value) identifier_value )attribute (subscript (identifier_ent) identifier_ent (string_'email') string_'email' )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_emailpart) identifier_emailpart (identifier_type_param) identifier_type_param )attribute (string_'INTERNET') string_'INTERNET' )assignment )expression_statement (expression_statement (call (attribute (identifier_out) identifier_out (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_card) identifier_card (identifier_serialize) identifier_serialize )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
VCARD format.
(module (function_definition (function_name_build_act) function_name_build_act (parameters (typed_parameter (identifier_cls) identifier_cls (type (generic_type (identifier_Type) identifier_Type (type_parameter (type (identifier__Block) identifier__Block )type )type_parameter )generic_type )type )typed_parameter (typed_parameter (identifier_node) identifier_node (type (attribute (identifier_ast) identifier_ast (identifier_stmt) identifier_stmt )attribute )type )typed_parameter (typed_parameter (identifier_test_func_node) identifier_test_func_node (type (attribute (identifier_ast) identifier_ast (identifier_FunctionDef) identifier_FunctionDef )attribute )type )typed_parameter )parameters (type (identifier__Block) identifier__Block )type (block (expression_statement (call (identifier_add_node_parents) identifier_add_node_parents (argument_list (identifier_test_func_node) identifier_test_func_node )argument_list )call )expression_statement (expression_statement (assignment (identifier_act_block_node) identifier_act_block_node (identifier_node) identifier_node )assignment )expression_statement (while_statement (comparison_operator (attribute (identifier_act_block_node) identifier_act_block_node (identifier_parent) identifier_parent )attribute (identifier_test_func_node) identifier_test_func_node )comparison_operator (block (expression_statement (assignment (identifier_act_block_node) identifier_act_block_node (attribute (identifier_act_block_node) identifier_act_block_node (identifier_parent) identifier_parent )attribute )assignment )expression_statement )block )while_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (list (identifier_act_block_node) identifier_act_block_node )list (attribute (identifier_LineType) identifier_LineType (identifier_act) identifier_act )attribute )argument_list )call )return_statement )block )function_definition )module
Act block is a single node - either the act node itself, or the node that wraps the act node.
(module (function_definition (function_name__parse_row) function_name__parse_row (parameters (identifier_row) identifier_row )parameters (block (expression_statement (assignment (identifier_data) identifier_data (list )list )assignment )expression_statement (expression_statement (assignment (identifier_labels) identifier_labels (call (attribute (identifier_HtmlTable) identifier_HtmlTable (identifier__get_row_tag) identifier__get_row_tag )attribute (argument_list (identifier_row) identifier_row (string_"th") string_"th" )argument_list )call )assignment )expression_statement (if_statement (identifier_labels) identifier_labels (block (expression_statement (augmented_assignment (identifier_data) identifier_data (identifier_labels) identifier_labels )augmented_assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_columns) identifier_columns (call (attribute (identifier_HtmlTable) identifier_HtmlTable (identifier__get_row_tag) identifier__get_row_tag )attribute (argument_list (identifier_row) identifier_row (string_"td") string_"td" )argument_list )call )assignment )expression_statement (if_statement (identifier_columns) identifier_columns (block (expression_statement (augmented_assignment (identifier_data) identifier_data (identifier_columns) identifier_columns )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Parses HTML row :param row: HTML row :return: list of values in row
(module (function_definition (function_name_HandlePeerInfoReceived) function_name_HandlePeerInfoReceived (parameters (identifier_self) identifier_self (identifier_payload) identifier_payload )parameters (block (expression_statement (assignment (identifier_addrs) identifier_addrs (call (attribute (identifier_IOHelper) identifier_IOHelper (identifier_AsSerializableWithType) identifier_AsSerializableWithType )attribute (argument_list (identifier_payload) identifier_payload (string_'neo.Network.Payloads.AddrPayload.AddrPayload') string_'neo.Network.Payloads.AddrPayload.AddrPayload' )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_addrs) identifier_addrs )not_operator (block (return_statement )return_statement )block )if_statement (for_statement (identifier_nawt) identifier_nawt (attribute (identifier_addrs) identifier_addrs (identifier_NetworkAddressesWithTime) identifier_NetworkAddressesWithTime )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_leader) identifier_leader )attribute (identifier_RemoteNodePeerReceived) identifier_RemoteNodePeerReceived )attribute (argument_list (attribute (identifier_nawt) identifier_nawt (identifier_Address) identifier_Address )attribute (attribute (identifier_nawt) identifier_nawt (identifier_Port) identifier_Port )attribute (attribute (identifier_self) identifier_self (identifier_prefix) identifier_prefix )attribute )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Process response of `self.RequestPeerInfo`.
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (identifier_notification_level) identifier_notification_level )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_values) identifier_values (identifier_of) identifier_of )attribute (argument_list (dictionary (pair (string_'NotificationLevel') string_'NotificationLevel' (identifier_notification_level) identifier_notification_level )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_payload) identifier_payload (call (attribute (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_update) identifier_update )attribute (argument_list (string_'POST') string_'POST' (attribute (identifier_self) identifier_self (identifier__uri) identifier__uri )attribute (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_UserChannelInstance) identifier_UserChannelInstance (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_payload) identifier_payload (keyword_argument (identifier_service_sid) identifier_service_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'service_sid') string_'service_sid' )subscript )keyword_argument (keyword_argument (identifier_user_sid) identifier_user_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'user_sid') string_'user_sid' )subscript )keyword_argument (keyword_argument (identifier_channel_sid) identifier_channel_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'channel_sid') string_'channel_sid' )subscript )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Update the UserChannelInstance :param UserChannelInstance.NotificationLevel notification_level: The push notification level to assign to the User Channel :returns: Updated UserChannelInstance :rtype: twilio.rest.chat.v2.service.user.user_channel.UserChannelInstance
(module (function_definition (function_name_octaves) function_name_octaves (parameters (identifier_freq) identifier_freq (default_parameter (identifier_fmin) identifier_fmin (float_20.) float_20. )default_parameter (default_parameter (identifier_fmax) identifier_fmax (float_2e4) float_2e4 )default_parameter )parameters (block (if_statement (call (identifier_any) identifier_any (generator_expression (comparison_operator (identifier_f) identifier_f (integer_0) integer_0 )comparison_operator (for_in_clause (identifier_f) identifier_f (tuple (identifier_freq) identifier_freq (identifier_fmin) identifier_fmin (identifier_fmax) identifier_fmax )tuple )for_in_clause )generator_expression )call (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Frequencies have to be positive") string_"Frequencies have to be positive" )argument_list )call )raise_statement )block )if_statement (while_statement (comparison_operator (identifier_freq) identifier_freq (identifier_fmin) identifier_fmin )comparison_operator (block (expression_statement (augmented_assignment (identifier_freq) identifier_freq (integer_2) integer_2 )augmented_assignment )expression_statement )block )while_statement (while_statement (comparison_operator (identifier_freq) identifier_freq (identifier_fmax) identifier_fmax )comparison_operator (block (expression_statement (augmented_assignment (identifier_freq) identifier_freq (integer_2) integer_2 )augmented_assignment )expression_statement )block )while_statement (if_statement (comparison_operator (identifier_freq) identifier_freq (identifier_fmin) identifier_fmin )comparison_operator (block (return_statement (list )list )return_statement )block )if_statement (return_statement (binary_operator (subscript (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_it) identifier_it (identifier_takewhile) identifier_takewhile )attribute (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (comparison_operator (identifier_x) identifier_x (identifier_fmin) identifier_fmin )comparison_operator )lambda (generator_expression (binary_operator (identifier_freq) identifier_freq (binary_operator (integer_2) integer_2 (identifier_harm) identifier_harm )binary_operator )binary_operator (for_in_clause (identifier_harm) identifier_harm (call (attribute (identifier_it) identifier_it (identifier_count) identifier_count )attribute (argument_list (integer_0) integer_0 (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call )for_in_clause )generator_expression )argument_list )call )argument_list )call (slice (colon) colon (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript (line_continuation_\) line_continuation_\ (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_it) identifier_it (identifier_takewhile) identifier_takewhile )attribute (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (comparison_operator (identifier_x) identifier_x (identifier_fmax) identifier_fmax )comparison_operator )lambda (generator_expression (binary_operator (identifier_freq) identifier_freq (binary_operator (integer_2) integer_2 (identifier_harm) identifier_harm )binary_operator )binary_operator (for_in_clause (identifier_harm) identifier_harm (call (attribute (identifier_it) identifier_it (identifier_count) identifier_count )attribute (argument_list (integer_1) integer_1 )argument_list )call )for_in_clause )generator_expression )argument_list )call )argument_list )call )binary_operator )return_statement )block )function_definition )module
Given a frequency and a frequency range, returns all frequencies in that range that is an integer number of octaves related to the given frequency. Parameters ---------- freq : Frequency, in any (linear) unit. fmin, fmax : Frequency range, in the same unit of ``freq``. Defaults to 20.0 and 20,000.0, respectively. Returns ------- A list of frequencies, in the same unit of ``freq`` and in ascending order. Examples -------- >>> from audiolazy import octaves, sHz >>> octaves(440.) [27.5, 55.0, 110.0, 220.0, 440.0, 880.0, 1760.0, 3520.0, 7040.0, 14080.0] >>> octaves(440., fmin=3000) [3520.0, 7040.0, 14080.0] >>> Hz = sHz(44100)[1] # Conversion unit from sample rate >>> freqs = octaves(440 * Hz, fmin=300 * Hz, fmax = 1000 * Hz) # rad/sample >>> len(freqs) # Number of octaves 2 >>> [round(f, 6) for f in freqs] # Values in rad/sample [0.062689, 0.125379] >>> [round(f / Hz, 6) for f in freqs] # Values in Hz [440.0, 880.0]
(module (function_definition (function_name_getPhysicalAddress) function_name_getPhysicalAddress (parameters (identifier_self) identifier_self (default_parameter (identifier_length) identifier_length (integer_512) integer_512 )default_parameter )parameters (block (expression_statement (assignment (identifier_name) identifier_name (call (attribute (identifier_ctypes) identifier_ctypes (identifier_create_string_buffer) identifier_create_string_buffer )attribute (argument_list (identifier_length) identifier_length )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__ioctl) identifier__ioctl )attribute (argument_list (call (identifier__HIDIOCGRAWPHYS) identifier__HIDIOCGRAWPHYS (argument_list (identifier_length) identifier_length )argument_list )call (identifier_name) identifier_name (True) True )argument_list )call )expression_statement (return_statement (attribute (identifier_name) identifier_name (identifier_value) identifier_value )attribute )return_statement )block )function_definition )module
Returns device physical address as a string. See hidraw documentation for value signification, as it depends on device's bus type.
(module (function_definition (function_name_head) function_name_head (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 (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (call (attribute (identifier_self) identifier_self (identifier_get_model) identifier_get_model )attribute (argument_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'id') string_'id' )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (yield (call (attribute (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (identifier_fetch) identifier_fetch )attribute (argument_list )argument_list )call )yield )assignment )expression_statement (if_statement (not_operator (identifier_result) identifier_result )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_not_found) identifier_not_found )attribute (argument_list )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_has_read_permission) identifier_has_read_permission )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_permission_denied) identifier_permission_denied )attribute (argument_list )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_headers) identifier_add_headers )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_status) identifier_set_status )attribute (argument_list (integer_200) integer_200 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_finish) identifier_finish )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Handle HEAD requests for the item :param args: :param kwargs:
(module (function_definition (function_name_save_image) function_name_save_image (parameters (identifier_image) identifier_image (identifier_local_filename) identifier_local_filename )parameters (block (expression_statement (assignment (pattern_list (identifier_r_name) identifier_r_name (identifier___) identifier___ (identifier_i_name) identifier_i_name )pattern_list (call (attribute (identifier_image) identifier_image (identifier_rpartition) identifier_rpartition )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_i_name) identifier_i_name (identifier___) identifier___ (identifier___) identifier___ )pattern_list (call (attribute (identifier_i_name) identifier_i_name (identifier_partition) identifier_partition )attribute (argument_list (string_':') string_':' )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_temp_dir) identifier_temp_dir (argument_list )argument_list )call (as_pattern_target (identifier_remote_tmp) identifier_remote_tmp )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_archive) identifier_archive (call (attribute (identifier_posixpath) identifier_posixpath (identifier_join) identifier_join )attribute (argument_list (identifier_remote_tmp) identifier_remote_tmp (call (attribute (string_'image_{0}.tar.gz') string_'image_{0}.tar.gz' (identifier_format) identifier_format )attribute (argument_list (identifier_i_name) identifier_i_name )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_run) identifier_run (argument_list (call (attribute (string_'docker save {0} | gzip --stdout > {1}') string_'docker save {0} | gzip --stdout > {1}' (identifier_format) identifier_format )attribute (argument_list (identifier_image) identifier_image (identifier_archive) identifier_archive )argument_list )call (keyword_argument (identifier_shell) identifier_shell (False) False )keyword_argument )argument_list )call )expression_statement (expression_statement (call (identifier_get) identifier_get (argument_list (identifier_archive) identifier_archive (identifier_local_filename) identifier_local_filename )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Saves a Docker image as a compressed tarball. This command line client method is a suitable alternative, if the Remove API method is too slow. :param image: Image id or tag. :type image: unicode :param local_filename: Local file name to store the image into. If this is a directory, the image will be stored there as a file named ``image_<Image name>.tar.gz``.
(module (function_definition (function_name_df2list) function_name_df2list (parameters (identifier_df) identifier_df )parameters (block (expression_statement (assignment (identifier_subjects) identifier_subjects (call (attribute (attribute (subscript (attribute (attribute (identifier_df) identifier_df (identifier_index) identifier_index )attribute (identifier_levels) identifier_levels )attribute (integer_0) integer_0 )subscript (identifier_values) identifier_values )attribute (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_lists) identifier_lists (call (attribute (attribute (subscript (attribute (attribute (identifier_df) identifier_df (identifier_index) identifier_index )attribute (identifier_levels) identifier_levels )attribute (integer_1) integer_1 )subscript (identifier_values) identifier_values )attribute (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_idx) identifier_idx (attribute (identifier_pd) identifier_pd (identifier_IndexSlice) identifier_IndexSlice )attribute )assignment )expression_statement (expression_statement (assignment (identifier_df) identifier_df (subscript (attribute (identifier_df) identifier_df (identifier_loc) identifier_loc )attribute (subscript (identifier_idx) identifier_idx (identifier_subjects) identifier_subjects (identifier_lists) identifier_lists )subscript (attribute (identifier_df) identifier_df (identifier_columns) identifier_columns )attribute )subscript )assignment )expression_statement (expression_statement (assignment (identifier_lst) identifier_lst (list_comprehension (call (attribute (attribute (subscript (attribute (identifier_df) identifier_df (identifier_loc) identifier_loc )attribute (identifier_sub) identifier_sub (slice (colon) colon )slice )subscript (identifier_values) identifier_values )attribute (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call (for_in_clause (identifier_sub) identifier_sub (identifier_subjects) identifier_subjects )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (identifier_lst) identifier_lst )return_statement )block )function_definition )module
Convert a MultiIndex df to list Parameters ---------- df : pandas.DataFrame A MultiIndex DataFrame where the first level is subjects and the second level is lists (e.g. egg.pres) Returns ---------- lst : a list of lists of lists of values The input df reformatted as a list
(module (function_definition (function_name_pickle_loads) function_name_pickle_loads (parameters (identifier_cls) identifier_cls (identifier_s) identifier_s )parameters (block (expression_statement (assignment (identifier_strio) identifier_strio (call (identifier_StringIO) identifier_StringIO (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_strio) identifier_strio (identifier_write) identifier_write )attribute (argument_list (identifier_s) identifier_s )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_strio) identifier_strio (identifier_seek) identifier_seek )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (expression_statement (assignment (identifier_flow) identifier_flow (call (identifier_pmg_pickle_load) identifier_pmg_pickle_load (argument_list (identifier_strio) identifier_strio )argument_list )call )assignment )expression_statement (return_statement (identifier_flow) identifier_flow )return_statement )block )function_definition )module
Reconstruct the flow from a string.
(module (function_definition (function_name__getInstrumentsVoc) function_name__getInstrumentsVoc (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_cfilter) identifier_cfilter (dictionary (pair (string_'portal_type') string_'portal_type' (string_'Instrument') string_'Instrument' )pair (pair (string_'is_active') string_'is_active' (True) True )pair )dictionary )assignment )expression_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier_getMethod) identifier_getMethod )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_cfilter) identifier_cfilter (string_'getMethodUIDs') string_'getMethodUIDs' )subscript (dictionary (pair (string_"query") string_"query" (call (attribute (call (attribute (identifier_self) identifier_self (identifier_getMethod) identifier_getMethod )attribute (argument_list )argument_list )call (identifier_UID) identifier_UID )attribute (argument_list )argument_list )call )pair (pair (string_"operator") string_"operator" (string_"or") string_"or" )pair )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_bsc) identifier_bsc (call (identifier_getToolByName) identifier_getToolByName (argument_list (identifier_self) identifier_self (string_'bika_setup_catalog') string_'bika_setup_catalog' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_items) identifier_items (binary_operator (list (tuple (string_'') string_'' (string_'No instrument') string_'No instrument' )tuple )list (list_comprehension (tuple (attribute (identifier_o) identifier_o (identifier_UID) identifier_UID )attribute (attribute (identifier_o) identifier_o (identifier_Title) identifier_Title )attribute )tuple (for_in_clause (identifier_o) identifier_o (call (identifier_bsc) identifier_bsc (argument_list (identifier_cfilter) identifier_cfilter )argument_list )call )for_in_clause )list_comprehension )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_o) identifier_o (call (attribute (identifier_self) identifier_self (identifier_getInstrument) identifier_getInstrument )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_o) identifier_o (comparison_operator (call (attribute (identifier_o) identifier_o (identifier_UID) identifier_UID )attribute (argument_list )argument_list )call (list_comprehension (subscript (identifier_i) identifier_i (integer_0) integer_0 )subscript (for_in_clause (identifier_i) identifier_i (identifier_items) identifier_items )for_in_clause )list_comprehension )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_items) identifier_items (identifier_append) identifier_append )attribute (argument_list (tuple (call (attribute (identifier_o) identifier_o (identifier_UID) identifier_UID )attribute (argument_list )argument_list )call (call (attribute (identifier_o) identifier_o (identifier_Title) identifier_Title )attribute (argument_list )argument_list )call )tuple )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_items) identifier_items (identifier_sort) identifier_sort )attribute (argument_list (lambda (lambda_parameters (identifier_x) identifier_x (identifier_y) identifier_y )lambda_parameters (call (identifier_cmp) identifier_cmp (argument_list (subscript (identifier_x) identifier_x (integer_1) integer_1 )subscript (subscript (identifier_y) identifier_y (integer_1) integer_1 )subscript )argument_list )call )lambda )argument_list )call )expression_statement (return_statement (call (identifier_DisplayList) identifier_DisplayList (argument_list (call (identifier_list) identifier_list (argument_list (identifier_items) identifier_items )argument_list )call )argument_list )call )return_statement )block )function_definition )module
This function returns the registered instruments in the system as a vocabulary. The instruments are filtered by the selected method.
(module (function_definition (function_name_on_helpButton) function_name_on_helpButton (parameters (identifier_self) identifier_self (identifier_event) identifier_event (default_parameter (identifier_page) identifier_page (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (identifier_find_pmag_dir) identifier_find_pmag_dir (identifier_get_pmag_dir) identifier_get_pmag_dir )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_help_page) identifier_help_page (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_path) identifier_path (string_'dialogs') string_'dialogs' (string_'help_files') string_'help_files' (identifier_page) identifier_page )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_help_page) identifier_help_page )argument_list )call )not_operator (block (expression_statement (assignment (identifier_help_page) identifier_help_page (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_path) identifier_path (string_'help_files') string_'help_files' (identifier_page) identifier_page )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_html_frame) identifier_html_frame (call (attribute (identifier_pw) identifier_pw (identifier_HtmlFrame) identifier_HtmlFrame )attribute (argument_list (identifier_self) identifier_self (keyword_argument (identifier_page) identifier_page (identifier_help_page) identifier_help_page )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_html_frame) identifier_html_frame (identifier_Show) identifier_Show )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
shows html help page
(module (function_definition (function_name_save_hash) function_name_save_hash (parameters (identifier_self) identifier_self (identifier_location) identifier_location (identifier_basedir) identifier_basedir (default_parameter (identifier_ext) identifier_ext (None) None )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_location) identifier_location (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute )argument_list )call (block (expression_statement (assignment (identifier_location) identifier_location (call (attribute (identifier_location) identifier_location (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_rel_path) identifier_rel_path (call (identifier_hashed_path) identifier_hashed_path (argument_list (identifier_location) identifier_location (keyword_argument (identifier_ext) identifier_ext (identifier_ext) identifier_ext )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_basedir) identifier_basedir (identifier_rel_path) identifier_rel_path )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_path) identifier_path )argument_list )call )not_operator (block (expression_statement (assignment (pattern_list (identifier_path_dir) identifier_path_dir (identifier__) identifier__ )pattern_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_path_dir) identifier_path_dir )argument_list )call )expression_statement )block (except_clause (identifier_OSError) identifier_OSError (block (pass_statement )pass_statement )block )except_clause )try_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_path) identifier_path (string_'wb') string_'wb' )argument_list )call (as_pattern_target (identifier_out) identifier_out )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_out) identifier_out (identifier_write) identifier_write )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__bytes_body) identifier__bytes_body )attribute )argument_list )call )expression_statement )block )with_statement )block )if_statement (return_statement (identifier_rel_path) identifier_rel_path )return_statement )block )function_definition )module
Save response body into file with special path builded from hash. That allows to lower number of files per directory. :param location: URL of file or something else. It is used to build the SHA1 hash. :param basedir: base directory to save the file. Note that file will not be saved directly to this directory but to some sub-directory of `basedir` :param ext: extension which should be appended to file name. The dot is inserted automatically between filename and extension. :returns: path to saved file relative to `basedir` Example:: >>> url = 'http://yandex.ru/logo.png' >>> g.go(url) >>> g.response.save_hash(url, 'some_dir', ext='png') 'e8/dc/f2918108788296df1facadc975d32b361a6a.png' # the file was saved to $PWD/some_dir/e8/dc/... TODO: replace `basedir` with two options: root and save_to. And returns save_to + path
(module (function_definition (function_name_bar) function_name_bar (parameters (identifier_self) identifier_self (default_parameter (identifier_x) identifier_x (None) None )default_parameter (default_parameter (identifier_y) identifier_y (None) None )default_parameter (dictionary_splat_pattern (identifier_kwds) identifier_kwds )dictionary_splat_pattern )parameters (block (return_statement (call (identifier_self) identifier_self (argument_list (keyword_argument (identifier_kind) identifier_kind (string_'bar') string_'bar' )keyword_argument (keyword_argument (identifier_x) identifier_x (identifier_x) identifier_x )keyword_argument (keyword_argument (identifier_y) identifier_y (identifier_y) identifier_y )keyword_argument (dictionary_splat (identifier_kwds) identifier_kwds )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Vertical bar plot. A bar plot is a plot that presents categorical data with rectangular bars with lengths proportional to the values that they represent. A bar plot shows comparisons among discrete categories. One axis of the plot shows the specific categories being compared, and the other axis represents a measured value. Parameters ---------- x : label or position, optional Allows plotting of one column versus another. If not specified, the index of the DataFrame is used. y : label or position, optional Allows plotting of one column versus another. If not specified, all numerical columns are used. **kwds Additional keyword arguments are documented in :meth:`DataFrame.plot`. Returns ------- matplotlib.axes.Axes or np.ndarray of them An ndarray is returned with one :class:`matplotlib.axes.Axes` per column when ``subplots=True``. See Also -------- DataFrame.plot.barh : Horizontal bar plot. DataFrame.plot : Make plots of a DataFrame. matplotlib.pyplot.bar : Make a bar plot with matplotlib. Examples -------- Basic plot. .. plot:: :context: close-figs >>> df = pd.DataFrame({'lab':['A', 'B', 'C'], 'val':[10, 30, 20]}) >>> ax = df.plot.bar(x='lab', y='val', rot=0) Plot a whole dataframe to a bar plot. Each column is assigned a distinct color, and each row is nested in a group along the horizontal axis. .. plot:: :context: close-figs >>> speed = [0.1, 17.5, 40, 48, 52, 69, 88] >>> lifespan = [2, 8, 70, 1.5, 25, 12, 28] >>> index = ['snail', 'pig', 'elephant', ... 'rabbit', 'giraffe', 'coyote', 'horse'] >>> df = pd.DataFrame({'speed': speed, ... 'lifespan': lifespan}, index=index) >>> ax = df.plot.bar(rot=0) Instead of nesting, the figure can be split by column with ``subplots=True``. In this case, a :class:`numpy.ndarray` of :class:`matplotlib.axes.Axes` are returned. .. plot:: :context: close-figs >>> axes = df.plot.bar(rot=0, subplots=True) >>> axes[1].legend(loc=2) # doctest: +SKIP Plot a single column. .. plot:: :context: close-figs >>> ax = df.plot.bar(y='speed', rot=0) Plot only selected categories for the DataFrame. .. plot:: :context: close-figs >>> ax = df.plot.bar(x='lifespan', rot=0)
(module (function_definition (function_name_wait_for_task_property) function_name_wait_for_task_property (parameters (identifier_service) identifier_service (identifier_task) identifier_task (identifier_prop) identifier_prop (default_parameter (identifier_timeout_sec) identifier_timeout_sec (integer_120) integer_120 )default_parameter )parameters (block (return_statement (call (identifier_time_wait) identifier_time_wait (argument_list (lambda (call (identifier_task_property_present_predicate) identifier_task_property_present_predicate (argument_list (identifier_service) identifier_service (identifier_task) identifier_task (identifier_prop) identifier_prop )argument_list )call )lambda (keyword_argument (identifier_timeout_seconds) identifier_timeout_seconds (identifier_timeout_sec) identifier_timeout_sec )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Waits for a task to have the specified property
(module (function_definition (function_name_check_ns_run_logls) function_name_check_ns_run_logls (parameters (identifier_run) identifier_run (default_parameter (identifier_dup_assert) identifier_dup_assert (False) False )default_parameter (default_parameter (identifier_dup_warn) identifier_dup_warn (False) False )default_parameter )parameters (block (assert_statement (call (attribute (identifier_np) identifier_np (identifier_array_equal) identifier_array_equal )attribute (argument_list (subscript (identifier_run) identifier_run (string_'logl') string_'logl' )subscript (subscript (subscript (identifier_run) identifier_run (string_'logl') string_'logl' )subscript (call (attribute (identifier_np) identifier_np (identifier_argsort) identifier_argsort )attribute (argument_list (subscript (identifier_run) identifier_run (string_'logl') string_'logl' )subscript )argument_list )call )subscript )argument_list )call )assert_statement (if_statement (boolean_operator (identifier_dup_assert) identifier_dup_assert (identifier_dup_warn) identifier_dup_warn )boolean_operator (block (expression_statement (assignment (pattern_list (identifier_unique_logls) identifier_unique_logls (identifier_counts) identifier_counts )pattern_list (call (attribute (identifier_np) identifier_np (identifier_unique) identifier_unique )attribute (argument_list (subscript (identifier_run) identifier_run (string_'logl') string_'logl' )subscript (keyword_argument (identifier_return_counts) identifier_return_counts (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_repeat_logls) identifier_repeat_logls (binary_operator (subscript (attribute (subscript (identifier_run) identifier_run (string_'logl') string_'logl' )subscript (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (subscript (attribute (identifier_unique_logls) identifier_unique_logls (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (parenthesized_expression (concatenated_string (string_'{} duplicate logl values (out of a total of {}). This may be ') string_'{} duplicate logl values (out of a total of {}). This may be ' (string_'caused by limited numerical precision in the output files.') string_'caused by limited numerical precision in the output files.' (string_'\nrepeated logls = {}\ncounts = {}\npositions in list of {}') string_'\nrepeated logls = {}\ncounts = {}\npositions in list of {}' (string_' unique logls = {}') string_' unique logls = {}' )concatenated_string )parenthesized_expression (identifier_format) identifier_format )attribute (argument_list (identifier_repeat_logls) identifier_repeat_logls (subscript (attribute (subscript (identifier_run) identifier_run (string_'logl') string_'logl' )subscript (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (subscript (identifier_unique_logls) identifier_unique_logls (comparison_operator (identifier_counts) identifier_counts (integer_1) integer_1 )comparison_operator )subscript (subscript (identifier_counts) identifier_counts (comparison_operator (identifier_counts) identifier_counts (integer_1) integer_1 )comparison_operator )subscript (subscript (attribute (identifier_unique_logls) identifier_unique_logls (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (subscript (call (attribute (identifier_np) identifier_np (identifier_where) identifier_where )attribute (argument_list (comparison_operator (identifier_counts) identifier_counts (integer_1) integer_1 )comparison_operator )argument_list )call (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (if_statement (identifier_dup_assert) identifier_dup_assert (block (assert_statement (comparison_operator (identifier_repeat_logls) identifier_repeat_logls (integer_0) integer_0 )comparison_operator (identifier_msg) identifier_msg )assert_statement )block (elif_clause (identifier_dup_warn) identifier_dup_warn (block (if_statement (comparison_operator (identifier_repeat_logls) identifier_repeat_logls (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (identifier_msg) identifier_msg (identifier_UserWarning) identifier_UserWarning )argument_list )call )expression_statement )block )if_statement )block )elif_clause )if_statement )block )if_statement )block )function_definition )module
Check run logls are unique and in the correct order. Parameters ---------- run: dict nested sampling run to check. dup_assert: bool, optional Whether to raise and AssertionError if there are duplicate logl values. dup_warn: bool, optional Whether to give a UserWarning if there are duplicate logl values (only used if dup_assert is False). Raises ------ AssertionError if run does not have expected properties.
(module (function_definition (function_name_new_transaction) function_name_new_transaction (parameters (identifier_self) identifier_self (identifier_timeout) identifier_timeout (identifier_durability) identifier_durability (identifier_transaction_type) identifier_transaction_type )parameters (block (expression_statement (assignment (identifier_connection) identifier_connection (call (attribute (identifier_self) identifier_self (identifier__connect) identifier__connect )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (identifier_Transaction) identifier_Transaction (argument_list (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_connection) identifier_connection (identifier_timeout) identifier_timeout (identifier_durability) identifier_durability (identifier_transaction_type) identifier_transaction_type )argument_list )call )return_statement )block )function_definition )module
Creates a Transaction object with given timeout, durability and transaction type. :param timeout: (long), the timeout in seconds determines the maximum lifespan of a transaction. :param durability: (int), the durability is the number of machines that can take over if a member fails during a transaction commit or rollback :param transaction_type: (Transaction Type), the transaction type which can be :const:`~hazelcast.transaction.TWO_PHASE` or :const:`~hazelcast.transaction.ONE_PHASE` :return: (:class:`~hazelcast.transaction.Transaction`), new created Transaction.
(module (function_definition (function_name__extract_auth_config) function_name__extract_auth_config (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_service) identifier_service (attribute (identifier_self) identifier_self (identifier__service) identifier__service )attribute )assignment )expression_statement (if_statement (not_operator (attribute (identifier_service) identifier_service (identifier_authentication) identifier_authentication )attribute )not_operator (block (return_statement (dictionary )dictionary )return_statement )block )if_statement (expression_statement (assignment (identifier_auth_infos) identifier_auth_infos (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_auth_rule) identifier_auth_rule (attribute (attribute (identifier_service) identifier_service (identifier_authentication) identifier_authentication )attribute (identifier_rules) identifier_rules )attribute (block (expression_statement (assignment (identifier_selector) identifier_selector (attribute (identifier_auth_rule) identifier_auth_rule (identifier_selector) identifier_selector )attribute )assignment )expression_statement (expression_statement (assignment (identifier_provider_ids_to_audiences) identifier_provider_ids_to_audiences (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_requirement) identifier_requirement (attribute (identifier_auth_rule) identifier_auth_rule (identifier_requirements) identifier_requirements )attribute (block (expression_statement (assignment (identifier_provider_id) identifier_provider_id (attribute (identifier_requirement) identifier_requirement (identifier_providerId) identifier_providerId )attribute )assignment )expression_statement (if_statement (boolean_operator (identifier_provider_id) identifier_provider_id (attribute (identifier_requirement) identifier_requirement (identifier_audiences) identifier_audiences )attribute )boolean_operator (block (expression_statement (assignment (identifier_audiences) identifier_audiences (call (attribute (attribute (identifier_requirement) identifier_requirement (identifier_audiences) identifier_audiences )attribute (identifier_split) identifier_split )attribute (argument_list (string_u",") string_u"," )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_provider_ids_to_audiences) identifier_provider_ids_to_audiences (identifier_provider_id) identifier_provider_id )subscript (identifier_audiences) identifier_audiences )assignment )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (subscript (identifier_auth_infos) identifier_auth_infos (identifier_selector) identifier_selector )subscript (call (identifier_AuthInfo) identifier_AuthInfo (argument_list (identifier_provider_ids_to_audiences) identifier_provider_ids_to_audiences )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_auth_infos) identifier_auth_infos )return_statement )block )function_definition )module
Obtains the authentication configurations.
(module (function_definition (function_name_unsubscribe) function_name_unsubscribe (parameters (identifier_self) identifier_self (identifier_ssid) identifier_ssid (default_parameter (identifier_max_msgs) identifier_max_msgs (integer_0) integer_0 )default_parameter )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_is_closed) identifier_is_closed )attribute (block (raise_statement (identifier_ErrConnectionClosed) identifier_ErrConnectionClosed )raise_statement )block )if_statement (expression_statement (assignment (identifier_sub) identifier_sub (None) None )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_sub) identifier_sub (subscript (attribute (identifier_self) identifier_self (identifier__subs) identifier__subs )attribute (identifier_ssid) identifier_ssid )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (return_statement )return_statement )block )except_clause )try_statement (if_statement (boolean_operator (comparison_operator (identifier_max_msgs) identifier_max_msgs (integer_0) integer_0 )comparison_operator (comparison_operator (attribute (identifier_sub) identifier_sub (identifier_received) identifier_received )attribute (identifier_max_msgs) identifier_max_msgs )comparison_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__subs) identifier__subs )attribute (identifier_pop) identifier_pop )attribute (argument_list (identifier_ssid) identifier_ssid (None) None )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__remove_subscription) identifier__remove_subscription )attribute (argument_list (identifier_sub) identifier_sub )argument_list )call )expression_statement )block )if_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_is_reconnecting) identifier_is_reconnecting )attribute )not_operator (block (expression_statement (yield (call (attribute (identifier_self) identifier_self (identifier_auto_unsubscribe) identifier_auto_unsubscribe )attribute (argument_list (identifier_ssid) identifier_ssid (identifier_max_msgs) identifier_max_msgs )argument_list )call )yield )expression_statement )block )if_statement )block )function_definition )module
Takes a subscription sequence id and removes the subscription from the client, optionally after receiving more than max_msgs, and unsubscribes immediatedly.
(module (function_definition (function_name_set_module_version) function_name_set_module_version (parameters (identifier_self) identifier_self (identifier_major) identifier_major (identifier_minor) identifier_minor (identifier_patch) identifier_patch )parameters (block (if_statement (not_operator (parenthesized_expression (boolean_operator (boolean_operator (call (attribute (identifier_self) identifier_self (identifier__is_byte) identifier__is_byte )attribute (argument_list (identifier_major) identifier_major )argument_list )call (call (attribute (identifier_self) identifier_self (identifier__is_byte) identifier__is_byte )attribute (argument_list (identifier_minor) identifier_minor )argument_list )call )boolean_operator (call (attribute (identifier_self) identifier_self (identifier__is_byte) identifier__is_byte )attribute (argument_list (identifier_patch) identifier_patch )argument_list )call )boolean_operator )parenthesized_expression )not_operator (block (raise_statement (call (identifier_ArgumentError) identifier_ArgumentError (argument_list (string_"Invalid module version number with component that does not fit in 1 byte") string_"Invalid module version number with component that does not fit in 1 byte" (keyword_argument (identifier_major) identifier_major (identifier_major) identifier_major )keyword_argument (keyword_argument (identifier_minor) identifier_minor (identifier_minor) identifier_minor )keyword_argument (keyword_argument (identifier_patch) identifier_patch (identifier_patch) identifier_patch )keyword_argument )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_module_version) identifier_module_version )attribute (tuple (identifier_major) identifier_major (identifier_minor) identifier_minor (identifier_patch) identifier_patch )tuple )assignment )expression_statement )block )function_definition )module
Set the module version for this module. Each module must declare a semantic version number in the form: major.minor.patch where each component is a 1 byte number between 0 and 255.
(module (function_definition (function_name_throttle) function_name_throttle (parameters (identifier_coro) identifier_coro (default_parameter (identifier_limit) identifier_limit (integer_1) integer_1 )default_parameter (default_parameter (identifier_timeframe) identifier_timeframe (integer_1) integer_1 )default_parameter (default_parameter (identifier_return_value) identifier_return_value (None) None )default_parameter (default_parameter (identifier_raise_exception) identifier_raise_exception (False) False )default_parameter )parameters (block (expression_statement (call (identifier_assert_corofunction) identifier_assert_corofunction (argument_list (keyword_argument (identifier_coro) identifier_coro (identifier_coro) identifier_coro )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_limit) identifier_limit (call (identifier_max) identifier_max (argument_list (call (identifier_int) identifier_int (argument_list (identifier_limit) identifier_limit )argument_list )call (integer_1) integer_1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_remaning) identifier_remaning (identifier_limit) identifier_limit )assignment )expression_statement (expression_statement (assignment (identifier_timeframe) identifier_timeframe (binary_operator (identifier_timeframe) identifier_timeframe (integer_1000) integer_1000 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_last_call) identifier_last_call (call (identifier_now) identifier_now (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (None) None )assignment )expression_statement (function_definition (function_name_stop) function_name_stop (parameters )parameters (block (if_statement (identifier_raise_exception) identifier_raise_exception (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_'paco: coroutine throttle limit exceeded') string_'paco: coroutine throttle limit exceeded' )argument_list )call )raise_statement )block )if_statement (if_statement (identifier_return_value) identifier_return_value (block (return_statement (identifier_return_value) identifier_return_value )return_statement )block )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition (function_definition (function_name_elapsed) function_name_elapsed (parameters )parameters (block (return_statement (binary_operator (call (identifier_now) identifier_now (argument_list )argument_list )call (identifier_last_call) identifier_last_call )binary_operator )return_statement )block )function_definition (decorated_definition (decorator (attribute (identifier_asyncio) identifier_asyncio (identifier_coroutine) identifier_coroutine )attribute )decorator (function_definition (function_name_wrapper) function_name_wrapper (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (nonlocal_statement (identifier_result) identifier_result )nonlocal_statement (nonlocal_statement (identifier_remaning) identifier_remaning )nonlocal_statement (nonlocal_statement (identifier_last_call) identifier_last_call )nonlocal_statement (if_statement (comparison_operator (call (identifier_elapsed) identifier_elapsed (argument_list )argument_list )call (identifier_timeframe) identifier_timeframe )comparison_operator (block (expression_statement (assignment (identifier_remaning) identifier_remaning (identifier_limit) identifier_limit )assignment )expression_statement (expression_statement (assignment (identifier_last_call) identifier_last_call (call (identifier_now) identifier_now (argument_list )argument_list )call )assignment )expression_statement )block (elif_clause (boolean_operator (comparison_operator (call (identifier_elapsed) identifier_elapsed (argument_list )argument_list )call (identifier_timeframe) identifier_timeframe )comparison_operator (comparison_operator (identifier_remaning) identifier_remaning (integer_0) integer_0 )comparison_operator )boolean_operator (block (return_statement (call (identifier_stop) identifier_stop (argument_list )argument_list )call )return_statement )block )elif_clause )if_statement (expression_statement (augmented_assignment (identifier_remaning) identifier_remaning (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (yield (call (identifier_coro) identifier_coro (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kw) identifier_kw )dictionary_splat )argument_list )call )yield )assignment )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
Creates a throttled coroutine function that only invokes ``coro`` at most once per every time frame of seconds or milliseconds. Provide options to indicate whether func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls to the throttled coroutine return the result of the last coroutine invocation. This function can be used as decorator. Arguments: coro (coroutinefunction): coroutine function to wrap with throttle strategy. limit (int): number of coroutine allowed execution in the given time frame. timeframe (int|float): throttle limit time frame in seconds. return_value (mixed): optional return if the throttle limit is reached. Returns the latest returned value by default. raise_exception (bool): raise exception if throttle limit is reached. Raises: RuntimeError: if cannot throttle limit reached (optional). Returns: coroutinefunction Usage:: async def mul_2(num): return num * 2 # Use as simple wrapper throttled = paco.throttle(mul_2, limit=1, timeframe=2) await throttled(2) # => 4 await throttled(3) # ignored! # => 4 await asyncio.sleep(2) await throttled(3) # executed! # => 6 # Use as decorator @paco.throttle(limit=1, timeframe=2) async def mul_2(num): return num * 2 await mul_2(2) # => 4 await mul_2(3) # ignored! # => 4 await asyncio.sleep(2) await mul_2(3) # executed! # => 6
(module (function_definition (function_name__add_index) function_name__add_index (parameters (identifier_self) identifier_self (identifier_index) identifier_index )parameters (block (expression_statement (assignment (identifier_index_name) identifier_index_name (call (attribute (identifier_index) identifier_index (identifier_get_name) identifier_get_name )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_index_name) identifier_index_name (call (attribute (identifier_self) identifier_self (identifier__normalize_identifier) identifier__normalize_identifier )attribute (argument_list (identifier_index_name) identifier_index_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_replaced_implicit_indexes) identifier_replaced_implicit_indexes (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_name) identifier_name (identifier_implicit_index) identifier_implicit_index )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier__implicit_indexes) identifier__implicit_indexes )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (boolean_operator (call (attribute (identifier_implicit_index) identifier_implicit_index (identifier_is_fullfilled_by) identifier_is_fullfilled_by )attribute (argument_list (identifier_index) identifier_index )argument_list )call (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier__indexes) identifier__indexes )attribute )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_replaced_implicit_indexes) identifier_replaced_implicit_indexes (identifier_append) identifier_append )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_already_exists) identifier_already_exists (parenthesized_expression (boolean_operator (boolean_operator (comparison_operator (identifier_index_name) identifier_index_name (attribute (identifier_self) identifier_self (identifier__indexes) identifier__indexes )attribute )comparison_operator (comparison_operator (identifier_index_name) identifier_index_name (identifier_replaced_implicit_indexes) identifier_replaced_implicit_indexes )comparison_operator )boolean_operator (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier__primary_key_name) identifier__primary_key_name )attribute (False) False )comparison_operator (call (attribute (identifier_index) identifier_index (identifier_is_primary) identifier_is_primary )attribute (argument_list )argument_list )call )boolean_operator )boolean_operator )parenthesized_expression )assignment )expression_statement (if_statement (identifier_already_exists) identifier_already_exists (block (raise_statement (call (identifier_IndexAlreadyExists) identifier_IndexAlreadyExists (argument_list (identifier_index_name) identifier_index_name (attribute (identifier_self) identifier_self (identifier__name) identifier__name )attribute )argument_list )call )raise_statement )block )if_statement (for_statement (identifier_name) identifier_name (identifier_replaced_implicit_indexes) identifier_replaced_implicit_indexes (block (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier__indexes) identifier__indexes )attribute (identifier_name) identifier_name )subscript )delete_statement (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier__implicit_indexes) identifier__implicit_indexes )attribute (identifier_name) identifier_name )subscript )delete_statement )block )for_statement (if_statement (call (attribute (identifier_index) identifier_index (identifier_is_primary) identifier_is_primary )attribute (argument_list )argument_list )call (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__primary_key_name) identifier__primary_key_name )attribute (identifier_index_name) identifier_index_name )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__indexes) identifier__indexes )attribute (identifier_index_name) identifier_index_name )subscript (identifier_index) identifier_index )assignment )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Adds an index to the table. :param index: The index to add :type index: Index :rtype: Table
(module (function_definition (function_name_sphinx) function_name_sphinx (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (assert_statement (identifier___IPYTHON__) identifier___IPYTHON__ )assert_statement (expression_statement (assignment (identifier_classdoc) identifier_classdoc (string_'') string_'' )assignment )expression_statement )block (except_clause (tuple (identifier_NameError) identifier_NameError (identifier_AssertionError) identifier_AssertionError )tuple (block (expression_statement (assignment (identifier_scls) identifier_scls (call (attribute (identifier_self) identifier_self (identifier_sphinx_class) identifier_sphinx_class )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_classdoc) identifier_classdoc (conditional_expression (call (attribute (string_' ({})') string_' ({})' (identifier_format) identifier_format )attribute (argument_list (identifier_scls) identifier_scls )argument_list )call (identifier_scls) identifier_scls (string_'') string_'' )conditional_expression )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_prop_doc) identifier_prop_doc (call (attribute (string_'**{name}**{cls}: {doc}{info}') string_'**{name}**{cls}: {doc}{info}' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )keyword_argument (keyword_argument (identifier_cls) identifier_cls (identifier_classdoc) identifier_classdoc )keyword_argument (keyword_argument (identifier_doc) identifier_doc (attribute (identifier_self) identifier_self (identifier_doc) identifier_doc )attribute )keyword_argument (keyword_argument (identifier_info) identifier_info (conditional_expression (call (attribute (string_', {}') string_', {}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute )argument_list )call (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (string_'') string_'' )conditional_expression )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_prop_doc) identifier_prop_doc )return_statement )block )function_definition )module
Generate Sphinx-formatted documentation for the Property
(module (function_definition (function_name_os_requires_version) function_name_os_requires_version (parameters (identifier_ostack_release) identifier_ostack_release (identifier_pkg) identifier_pkg )parameters (block (function_definition (function_name_wrap) function_name_wrap (parameters (identifier_f) identifier_f )parameters (block (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_f) identifier_f )argument_list )call )decorator (function_definition (function_name_wrapped_f) function_name_wrapped_f (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (if_statement (comparison_operator (call (identifier_os_release) identifier_os_release (argument_list (identifier_pkg) identifier_pkg )argument_list )call (identifier_ostack_release) identifier_ostack_release )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (binary_operator (concatenated_string (string_"This hook is not supported on releases") string_"This hook is not supported on releases" (string_" before %s") string_" before %s" )concatenated_string (identifier_ostack_release) identifier_ostack_release )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (call (identifier_f) identifier_f (argument_list (list_splat (identifier_args) identifier_args )list_splat )argument_list )call )expression_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapped_f) identifier_wrapped_f )return_statement )block )function_definition (return_statement (identifier_wrap) identifier_wrap )return_statement )block )function_definition )module
Decorator for hook to specify minimum supported release
(module (function_definition (function_name_is_ready) function_name_is_ready (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_ready) identifier_ready (comparison_operator (call (identifier_len) identifier_len (argument_list (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (list )list )argument_list )call )argument_list )call (integer_0) integer_0 )comparison_operator )assignment )expression_statement (if_statement (not_operator (identifier_ready) identifier_ready )not_operator (block (expression_statement (call (attribute (identifier_hookenv) identifier_hookenv (identifier_log) identifier_log )attribute (argument_list (call (attribute (string_'Incomplete relation: {}') string_'Incomplete relation: {}' (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )argument_list )call (attribute (identifier_hookenv) identifier_hookenv (identifier_DEBUG) identifier_DEBUG )attribute )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_ready) identifier_ready )return_statement )block )function_definition )module
Returns True if all of the `required_keys` are available from any units.
(module (function_definition (function_name_current_version) function_name_current_version (parameters )parameters (block (expression_statement (assignment (identifier_filepath) identifier_filepath (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (binary_operator (binary_operator (identifier_project_root) identifier_project_root (string_"directory_components") string_"directory_components" )binary_operator (string_"version.py") string_"version.py" )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_version_py) identifier_version_py (call (identifier_get_file_string) identifier_get_file_string (argument_list (identifier_filepath) identifier_filepath )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_regex) identifier_regex (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (attribute (identifier_Utils) identifier_Utils (identifier_get_version) identifier_get_version )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_regex) identifier_regex (identifier_search) identifier_search )attribute (argument_list (identifier_version_py) identifier_version_py )argument_list )call (None) None )comparison_operator (block (expression_statement (assignment (identifier_current_version) identifier_current_version (call (attribute (call (attribute (identifier_regex) identifier_regex (identifier_search) identifier_search )attribute (argument_list (identifier_version_py) identifier_version_py )argument_list )call (identifier_group) identifier_group )attribute (argument_list (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (identifier_color) identifier_color (argument_list (call (attribute (string_"Current directory-components version: {}") string_"Current directory-components version: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_current_version) identifier_current_version )argument_list )call (keyword_argument (identifier_fg) identifier_fg (string_'blue') string_'blue' )keyword_argument (keyword_argument (identifier_style) identifier_style (string_'bold') string_'bold' )keyword_argument )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_get_update_info) identifier_get_update_info (argument_list )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (identifier_color) identifier_color (argument_list (string_'Error finding directory-components version.') string_'Error finding directory-components version.' (keyword_argument (identifier_fg) identifier_fg (string_'red') string_'red' )keyword_argument (keyword_argument (identifier_style) identifier_style (string_'bold') string_'bold' )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Get current version of directory-components.
(module (function_definition (function_name_get_agent_sock_path) function_name_get_agent_sock_path (parameters (default_parameter (identifier_env) identifier_env (None) None )default_parameter (default_parameter (identifier_sp) identifier_sp (identifier_subprocess) identifier_subprocess )default_parameter )parameters (block (expression_statement (assignment (identifier_args) identifier_args (list (call (attribute (identifier_util) identifier_util (identifier_which) identifier_which )attribute (argument_list (string_'gpgconf') string_'gpgconf' )argument_list )call (string_'--list-dirs') string_'--list-dirs' )list )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (call (identifier_check_output) identifier_check_output (argument_list (keyword_argument (identifier_args) identifier_args (identifier_args) identifier_args )keyword_argument (keyword_argument (identifier_env) identifier_env (identifier_env) identifier_env )keyword_argument (keyword_argument (identifier_sp) identifier_sp (identifier_sp) identifier_sp )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_lines) identifier_lines (call (attribute (call (attribute (identifier_output) identifier_output (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_b'\n') string_b'\n' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dirs) identifier_dirs (call (identifier_dict) identifier_dict (generator_expression (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list (string_b':') string_b':' (integer_1) integer_1 )argument_list )call (for_in_clause (identifier_line) identifier_line (identifier_lines) identifier_lines )for_in_clause )generator_expression )call )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'%s: %s') string_'%s: %s' (identifier_args) identifier_args (identifier_dirs) identifier_dirs )argument_list )call )expression_statement (return_statement (subscript (identifier_dirs) identifier_dirs (string_b'agent-socket') string_b'agent-socket' )subscript )return_statement )block )function_definition )module
Parse gpgconf output to find out GPG agent UNIX socket path.
(module (function_definition (function_name_read) function_name_read (parameters (identifier_filename) identifier_filename (default_parameter (identifier_loader) identifier_loader (None) None )default_parameter (default_parameter (identifier_implicit_tuple) identifier_implicit_tuple (True) True )default_parameter (default_parameter (identifier_allow_errors) identifier_allow_errors (False) False )default_parameter )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (call (identifier_reads) identifier_reads (argument_list (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call (keyword_argument (identifier_filename) identifier_filename (identifier_filename) identifier_filename )keyword_argument (keyword_argument (identifier_loader) identifier_loader (identifier_loader) identifier_loader )keyword_argument (keyword_argument (identifier_implicit_tuple) identifier_implicit_tuple (identifier_implicit_tuple) identifier_implicit_tuple )keyword_argument (keyword_argument (identifier_allow_errors) identifier_allow_errors (identifier_allow_errors) identifier_allow_errors )keyword_argument )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Load but don't evaluate a GCL expression from a file.
(module (function_definition (function_name_cmd) function_name_cmd (parameters (identifier_send) identifier_send (identifier_msg) identifier_msg (identifier__) identifier__ )parameters (block (expression_statement (assignment (identifier_coin) identifier_coin (list (string_'heads') string_'heads' (string_'tails') string_'tails' )list )assignment )expression_statement (if_statement (not_operator (identifier_msg) identifier_msg )not_operator (block (expression_statement (call (identifier_send) identifier_send (argument_list (binary_operator (string_'The coin lands on... %s') string_'The coin lands on... %s' (call (identifier_choice) identifier_choice (argument_list (identifier_coin) identifier_coin )argument_list )call )binary_operator )argument_list )call )expression_statement )block (elif_clause (not_operator (call (attribute (call (attribute (identifier_msg) identifier_msg (identifier_lstrip) identifier_lstrip )attribute (argument_list (string_'-') string_'-' )argument_list )call (identifier_isdigit) identifier_isdigit )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (call (identifier_send) identifier_send (argument_list (string_"Not A Valid Positive Integer.") string_"Not A Valid Positive Integer." )argument_list )call )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_msg) identifier_msg (call (identifier_int) identifier_int (argument_list (identifier_msg) identifier_msg )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_msg) identifier_msg (integer_0) integer_0 )comparison_operator (block (expression_statement (call (identifier_send) identifier_send (argument_list (string_"Negative Flipping requires the (optional) quantum coprocessor.") string_"Negative Flipping requires the (optional) quantum coprocessor." )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_headflips) identifier_headflips (call (identifier_randint) identifier_randint (argument_list (integer_0) integer_0 (identifier_msg) identifier_msg )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tailflips) identifier_tailflips (binary_operator (identifier_msg) identifier_msg (identifier_headflips) identifier_headflips )binary_operator )assignment )expression_statement (expression_statement (call (identifier_send) identifier_send (argument_list (binary_operator (string_'The coins land on heads %g times and on tails %g times.') string_'The coins land on heads %g times and on tails %g times.' (tuple (identifier_headflips) identifier_headflips (identifier_tailflips) identifier_tailflips )tuple )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Flips a coin a number of times. Syntax: {command} [number]
(module (function_definition (function_name__get_client_and_key) function_name__get_client_and_key (parameters (identifier_url) identifier_url (identifier_user) identifier_user (identifier_password) identifier_password (default_parameter (identifier_verbose) identifier_verbose (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_session) identifier_session (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_session) identifier_session (string_'client') string_'client' )subscript (call (attribute (attribute (attribute (identifier_six) identifier_six (identifier_moves) identifier_moves )attribute (identifier_xmlrpc_client) identifier_xmlrpc_client )attribute (identifier_Server) identifier_Server )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_verbose) identifier_verbose (identifier_verbose) identifier_verbose )keyword_argument (keyword_argument (identifier_use_datetime) identifier_use_datetime (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_session) identifier_session (string_'key') string_'key' )subscript (call (attribute (attribute (subscript (identifier_session) identifier_session (string_'client') string_'client' )subscript (identifier_auth) identifier_auth )attribute (identifier_login) identifier_login )attribute (argument_list (identifier_user) identifier_user (identifier_password) identifier_password )argument_list )call )assignment )expression_statement (return_statement (identifier_session) identifier_session )return_statement )block )function_definition )module
Return the client object and session key for the client
(module (function_definition (function_name__default_url) function_name__default_url (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_host) identifier_host (conditional_expression (string_'localhost') string_'localhost' (comparison_operator (attribute (identifier_self) identifier_self (identifier_mode) identifier_mode )attribute (string_'remote') string_'remote' )comparison_operator (attribute (identifier_self) identifier_self (identifier_host) identifier_host )attribute )conditional_expression )assignment )expression_statement (return_statement (call (attribute (string_'ws://{}:{}/dev') string_'ws://{}:{}/dev' (identifier_format) identifier_format )attribute (argument_list (identifier_host) identifier_host (attribute (identifier_self) identifier_self (identifier_port) identifier_port )attribute )argument_list )call )return_statement )block )function_definition )module
Websocket URL to connect to and listen for reload requests
(module (function_definition (function_name_fit) function_name_fit (parameters (identifier_self) identifier_self (identifier_X) identifier_X (default_parameter (identifier_y) identifier_y (None) None )default_parameter )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_metric) identifier_metric )attribute (string_'precomputed') string_'precomputed' )comparison_operator (block (expression_statement (assignment (identifier_X) identifier_X (call (identifier_check_array) identifier_check_array (argument_list (identifier_X) identifier_X (keyword_argument (identifier_accept_sparse) identifier_accept_sparse (string_'csr') string_'csr' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__raw_data) identifier__raw_data )attribute (identifier_X) identifier_X )assignment )expression_statement )block (elif_clause (call (identifier_issparse) identifier_issparse (argument_list (identifier_X) identifier_X )argument_list )call (block (expression_statement (assignment (identifier_X) identifier_X (call (identifier_check_array) identifier_check_array (argument_list (identifier_X) identifier_X (keyword_argument (identifier_accept_sparse) identifier_accept_sparse (string_'csr') string_'csr' )keyword_argument )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (call (identifier_check_precomputed_distance_matrix) identifier_check_precomputed_distance_matrix (argument_list (identifier_X) identifier_X )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_kwargs) identifier_kwargs (call (attribute (identifier_self) identifier_self (identifier_get_params) identifier_get_params )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_'prediction_data') string_'prediction_data' (None) None )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_update) identifier_update )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__metric_kwargs) identifier__metric_kwargs )attribute )argument_list )call )expression_statement (expression_statement (assignment (tuple_pattern (attribute (identifier_self) identifier_self (identifier_labels_) identifier_labels_ )attribute (attribute (identifier_self) identifier_self (identifier_probabilities_) identifier_probabilities_ )attribute (attribute (identifier_self) identifier_self (identifier_cluster_persistence_) identifier_cluster_persistence_ )attribute (attribute (identifier_self) identifier_self (identifier__condensed_tree) identifier__condensed_tree )attribute (attribute (identifier_self) identifier_self (identifier__single_linkage_tree) identifier__single_linkage_tree )attribute (attribute (identifier_self) identifier_self (identifier__min_spanning_tree) identifier__min_spanning_tree )attribute )tuple_pattern (call (identifier_hdbscan) identifier_hdbscan (argument_list (identifier_X) identifier_X (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_prediction_data) identifier_prediction_data )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_generate_prediction_data) identifier_generate_prediction_data )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Perform HDBSCAN clustering from features or distance matrix. Parameters ---------- X : array or sparse (CSR) matrix of shape (n_samples, n_features), or \ array of shape (n_samples, n_samples) A feature array, or array of distances between samples if ``metric='precomputed'``. Returns ------- self : object Returns self