sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_load_config) function_name_load_config (parameters (typed_parameter (identifier_fname) identifier_fname (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_ModelConfig) identifier_ModelConfig )type (block (expression_statement (assignment (identifier_config) identifier_config (call (attribute (identifier_ModelConfig) identifier_ModelConfig (identifier_load) identifier_load )attribute (argument_list (identifier_fname) identifier_fname )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_'ModelConfig loaded from "%s"') string_'ModelConfig loaded from "%s"' (identifier_fname) identifier_fname )argument_list )call )expression_statement (return_statement (call (identifier_cast) identifier_cast (argument_list (identifier_ModelConfig) identifier_ModelConfig (identifier_config) identifier_config )argument_list )call )return_statement )block )function_definition )module
Loads model configuration. :param fname: Path to load model configuration from. :return: Model configuration.
(module (function_definition (function_name_parse_connection_string) function_name_parse_connection_string (parameters (identifier_self) identifier_self (identifier_connection) identifier_connection )parameters (block (if_statement (comparison_operator (identifier_connection) identifier_connection (string_'c2s_tls') string_'c2s_tls' )comparison_operator (block (return_statement (expression_list (identifier_CONNECTION_XMPP) identifier_CONNECTION_XMPP (True) True (False) False )expression_list )return_statement )block (elif_clause (comparison_operator (identifier_connection) identifier_connection (string_'c2s_compressed_tls') string_'c2s_compressed_tls' )comparison_operator (block (return_statement (expression_list (identifier_CONNECTION_XMPP) identifier_CONNECTION_XMPP (True) True (True) True )expression_list )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_connection) identifier_connection (string_'http_bind') string_'http_bind' )comparison_operator (block (return_statement (expression_list (identifier_CONNECTION_HTTP_BINDING) identifier_CONNECTION_HTTP_BINDING (None) None (None) None )expression_list )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_connection) identifier_connection (string_'c2s') string_'c2s' )comparison_operator (block (return_statement (expression_list (identifier_CONNECTION_XMPP) identifier_CONNECTION_XMPP (False) False (False) False )expression_list )return_statement )block )elif_clause )if_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warn) identifier_warn )attribute (argument_list (string_'Could not parse connection string "%s"') string_'Could not parse connection string "%s"' (identifier_connection) identifier_connection )argument_list )call )expression_statement (return_statement (expression_list (identifier_CONNECTION_UNKNOWN) identifier_CONNECTION_UNKNOWN (True) True (True) True )expression_list )return_statement )block )function_definition )module
Parse string as returned by the ``connected_users_info`` or ``user_sessions_info`` API calls. >>> EjabberdBackendBase().parse_connection_string('c2s_tls') (0, True, False) >>> EjabberdBackendBase().parse_connection_string('c2s_compressed_tls') (0, True, True) >>> EjabberdBackendBase().parse_connection_string('http_bind') (2, None, None) :param connection: The connection string as returned by the ejabberd APIs. :type connection: str :return: A tuple representing the conntion type, if it is encrypted and if it uses XMPP stream compression. :rtype: tuple
(module (function_definition (function_name__str) function_name__str (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_val) identifier_val )parameters (block (expression_statement (assignment (identifier_s) identifier_s (string_'') string_'' )assignment )expression_statement (expression_statement (assignment (identifier_v) identifier_v (call (identifier_Value) identifier_Value (argument_list (identifier_val) identifier_val )argument_list )call )assignment )expression_statement (if_statement (identifier_name) identifier_name (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"{} is type {}") string_"{} is type {}" (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name (attribute (identifier_v) identifier_v (identifier_typename) identifier_typename )attribute )argument_list )call )argument_list )call )expression_statement (try_statement (block (expression_statement (assignment (identifier_count) identifier_count (call (identifier_len) identifier_len (argument_list (identifier_val) identifier_val )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (call (attribute (string_"{} ({}) = {}") string_"{} ({}) = {}" (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name (identifier_count) identifier_count (call (attribute (identifier_v) identifier_v (identifier_string_value) identifier_string_value )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (tuple (identifier_TypeError) identifier_TypeError (identifier_KeyError) identifier_KeyError (identifier_AttributeError) identifier_AttributeError )tuple (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (identifier_e) identifier_e (keyword_argument (identifier_exc_info) identifier_exc_info (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_s) identifier_s (call (attribute (string_"{} = {}") string_"{} = {}" (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name (call (attribute (identifier_v) identifier_v (identifier_string_value) identifier_string_value )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )except_clause )try_statement )block (else_clause (block (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_v) identifier_v (identifier_string_value) identifier_string_value )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_s) identifier_s )return_statement )block )function_definition )module
return a string version of name = val that can be printed example -- _str('foo', 'bar') # foo = bar name -- string -- the variable name that was passed into one of the public methods val -- mixed -- the variable at name's value return -- string
(module (function_definition (function_name_get_creation_date_tags) function_name_get_creation_date_tags (parameters (identifier_url) identifier_url (identifier_domain) identifier_domain (default_parameter (identifier_as_dicts) identifier_as_dicts (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_creation_date_tags) identifier_creation_date_tags (list (call (identifier_mementoweb_api_tags) identifier_mementoweb_api_tags (argument_list (identifier_url) identifier_url )argument_list )call (call (identifier_get_whois_tags) identifier_get_whois_tags (argument_list (identifier_domain) identifier_domain )argument_list )call )list )assignment )expression_statement (expression_statement (assignment (identifier_creation_date_tags) identifier_creation_date_tags (call (identifier_sorted) identifier_sorted (argument_list (call (identifier_sum) identifier_sum (argument_list (identifier_creation_date_tags) identifier_creation_date_tags (list )list )argument_list )call (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (attribute (identifier_x) identifier_x (identifier_date) identifier_date )attribute )lambda )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_as_dicts) identifier_as_dicts )not_operator (block (return_statement (identifier_creation_date_tags) identifier_creation_date_tags )return_statement )block )if_statement (return_statement (list_comprehension (call (attribute (identifier_item) identifier_item (identifier__as_dict) identifier__as_dict )attribute (argument_list )argument_list )call (for_in_clause (identifier_item) identifier_item (identifier_creation_date_tags) identifier_creation_date_tags )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Put together all data sources in this module and return it's output. Args: url (str): URL of the web. With relative paths and so on. domain (str): Just the domain of the web. as_dicts (bool, default False): Convert output to dictionaries compatible with :class:`.SourceString`? Returns: list: Sorted list of :class:`TimeResource` objects or dicts.
(module (function_definition (function_name__write_migration) function_name__write_migration (parameters (identifier_self) identifier_self (identifier_creator) identifier_creator (identifier_name) identifier_name (identifier_table) identifier_table (identifier_create) identifier_create (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_file_) identifier_file_ (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (call (attribute (identifier_creator) identifier_creator (identifier_create) identifier_create )attribute (argument_list (identifier_name) identifier_name (identifier_path) identifier_path (identifier_table) identifier_table (identifier_create) identifier_create )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (identifier_file_) identifier_file_ )return_statement )block )function_definition )module
Write the migration file to disk.
(module (function_definition (function_name_is_subfeature_of) function_name_is_subfeature_of (parameters (identifier_parent_property) identifier_parent_property (identifier_f) identifier_f )parameters (block (if_statement (identifier___debug__) identifier___debug__ (block (import_from_statement (relative_import (import_prefix )import_prefix (dotted_name (identifier_property) identifier_property )dotted_name )relative_import (dotted_name (identifier_Property) identifier_Property )dotted_name )import_from_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_parent_property) identifier_parent_property (identifier_Property) identifier_Property )argument_list )call )assert_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_f) identifier_f (identifier_Feature) identifier_Feature )argument_list )call )assert_statement )block )if_statement (if_statement (not_operator (attribute (identifier_f) identifier_f (identifier_subfeature) identifier_subfeature )attribute )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_p) identifier_p (attribute (identifier_f) identifier_f (identifier_parent) identifier_parent )attribute )assignment )expression_statement (if_statement (not_operator (identifier_p) identifier_p )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_parent_feature) identifier_parent_feature (subscript (identifier_p) identifier_p (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_parent_value) identifier_parent_value (subscript (identifier_p) identifier_p (integer_1) integer_1 )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_parent_feature) identifier_parent_feature (attribute (identifier_parent_property) identifier_parent_property (identifier_feature) identifier_feature )attribute )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (boolean_operator (identifier_parent_value) identifier_parent_value (comparison_operator (identifier_parent_value) identifier_parent_value (attribute (identifier_parent_property) identifier_parent_property (identifier_value) identifier_value )attribute )comparison_operator )boolean_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Return true iff f is an ordinary subfeature of the parent_property's feature, or if f is a subfeature of the parent_property's feature specific to the parent_property's value.
(module (function_definition (function_name_prepare_allseries) function_name_prepare_allseries (parameters (identifier_self) identifier_self (typed_default_parameter (identifier_ramflag) identifier_ramflag (type (identifier_bool) identifier_bool )type (True) True )typed_default_parameter )parameters (type (None) None )type (block (for_statement (identifier_element) identifier_element (call (attribute (identifier_printtools) identifier_printtools (identifier_progressbar) identifier_progressbar )attribute (argument_list (identifier_self) identifier_self )argument_list )call (block (expression_statement (call (attribute (identifier_element) identifier_element (identifier_prepare_allseries) identifier_prepare_allseries )attribute (argument_list (identifier_ramflag) identifier_ramflag )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Call method |Element.prepare_allseries| of all handled |Element| objects.
(module (function_definition (function_name_format_image) function_name_format_image (parameters (identifier_path) identifier_path (identifier_options) identifier_options )parameters (block (expression_statement (assignment (identifier_image) identifier_image (call (attribute (identifier_Image) identifier_Image (identifier_open) identifier_open )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_image_pipeline_results) identifier_image_pipeline_results (call (identifier___pipeline_image) identifier___pipeline_image (argument_list (identifier_image) identifier_image (identifier_options) identifier_options )argument_list )call )assignment )expression_statement (return_statement (identifier_image_pipeline_results) identifier_image_pipeline_results )return_statement )block )function_definition )module
Formats an image. Args: path (str): Path to the image file. options (dict): Options to apply to the image. Returns: (list) A list of PIL images. The list will always be of length 1 unless resolutions for resizing are provided in the options.
(module (function_definition (function_name_format_assistants_lines) function_name_format_assistants_lines (parameters (identifier_cls) identifier_cls (identifier_assistants) identifier_assistants )parameters (block (expression_statement (assignment (identifier_lines) identifier_lines (call (attribute (identifier_cls) identifier_cls (identifier__format_files) identifier__format_files )attribute (argument_list (identifier_assistants) identifier_assistants (string_'assistants') string_'assistants' )argument_list )call )assignment )expression_statement (if_statement (identifier_assistants) identifier_assistants (block (expression_statement (call (attribute (identifier_lines) identifier_lines (identifier_append) identifier_append )attribute (argument_list (string_'') string_'' )argument_list )call )expression_statement (expression_statement (assignment (identifier_assistant) identifier_assistant (call (attribute (call (attribute (call (identifier_strip_prefix) identifier_strip_prefix (argument_list (call (attribute (identifier_random) identifier_random (identifier_choice) identifier_choice )attribute (argument_list (identifier_assistants) identifier_assistants )argument_list )call (string_'assistants') string_'assistants' )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_sep) identifier_sep )attribute (string_' ') string_' ' )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_assistants) identifier_assistants )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_strings) identifier_strings (list (string_'After you install this DAP, you can find help about the Assistant') string_'After you install this DAP, you can find help about the Assistant' (string_'by running "da {a} -h" .') string_'by running "da {a} -h" .' )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_strings) identifier_strings (list (string_'After you install this DAP, you can find help, for example about the Assistant') string_'After you install this DAP, you can find help, for example about the Assistant' (string_'"{a}", by running "da {a} -h".') string_'"{a}", by running "da {a} -h".' )list )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_lines) identifier_lines (identifier_extend) identifier_extend )attribute (argument_list (list_comprehension (call (attribute (identifier_l) identifier_l (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_a) identifier_a (identifier_assistant) identifier_assistant )keyword_argument )argument_list )call (for_in_clause (identifier_l) identifier_l (identifier_strings) identifier_strings )for_in_clause )list_comprehension )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_lines) identifier_lines )return_statement )block )function_definition )module
Return formatted assistants from the given list in human readable form.
(module (function_definition (function_name__setup_params) function_name__setup_params (parameters (identifier_self_) identifier_self_ (dictionary_splat_pattern (identifier_params) identifier_params )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_self) identifier_self (attribute (attribute (identifier_self_) identifier_self_ (identifier_param) identifier_param )attribute (identifier_self) identifier_self )attribute )assignment )expression_statement (expression_statement (assignment (identifier_params_to_instantiate) identifier_params_to_instantiate (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_class_) identifier_class_ (call (identifier_classlist) identifier_classlist (argument_list (call (identifier_type) identifier_type (argument_list (identifier_self) identifier_self )argument_list )call )argument_list )call (block (if_statement (not_operator (call (identifier_issubclass) identifier_issubclass (argument_list (identifier_class_) identifier_class_ (identifier_Parameterized) identifier_Parameterized )argument_list )call )not_operator (block (continue_statement )continue_statement )block )if_statement (for_statement (tuple_pattern (identifier_k) identifier_k (identifier_v) identifier_v )tuple_pattern (call (attribute (attribute (identifier_class_) identifier_class_ (identifier___dict__) identifier___dict__ )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (boolean_operator (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_v) identifier_v (identifier_Parameter) identifier_Parameter )argument_list )call (attribute (identifier_v) identifier_v (identifier_instantiate) identifier_instantiate )attribute )boolean_operator (comparison_operator (identifier_k) identifier_k (string_"name") string_"name" )comparison_operator )boolean_operator (block (expression_statement (assignment (subscript (identifier_params_to_instantiate) identifier_params_to_instantiate (identifier_k) identifier_k )subscript (identifier_v) identifier_v )assignment )expression_statement )block )if_statement )block )for_statement )block )for_statement (for_statement (identifier_p) identifier_p (call (attribute (identifier_params_to_instantiate) identifier_params_to_instantiate (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_param) identifier_param )attribute (identifier__instantiate_param) identifier__instantiate_param )attribute (argument_list (identifier_p) identifier_p )argument_list )call )expression_statement )block )for_statement (for_statement (pattern_list (identifier_name) identifier_name (identifier_val) identifier_val )pattern_list (call (attribute (identifier_params) identifier_params (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_desc) identifier_desc (subscript (call (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier_get_param_descriptor) identifier_get_param_descriptor )attribute (argument_list (identifier_name) identifier_name )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (if_statement (not_operator (identifier_desc) identifier_desc )not_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_param) identifier_param )attribute (identifier_warning) identifier_warning )attribute (argument_list (string_"Setting non-parameter attribute %s=%s using a mechanism intended only for parameters") string_"Setting non-parameter attribute %s=%s using a mechanism intended only for parameters" (identifier_name) identifier_name (identifier_val) identifier_val )argument_list )call )expression_statement )block )if_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_name) identifier_name (identifier_val) identifier_val )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Initialize default and keyword parameter values. First, ensures that all Parameters with 'instantiate=True' (typically used for mutable Parameters) are copied directly into each object, to ensure that there is an independent copy (to avoid suprising aliasing errors). Then sets each of the keyword arguments, warning when any of them are not defined as parameters. Constant Parameters can be set during calls to this method.
(module (function_definition (function_name_parse_json) function_name_parse_json (parameters (identifier_self) identifier_self (identifier_page) identifier_page )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_page) identifier_page (identifier_basestring) identifier_basestring )argument_list )call )not_operator (block (expression_statement (assignment (identifier_page) identifier_page (call (attribute (identifier_util) identifier_util (identifier_decode_page) identifier_decode_page )attribute (argument_list (identifier_page) identifier_page )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_doc) identifier_doc )attribute (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_page) identifier_page )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_results) identifier_results (call (attribute (attribute (identifier_self) identifier_self (identifier_doc) identifier_doc )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_result_name) identifier_result_name )attribute (list )list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_results) identifier_results )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_check_status) identifier_check_status )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_doc) identifier_doc )attribute (identifier_get) identifier_get )attribute (argument_list (string_'status') string_'status' )argument_list )call )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )if_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
Returns json feed.
(module (function_definition (function_name_identify_datafiles) function_name_identify_datafiles (parameters (identifier_root) identifier_root (default_parameter (identifier_extensions_to_ignore) identifier_extensions_to_ignore (None) None )default_parameter (default_parameter (identifier_directories_to_ignore) identifier_directories_to_ignore (None) None )default_parameter (default_parameter (identifier_files_to_ignore) identifier_files_to_ignore (None) None )default_parameter )parameters (block (for_statement (pattern_list (identifier_dirpath) identifier_dirpath (identifier_dirnames) identifier_dirnames (identifier_filenames) identifier_filenames )pattern_list (call (identifier_walk) identifier_walk (argument_list (identifier_root) identifier_root )argument_list )call (block (for_statement (identifier_ignore) identifier_ignore (identifier_directories_to_ignore) identifier_directories_to_ignore (block (if_statement (comparison_operator (identifier_ignore) identifier_ignore (identifier_dirnames) identifier_dirnames )comparison_operator (block (expression_statement (call (attribute (identifier_dirnames) identifier_dirnames (identifier_remove) identifier_remove )attribute (argument_list (identifier_ignore) identifier_ignore )argument_list )call )expression_statement )block )if_statement )block )for_statement (for_statement (identifier_filename) identifier_filename (identifier_filenames) identifier_filenames (block (expression_statement (assignment (identifier_ignore) identifier_ignore (False) False )assignment )expression_statement (for_statement (identifier_ext) identifier_ext (identifier_extensions_to_ignore) identifier_extensions_to_ignore (block (if_statement (call (attribute (identifier_filename) identifier_filename (identifier_endswith) identifier_endswith )attribute (argument_list (identifier_ext) identifier_ext )argument_list )call (block (expression_statement (assignment (identifier_ignore) identifier_ignore (True) True )assignment )expression_statement )block )if_statement )block )for_statement (if_statement (comparison_operator (identifier_filename) identifier_filename (identifier_files_to_ignore) identifier_files_to_ignore )comparison_operator (block (expression_statement (assignment (identifier_ignore) identifier_ignore (True) True )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_ignore) identifier_ignore (False) False )comparison_operator (block (expression_statement (yield (expression_list (identifier_dirpath) identifier_dirpath (identifier_filename) identifier_filename )expression_list )yield )expression_statement )block )if_statement )block )for_statement )block )for_statement )block )function_definition )module
Identify files that might contain data See function IP_verified() for details about optinoal parmeters
(module (function_definition (function_name_transform) function_name_transform (parameters (identifier_fields) identifier_fields (identifier_function) identifier_function (list_splat_pattern (identifier_tables) identifier_tables )list_splat_pattern )parameters (block (expression_statement (string_"Return a new table based on other tables and a transformation function") string_"Return a new table based on other tables and a transformation function" )expression_statement (expression_statement (assignment (identifier_new_table) identifier_new_table (call (identifier_Table) identifier_Table (argument_list (keyword_argument (identifier_fields) identifier_fields (identifier_fields) identifier_fields )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_table) identifier_table (identifier_tables) identifier_tables (block (for_statement (identifier_row) identifier_row (call (identifier_filter) identifier_filter (argument_list (identifier_bool) identifier_bool (call (identifier_map) identifier_map (argument_list (lambda (lambda_parameters (identifier_row) identifier_row )lambda_parameters (call (identifier_function) identifier_function (argument_list (identifier_row) identifier_row (identifier_table) identifier_table )argument_list )call )lambda (identifier_table) identifier_table )argument_list )call )argument_list )call (block (expression_statement (call (attribute (identifier_new_table) identifier_new_table (identifier_append) identifier_append )attribute (argument_list (identifier_row) identifier_row )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_new_table) identifier_new_table )return_statement )block )function_definition )module
Return a new table based on other tables and a transformation function
(module (function_definition (function_name_service_executions) function_name_service_executions (parameters (identifier_self) identifier_self (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_pk) identifier_pk (None) None )default_parameter (default_parameter (identifier_scope) identifier_scope (None) None )default_parameter (default_parameter (identifier_service) identifier_service (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_request_params) identifier_request_params (dictionary (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'id') string_'id' (identifier_pk) identifier_pk )pair (pair (string_'service') string_'service' (identifier_service) identifier_service )pair (pair (string_'scope') string_'scope' (identifier_scope) identifier_scope )pair )dictionary )assignment )expression_statement (if_statement (identifier_kwargs) identifier_kwargs (block (expression_statement (call (attribute (identifier_request_params) identifier_request_params (identifier_update) identifier_update )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (argument_list (string_'GET') string_'GET' (call (attribute (identifier_self) identifier_self (identifier__build_url) identifier__build_url )attribute (argument_list (string_'service_executions') string_'service_executions' )argument_list )call (keyword_argument (identifier_params) identifier_params (identifier_request_params) identifier_request_params )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_r) identifier_r (identifier_status_code) identifier_status_code )attribute (attribute (attribute (identifier_requests) identifier_requests (identifier_codes) identifier_codes )attribute (identifier_ok) identifier_ok )attribute )comparison_operator (block (raise_statement (call (identifier_NotFoundError) identifier_NotFoundError (argument_list (string_"Could not retrieve service executions") string_"Could not retrieve service executions" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_r) identifier_r (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (call (identifier_ServiceExecution) identifier_ServiceExecution (argument_list (identifier_service_exeuction) identifier_service_exeuction (keyword_argument (identifier_client) identifier_client (identifier_self) identifier_self )keyword_argument )argument_list )call (for_in_clause (identifier_service_exeuction) identifier_service_exeuction (subscript (identifier_data) identifier_data (string_'results') string_'results' )subscript )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Retrieve Service Executions. If additional `keyword=value` arguments are provided, these are added to the request parameters. Please refer to the documentation of the KE-chain API for additional query parameters. :param name: (optional) name to limit the search for :type name: basestring or None :param pk: (optional) primary key or id (UUID) of the service to search for :type pk: basestring or None :param scope: (optional) id (UUID) of the scope to search in :type scope: basestring or None :param service: (optional) service UUID to filter on :type service: basestring or None :param kwargs: (optional) additional search keyword arguments :type kwargs: dict or None :return: a single :class:`models.ServiceExecution` object :raises NotFoundError: When no `ServiceExecution` object is found
(module (function_definition (function_name__parse_references) function_name__parse_references (parameters (identifier_xml) identifier_xml )parameters (block (expression_statement (assignment (identifier_references) identifier_references (list )list )assignment )expression_statement (expression_statement (assignment (identifier_ref_finder) identifier_ref_finder (call (identifier_HTMLReferenceFinder) identifier_HTMLReferenceFinder (argument_list (identifier_xml) identifier_xml )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_elm) identifier_elm (identifier_uri_attr) identifier_uri_attr )pattern_list (identifier_ref_finder) identifier_ref_finder (block (expression_statement (assignment (identifier_type_) identifier_type_ (call (identifier__discover_uri_type) identifier__discover_uri_type (argument_list (call (attribute (identifier_elm) identifier_elm (identifier_get) identifier_get )attribute (argument_list (identifier_uri_attr) identifier_uri_attr )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_references) identifier_references (identifier_append) identifier_append )attribute (argument_list (call (identifier_Reference) identifier_Reference (argument_list (identifier_elm) identifier_elm (identifier_type_) identifier_type_ (identifier_uri_attr) identifier_uri_attr )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_references) identifier_references )return_statement )block )function_definition )module
Parse the references to ``Reference`` instances.
(module (function_definition (function_name_unoptimize_scope) function_name_unoptimize_scope (parameters (identifier_self) identifier_self (identifier_frame) identifier_frame )parameters (block (if_statement (attribute (attribute (identifier_frame) identifier_frame (identifier_identifiers) identifier_identifiers )attribute (identifier_declared) identifier_declared )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_writeline) identifier_writeline )attribute (argument_list (binary_operator (string_'%sdummy(%s)') string_'%sdummy(%s)' (tuple (boolean_operator (boolean_operator (identifier_unoptimize_before_dead_code) identifier_unoptimize_before_dead_code (string_'if 0: ') string_'if 0: ' )boolean_operator (string_'') string_'' )boolean_operator (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (generator_expression (binary_operator (string_'l_') string_'l_' (identifier_name) identifier_name )binary_operator (for_in_clause (identifier_name) identifier_name (attribute (attribute (identifier_frame) identifier_frame (identifier_identifiers) identifier_identifiers )attribute (identifier_declared) identifier_declared )attribute )for_in_clause )generator_expression )call )tuple )binary_operator )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Disable Python optimizations for the frame.
(module (function_definition (function_name__is_autonomous) function_name__is_autonomous (parameters (identifier_indep) identifier_indep (identifier_exprs) identifier_exprs )parameters (block (if_statement (comparison_operator (identifier_indep) identifier_indep (None) None )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (for_statement (identifier_expr) identifier_expr (identifier_exprs) identifier_exprs (block (try_statement (block (expression_statement (assignment (identifier_in_there) identifier_in_there (comparison_operator (identifier_indep) identifier_indep (attribute (identifier_expr) identifier_expr (identifier_free_symbols) identifier_free_symbols )attribute )comparison_operator )assignment )expression_statement )block (except_clause (block (expression_statement (assignment (identifier_in_there) identifier_in_there (call (attribute (identifier_expr) identifier_expr (identifier_has) identifier_has )attribute (argument_list (identifier_indep) identifier_indep )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (if_statement (identifier_in_there) identifier_in_there (block (return_statement (False) False )return_statement )block )if_statement )block )for_statement (return_statement (True) True )return_statement )block )function_definition )module
Whether the expressions for the dependent variables are autonomous. Note that the system may still behave as an autonomous system on the interface of :meth:`integrate` due to use of pre-/post-processors.
(module (function_definition (function_name__encode_params) function_name__encode_params (parameters (identifier_kw) identifier_kw )parameters (block (expression_statement (assignment (identifier_args) identifier_args (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_kw) identifier_kw (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (try_statement (block (expression_statement (assignment (identifier_qv) identifier_qv (conditional_expression (call (attribute (identifier_v) identifier_v (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_v) identifier_v (identifier_unicode) identifier_unicode )argument_list )call (call (identifier_str) identifier_str (argument_list (identifier_v) identifier_v )argument_list )call )conditional_expression )assignment )expression_statement )block (except_clause (block (expression_statement (assignment (identifier_qv) identifier_qv (identifier_v) identifier_v )assignment )expression_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_args) identifier_args (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_'%s=%s') string_'%s=%s' (tuple (identifier_k) identifier_k (call (identifier_urlquote) identifier_urlquote (argument_list (identifier_qv) identifier_qv )argument_list )call )tuple )binary_operator )argument_list )call )expression_statement )block )for_statement (return_statement (call (attribute (string_'&') string_'&' (identifier_join) identifier_join )attribute (argument_list (identifier_args) identifier_args )argument_list )call )return_statement )block )function_definition )module
Encode parameters.
(module (function_definition (function_name_buildingname) function_name_buildingname (parameters (identifier_ddtt) identifier_ddtt )parameters (block (expression_statement (assignment (identifier_idf) identifier_idf (attribute (identifier_ddtt) identifier_ddtt (identifier_theidf) identifier_theidf )attribute )assignment )expression_statement (expression_statement (assignment (identifier_building) identifier_building (subscript (subscript (attribute (identifier_idf) identifier_idf (identifier_idfobjects) identifier_idfobjects )attribute (call (attribute (string_'building') string_'building' (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (attribute (identifier_building) identifier_building (identifier_Name) identifier_Name )attribute )return_statement )block )function_definition )module
return building name
(module (function_definition (function_name_shorten_type) function_name_shorten_type (parameters (identifier_typ) identifier_typ )parameters (block (expression_statement (assignment (identifier_offset) identifier_offset (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_prefix) identifier_prefix (identifier_SHORTEN_TYPE_PREFIXES) identifier_SHORTEN_TYPE_PREFIXES (block (if_statement (call (attribute (identifier_typ) identifier_typ (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_prefix) identifier_prefix )argument_list )call (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_prefix) identifier_prefix )argument_list )call (identifier_offset) identifier_offset )comparison_operator (block (expression_statement (assignment (identifier_offset) identifier_offset (call (identifier_len) identifier_len (argument_list (identifier_prefix) identifier_prefix )argument_list )call )assignment )expression_statement )block )if_statement )block )if_statement )block )for_statement (return_statement (subscript (identifier_typ) identifier_typ (slice (identifier_offset) identifier_offset (colon) colon )slice )subscript )return_statement )block )function_definition )module
Shorten a type. E.g. drops 'System.'
(module (function_definition (function_name__fetch_all) function_name__fetch_all (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__result_cache) identifier__result_cache )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__result_cache) identifier__result_cache )attribute (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_self) identifier_self (identifier_iterator) identifier_iterator )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__iterable_class) identifier__iterable_class )attribute (identifier_ModelIterable) identifier_ModelIterable )comparison_operator (block (for_statement (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier__result_cache) identifier__result_cache )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set_item_querytime) identifier__set_item_querytime )attribute (argument_list (identifier_x) identifier_x )argument_list )call )expression_statement )block )for_statement )block )if_statement )block )if_statement (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier__prefetch_related_lookups) identifier__prefetch_related_lookups )attribute (not_operator (attribute (identifier_self) identifier_self (identifier__prefetch_done) identifier__prefetch_done )attribute )not_operator )boolean_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__prefetch_related_objects) identifier__prefetch_related_objects )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Completely overrides the QuerySet._fetch_all method by adding the timestamp to all objects :return: See django.db.models.query.QuerySet._fetch_all for return values
(module (function_definition (function_name__split_lines) function_name__split_lines (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_parsed_lines) identifier_parsed_lines (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_rt) identifier_rt (identifier_all_record_types) identifier_all_record_types (block (expression_statement (assignment (subscript (identifier_parsed_lines) identifier_parsed_lines (identifier_rt) identifier_rt )subscript (list )list )assignment )expression_statement )block )for_statement (expression_statement (assignment (subscript (identifier_parsed_lines) identifier_parsed_lines (integer_0) integer_0 )subscript (list )list )assignment )expression_statement (for_statement (identifier_line) identifier_line (attribute (identifier_self) identifier_self (identifier_lines) identifier_lines )attribute (block (expression_statement (assignment (identifier_linetype) identifier_linetype (subscript (identifier_line) identifier_line (slice (integer_0) integer_0 (colon) colon (integer_6) integer_6 )slice )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_linetype) identifier_linetype (identifier_all_record_types) identifier_all_record_types )comparison_operator (block (expression_statement (call (attribute (subscript (identifier_parsed_lines) identifier_parsed_lines (identifier_linetype) identifier_linetype )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_line) identifier_line )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (subscript (identifier_parsed_lines) identifier_parsed_lines (integer_0) integer_0 )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_line) identifier_line )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_parsed_lines) identifier_parsed_lines )attribute (identifier_parsed_lines) identifier_parsed_lines )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__update_structure_lines) identifier__update_structure_lines )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Creates the parsed_lines dict which keeps all record data in document order indexed by the record type.
(module (function_definition (function_name__expand_sequence) function_name__expand_sequence (parameters (identifier_self) identifier_self (typed_parameter (identifier_seq) identifier_seq (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_GridQubit) identifier_GridQubit )type )type_parameter )generic_type )type )typed_parameter )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_GridQubit) identifier_GridQubit )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_i) identifier_i (integer_1) integer_1 )assignment )expression_statement (while_statement (comparison_operator (identifier_i) identifier_i (call (identifier_len) identifier_len (argument_list (identifier_seq) identifier_seq )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (identifier_self) identifier_self (identifier__find_path_between) identifier__find_path_between )attribute (argument_list (subscript (identifier_seq) identifier_seq (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator )subscript (subscript (identifier_seq) identifier_seq (identifier_i) identifier_i )subscript (call (identifier_set) identifier_set (argument_list (identifier_seq) identifier_seq )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (identifier_path) identifier_path (block (expression_statement (assignment (identifier_seq) identifier_seq (binary_operator (binary_operator (subscript (identifier_seq) identifier_seq (slice (colon) colon (identifier_i) identifier_i )slice )subscript (identifier_path) identifier_path )binary_operator (subscript (identifier_seq) identifier_seq (slice (identifier_i) identifier_i (colon) colon )slice )subscript )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (identifier_i) identifier_i (integer_1) integer_1 )augmented_assignment )expression_statement )block )else_clause )if_statement )block )while_statement (return_statement (identifier_seq) identifier_seq )return_statement )block )function_definition )module
Tries to expand given sequence with more qubits. Args: seq: Linear sequence of qubits. Returns: New continuous linear sequence which contains all the qubits from seq and possibly new qubits inserted in between.
(module (function_definition (function_name_bounds) function_name_bounds (parameters (identifier_self) identifier_self (default_parameter (identifier_thr) identifier_thr (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_min_lat) identifier_min_lat (call (identifier_float) identifier_float (argument_list (string_"inf") string_"inf" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_min_lon) identifier_min_lon (call (identifier_float) identifier_float (argument_list (string_"inf") string_"inf" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_max_lat) identifier_max_lat (unary_operator (call (identifier_float) identifier_float (argument_list (string_"inf") string_"inf" )argument_list )call )unary_operator )assignment )expression_statement (expression_statement (assignment (identifier_max_lon) identifier_max_lon (unary_operator (call (identifier_float) identifier_float (argument_list (string_"inf") string_"inf" )argument_list )call )unary_operator )assignment )expression_statement (for_statement (identifier_segment) identifier_segment (attribute (identifier_self) identifier_self (identifier_segments) identifier_segments )attribute (block (expression_statement (assignment (pattern_list (identifier_milat) identifier_milat (identifier_milon) identifier_milon (identifier_malat) identifier_malat (identifier_malon) identifier_malon )pattern_list (call (attribute (identifier_segment) identifier_segment (identifier_bounds) identifier_bounds )attribute (argument_list (keyword_argument (identifier_thr) identifier_thr (identifier_thr) identifier_thr )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_min_lat) identifier_min_lat (call (identifier_min) identifier_min (argument_list (identifier_milat) identifier_milat (identifier_min_lat) identifier_min_lat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_min_lon) identifier_min_lon (call (identifier_min) identifier_min (argument_list (identifier_milon) identifier_milon (identifier_min_lon) identifier_min_lon )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_max_lat) identifier_max_lat (call (identifier_max) identifier_max (argument_list (identifier_malat) identifier_malat (identifier_max_lat) identifier_max_lat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_max_lon) identifier_max_lon (call (identifier_max) identifier_max (argument_list (identifier_malon) identifier_malon (identifier_max_lon) identifier_max_lon )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (expression_list (identifier_min_lat) identifier_min_lat (identifier_min_lon) identifier_min_lon (identifier_max_lat) identifier_max_lat (identifier_max_lon) identifier_max_lon )expression_list )return_statement )block )function_definition )module
Gets the bounds of this segment Returns: (float, float, float, float): Bounds, with min latitude, min longitude, max latitude and max longitude
(module (function_definition (function_name_load_configuration) function_name_load_configuration (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_filename) identifier_filename (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier___file__) identifier___file__ )argument_list )call (string_'templates/spline-loc.yml.j2') string_'templates/spline-loc.yml.j2' )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename )argument_list )call (as_pattern_target (identifier_handle) identifier_handle )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (attribute (call (identifier_Adapter) identifier_Adapter (argument_list (call (identifier_safe_load) identifier_safe_load (argument_list (identifier_handle) identifier_handle )argument_list )call )argument_list )call (identifier_configuration) identifier_configuration )attribute )return_statement )block )with_statement )block )function_definition )module
Loading configuration.
(module (function_definition (function_name_events) function_name_events (parameters (identifier_self) identifier_self (identifier_year) identifier_year (default_parameter (identifier_simple) identifier_simple (False) False )default_parameter (default_parameter (identifier_keys) identifier_keys (False) False )default_parameter )parameters (block (if_statement (identifier_keys) identifier_keys (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (binary_operator (string_'events/%s/keys') string_'events/%s/keys' (identifier_year) identifier_year )binary_operator )argument_list )call )return_statement )block (else_clause (block (return_statement (list_comprehension (call (identifier_Event) identifier_Event (argument_list (identifier_raw) identifier_raw )argument_list )call (for_in_clause (identifier_raw) identifier_raw (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (binary_operator (string_'events/%s%s') string_'events/%s%s' (tuple (identifier_year) identifier_year (conditional_expression (string_'/simple') string_'/simple' (identifier_simple) identifier_simple (string_'') string_'' )conditional_expression )tuple )binary_operator )argument_list )call )for_in_clause )list_comprehension )return_statement )block )else_clause )if_statement )block )function_definition )module
Get a list of events in a given year. :param year: Year to get events from. :param keys: Get only keys of the events rather than full data. :param simple: Get only vital data. :return: List of string event keys or Event objects.
(module (function_definition (function_name_cublasZherk) function_name_cublasZherk (parameters (identifier_handle) identifier_handle (identifier_uplo) identifier_uplo (identifier_trans) identifier_trans (identifier_n) identifier_n (identifier_k) identifier_k (identifier_alpha) identifier_alpha (identifier_A) identifier_A (identifier_lda) identifier_lda (identifier_beta) identifier_beta (identifier_C) identifier_C (identifier_ldc) identifier_ldc )parameters (block (expression_statement (assignment (identifier_status) identifier_status (call (attribute (identifier__libcublas) identifier__libcublas (identifier_cublasZherk_v2) identifier_cublasZherk_v2 )attribute (argument_list (identifier_handle) identifier_handle (subscript (identifier__CUBLAS_FILL_MODE) identifier__CUBLAS_FILL_MODE (identifier_uplo) identifier_uplo )subscript (subscript (identifier__CUBLAS_OP) identifier__CUBLAS_OP (identifier_trans) identifier_trans )subscript (identifier_n) identifier_n (identifier_k) identifier_k (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_double) identifier_c_double )attribute (argument_list (identifier_alpha) identifier_alpha )argument_list )call )argument_list )call (call (identifier_int) identifier_int (argument_list (identifier_A) identifier_A )argument_list )call (identifier_lda) identifier_lda (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_double) identifier_c_double )attribute (argument_list (identifier_beta) identifier_beta )argument_list )call )argument_list )call (call (identifier_int) identifier_int (argument_list (identifier_C) identifier_C )argument_list )call (identifier_ldc) identifier_ldc )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_cublasCheckStatus) identifier_cublasCheckStatus (argument_list (identifier_status) identifier_status )argument_list )call )expression_statement )block )function_definition )module
Rank-k operation on Hermitian matrix.
(module (function_definition (function_name__prepare_tmp_directory) function_name__prepare_tmp_directory (parameters (identifier_self) identifier_self (identifier_tmp_dir) identifier_tmp_dir )parameters (block (if_statement (identifier_tmp_dir) identifier_tmp_dir (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_tmp_dir) identifier_tmp_dir )argument_list )call (block (raise_statement (call (identifier_SquashError) identifier_SquashError (argument_list (binary_operator (string_"The '%s' directory already exists, please remove it before you proceed") string_"The '%s' directory already exists, please remove it before you proceed" (identifier_tmp_dir) identifier_tmp_dir )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_tmp_dir) identifier_tmp_dir )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_tmp_dir) identifier_tmp_dir (call (attribute (identifier_tempfile) identifier_tempfile (identifier_mkdtemp) identifier_mkdtemp )attribute (argument_list (keyword_argument (identifier_prefix) identifier_prefix (string_"docker-squash-") string_"docker-squash-" )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_"Using %s as the temporary directory") string_"Using %s as the temporary directory" (identifier_tmp_dir) identifier_tmp_dir )binary_operator )argument_list )call )expression_statement (return_statement (identifier_tmp_dir) identifier_tmp_dir )return_statement )block )function_definition )module
Creates temporary directory that is used to work on layers
(module (function_definition (function_name_strip_spaces) function_name_strip_spaces (parameters (identifier_value) identifier_value (default_parameter (identifier_sep) identifier_sep (None) None )default_parameter (default_parameter (identifier_join) identifier_join (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_value) identifier_value (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (list_comprehension (call (attribute (identifier_v) identifier_v (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (for_in_clause (identifier_v) identifier_v (call (attribute (identifier_value) identifier_value (identifier_split) identifier_split )attribute (argument_list (identifier_sep) identifier_sep )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_join_sep) identifier_join_sep (boolean_operator (identifier_sep) identifier_sep (string_' ') string_' ' )boolean_operator )assignment )expression_statement (return_statement (conditional_expression (call (attribute (identifier_join_sep) identifier_join_sep (identifier_join) identifier_join )attribute (argument_list (identifier_value) identifier_value )argument_list )call (identifier_join) identifier_join (identifier_value) identifier_value )conditional_expression )return_statement )block )function_definition )module
Cleans trailing whitespaces and replaces also multiple whitespaces with a single space.
(module (function_definition (function_name_parse_first_row) function_name_parse_first_row (parameters (identifier_row) identifier_row (identifier_url_instance) identifier_url_instance )parameters (block (expression_statement (assignment (identifier_tags) identifier_tags (call (attribute (identifier_row) identifier_row (identifier_xpath) identifier_xpath )attribute (argument_list (attribute (identifier_Parser) identifier_Parser (identifier_FIRST_ROW_XPATH) identifier_FIRST_ROW_XPATH )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_category_url) identifier_category_url (call (attribute (identifier_url_instance) identifier_url_instance (identifier_combine) identifier_combine )attribute (argument_list (call (attribute (subscript (identifier_tags) identifier_tags (integer_0) integer_0 )subscript (identifier_get) identifier_get )attribute (argument_list (string_'href') string_'href' )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_title) identifier_title (call (identifier_unicode) identifier_unicode (argument_list (attribute (subscript (identifier_tags) identifier_tags (integer_1) integer_1 )subscript (identifier_text) identifier_text )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_torrent_url) identifier_torrent_url (call (attribute (subscript (identifier_tags) identifier_tags (integer_1) integer_1 )subscript (identifier_get) identifier_get )attribute (argument_list (string_'href') string_'href' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_str_id) identifier_str_id (subscript (call (attribute (identifier_torrent_url) identifier_torrent_url (identifier_split) identifier_split )attribute (argument_list (string_'details/') string_'details/' )argument_list )call (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_str_id) identifier_str_id (conditional_expression (subscript (identifier_str_id) identifier_str_id (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript (call (attribute (identifier_str_id) identifier_str_id (identifier_endswith) identifier_endswith )attribute (argument_list (string_'/') string_'/' )argument_list )call (identifier_str_id) identifier_str_id )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_torrent_url) identifier_torrent_url (call (attribute (identifier_url_instance) identifier_url_instance (identifier_combine) identifier_combine )attribute (argument_list (identifier_torrent_url) identifier_torrent_url )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_tags) identifier_tags )argument_list )call (integer_3) integer_3 )comparison_operator (block (expression_statement (augmented_assignment (identifier_category_url) identifier_category_url (string_'&external=1') string_'&external=1' )augmented_assignment )expression_statement (expression_statement (assignment (identifier_tracked_by) identifier_tracked_by (string_'(external)') string_'(external)' )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_tracked_by) identifier_tracked_by (string_'Demonoid') string_'Demonoid' )assignment )expression_statement )block )else_clause )if_statement (return_statement (list (identifier_str_id) identifier_str_id (identifier_title) identifier_title (identifier_tracked_by) identifier_tracked_by (identifier_category_url) identifier_category_url (identifier_torrent_url) identifier_torrent_url )list )return_statement )block )function_definition )module
Static method that parses a given table row element by executing `Parser.FIRST_ROW_XPATH` and scrapping torrent's id, title, tracked by status, category url and torrent url. Used specifically with a torrent's first table row. :param lxml.HtmlElement row: row to parse :param urls.Url url_instance: Url used to combine base url's with scrapped links from tr :return: scrapped id, title, tracked by status, category url and torrent url :rtype: list
(module (function_definition (function_name_count) function_name_count (parameters (identifier_self) identifier_self (identifier_stats) identifier_stats (identifier_value) identifier_value (default_parameter (identifier_sample_rate) identifier_sample_rate (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update_stats) identifier_update_stats )attribute (argument_list (identifier_stats) identifier_stats (identifier_value) identifier_value (attribute (identifier_self) identifier_self (identifier_SC_COUNT) identifier_SC_COUNT )attribute (identifier_sample_rate) identifier_sample_rate )argument_list )call )expression_statement )block )function_definition )module
Updates one or more stats counters by arbitrary value >>> client = StatsdClient() >>> client.count('example.counter', 17)
(module (function_definition (function_name_remove_tar_files) function_name_remove_tar_files (parameters (identifier_file_list) identifier_file_list )parameters (block (for_statement (identifier_f) identifier_f (identifier_file_list) identifier_file_list (block (if_statement (boolean_operator (call (identifier_file_exists) identifier_file_exists (argument_list (identifier_f) identifier_f )argument_list )call (call (attribute (identifier_f) identifier_f (identifier_endswith) identifier_endswith )attribute (argument_list (string_'.tar') string_'.tar' )argument_list )call )boolean_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_f) identifier_f )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Public function that removes temporary tar archive files in a local directory
(module (function_definition (function_name__from_dict) function_name__from_dict (parameters (identifier_cls) identifier_cls (identifier__dict) identifier__dict )parameters (block (expression_statement (assignment (identifier_args) identifier_args (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (string_'authors') string_'authors' (identifier__dict) identifier__dict )comparison_operator (block (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'authors') string_'authors' )subscript (list_comprehension (call (attribute (identifier_Author) identifier_Author (identifier__from_dict) identifier__from_dict )attribute (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (parenthesized_expression (call (attribute (identifier__dict) identifier__dict (identifier_get) identifier_get )attribute (argument_list (string_'authors') string_'authors' )argument_list )call )parenthesized_expression )for_in_clause )list_comprehension )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'publication_date') string_'publication_date' (identifier__dict) identifier__dict )comparison_operator (block (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'publication_date') string_'publication_date' )subscript (call (attribute (identifier__dict) identifier__dict (identifier_get) identifier_get )attribute (argument_list (string_'publication_date') string_'publication_date' )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'title') string_'title' (identifier__dict) identifier__dict )comparison_operator (block (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'title') string_'title' )subscript (call (attribute (identifier__dict) identifier__dict (identifier_get) identifier_get )attribute (argument_list (string_'title') string_'title' )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'image') string_'image' (identifier__dict) identifier__dict )comparison_operator (block (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'image') string_'image' )subscript (call (attribute (identifier__dict) identifier__dict (identifier_get) identifier_get )attribute (argument_list (string_'image') string_'image' )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'feeds') string_'feeds' (identifier__dict) identifier__dict )comparison_operator (block (expression_statement (assignment (subscript (identifier_args) identifier_args (string_'feeds') string_'feeds' )subscript (list_comprehension (call (attribute (identifier_Feed) identifier_Feed (identifier__from_dict) identifier__from_dict )attribute (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (parenthesized_expression (call (attribute (identifier__dict) identifier__dict (identifier_get) identifier_get )attribute (argument_list (string_'feeds') string_'feeds' )argument_list )call )parenthesized_expression )for_in_clause )list_comprehension )assignment )expression_statement )block )if_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (dictionary_splat (identifier_args) identifier_args )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Initialize a AnalysisResultsMetadata object from a json dictionary.
(module (function_definition (function_name_handle) function_name_handle (parameters (identifier_self) identifier_self (identifier_args) identifier_args )parameters (block (expression_statement (assignment (identifier_salutation) identifier_salutation (subscript (dictionary (pair (string_'french') string_'french' (string_'Bonjour') string_'Bonjour' )pair (pair (string_'spanish') string_'spanish' (string_'Hola') string_'Hola' )pair (pair (string_'english') string_'english' (string_'Hello') string_'Hello' )pair )dictionary (call (attribute (attribute (identifier_args) identifier_args (identifier_lang) identifier_lang )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )subscript )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (list )list )assignment )expression_statement (for_statement (identifier_name) identifier_name (attribute (identifier_args) identifier_args (identifier_name) identifier_name )attribute (block (expression_statement (call (attribute (identifier_output) identifier_output (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_"{} {}!") string_"{} {}!" (identifier_format) identifier_format )attribute (argument_list (identifier_salutation) identifier_salutation (identifier_name) identifier_name )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (call (attribute (string_"\n") string_"\n" (identifier_join) identifier_join )attribute (argument_list (identifier_output) identifier_output )argument_list )call )return_statement )block )function_definition )module
Greet each person by name.
(module (function_definition (function_name__one_q_state_prep) function_name__one_q_state_prep (parameters (typed_parameter (identifier_oneq_state) identifier_oneq_state (type (identifier__OneQState) identifier__OneQState )type )typed_parameter )parameters (block (expression_statement (assignment (identifier_label) identifier_label (attribute (identifier_oneq_state) identifier_oneq_state (identifier_label) identifier_label )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_label) identifier_label (string_'SIC') string_'SIC' )comparison_operator (block (return_statement (call (identifier__one_q_sic_prep) identifier__one_q_sic_prep (argument_list (attribute (identifier_oneq_state) identifier_oneq_state (identifier_index) identifier_index )attribute (attribute (identifier_oneq_state) identifier_oneq_state (identifier_qubit) identifier_qubit )attribute )argument_list )call )return_statement )block (elif_clause (comparison_operator (identifier_label) identifier_label (list (string_'X') string_'X' (string_'Y') string_'Y' (string_'Z') string_'Z' )list )comparison_operator (block (return_statement (call (identifier__one_q_pauli_prep) identifier__one_q_pauli_prep (argument_list (identifier_label) identifier_label (attribute (identifier_oneq_state) identifier_oneq_state (identifier_index) identifier_index )attribute (attribute (identifier_oneq_state) identifier_oneq_state (identifier_qubit) identifier_qubit )attribute )argument_list )call )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_f"Bad state label: {label}") string_f"Bad state label: {label}" )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Prepare a one qubit state. Either SIC[0-3], X[0-1], Y[0-1], or Z[0-1].
(module (function_definition (function_name_process_dataset) function_name_process_dataset (parameters (identifier_dataset) identifier_dataset (identifier_models) identifier_models (dictionary_splat_pattern (identifier_kargs) identifier_kargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_dset) identifier_dset (call (attribute (identifier_collections) identifier_collections (identifier_OrderedDict) identifier_OrderedDict )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_m) identifier_m (call (attribute (identifier_MultiFitter) identifier_MultiFitter (identifier_flatten_models) identifier_flatten_models )attribute (argument_list (identifier_models) identifier_models )argument_list )call (block (expression_statement (assignment (subscript (identifier_dset) identifier_dset (attribute (identifier_m) identifier_m (identifier_datatag) identifier_datatag )attribute )subscript (parenthesized_expression (conditional_expression (call (attribute (identifier_m) identifier_m (identifier_builddataset) identifier_builddataset )attribute (argument_list (identifier_dataset) identifier_dataset )argument_list )call (comparison_operator (attribute (identifier_m) identifier_m (identifier_ncg) identifier_ncg )attribute (integer_1) integer_1 )comparison_operator (call (attribute (identifier_MultiFitter) identifier_MultiFitter (identifier_coarse_grain) identifier_coarse_grain )attribute (argument_list (call (attribute (identifier_m) identifier_m (identifier_builddataset) identifier_builddataset )attribute (argument_list (identifier_dataset) identifier_dataset )argument_list )call (keyword_argument (identifier_ncg) identifier_ncg (attribute (identifier_m) identifier_m (identifier_ncg) identifier_ncg )attribute )keyword_argument )argument_list )call )conditional_expression )parenthesized_expression )assignment )expression_statement )block )for_statement (return_statement (call (attribute (attribute (identifier_gvar) identifier_gvar (identifier_dataset) identifier_dataset )attribute (identifier_avg_data) identifier_avg_data )attribute (argument_list (identifier_dset) identifier_dset (dictionary_splat (identifier_kargs) identifier_kargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Convert ``dataset`` to processed data using ``models``. :class:`gvar.dataset.Dataset` (or similar dictionary) object ``dataset`` is processed by each model in list ``models``, and the results collected into a new dictionary ``pdata`` for use in :meth:`MultiFitter.lsqfit` and :meth:`MultiFitter.chained_lsqft`. Assumes that the models have defined method :meth:`MultiFitterModel.builddataset`. Keyword arguments ``kargs`` are passed on to :func:`gvar.dataset.avg_data` when averaging the data.
(module (function_definition (function_name__get_version) function_name__get_version (parameters )parameters (block (expression_statement (assignment (identifier_version_string) identifier_version_string (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run') string_'cmd.run' )subscript (argument_list (list (call (identifier__check_xbps) identifier__check_xbps (argument_list )argument_list )call (string_'--version') string_'--version' )list (keyword_argument (identifier_output_loglevel) identifier_output_loglevel (string_'trace') string_'trace' )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_version_string) identifier_version_string (None) None )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_VERSION_MATCH) identifier_VERSION_MATCH (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (string_r'(?:XBPS:[\s]+)([\d.]+)(?:[\s]+.*)') string_r'(?:XBPS:[\s]+)([\d.]+)(?:[\s]+.*)' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_version_match) identifier_version_match (call (attribute (identifier_VERSION_MATCH) identifier_VERSION_MATCH (identifier_search) identifier_search )attribute (argument_list (identifier_version_string) identifier_version_string )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_version_match) identifier_version_match )not_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (call (attribute (call (attribute (identifier_version_match) identifier_version_match (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call )return_statement )block )function_definition )module
Get the xbps version
(module (function_definition (function_name_compliance_report) function_name_compliance_report (parameters (default_parameter (identifier_filepath) identifier_filepath (None) None )default_parameter (default_parameter (identifier_string) identifier_string (None) None )default_parameter (default_parameter (identifier_renderer) identifier_renderer (string_'jinja|yaml') string_'jinja|yaml' )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_validation_string) identifier_validation_string (call (subscript (identifier___salt__) identifier___salt__ (string_'slsutil.renderer') string_'slsutil.renderer' )subscript (argument_list (keyword_argument (identifier_path) identifier_path (identifier_filepath) identifier_filepath )keyword_argument (keyword_argument (identifier_string) identifier_string (identifier_string) identifier_string )keyword_argument (keyword_argument (identifier_default_renderer) identifier_default_renderer (identifier_renderer) identifier_renderer )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_napalm) identifier_napalm )attribute (identifier_call) identifier_call )attribute (argument_list (identifier_napalm_device) identifier_napalm_device (string_'compliance_report') string_'compliance_report' (keyword_argument (identifier_validation_source) identifier_validation_source (identifier_validation_string) identifier_validation_string )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return the compliance report. filepath The absolute path to the validation file. .. versionchanged:: 2019.2.0 Beginning with release codename ``2019.2.0``, this function has been enhanced, to be able to leverage the multi-engine template rendering of Salt, besides the possibility to retrieve the file source from remote systems, the URL schemes supported being: - ``salt://`` - ``http://`` and ``https://`` - ``ftp://`` - ``s3://`` - ``swift:/`` Or on the local file system (on the Minion). .. note:: The rendering result does not necessarily need to be YAML, instead it can be any format interpreted by Salt's rendering pipeline (including pure Python). string .. versionadded:: 2019.2.0 The compliance report send as inline string, to be used as the file to send through the renderer system. Note, not all renderer modules can work with strings; the 'py' renderer requires a file, for example. renderer: ``jinja|yaml`` .. versionadded:: 2019.2.0 The renderer pipe to send the file through; this is overridden by a "she-bang" at the top of the file. kwargs .. versionchanged:: 2019.2.0 Keyword args to pass to Salt's compile_template() function. CLI Example: .. code-block:: bash salt '*' napalm.compliance_report ~/validate.yml salt '*' napalm.compliance_report salt://path/to/validator.sls Validation File Example (pure YAML): .. code-block:: yaml - get_facts: os_version: 4.17 - get_interfaces_ip: Management1: ipv4: 10.0.2.14: prefix_length: 24 _mode: strict Validation File Example (as Jinja + YAML): .. code-block:: yaml - get_facts: os_version: {{ grains.version }} - get_interfaces_ip: Loopback0: ipv4: {{ grains.lo0.ipv4 }}: prefix_length: 24 _mode: strict - get_bgp_neighbors: {{ pillar.bgp.neighbors }} Output Example: .. code-block:: yaml device1: ---------- comment: out: ---------- complies: False get_facts: ---------- complies: False extra: missing: present: ---------- os_version: ---------- actual_value: 15.1F6-S1.4 complies: False nested: False get_interfaces_ip: ---------- complies: False extra: missing: - Management1 present: ---------- skipped: result: True
(module (function_definition (function_name_op_at_on) function_name_op_at_on (parameters (typed_parameter (identifier_operation) identifier_operation (type (attribute (identifier_ops) identifier_ops (identifier_Operation) identifier_Operation )attribute )type )typed_parameter (typed_parameter (identifier_time) identifier_time (type (identifier_Timestamp) identifier_Timestamp )type )typed_parameter (typed_parameter (identifier_device) identifier_device (type (identifier_Device) identifier_Device )type )typed_parameter )parameters (block (return_statement (call (identifier_ScheduledOperation) identifier_ScheduledOperation (argument_list (identifier_time) identifier_time (call (attribute (identifier_device) identifier_device (identifier_duration_of) identifier_duration_of )attribute (argument_list (identifier_operation) identifier_operation )argument_list )call (identifier_operation) identifier_operation )argument_list )call )return_statement )block )function_definition )module
Creates a scheduled operation with a device-determined duration.
(module (function_definition (function_name_add_coreference) function_name_add_coreference (parameters (identifier_self) identifier_self (identifier_coreference) identifier_coreference )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_coreference_layer) identifier_coreference_layer )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_coreference_layer) identifier_coreference_layer )attribute (call (identifier_Ccoreferences) identifier_Ccoreferences (argument_list (keyword_argument (identifier_type) identifier_type (attribute (identifier_self) identifier_self (identifier_type) identifier_type )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute (identifier_append) identifier_append )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_coreference_layer) identifier_coreference_layer )attribute (identifier_get_node) identifier_get_node )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_coreference_layer) identifier_coreference_layer )attribute (identifier_add_coreference) identifier_add_coreference )attribute (argument_list (identifier_coreference) identifier_coreference )argument_list )call )expression_statement )block )function_definition )module
Adds an coreference to the coreference layer @type coreference: L{Ccoreference} @param coreference: the coreference object
(module (function_definition (function_name_number) function_name_number (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_math) identifier_math (identifier_ceil) identifier_ceil )attribute (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_total_size) identifier_total_size )attribute (call (identifier_float) identifier_float (argument_list (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute )argument_list )call )binary_operator )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Returns the number of batches the batched sequence contains. :rtype: integer.
(module (function_definition (function_name_get_single_keywords) function_name_get_single_keywords (parameters (identifier_skw_db) identifier_skw_db (identifier_fulltext) identifier_fulltext )parameters (block (expression_statement (assignment (identifier_timer_start) identifier_timer_start (call (attribute (identifier_time) identifier_time (identifier_clock) identifier_clock )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_records) identifier_records (list )list )assignment )expression_statement (for_statement (identifier_single_keyword) identifier_single_keyword (call (attribute (identifier_skw_db) identifier_skw_db (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (for_statement (identifier_regex) identifier_regex (attribute (identifier_single_keyword) identifier_single_keyword (identifier_regex) identifier_regex )attribute (block (for_statement (identifier_match) identifier_match (call (attribute (identifier_regex) identifier_regex (identifier_finditer) identifier_finditer )attribute (argument_list (identifier_fulltext) identifier_fulltext )argument_list )call (block (expression_statement (assignment (identifier_span) identifier_span (tuple (subscript (call (attribute (identifier_match) identifier_match (identifier_span) identifier_span )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript (binary_operator (subscript (call (attribute (identifier_match) identifier_match (identifier_span) identifier_span )attribute (argument_list )argument_list )call (integer_1) integer_1 )subscript (integer_1) integer_1 )binary_operator )tuple )assignment )expression_statement (expression_statement (assignment (identifier_records) identifier_records (list_comprehension (identifier_record) identifier_record (for_in_clause (identifier_record) identifier_record (identifier_records) identifier_records )for_in_clause (if_clause (not_operator (call (identifier__contains_span) identifier__contains_span (argument_list (identifier_span) identifier_span (subscript (identifier_record) identifier_record (integer_0) integer_0 )subscript )argument_list )call )not_operator )if_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_add) identifier_add (True) True )assignment )expression_statement (for_statement (identifier_previous_record) identifier_previous_record (identifier_records) identifier_records (block (if_statement (parenthesized_expression (boolean_operator (comparison_operator (tuple (identifier_span) identifier_span (identifier_single_keyword) identifier_single_keyword )tuple (identifier_previous_record) identifier_previous_record )comparison_operator (call (identifier__contains_span) identifier__contains_span (argument_list (subscript (identifier_previous_record) identifier_previous_record (integer_0) integer_0 )subscript (identifier_span) identifier_span )argument_list )call )boolean_operator )parenthesized_expression (block (expression_statement (assignment (identifier_add) identifier_add (False) False )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement (if_statement (identifier_add) identifier_add (block (expression_statement (call (attribute (identifier_records) identifier_records (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_span) identifier_span (identifier_single_keyword) identifier_single_keyword )tuple )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )for_statement )block )for_statement (expression_statement (assignment (identifier_single_keywords) identifier_single_keywords (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_span) identifier_span (identifier_single_keyword) identifier_single_keyword )pattern_list (identifier_records) identifier_records (block (expression_statement (call (attribute (identifier_single_keywords) identifier_single_keywords (identifier_setdefault) identifier_setdefault )attribute (argument_list (identifier_single_keyword) identifier_single_keyword (list (list )list )list )argument_list )call )expression_statement (expression_statement (call (attribute (subscript (subscript (identifier_single_keywords) identifier_single_keywords (identifier_single_keyword) identifier_single_keyword )subscript (integer_0) integer_0 )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_span) identifier_span )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_current_app) identifier_current_app (identifier_logger) identifier_logger )attribute (identifier_info) identifier_info )attribute (argument_list (binary_operator (concatenated_string (string_"Matching single keywords... %d keywords found ") string_"Matching single keywords... %d keywords found " (string_"in %.1f sec.") string_"in %.1f sec." )concatenated_string (tuple (call (identifier_len) identifier_len (argument_list (identifier_single_keywords) identifier_single_keywords )argument_list )call (binary_operator (call (attribute (identifier_time) identifier_time (identifier_clock) identifier_clock )attribute (argument_list )argument_list )call (identifier_timer_start) identifier_timer_start )binary_operator )tuple )binary_operator )argument_list )call )expression_statement (return_statement (identifier_single_keywords) identifier_single_keywords )return_statement )block )function_definition )module
Find single keywords in the fulltext. :param skw_db: list of KeywordToken objects :param fulltext: string, which will be searched :return : dictionary of matches in a format { <keyword object>, [[position, position...], ], .. }
(module (function_definition (function_name_create) function_name_create (parameters (identifier_dataset) identifier_dataset (identifier_target) identifier_target (default_parameter (identifier_features) identifier_features (None) None )default_parameter (default_parameter (identifier_validation_set) identifier_validation_set (string_'auto') string_'auto' )default_parameter (default_parameter (identifier_verbose) identifier_verbose (True) True )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_dataset) identifier_dataset (identifier_validation_set) identifier_validation_set )pattern_list (call (identifier__validate_data) identifier__validate_data (argument_list (identifier_dataset) identifier_dataset (identifier_target) identifier_target (identifier_features) identifier_features (identifier_validation_set) identifier_validation_set )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_validation_set) identifier_validation_set (None) None )comparison_operator (block (expression_statement (assignment (identifier_validation_set) identifier_validation_set (call (attribute (identifier__turicreate) identifier__turicreate (identifier_SFrame) identifier_SFrame )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_model_proxy) identifier_model_proxy (call (attribute (attribute (identifier__turicreate) identifier__turicreate (identifier_extensions) identifier_extensions )attribute (identifier_create_automatic_regression_model) identifier_create_automatic_regression_model )attribute (argument_list (identifier_dataset) identifier_dataset (identifier_target) identifier_target (identifier_validation_set) identifier_validation_set (dictionary )dictionary )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier__sl) identifier__sl (identifier_wrap_model_proxy) identifier_wrap_model_proxy )attribute (argument_list (identifier_model_proxy) identifier_model_proxy )argument_list )call )return_statement )block )function_definition )module
Automatically create a suitable regression model based on the provided training data. To use specific options of a desired model, use the ``create`` function of the corresponding model. Parameters ---------- dataset : SFrame Dataset for training the model. target : str The name of the column in ``dataset`` that is the prediction target. This column must have a numeric type (int/float). features : list[string], optional Names of the columns containing features. 'None' (the default) indicates that all columns except the target variable should be used as features. The features are columns in the input SFrame that can be of the following types: - *Numeric*: values of numeric type integer or float. - *Categorical*: values of type string. - *Array*: list of numeric (integer or float) values. Each list element is treated as a separate feature in the model. - *Dictionary*: key-value pairs with numeric (integer or float) values Each key of a dictionary is treated as a separate feature and the value in the dictionary corresponds to the value of the feature. Dictionaries are ideal for representing sparse data. Columns of type *list* are not supported. Convert such feature columns to type array if all entries in the list are of numeric types. If the lists contain data of mixed types, separate them out into different columns. validation_set : SFrame, optional A dataset for monitoring the model's generalization performance. For each row of the progress table, the chosen metrics are computed for both the provided training dataset and the validation_set. The format of this SFrame must be the same as the training set. By default this argument is set to 'auto' and a validation set is automatically sampled and used for progress printing. If validation_set is set to None, then no additional metrics are computed. The default value is 'auto'. verbose : boolean, optional If True, print progress information during training. Returns ------- out : A trained regression model. See Also -------- turicreate.linear_regression.LinearRegression, turicreate.boosted_trees_regression.BoostedTreesRegression Examples -------- .. sourcecode:: python # Setup the data >>> import turicreate as tc >>> data = tc.SFrame('https://static.turi.com/datasets/regression/houses.csv') # Selects the best model based on your data. >>> model = tc.regression.create(data, target='price', ... features=['bath', 'bedroom', 'size']) # Make predictions and evaluate results. >>> predictions = model.predict(data) >>> results = model.evaluate(data) # Setup the data >>> import turicreate as tc >>> data = tc.SFrame('https://static.turi.com/datasets/regression/houses.csv') # Selects the best model based on your data. >>> model = tc.regression.create(data, target='price', ... features=['bath', 'bedroom', 'size']) # Make predictions and evaluate results. >>> predictions = model.predict(data) >>> results = model.evaluate(data)
(module (function_definition (function_name_snappy_encode) function_name_snappy_encode (parameters (identifier_payload) identifier_payload (default_parameter (identifier_xerial_compatible) identifier_xerial_compatible (False) False )default_parameter (default_parameter (identifier_xerial_blocksize) identifier_xerial_blocksize (binary_operator (integer_32) integer_32 (integer_1024) integer_1024 )binary_operator )default_parameter )parameters (block (if_statement (not_operator (call (identifier_has_snappy) identifier_has_snappy (argument_list )argument_list )call )not_operator (block (raise_statement (call (identifier_NotImplementedError) identifier_NotImplementedError (argument_list (string_"Snappy codec is not available") string_"Snappy codec is not available" )argument_list )call )raise_statement )block )if_statement (if_statement (identifier_xerial_compatible) identifier_xerial_compatible (block (function_definition (function_name__chunker) function_name__chunker (parameters )parameters (block (for_statement (identifier_i) identifier_i (call (identifier_xrange) identifier_xrange (argument_list (integer_0) integer_0 (call (identifier_len) identifier_len (argument_list (identifier_payload) identifier_payload )argument_list )call (identifier_xerial_blocksize) identifier_xerial_blocksize )argument_list )call (block (expression_statement (yield (subscript (identifier_payload) identifier_payload (slice (identifier_i) identifier_i (colon) colon (binary_operator (identifier_i) identifier_i (identifier_xerial_blocksize) identifier_xerial_blocksize )binary_operator )slice )subscript )yield )expression_statement )block )for_statement )block )function_definition (expression_statement (assignment (identifier_out) identifier_out (call (identifier_BytesIO) identifier_BytesIO (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_header) identifier_header (call (attribute (string_b'') string_b'' (identifier_join) identifier_join )attribute (argument_list (list_comprehension (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (binary_operator (string_'!') string_'!' (identifier_fmt) identifier_fmt )binary_operator (identifier_dat) identifier_dat )argument_list )call (for_in_clause (pattern_list (identifier_fmt) identifier_fmt (identifier_dat) identifier_dat )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier__XERIAL_V1_FORMAT) identifier__XERIAL_V1_FORMAT (identifier__XERIAL_V1_HEADER) identifier__XERIAL_V1_HEADER )argument_list )call )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_out) identifier_out (identifier_write) identifier_write )attribute (argument_list (identifier_header) identifier_header )argument_list )call )expression_statement (for_statement (identifier_chunk) identifier_chunk (call (identifier__chunker) identifier__chunker (argument_list )argument_list )call (block (expression_statement (assignment (identifier_block) identifier_block (call (attribute (identifier_snappy) identifier_snappy (identifier_compress) identifier_compress )attribute (argument_list (identifier_chunk) identifier_chunk )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_block_size) identifier_block_size (call (identifier_len) identifier_len (argument_list (identifier_block) identifier_block )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_out) identifier_out (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_'!i') string_'!i' (identifier_block_size) identifier_block_size )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_out) identifier_out (identifier_write) identifier_write )attribute (argument_list (identifier_block) identifier_block )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_out) identifier_out (identifier_seek) identifier_seek )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (return_statement (call (attribute (identifier_out) identifier_out (identifier_read) identifier_read )attribute (argument_list )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_snappy) identifier_snappy (identifier_compress) identifier_compress )attribute (argument_list (identifier_payload) identifier_payload )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Encodes the given data with snappy if xerial_compatible is set then the stream is encoded in a fashion compatible with the xerial snappy library The block size (xerial_blocksize) controls how frequent the blocking occurs 32k is the default in the xerial library. The format winds up being +-------------+------------+--------------+------------+--------------+ | Header | Block1 len | Block1 data | Blockn len | Blockn data | |-------------+------------+--------------+------------+--------------| | 16 bytes | BE int32 | snappy bytes | BE int32 | snappy bytes | +-------------+------------+--------------+------------+--------------+ It is important to not that the blocksize is the amount of uncompressed data presented to snappy at each block, whereas the blocklen is the number of bytes that will be present in the stream, that is the length will always be <= blocksize.
(module (function_definition (function_name__get_pdb_id) function_name__get_pdb_id (parameters (identifier_self) identifier_self (identifier_elem) identifier_elem (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_id) identifier_id (subscript (attribute (identifier_elem) identifier_elem (identifier_attrib) identifier_attrib )attribute (string_'ID') string_'ID' )subscript )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_restrict_to_transmembrane_proteins) identifier_restrict_to_transmembrane_proteins )attribute (block (expression_statement (assignment (identifier_tmp) identifier_tmp (subscript (attribute (identifier_elem) identifier_elem (identifier_attrib) identifier_attrib )attribute (string_'TMP') string_'TMP' )subscript )assignment )expression_statement (assert_statement (parenthesized_expression (boolean_operator (boolean_operator (comparison_operator (identifier_tmp) identifier_tmp (string_'no') string_'no' )comparison_operator (comparison_operator (identifier_tmp) identifier_tmp (string_'yes') string_'yes' )comparison_operator )boolean_operator (comparison_operator (identifier_tmp) identifier_tmp (string_'not') string_'not' )comparison_operator )boolean_operator )parenthesized_expression )assert_statement (if_statement (comparison_operator (identifier_tmp) identifier_tmp (string_'yes') string_'yes' )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_ids) identifier_ids )attribute (identifier_id) identifier_id )subscript (call (attribute (identifier_PDBTM) identifier_PDBTM (identifier__get_tm_type) identifier__get_tm_type )attribute (argument_list (identifier_elem) identifier_elem )argument_list )call )assignment )expression_statement )block )if_statement )block (else_clause (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_ids) identifier_ids )attribute (identifier_id) identifier_id )subscript (binary_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_ids) identifier_ids )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_id) identifier_id (integer_0) integer_0 )argument_list )call (integer_1) integer_1 )binary_operator )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
If self.restrict_to_transmembrane_proteins is False then this adds all ids to self.ids. Otherwise, only transmembrane protein ids are added.
(module (function_definition (function_name_create_redis_client) function_name_create_redis_client (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (attribute (identifier_ray) identifier_ray (identifier_services) identifier_services )attribute (identifier_create_redis_client) identifier_create_redis_client )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__redis_address) identifier__redis_address )attribute (attribute (attribute (identifier_self) identifier_self (identifier__ray_params) identifier__ray_params )attribute (identifier_redis_password) identifier_redis_password )attribute )argument_list )call )return_statement )block )function_definition )module
Create a redis client.
(module (function_definition (function_name_do_authenticate_account) function_name_do_authenticate_account (parameters (identifier_self) identifier_self (identifier_authc_token) identifier_authc_token )parameters (block (try_statement (block (expression_statement (assignment (identifier_realms) identifier_realms (subscript (attribute (identifier_self) identifier_self (identifier_token_realm_resolver) identifier_token_realm_resolver )attribute (attribute (identifier_authc_token) identifier_authc_token (identifier___class__) identifier___class__ )attribute )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (string_'Unsupported Token Type Provided: ') string_'Unsupported Token Type Provided: ' (attribute (attribute (identifier_authc_token) identifier_authc_token (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (parenthesized_expression (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_realms) identifier_realms )attribute )argument_list )call (integer_1) integer_1 )comparison_operator )parenthesized_expression (block (expression_statement (assignment (identifier_account) identifier_account (call (attribute (identifier_self) identifier_self (identifier_authenticate_single_realm_account) identifier_authenticate_single_realm_account )attribute (argument_list (subscript (identifier_realms) identifier_realms (integer_0) integer_0 )subscript (identifier_authc_token) identifier_authc_token )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_account) identifier_account (call (attribute (identifier_self) identifier_self (identifier_authenticate_multi_realm_account) identifier_authenticate_multi_realm_account )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_realms) identifier_realms )attribute (identifier_authc_token) identifier_authc_token )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_cred_type) identifier_cred_type (subscript (attribute (identifier_authc_token) identifier_authc_token (identifier_token_info) identifier_token_info )attribute (string_'cred_type') string_'cred_type' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_attempts) identifier_attempts (call (attribute (subscript (subscript (identifier_account) identifier_account (string_'authc_info') string_'authc_info' )subscript (identifier_cred_type) identifier_cred_type )subscript (identifier_get) identifier_get )attribute (argument_list (string_'failed_attempts') string_'failed_attempts' (list )list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_validate_locked) identifier_validate_locked )attribute (argument_list (identifier_authc_token) identifier_authc_token (identifier_attempts) identifier_attempts )argument_list )call )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (subscript (identifier_account) identifier_account (string_'authc_info') string_'authc_info' )subscript )argument_list )call (subscript (attribute (identifier_authc_token) identifier_authc_token (identifier_token_info) identifier_token_info )attribute (string_'tier') string_'tier' )subscript )comparison_operator (block (if_statement (attribute (identifier_self) identifier_self (identifier_mfa_dispatcher) identifier_mfa_dispatcher )attribute (block (expression_statement (assignment (identifier_realm) identifier_realm (subscript (subscript (attribute (identifier_self) identifier_self (identifier_token_realm_resolver) identifier_token_realm_resolver )attribute (identifier_TOTPToken) identifier_TOTPToken )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_totp_token) identifier_totp_token (call (attribute (identifier_realm) identifier_realm (identifier_generate_totp_token) identifier_generate_totp_token )attribute (argument_list (identifier_account) identifier_account )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mfa_info) identifier_mfa_info (subscript (subscript (subscript (identifier_account) identifier_account (string_'authc_info') string_'authc_info' )subscript (string_'totp_key') string_'totp_key' )subscript (string_'2fa_info') string_'2fa_info' )subscript )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_mfa_dispatcher) identifier_mfa_dispatcher )attribute (identifier_dispatch) identifier_dispatch )attribute (argument_list (attribute (identifier_authc_token) identifier_authc_token (identifier_identifier) identifier_identifier )attribute (identifier_mfa_info) identifier_mfa_info (identifier_totp_token) identifier_totp_token )argument_list )call )expression_statement )block )if_statement (raise_statement (call (identifier_AdditionalAuthenticationRequired) identifier_AdditionalAuthenticationRequired (argument_list (subscript (identifier_account) identifier_account (string_'account_id') string_'account_id' )subscript )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_account) identifier_account )return_statement )block )function_definition )module
Returns an account object only when the current token authenticates AND the authentication process is complete, raising otherwise :returns: Account :raises AdditionalAuthenticationRequired: when additional tokens are required, passing the account object
(module (function_definition (function_name_connect_reftrack_scenenode) function_name_connect_reftrack_scenenode (parameters (identifier_self) identifier_self (identifier_refobj) identifier_refobj (identifier_scenenode) identifier_scenenode )parameters (block (expression_statement (assignment (identifier_conns) identifier_conns (list (tuple (binary_operator (string_"%s.scenenode") string_"%s.scenenode" (identifier_refobj) identifier_refobj )binary_operator (binary_operator (string_"%s.reftrack") string_"%s.reftrack" (identifier_scenenode) identifier_scenenode )binary_operator )tuple (tuple (binary_operator (string_"%s.taskfile_id") string_"%s.taskfile_id" (identifier_scenenode) identifier_scenenode )binary_operator (binary_operator (string_"%s.taskfile_id") string_"%s.taskfile_id" (identifier_refobj) identifier_refobj )binary_operator )tuple )list )assignment )expression_statement (for_statement (pattern_list (identifier_src) identifier_src (identifier_dst) identifier_dst )pattern_list (identifier_conns) identifier_conns (block (if_statement (not_operator (call (attribute (identifier_cmds) identifier_cmds (identifier_isConnected) identifier_isConnected )attribute (argument_list (identifier_src) identifier_src (identifier_dst) identifier_dst )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_cmds) identifier_cmds (identifier_connectAttr) identifier_connectAttr )attribute (argument_list (identifier_src) identifier_src (identifier_dst) identifier_dst (keyword_argument (identifier_force) identifier_force (True) True )keyword_argument )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Connect the given reftrack node with the given scene node :param refobj: the reftrack node to connect :type refobj: str :param scenenode: the jb_sceneNode to connect :type scenenode: str :returns: None :rtype: None :raises: None
(module (function_definition (function_name_download_and_extract_to_mkdtemp) function_name_download_and_extract_to_mkdtemp (parameters (identifier_bucket) identifier_bucket (identifier_key) identifier_key (default_parameter (identifier_session) identifier_session (None) None )default_parameter )parameters (block (if_statement (identifier_session) identifier_session (block (expression_statement (assignment (identifier_s3_client) identifier_s3_client (call (attribute (identifier_session) identifier_session (identifier_client) identifier_client )attribute (argument_list (string_'s3') string_'s3' )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_s3_client) identifier_s3_client (call (attribute (identifier_boto3) identifier_boto3 (identifier_client) identifier_client )attribute (argument_list (string_'s3') string_'s3' )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_transfer) identifier_transfer (call (identifier_S3Transfer) identifier_S3Transfer (argument_list (identifier_s3_client) identifier_s3_client )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_filedes) identifier_filedes (identifier_temp_file) identifier_temp_file )pattern_list (call (attribute (identifier_tempfile) identifier_tempfile (identifier_mkstemp) identifier_mkstemp )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_close) identifier_close )attribute (argument_list (identifier_filedes) identifier_filedes )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_transfer) identifier_transfer (identifier_download_file) identifier_download_file )attribute (argument_list (identifier_bucket) identifier_bucket (identifier_key) identifier_key (identifier_temp_file) identifier_temp_file )argument_list )call )expression_statement (expression_statement (assignment (identifier_output_dir) identifier_output_dir (call (attribute (identifier_tempfile) identifier_tempfile (identifier_mkdtemp) identifier_mkdtemp )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_zip_ref) identifier_zip_ref (call (attribute (identifier_zipfile) identifier_zipfile (identifier_ZipFile) identifier_ZipFile )attribute (argument_list (identifier_temp_file) identifier_temp_file (string_'r') string_'r' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_zip_ref) identifier_zip_ref (identifier_extractall) identifier_extractall )attribute (argument_list (identifier_output_dir) identifier_output_dir )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_zip_ref) identifier_zip_ref (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_temp_file) identifier_temp_file )argument_list )call )expression_statement (return_statement (identifier_output_dir) identifier_output_dir )return_statement )block )function_definition )module
Download zip archive and extract it to temporary directory.
(module (function_definition (function_name__speak_as_spell_out_inherit) function_name__speak_as_spell_out_inherit (parameters (identifier_self) identifier_self (identifier_element) identifier_element )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__reverse_speak_as) identifier__reverse_speak_as )attribute (argument_list (identifier_element) identifier_element (string_'spell-out') string_'spell-out' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__isolate_text_node) identifier__isolate_text_node )attribute (argument_list (identifier_element) identifier_element )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__visit) identifier__visit )attribute (argument_list (identifier_element) identifier_element (attribute (identifier_self) identifier_self (identifier__speak_as_spell_out) identifier__speak_as_spell_out )attribute )argument_list )call )expression_statement )block )function_definition )module
Speak one letter at a time for each word for elements and descendants. :param element: The element. :type element: hatemile.util.html.htmldomelement.HTMLDOMElement
(module (function_definition (function_name_plot_soma3d) function_name_plot_soma3d (parameters (identifier_ax) identifier_ax (identifier_soma) identifier_soma (default_parameter (identifier_color) identifier_color (None) None )default_parameter (default_parameter (identifier_alpha) identifier_alpha (identifier__ALPHA) identifier__ALPHA )default_parameter )parameters (block (expression_statement (assignment (identifier_color) identifier_color (call (identifier__get_color) identifier__get_color (argument_list (identifier_color) identifier_color (keyword_argument (identifier_tree_type) identifier_tree_type (attribute (identifier_NeuriteType) identifier_NeuriteType (identifier_soma) identifier_soma )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_soma) identifier_soma (identifier_SomaCylinders) identifier_SomaCylinders )argument_list )call (block (for_statement (pattern_list (identifier_start) identifier_start (identifier_end) identifier_end )pattern_list (call (identifier_zip) identifier_zip (argument_list (attribute (identifier_soma) identifier_soma (identifier_points) identifier_points )attribute (subscript (attribute (identifier_soma) identifier_soma (identifier_points) identifier_points )attribute (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call (block (expression_statement (call (attribute (identifier_common) identifier_common (identifier_plot_cylinder) identifier_plot_cylinder )attribute (argument_list (identifier_ax) identifier_ax (keyword_argument (identifier_start) identifier_start (subscript (identifier_start) identifier_start (attribute (identifier_COLS) identifier_COLS (identifier_XYZ) identifier_XYZ )attribute )subscript )keyword_argument (keyword_argument (identifier_end) identifier_end (subscript (identifier_end) identifier_end (attribute (identifier_COLS) identifier_COLS (identifier_XYZ) identifier_XYZ )attribute )subscript )keyword_argument (keyword_argument (identifier_start_radius) identifier_start_radius (subscript (identifier_start) identifier_start (attribute (identifier_COLS) identifier_COLS (identifier_R) identifier_R )attribute )subscript )keyword_argument (keyword_argument (identifier_end_radius) identifier_end_radius (subscript (identifier_end) identifier_end (attribute (identifier_COLS) identifier_COLS (identifier_R) identifier_R )attribute )subscript )keyword_argument (keyword_argument (identifier_color) identifier_color (identifier_color) identifier_color )keyword_argument (keyword_argument (identifier_alpha) identifier_alpha (identifier_alpha) identifier_alpha )keyword_argument )argument_list )call )expression_statement )block )for_statement )block (else_clause (block (expression_statement (call (attribute (identifier_common) identifier_common (identifier_plot_sphere) identifier_plot_sphere )attribute (argument_list (identifier_ax) identifier_ax (keyword_argument (identifier_center) identifier_center (subscript (attribute (identifier_soma) identifier_soma (identifier_center) identifier_center )attribute (attribute (identifier_COLS) identifier_COLS (identifier_XYZ) identifier_XYZ )attribute )subscript )keyword_argument (keyword_argument (identifier_radius) identifier_radius (attribute (identifier_soma) identifier_soma (identifier_radius) identifier_radius )attribute )keyword_argument (keyword_argument (identifier_color) identifier_color (identifier_color) identifier_color )keyword_argument (keyword_argument (identifier_alpha) identifier_alpha (identifier_alpha) identifier_alpha )keyword_argument )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (identifier__update_3d_datalim) identifier__update_3d_datalim (argument_list (identifier_ax) identifier_ax (identifier_soma) identifier_soma )argument_list )call )expression_statement )block )function_definition )module
Generates a 3d figure of the soma. Args: ax(matplotlib axes): on what to plot soma(neurom.core.Soma): plotted soma color(str or None): Color of plotted values, None corresponds to default choice alpha(float): Transparency of plotted values
(module (function_definition (function_name_convert_value) function_name_convert_value (parameters (identifier_value) identifier_value (identifier_source_currency) identifier_source_currency (identifier_target_currency) identifier_target_currency )parameters (block (if_statement (comparison_operator (identifier_source_currency) identifier_source_currency (identifier_target_currency) identifier_target_currency )comparison_operator (block (return_statement (identifier_value) identifier_value )return_statement )block )if_statement (expression_statement (assignment (identifier_rate) identifier_rate (call (identifier_get_rate) identifier_get_rate (argument_list (identifier_source_currency) identifier_source_currency (identifier_target_currency) identifier_target_currency )argument_list )call )assignment )expression_statement (return_statement (binary_operator (identifier_value) identifier_value (identifier_rate) identifier_rate )binary_operator )return_statement )block )function_definition )module
Converts the price of a currency to another one using exchange rates :param price: the price value :param type: decimal :param source_currency: source ISO-4217 currency code :param type: str :param target_currency: target ISO-4217 currency code :param type: str :returns: converted price instance :rtype: ``Price``
(module (function_definition (function_name_gsr_path) function_name_gsr_path (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (return_statement (attribute (identifier_self) identifier_self (identifier__gsr_path) identifier__gsr_path )attribute )return_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_self) identifier_self (identifier_outdir) identifier_outdir )attribute (identifier_has_abiext) identifier_has_abiext )attribute (argument_list (string_"GSR") string_"GSR" )argument_list )call )assignment )expression_statement (if_statement (identifier_path) identifier_path (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__gsr_path) identifier__gsr_path )attribute (identifier_path) identifier_path )assignment )expression_statement )block )if_statement (return_statement (identifier_path) identifier_path )return_statement )block )except_clause )try_statement )block )function_definition )module
Absolute path of the GSR file. Empty string if file is not present.
(module (function_definition (function_name_bind_download_buttons) function_name_bind_download_buttons (parameters (identifier_cls) identifier_cls )parameters (block (function_definition (function_name_on_click) function_name_on_click (parameters (identifier_ev) identifier_ev )parameters (block (expression_statement (assignment (identifier_button_el) identifier_button_el (attribute (identifier_ev) identifier_ev (identifier_target) identifier_target )attribute )assignment )expression_statement (expression_statement (assignment (identifier_form_el) identifier_form_el (attribute (attribute (attribute (identifier_button_el) identifier_button_el (identifier_parent) identifier_parent )attribute (identifier_parent) identifier_parent )attribute (identifier_parent) identifier_parent )attribute )assignment )expression_statement (expression_statement (assignment (identifier_content) identifier_content (attribute (subscript (call (attribute (identifier_form_el) identifier_form_el (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_selector) identifier_selector (string_"textarea") string_"textarea" )keyword_argument )argument_list )call (integer_0) integer_0 )subscript (identifier_text) identifier_text )attribute )assignment )expression_statement (expression_statement (assignment (identifier_suffix) identifier_suffix (attribute (identifier_form_el) identifier_form_el (identifier_name) identifier_name )attribute )assignment )expression_statement (expression_statement (assignment (identifier_download_path) identifier_download_path (binary_operator (string_"as_file/%s.%s") string_"as_file/%s.%s" (tuple (attribute (identifier_cls) identifier_cls (identifier_filename) identifier_filename )attribute (identifier_suffix) identifier_suffix )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_form_el) identifier_form_el (identifier_action) identifier_action )attribute (call (identifier_join) identifier_join (argument_list (attribute (identifier_settings) identifier_settings (identifier_API_PATH) identifier_API_PATH )attribute (identifier_download_path) identifier_download_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_input_el) identifier_input_el (subscript (call (attribute (identifier_form_el) identifier_form_el (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_selector) identifier_selector (string_"input") string_"input" )keyword_argument )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_input_el) identifier_input_el (identifier_value) identifier_value )attribute (identifier_content) identifier_content )assignment )expression_statement )block )function_definition (for_statement (identifier_el) identifier_el (call (attribute (identifier_document) identifier_document (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_selector) identifier_selector (string_"button.output_download_button") string_"button.output_download_button" )keyword_argument )argument_list )call (block (expression_statement (call (attribute (identifier_el) identifier_el (identifier_bind) identifier_bind )attribute (argument_list (string_"click") string_"click" (identifier_on_click) identifier_on_click )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Bind buttons to callbacks.
(module (function_definition (function_name_namedtuple_storable) function_name_namedtuple_storable (parameters (identifier_namedtuple) identifier_namedtuple (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (identifier_default_storable) identifier_default_storable (argument_list (identifier_namedtuple) identifier_namedtuple (attribute (identifier_namedtuple) identifier_namedtuple (identifier__fields) identifier__fields )attribute (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Storable factory for named tuples.
(module (function_definition (function_name_get_total_time) function_name_get_total_time (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_first_step) identifier_first_step (subscript (attribute (identifier_self) identifier_self (identifier_steps) identifier_steps )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_last_step) identifier_last_step (subscript (attribute (identifier_self) identifier_self (identifier_steps) identifier_steps )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement (expression_statement (assignment (identifier_seconds) identifier_seconds (binary_operator (subscript (subscript (attribute (identifier_self) identifier_self (identifier_history) identifier_history )attribute (identifier_last_step) identifier_last_step )subscript (string_"__timestamp__") string_"__timestamp__" )subscript (line_continuation_\) line_continuation_\ (subscript (subscript (attribute (identifier_self) identifier_self (identifier_history) identifier_history )attribute (identifier_first_step) identifier_first_step )subscript (string_"__timestamp__") string_"__timestamp__" )subscript )binary_operator )assignment )expression_statement (return_statement (call (attribute (identifier_datetime) identifier_datetime (identifier_timedelta) identifier_timedelta )attribute (argument_list (keyword_argument (identifier_seconds) identifier_seconds (identifier_seconds) identifier_seconds )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns the total period between when the first and last steps where logged. This usually correspnods to the total training time if there were no gaps in the training.
(module (function_definition (function_name__py3_crc16) function_name__py3_crc16 (parameters (identifier_value) identifier_value )parameters (block (expression_statement (assignment (identifier_crc) identifier_crc (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_byte) identifier_byte (identifier_value) identifier_value (block (expression_statement (assignment (identifier_crc) identifier_crc (binary_operator (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (identifier_crc) identifier_crc (integer_8) integer_8 )binary_operator )parenthesized_expression (integer_0xffff) integer_0xffff )binary_operator )parenthesized_expression (subscript (identifier__CRC16_LOOKUP) identifier__CRC16_LOOKUP (binary_operator (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (identifier_crc) identifier_crc (integer_8) integer_8 )binary_operator )parenthesized_expression (identifier_byte) identifier_byte )binary_operator )parenthesized_expression (integer_0xff) integer_0xff )binary_operator )subscript )binary_operator )assignment )expression_statement )block )for_statement (return_statement (identifier_crc) identifier_crc )return_statement )block )function_definition )module
Calculate the CRC for the value in Python 3 :param bytes value: The value to return for the CRC Checksum :rtype: int
(module (function_definition (function_name_rename_keys) function_name_rename_keys (parameters (typed_parameter (identifier_record) identifier_record (type (identifier_Mapping) identifier_Mapping )type )typed_parameter (typed_parameter (identifier_key_map) identifier_key_map (type (identifier_Mapping) identifier_Mapping )type )typed_parameter )parameters (type (identifier_dict) identifier_dict )type (block (expression_statement (assignment (identifier_new_record) identifier_new_record (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_record) identifier_record (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_key) identifier_key (conditional_expression (subscript (identifier_key_map) identifier_key_map (identifier_k) identifier_k )subscript (comparison_operator (identifier_k) identifier_k (identifier_key_map) identifier_key_map )comparison_operator (identifier_k) identifier_k )conditional_expression )assignment )expression_statement (expression_statement (assignment (subscript (identifier_new_record) identifier_new_record (identifier_key) identifier_key )subscript (identifier_v) identifier_v )assignment )expression_statement )block )for_statement (return_statement (identifier_new_record) identifier_new_record )return_statement )block )function_definition )module
New record with same keys or renamed keys if key found in key_map.
(module (function_definition (function_name_blob) function_name_blob (parameters (identifier_self) identifier_self (identifier_sha) identifier_sha )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier__build_url) identifier__build_url )attribute (argument_list (string_'git') string_'git' (string_'blobs') string_'blobs' (identifier_sha) identifier_sha (keyword_argument (identifier_base_url) identifier_base_url (attribute (identifier_self) identifier_self (identifier__api) identifier__api )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_json) identifier_json (call (attribute (identifier_self) identifier_self (identifier__json) identifier__json )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (identifier_url) identifier_url )argument_list )call (integer_200) integer_200 )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (call (identifier_Blob) identifier_Blob (argument_list (identifier_json) identifier_json )argument_list )call (identifier_json) identifier_json (None) None )conditional_expression )return_statement )block )function_definition )module
Get the blob indicated by ``sha``. :param str sha: (required), sha of the blob :returns: :class:`Blob <github3.git.Blob>` if successful, otherwise None
(module (function_definition (function_name_merge_chunk_data) function_name_merge_chunk_data (parameters (default_parameter (identifier_output_file) identifier_output_file (string_"merged_idx_contig_hit_size_cov.txt") string_"merged_idx_contig_hit_size_cov.txt" )default_parameter (list_splat_pattern (identifier_files) identifier_files )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_chunks) identifier_chunks (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_chunk_file) identifier_chunk_file (identifier_files) identifier_files (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_chunk_file) identifier_chunk_file )argument_list )call (as_pattern_target (identifier_chunk_file_handle) identifier_chunk_file_handle )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_line) identifier_line (identifier_chunk_file_handle) identifier_chunk_file_handle (block (expression_statement (assignment (pattern_list (identifier_chunk_id) identifier_chunk_id (identifier_chunk_name) identifier_chunk_name (identifier_hit) identifier_hit (identifier_size) identifier_size (identifier_cov) identifier_cov )pattern_list (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list (string_"\t") string_"\t" )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (augmented_assignment (subscript (subscript (identifier_chunks) identifier_chunks (identifier_chunk_id) identifier_chunk_id )subscript (string_"hit") string_"hit" )subscript (identifier_hit) identifier_hit )augmented_assignment )expression_statement (expression_statement (augmented_assignment (subscript (subscript (identifier_chunks) identifier_chunks (identifier_chunk_id) identifier_chunk_id )subscript (string_"cov") string_"cov" )subscript (identifier_cov) identifier_cov )augmented_assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (subscript (identifier_chunks) identifier_chunks (identifier_chunk_id) identifier_chunk_id )subscript (dictionary (pair (string_"name") string_"name" (identifier_chunk_name) identifier_chunk_name )pair (pair (string_"hit") string_"hit" (identifier_hit) identifier_hit )pair (pair (string_"size") string_"size" (identifier_size) identifier_size )pair (pair (string_"cov") string_"cov" (identifier_cov) identifier_cov )pair )dictionary )assignment )expression_statement )block )except_clause )try_statement )block )for_statement )block )with_statement )block )for_statement (expression_statement (assignment (identifier_sorted_chunks) identifier_sorted_chunks (call (identifier_sorted) identifier_sorted (argument_list (identifier_chunks) identifier_chunks )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_output_file) identifier_output_file (string_"w") string_"w" )argument_list )call (as_pattern_target (identifier_output_handle) identifier_output_handle )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_chunk_id) identifier_chunk_id (identifier_sorted_chunks) identifier_sorted_chunks (block (expression_statement (assignment (identifier_my_chunk) identifier_my_chunk (subscript (identifier_chunks) identifier_chunks (identifier_chunk_id) identifier_chunk_id )subscript )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_name) identifier_name (identifier_hit) identifier_hit (identifier_size) identifier_size (identifier_cov) identifier_cov )pattern_list (tuple (subscript (identifier_my_chunk) identifier_my_chunk (string_"name") string_"name" )subscript (subscript (identifier_my_chunk) identifier_my_chunk (string_"hit") string_"hit" )subscript (subscript (identifier_my_chunk) identifier_my_chunk (string_"size") string_"size" )subscript (subscript (identifier_my_chunk) identifier_my_chunk (string_"cov") string_"cov" )subscript )tuple )assignment )expression_statement (expression_statement (assignment (identifier_my_line) identifier_my_line (call (attribute (string_"{}\t{}\t{}\t{}\t{}") string_"{}\t{}\t{}\t{}\t{}" (identifier_format) identifier_format )attribute (argument_list (identifier_chunk_id) identifier_chunk_id (identifier_name) identifier_name (identifier_hit) identifier_hit (identifier_size) identifier_size (identifier_cov) identifier_cov )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_output_handle) identifier_output_handle (identifier_write) identifier_write )attribute (argument_list (identifier_my_line) identifier_my_line )argument_list )call )expression_statement )block )for_statement )block )with_statement )block )function_definition )module
Merge chunk data from different networks Similarly to merge_network, this merges any number of chunk data files. Parameters --------- output_file : file, str, or pathlib.Path, optional The output file to write the merged chunk data files into. Default is merged_idx_contig_hit_size_cov.txt `*files` : file, str or pathlib.Path The chunk data files to merge.
(module (function_definition (function_name_delete_intf_router) function_name_delete_intf_router (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_tenant_id) identifier_tenant_id (identifier_rout_id) identifier_rout_id (identifier_subnet_lst) identifier_subnet_lst )parameters (block (try_statement (block (for_statement (identifier_subnet_id) identifier_subnet_id (identifier_subnet_lst) identifier_subnet_lst (block (expression_statement (assignment (identifier_body) identifier_body (dictionary (pair (string_'subnet_id') string_'subnet_id' (identifier_subnet_id) identifier_subnet_id )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_intf) identifier_intf (call (attribute (attribute (identifier_self) identifier_self (identifier_neutronclient) identifier_neutronclient )attribute (identifier_remove_interface_router) identifier_remove_interface_router )attribute (argument_list (identifier_rout_id) identifier_rout_id (keyword_argument (identifier_body) identifier_body (identifier_body) identifier_body )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_intf) identifier_intf (identifier_get) identifier_get )attribute (argument_list (string_'id') string_'id' )argument_list )call )expression_statement )block )for_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_error) identifier_error )attribute (argument_list (concatenated_string (string_"Failed to delete router interface %(name)s, ") string_"Failed to delete router interface %(name)s, " (string_" Exc %(exc)s") string_" Exc %(exc)s" )concatenated_string (dictionary (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'exc') string_'exc' (call (identifier_str) identifier_str (argument_list (identifier_exc) identifier_exc )argument_list )call )pair )dictionary )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )except_clause )try_statement (return_statement (True) True )return_statement )block )function_definition )module
Delete the openstack router and remove the interfaces attached.
(module (function_definition (function_name_convert_ascii_field) function_name_convert_ascii_field (parameters (identifier_string) identifier_string )parameters (block (expression_statement (assignment (identifier_values) identifier_values (list )list )assignment )expression_statement (for_statement (identifier_codepoint) identifier_codepoint (list_comprehension (identifier_s) identifier_s (for_in_clause (identifier_s) identifier_s (call (attribute (identifier_string) identifier_string (identifier_split) identifier_split )attribute (argument_list (identifier_DATA_FILE_CODEPOINT_SEPARATOR) identifier_DATA_FILE_CODEPOINT_SEPARATOR )argument_list )call )for_in_clause (if_clause (boolean_operator (parenthesized_expression (comparison_operator (identifier_s) identifier_s (identifier_DATA_FILE_VALUE_NOT_AVAILABLE) identifier_DATA_FILE_VALUE_NOT_AVAILABLE )comparison_operator )parenthesized_expression (parenthesized_expression (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_s) identifier_s )argument_list )call (integer_0) integer_0 )comparison_operator )parenthesized_expression )boolean_operator )if_clause )list_comprehension (block (if_statement (boolean_operator (parenthesized_expression (call (attribute (identifier_codepoint) identifier_codepoint (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_DATA_FILE_ASCII_NUMERICAL_CODEPOINT_START) identifier_DATA_FILE_ASCII_NUMERICAL_CODEPOINT_START )argument_list )call )parenthesized_expression (parenthesized_expression (call (attribute (identifier_codepoint) identifier_codepoint (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_DATA_FILE_ASCII_UNICODE_CODEPOINT_START) identifier_DATA_FILE_ASCII_UNICODE_CODEPOINT_START )argument_list )call )parenthesized_expression )boolean_operator (block (expression_statement (call (attribute (identifier_values) identifier_values (identifier_append) identifier_append )attribute (argument_list (call (identifier_hex_to_unichr) identifier_hex_to_unichr (argument_list (identifier_codepoint) identifier_codepoint )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_values) identifier_values (identifier_append) identifier_append )attribute (argument_list (identifier_codepoint) identifier_codepoint )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_values) identifier_values )return_statement )block )function_definition )module
Convert an ASCII field into the corresponding list of Unicode strings. The (input) ASCII field is a Unicode string containing one or more ASCII codepoints (``00xx`` or ``U+00xx`` or an ASCII string not starting with ``00`` or ``U+``), separated by a space. :param str string: the (input) ASCII field :rtype: list of Unicode strings
(module (function_definition (function_name_get_service_types) function_name_get_service_types (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (call (attribute (identifier_self) identifier_self (identifier__get_resource_root) identifier__get_resource_root )attribute (argument_list )argument_list )call (identifier_get) identifier_get )attribute (argument_list (binary_operator (call (attribute (identifier_self) identifier_self (identifier__path) identifier__path )attribute (argument_list )argument_list )call (string_'/serviceTypes') string_'/serviceTypes' )binary_operator )argument_list )call )assignment )expression_statement (return_statement (subscript (identifier_resp) identifier_resp (attribute (identifier_ApiList) identifier_ApiList (identifier_LIST_KEY) identifier_LIST_KEY )attribute )subscript )return_statement )block )function_definition )module
Get all service types supported by this cluster. @return: A list of service types (strings)
(module (function_definition (function_name_body_kwargs) function_name_body_kwargs (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_body_kwargs) identifier_body_kwargs (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_ct) identifier_ct (call (attribute (identifier_self) identifier_self (identifier_get_header) identifier_get_header )attribute (argument_list (string_"content-type") string_"content-type" )argument_list )call )assignment )expression_statement (if_statement (identifier_ct) identifier_ct (block (expression_statement (assignment (identifier_ct) identifier_ct (call (attribute (identifier_ct) identifier_ct (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_ct) identifier_ct (identifier_rfind) identifier_rfind )attribute (argument_list (string_"json") string_"json" )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_body) identifier_body (attribute (identifier_self) identifier_self (identifier_body) identifier_body )attribute )assignment )expression_statement (if_statement (identifier_body) identifier_body (block (expression_statement (assignment (identifier_body_kwargs) identifier_body_kwargs (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_body) identifier_body )argument_list )call )assignment )expression_statement )block )if_statement )block (else_clause (block (if_statement (attribute (identifier_self) identifier_self (identifier_body_input) identifier_body_input )attribute (block (expression_statement (assignment (identifier_body) identifier_body (call (identifier_RequestBody) identifier_RequestBody (argument_list (keyword_argument (identifier_fp) identifier_fp (attribute (identifier_self) identifier_self (identifier_body_input) identifier_body_input )attribute )keyword_argument (keyword_argument (identifier_headers) identifier_headers (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute )keyword_argument (keyword_argument (identifier_environ) identifier_environ (attribute (identifier_self) identifier_self (identifier_environ) identifier_environ )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_body_kwargs) identifier_body_kwargs (call (identifier_dict) identifier_dict (argument_list (identifier_body) identifier_body )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_body) identifier_body (attribute (identifier_self) identifier_self (identifier_body) identifier_body )attribute )assignment )expression_statement (if_statement (identifier_body) identifier_body (block (expression_statement (assignment (identifier_body_kwargs) identifier_body_kwargs (call (attribute (identifier_self) identifier_self (identifier__parse_query_str) identifier__parse_query_str )attribute (argument_list (identifier_body) identifier_body )argument_list )call )assignment )expression_statement )block )if_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )if_statement (return_statement (identifier_body_kwargs) identifier_body_kwargs )return_statement )block )function_definition )module
the request body, if this is a POST request this tries to do the right thing with the body, so if you have set the body and the content type is json, then it will return the body json decoded, if you need the original string body, use body example -- self.body = '{"foo":{"name":"bar"}}' b = self.body_kwargs # dict with: {"foo": { "name": "bar"}} print self.body # string with: '{"foo":{"name":"bar"}}'
(module (function_definition (function_name_set_cursor_pos_callback) function_name_set_cursor_pos_callback (parameters (identifier_window) identifier_window (identifier_cbfun) identifier_cbfun )parameters (block (expression_statement (assignment (identifier_window_addr) identifier_window_addr (attribute (attribute (call (attribute (identifier_ctypes) identifier_ctypes (identifier_cast) identifier_cast )attribute (argument_list (call (attribute (identifier_ctypes) identifier_ctypes (identifier_pointer) identifier_pointer )attribute (argument_list (identifier_window) identifier_window )argument_list )call (call (attribute (identifier_ctypes) identifier_ctypes (identifier_POINTER) identifier_POINTER )attribute (argument_list (attribute (identifier_ctypes) identifier_ctypes (identifier_c_long) identifier_c_long )attribute )argument_list )call )argument_list )call (identifier_contents) identifier_contents )attribute (identifier_value) identifier_value )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_window_addr) identifier_window_addr (identifier__cursor_pos_callback_repository) identifier__cursor_pos_callback_repository )comparison_operator (block (expression_statement (assignment (identifier_previous_callback) identifier_previous_callback (subscript (identifier__cursor_pos_callback_repository) identifier__cursor_pos_callback_repository (identifier_window_addr) identifier_window_addr )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_previous_callback) identifier_previous_callback (None) None )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_cbfun) identifier_cbfun (None) None )comparison_operator (block (expression_statement (assignment (identifier_cbfun) identifier_cbfun (integer_0) integer_0 )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_c_cbfun) identifier_c_cbfun (call (identifier__GLFWcursorposfun) identifier__GLFWcursorposfun (argument_list (identifier_cbfun) identifier_cbfun )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier__cursor_pos_callback_repository) identifier__cursor_pos_callback_repository (identifier_window_addr) identifier_window_addr )subscript (tuple (identifier_cbfun) identifier_cbfun (identifier_c_cbfun) identifier_c_cbfun )tuple )assignment )expression_statement (expression_statement (assignment (identifier_cbfun) identifier_cbfun (identifier_c_cbfun) identifier_c_cbfun )assignment )expression_statement (expression_statement (call (attribute (identifier__glfw) identifier__glfw (identifier_glfwSetCursorPosCallback) identifier_glfwSetCursorPosCallback )attribute (argument_list (identifier_window) identifier_window (identifier_cbfun) identifier_cbfun )argument_list )call )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_previous_callback) identifier_previous_callback (None) None )comparison_operator (comparison_operator (subscript (identifier_previous_callback) identifier_previous_callback (integer_0) integer_0 )subscript (integer_0) integer_0 )comparison_operator )boolean_operator (block (return_statement (subscript (identifier_previous_callback) identifier_previous_callback (integer_0) integer_0 )subscript )return_statement )block )if_statement )block )function_definition )module
Sets the cursor position callback. Wrapper for: GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun cbfun);
(module (function_definition (function_name_substitute_values) function_name_substitute_values (parameters (identifier_self) identifier_self (identifier_vect) identifier_vect )parameters (block (try_statement (block (expression_statement (assignment (identifier_unique) identifier_unique (call (attribute (identifier_np) identifier_np (identifier_unique) identifier_unique )attribute (argument_list (identifier_vect) identifier_vect )argument_list )call )assignment )expression_statement )block (except_clause (block (expression_statement (assignment (identifier_unique) identifier_unique (call (identifier_set) identifier_set (argument_list (identifier_vect) identifier_vect )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_unique) identifier_unique (list_comprehension (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (identifier_unique) identifier_unique )for_in_clause (if_clause (boolean_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_x) identifier_x (identifier_float) identifier_float )argument_list )call )not_operator (not_operator (call (identifier_isnan) identifier_isnan (argument_list (identifier_x) identifier_x )argument_list )call )not_operator )boolean_operator )if_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_arr) identifier_arr (call (attribute (identifier_np) identifier_np (identifier_copy) identifier_copy )attribute (argument_list (identifier_vect) identifier_vect )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_new_id) identifier_new_id (identifier_value) identifier_value )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_unique) identifier_unique )argument_list )call (block (expression_statement (call (attribute (identifier_np) identifier_np (identifier_place) identifier_place )attribute (argument_list (identifier_arr) identifier_arr (comparison_operator (identifier_arr) identifier_arr (identifier_value) identifier_value )comparison_operator (identifier_new_id) identifier_new_id )argument_list )call )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_metadata) identifier_metadata )attribute (identifier_new_id) identifier_new_id )subscript (identifier_value) identifier_value )assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_arr) identifier_arr (call (attribute (identifier_arr) identifier_arr (identifier_astype) identifier_astype )attribute (argument_list (attribute (identifier_np) identifier_np (identifier_float) identifier_float )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_np) identifier_np (identifier_place) identifier_place )attribute (argument_list (identifier_arr) identifier_arr (call (attribute (identifier_np) identifier_np (identifier_isnan) identifier_isnan )attribute (argument_list (identifier_arr) identifier_arr )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_arr) identifier_arr )attribute (identifier_arr) identifier_arr )assignment )expression_statement (if_statement (comparison_operator (unary_operator (integer_1) integer_1 )unary_operator (identifier_arr) identifier_arr )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_metadata) identifier_metadata )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript (attribute (identifier_self) identifier_self (identifier__missing_id) identifier__missing_id )attribute )assignment )expression_statement )block )if_statement )block )function_definition )module
Internal method to substitute integers into the vector, and construct metadata to convert back to the original vector. np.nan is always given -1, all other objects are given integers in order of apperence. Parameters ---------- vect : np.array the vector in which to substitute values in
(module (function_definition (function_name_reconstitute_path) function_name_reconstitute_path (parameters (identifier_drive) identifier_drive (identifier_folders) identifier_folders )parameters (block (expression_statement (assignment (identifier_reconstituted) identifier_reconstituted (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_drive) identifier_drive (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_sep) identifier_sep )attribute (list_splat (identifier_folders) identifier_folders )list_splat )argument_list )call )assignment )expression_statement (return_statement (identifier_reconstituted) identifier_reconstituted )return_statement )block )function_definition )module
Reverts a tuple from `get_path_components` into a path. :param drive: A drive (eg 'c:'). Only applicable for NT systems :param folders: A list of folder names :return: A path comprising the drive and list of folder names. The path terminate with a `os.path.sep` *only* if it is a root directory
(module (function_definition (function_name_select) function_name_select (parameters (identifier_self) identifier_self (default_parameter (identifier_limit) identifier_limit (integer_0) integer_0 )default_parameter )parameters (block (if_statement (comparison_operator (identifier_limit) identifier_limit (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_limit) identifier_limit (None) None )assignment )expression_statement )block )if_statement (for_statement (identifier_child) identifier_child (call (attribute (identifier_self) identifier_self (identifier_get_descendants) identifier_get_descendants )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_tag) identifier_tag )attribute )argument_list )call (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_match) identifier_match )attribute (argument_list (identifier_child) identifier_child )argument_list )call (block (expression_statement (yield (identifier_child) identifier_child )yield )expression_statement (if_statement (comparison_operator (identifier_limit) identifier_limit (None) None )comparison_operator (block (expression_statement (augmented_assignment (identifier_limit) identifier_limit (integer_1) integer_1 )augmented_assignment )expression_statement (if_statement (comparison_operator (identifier_limit) identifier_limit (integer_1) integer_1 )comparison_operator (block (break_statement )break_statement )block )if_statement )block )if_statement )block )if_statement )block )for_statement )block )function_definition )module
Match all tags under the targeted tag.
(module (function_definition (function_name_crypto_sign) function_name_crypto_sign (parameters (identifier_msg) identifier_msg (identifier_sk) identifier_sk )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_sk) identifier_sk )argument_list )call (identifier_SECRETKEYBYTES) identifier_SECRETKEYBYTES )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Bad signing key length %d") string_"Bad signing key length %d" (call (identifier_len) identifier_len (argument_list (identifier_sk) identifier_sk )argument_list )call )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_vkbytes) identifier_vkbytes (subscript (identifier_sk) identifier_sk (slice (identifier_PUBLICKEYBYTES) identifier_PUBLICKEYBYTES (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_skbytes) identifier_skbytes (subscript (identifier_sk) identifier_sk (slice (colon) colon (identifier_PUBLICKEYBYTES) identifier_PUBLICKEYBYTES )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_sig) identifier_sig (call (attribute (identifier_djbec) identifier_djbec (identifier_signature) identifier_signature )attribute (argument_list (identifier_msg) identifier_msg (identifier_skbytes) identifier_skbytes (identifier_vkbytes) identifier_vkbytes )argument_list )call )assignment )expression_statement (return_statement (binary_operator (identifier_sig) identifier_sig (identifier_msg) identifier_msg )binary_operator )return_statement )block )function_definition )module
Return signature+message given message and secret key. The signature is the first SIGNATUREBYTES bytes of the return value. A copy of msg is in the remainder.
(module (function_definition (function_name_format) function_name_format (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (argument_list (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_ColorStr) identifier_ColorStr (identifier_self) identifier_self )argument_list )call (identifier_format) identifier_format )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (keyword_argument (identifier_keep_tags) identifier_keep_tags (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return a formatted version, using substitutions from args and kwargs. The substitutions are identified by braces ('{' and '}').
(module (function_definition (function_name_parse_rule) function_name_parse_rule (parameters (identifier_name) identifier_name (identifier_rule_text) identifier_rule_text (default_parameter (identifier_do_raise) identifier_do_raise (False) False )default_parameter )parameters (block (try_statement (block (return_statement (subscript (call (attribute (identifier_rule) identifier_rule (identifier_parseString) identifier_parseString )attribute (argument_list (identifier_rule_text) identifier_rule_text (keyword_argument (identifier_parseAll) identifier_parseAll (True) True )keyword_argument )argument_list )call (integer_0) integer_0 )subscript )return_statement )block (except_clause (as_pattern (attribute (identifier_pyparsing) identifier_pyparsing (identifier_ParseException) identifier_ParseException )attribute (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (if_statement (identifier_do_raise) identifier_do_raise (block (raise_statement )raise_statement )block )if_statement (expression_statement (assignment (identifier_log) identifier_log (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (string_'policies') string_'policies' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warn) identifier_warn )attribute (argument_list (binary_operator (string_"Failed to parse rule %r: %s") string_"Failed to parse rule %r: %s" (tuple (identifier_name) identifier_name (identifier_exc) identifier_exc )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warn) identifier_warn )attribute (argument_list (binary_operator (string_"Rule line: %s") string_"Rule line: %s" (attribute (identifier_exc) identifier_exc (identifier_line) identifier_line )attribute )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warn) identifier_warn )attribute (argument_list (binary_operator (string_"Location : %s^") string_"Location : %s^" (parenthesized_expression (binary_operator (string_" ") string_" " (parenthesized_expression (binary_operator (attribute (identifier_exc) identifier_exc (identifier_col) identifier_col )attribute (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )parenthesized_expression )binary_operator )argument_list )call )expression_statement (return_statement (call (identifier_Instructions) identifier_Instructions (argument_list (list (call (identifier_Constant) identifier_Constant (argument_list (False) False )argument_list )call (identifier_set_authz) identifier_set_authz )list )argument_list )call )return_statement )block )except_clause )try_statement )block )function_definition )module
Parses the given rule text. :param name: The name of the rule. Used when emitting log messages regarding a failure to parse the rule. :param rule_text: The text of the rule to parse. :param do_raise: If ``False`` and the rule fails to parse, a log message is emitted to the "policies" logger at level WARN, and a rule that always evaluates to ``False`` will be returned. If ``True``, a ``pyparsing.ParseException`` will be raised. :returns: An instance of ``policies.instructions.Instructions``, containing the instructions necessary to evaluate the authorization rule.
(module (function_definition (function_name_get_relationship) function_name_get_relationship (parameters (identifier_self) identifier_self (identifier_attribute) identifier_attribute )parameters (block (expression_statement (assignment (identifier_rel) identifier_rel (call (attribute (attribute (identifier_self) identifier_self (identifier___relationships) identifier___relationships )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_attribute) identifier_attribute (identifier_entity_attr) identifier_entity_attr )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_rel) identifier_rel (None) None )comparison_operator (block (expression_statement (assignment (identifier_rel) identifier_rel (call (identifier_LazyDomainRelationship) identifier_LazyDomainRelationship (argument_list (identifier_self) identifier_self (identifier_attribute) identifier_attribute (keyword_argument (identifier_direction) identifier_direction (attribute (identifier_self) identifier_self (identifier_relationship_direction) identifier_relationship_direction )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier___relationships) identifier___relationships )attribute (attribute (identifier_attribute) identifier_attribute (identifier_entity_attr) identifier_entity_attr )attribute )subscript (identifier_rel) identifier_rel )assignment )expression_statement )block )if_statement (return_statement (identifier_rel) identifier_rel )return_statement )block )function_definition )module
Returns the domain relationship object for the given resource attribute.
(module (function_definition (function_name_wrap) function_name_wrap (parameters (typed_parameter (identifier_start) identifier_start (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_string) identifier_string (type (identifier_str) identifier_str )type )typed_parameter (typed_default_parameter (identifier_end) identifier_end (type (identifier_str) identifier_str )type (string_"") string_"" )typed_default_parameter )parameters (type (identifier_str) identifier_str )type (block (return_statement (conditional_expression (string_f"{start}{string}{end}") string_f"{start}{string}{end}" (identifier_string) identifier_string (string_"") string_"" )conditional_expression )return_statement )block )function_definition )module
Wrap string inside other strings at start and end. If the string is not None or empty, then wrap with start and end, otherwise return an empty string.
(module (function_definition (function_name_send_msg) function_name_send_msg (parameters (identifier_app) identifier_app (identifier_msg) identifier_msg (default_parameter (identifier_reply_cls) identifier_reply_cls (None) None )default_parameter (default_parameter (identifier_reply_multi) identifier_reply_multi (False) False )default_parameter )parameters (block (return_statement (call (call (attribute (identifier_app) identifier_app (identifier_send_request) identifier_send_request )attribute (argument_list (call (attribute (identifier_event) identifier_event (identifier_SendMsgRequest) identifier_SendMsgRequest )attribute (argument_list (keyword_argument (identifier_msg) identifier_msg (identifier_msg) identifier_msg )keyword_argument (keyword_argument (identifier_reply_cls) identifier_reply_cls (identifier_reply_cls) identifier_reply_cls )keyword_argument (keyword_argument (identifier_reply_multi) identifier_reply_multi (identifier_reply_multi) identifier_reply_multi )keyword_argument )argument_list )call )argument_list )call (argument_list )argument_list )call )return_statement )block )function_definition )module
Send an OpenFlow message and wait for reply messages. :param app: Client RyuApp instance :param msg: An OpenFlow controller-to-switch message to send :param reply_cls: OpenFlow message class for expected replies. None means no replies are expected. The default is None. :param reply_multi: True if multipart replies are expected. The default is False. If no replies, returns None. If reply_multi=False, returns OpenFlow switch-to-controller message. If reply_multi=True, returns a list of OpenFlow switch-to-controller messages. Raise an exception on error. Example:: # ...(snip)... import ryu.app.ofctl.api as ofctl_api class MyApp(app_manager.RyuApp): def _my_handler(self, ev): # ...(snip)... msg = parser.OFPPortDescStatsRequest(datapath=datapath) result = ofctl_api.send_msg( self, msg, reply_cls=parser.OFPPortDescStatsReply, reply_multi=True)
(module (function_definition (function_name_is_castable) function_name_is_castable (parameters (identifier_src) identifier_src (identifier_dst) identifier_dst )parameters (block (if_statement (boolean_operator (parenthesized_expression (boolean_operator (parenthesized_expression (comparison_operator (identifier_src) identifier_src (list (identifier_int) identifier_int (identifier_bool) identifier_bool )list )comparison_operator )parenthesized_expression (call (attribute (identifier_rdltypes) identifier_rdltypes (identifier_is_user_enum) identifier_is_user_enum )attribute (argument_list (identifier_src) identifier_src )argument_list )call )boolean_operator )parenthesized_expression (parenthesized_expression (comparison_operator (identifier_dst) identifier_dst (list (identifier_int) identifier_int (identifier_bool) identifier_bool )list )comparison_operator )parenthesized_expression )boolean_operator (block (return_statement (True) True )return_statement )block (elif_clause (boolean_operator (parenthesized_expression (comparison_operator (identifier_src) identifier_src (attribute (identifier_rdltypes) identifier_rdltypes (identifier_ArrayPlaceholder) identifier_ArrayPlaceholder )attribute )comparison_operator )parenthesized_expression (parenthesized_expression (comparison_operator (identifier_dst) identifier_dst (attribute (identifier_rdltypes) identifier_rdltypes (identifier_ArrayPlaceholder) identifier_ArrayPlaceholder )attribute )comparison_operator )parenthesized_expression )boolean_operator (block (if_statement (comparison_operator (attribute (identifier_src) identifier_src (identifier_element_type) identifier_element_type )attribute (None) None )comparison_operator (block (return_statement (True) True )return_statement )block (elif_clause (comparison_operator (attribute (identifier_src) identifier_src (identifier_element_type) identifier_element_type )attribute (attribute (identifier_dst) identifier_dst (identifier_element_type) identifier_element_type )attribute )comparison_operator (block (return_statement (True) True )return_statement )block )elif_clause (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block )elif_clause (elif_clause (call (attribute (identifier_rdltypes) identifier_rdltypes (identifier_is_user_struct) identifier_is_user_struct )attribute (argument_list (identifier_dst) identifier_dst )argument_list )call (block (return_statement (call (identifier_issubclass) identifier_issubclass (argument_list (identifier_src) identifier_src (identifier_dst) identifier_dst )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_dst) identifier_dst (attribute (identifier_rdltypes) identifier_rdltypes (identifier_PropertyReference) identifier_PropertyReference )attribute )comparison_operator (block (return_statement (call (identifier_issubclass) identifier_issubclass (argument_list (identifier_src) identifier_src (attribute (identifier_rdltypes) identifier_rdltypes (identifier_PropertyReference) identifier_PropertyReference )attribute )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_src) identifier_src (identifier_dst) identifier_dst )comparison_operator (block (return_statement (True) True )return_statement )block )elif_clause (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block )function_definition )module
Check if src type can be cast to dst type
(module (function_definition (function_name_finish_authentication) function_name_finish_authentication (parameters (identifier_self) identifier_self (identifier_username) identifier_username (identifier_password) identifier_password )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_srp) identifier_srp )attribute (identifier_step1) identifier_step1 )attribute (argument_list (identifier_username) identifier_username (identifier_password) identifier_password )argument_list )call )expression_statement (expression_statement (assignment (identifier_data) identifier_data (await (call (attribute (identifier_self) identifier_self (identifier__send_plist) identifier__send_plist )attribute (argument_list (string_'step1') string_'step1' (keyword_argument (identifier_method) identifier_method (string_'pin') string_'pin' )keyword_argument (keyword_argument (identifier_user) identifier_user (identifier_username) identifier_username )keyword_argument )argument_list )call )await )assignment )expression_statement (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (identifier_plistlib) identifier_plistlib (identifier_loads) identifier_loads )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_pub_key) identifier_pub_key (identifier_key_proof) identifier_key_proof )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_srp) identifier_srp )attribute (identifier_step2) identifier_step2 )attribute (argument_list (subscript (identifier_resp) identifier_resp (string_'pk') string_'pk' )subscript (subscript (identifier_resp) identifier_resp (string_'salt') string_'salt' )subscript )argument_list )call )assignment )expression_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier__send_plist) identifier__send_plist )attribute (argument_list (string_'step2') string_'step2' (keyword_argument (identifier_pk) identifier_pk (call (attribute (identifier_binascii) identifier_binascii (identifier_unhexlify) identifier_unhexlify )attribute (argument_list (identifier_pub_key) identifier_pub_key )argument_list )call )keyword_argument (keyword_argument (identifier_proof) identifier_proof (call (attribute (identifier_binascii) identifier_binascii (identifier_unhexlify) identifier_unhexlify )attribute (argument_list (identifier_key_proof) identifier_key_proof )argument_list )call )keyword_argument )argument_list )call )await )expression_statement (expression_statement (assignment (pattern_list (identifier_epk) identifier_epk (identifier_tag) identifier_tag )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_srp) identifier_srp )attribute (identifier_step3) identifier_step3 )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier__send_plist) identifier__send_plist )attribute (argument_list (string_'step3') string_'step3' (keyword_argument (identifier_epk) identifier_epk (identifier_epk) identifier_epk )keyword_argument (keyword_argument (identifier_authTag) identifier_authTag (identifier_tag) identifier_tag )keyword_argument )argument_list )call )await )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Finish authentication process. A username (generated by new_credentials) and the PIN code shown on screen must be provided.
(module (function_definition (function_name__get_section) function_name__get_section (parameters (identifier_self) identifier_self (identifier_name) identifier_name (default_parameter (identifier_create) identifier_create (True) True )default_parameter )parameters (block (try_statement (block (return_statement (subscript (attribute (identifier_self) identifier_self (identifier_sections) identifier_sections )attribute (identifier_name) identifier_name )subscript )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (if_statement (not_operator (identifier_create) identifier_create )not_operator (block (raise_statement )raise_statement )block )if_statement (expression_statement (assignment (identifier_section) identifier_section (call (identifier_Section) identifier_Section (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_sections) identifier_sections )attribute (identifier_name) identifier_name )subscript (identifier_section) identifier_section )assignment )expression_statement (return_statement (identifier_section) identifier_section )return_statement )block )except_clause )try_statement )block )function_definition )module
Retrieve a section by name. Create it on first access.
(module (function_definition (function_name_get_iso2_from_iso3) function_name_get_iso2_from_iso3 (parameters (identifier_cls) identifier_cls (identifier_iso3) identifier_iso3 (default_parameter (identifier_use_live) identifier_use_live (True) True )default_parameter (default_parameter (identifier_exception) identifier_exception (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_countriesdata) identifier_countriesdata (call (attribute (identifier_cls) identifier_cls (identifier_countriesdata) identifier_countriesdata )attribute (argument_list (keyword_argument (identifier_use_live) identifier_use_live (identifier_use_live) identifier_use_live )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_iso2) identifier_iso2 (call (attribute (subscript (identifier_countriesdata) identifier_countriesdata (string_'iso2iso3') string_'iso2iso3' )subscript (identifier_get) identifier_get )attribute (argument_list (call (attribute (identifier_iso3) identifier_iso3 (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_iso2) identifier_iso2 (None) None )comparison_operator (block (return_statement (identifier_iso2) identifier_iso2 )return_statement )block )if_statement (if_statement (comparison_operator (identifier_exception) identifier_exception (None) None )comparison_operator (block (raise_statement (identifier_exception) identifier_exception )raise_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Get ISO2 from ISO3 code Args: iso3 (str): ISO3 code for which to get ISO2 code use_live (bool): Try to get use latest data from web rather than file in package. Defaults to True. exception (Optional[ExceptionUpperBound]): An exception to raise if country not found. Defaults to None. Returns: Optional[str]: ISO2 code
(module (function_definition (function_name_get_service_id_list) function_name_get_service_id_list (parameters )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_tuple) identifier_tuple )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_keys) identifier_keys (call (attribute (identifier_DB) identifier_DB (identifier_get_keys) identifier_get_keys )attribute (argument_list (string_'states*') string_'states*' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_services) identifier_services (list )list )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_keys) identifier_keys (block (expression_statement (assignment (identifier_values) identifier_values (call (attribute (identifier_key) identifier_key (identifier_split) identifier_split )attribute (argument_list (string_':') string_':' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_values) identifier_values )argument_list )call (integer_4) integer_4 )comparison_operator (block (expression_statement (call (attribute (identifier_services) identifier_services (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_':') string_':' (identifier_join) identifier_join )attribute (argument_list (subscript (identifier_values) identifier_values (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_services) identifier_services )return_statement )block )function_definition )module
Return list of Services.
(module (function_definition (function_name_get_plural_name) function_name_get_plural_name (parameters (identifier_cls) identifier_cls )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (attribute (identifier_cls) identifier_cls (identifier_Meta) identifier_Meta )attribute (string_'plural_name') string_'plural_name' )argument_list )call )not_operator (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (attribute (identifier_cls) identifier_cls (identifier_Meta) identifier_Meta )attribute (string_'plural_name') string_'plural_name' (call (attribute (identifier_inflection) identifier_inflection (identifier_pluralize) identifier_pluralize )attribute (argument_list (call (attribute (identifier_cls) identifier_cls (identifier_get_name) identifier_get_name )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )if_statement (return_statement (attribute (attribute (identifier_cls) identifier_cls (identifier_Meta) identifier_Meta )attribute (identifier_plural_name) identifier_plural_name )attribute )return_statement )block )function_definition )module
Get the serializer's plural name. The plural name may be defined on the Meta class. If the plural name is not defined, the pluralized form of the name will be returned.
(module (function_definition (function_name_get_all_published_ships_basic) function_name_get_all_published_ships_basic (parameters (identifier_db_connection) identifier_db_connection )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_get_all_published_ships_basic) identifier_get_all_published_ships_basic (string_'_results') string_'_results' )argument_list )call )not_operator (block (expression_statement (assignment (identifier_sql) identifier_sql (string_'CALL get_all_published_ships_basic();') string_'CALL get_all_published_ships_basic();' )assignment )expression_statement (expression_statement (assignment (identifier_results) identifier_results (call (identifier_execute_sql) identifier_execute_sql (argument_list (identifier_sql) identifier_sql (identifier_db_connection) identifier_db_connection )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_get_all_published_ships_basic) identifier_get_all_published_ships_basic (identifier__results) identifier__results )attribute (identifier_results) identifier_results )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_get_all_published_ships_basic) identifier_get_all_published_ships_basic (identifier__results) identifier__results )attribute )return_statement )block )function_definition )module
Gets a list of all published ships and their basic information. :return: Each result has a tuple of (typeID, typeName, groupID, groupName, categoryID, and categoryName). :rtype: list
(module (function_definition (function_name__resample_residuals) function_name__resample_residuals (parameters (identifier_self) identifier_self (identifier_stars) identifier_stars (identifier_epsf) identifier_epsf )parameters (block (expression_statement (assignment (identifier_shape) identifier_shape (tuple (attribute (identifier_stars) identifier_stars (identifier_n_good_stars) identifier_n_good_stars )attribute (subscript (attribute (identifier_epsf) identifier_epsf (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (subscript (attribute (identifier_epsf) identifier_epsf (identifier_shape) identifier_shape )attribute (integer_1) integer_1 )subscript )tuple )assignment )expression_statement (expression_statement (assignment (identifier_star_imgs) identifier_star_imgs (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (identifier_shape) identifier_shape )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_star) identifier_star )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_stars) identifier_stars (identifier_all_good_stars) identifier_all_good_stars )attribute )argument_list )call (block (expression_statement (assignment (subscript (identifier_star_imgs) identifier_star_imgs (identifier_i) identifier_i (slice (colon) colon )slice (slice (colon) colon )slice )subscript (call (attribute (identifier_self) identifier_self (identifier__resample_residual) identifier__resample_residual )attribute (argument_list (identifier_star) identifier_star (identifier_epsf) identifier_epsf )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_star_imgs) identifier_star_imgs )return_statement )block )function_definition )module
Compute normalized residual images for all the input stars. Parameters ---------- stars : `EPSFStars` object The stars used to build the ePSF. epsf : `EPSFModel` object The ePSF model. Returns ------- star_imgs : 3D `~numpy.ndarray` A 3D cube containing the resampled residual images.
(module (function_definition (function_name_resource_create_ticket) function_name_resource_create_ticket (parameters (identifier_self) identifier_self (identifier_token) identifier_token (identifier_id) identifier_id (identifier_scopes) identifier_scopes (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_resource_id) identifier_resource_id (identifier_id) identifier_id )keyword_argument (keyword_argument (identifier_resource_scopes) identifier_resource_scopes (identifier_scopes) identifier_scopes )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier__realm) identifier__realm )attribute (identifier_client) identifier_client )attribute (identifier_post) identifier_post )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_well_known) identifier_well_known )attribute (string_'permission_endpoint') string_'permission_endpoint' )subscript (keyword_argument (identifier_data) identifier_data (call (attribute (identifier_self) identifier_self (identifier__dumps) identifier__dumps )attribute (argument_list (list (identifier_data) identifier_data )list )argument_list )call )keyword_argument (keyword_argument (identifier_headers) identifier_headers (call (attribute (identifier_self) identifier_self (identifier_get_headers) identifier_get_headers )attribute (argument_list (identifier_token) identifier_token )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Create a ticket form permission to resource. https://www.keycloak.org/docs/latest/authorization_services/index.html#_service_protection_permission_api_papi :param str token: user access token :param str id: resource id :param list scopes: scopes access is wanted :param dict claims: (optional) :rtype: dict
(module (function_definition (function_name_prebuild_arch) function_name_prebuild_arch (parameters (identifier_self) identifier_self (identifier_arch) identifier_arch )parameters (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (identifier_self) identifier_self (identifier_get_build_dir) identifier_get_build_dir )attribute (argument_list (attribute (identifier_arch) identifier_arch (identifier_arch) identifier_arch )attribute )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (identifier_exists) identifier_exists (argument_list (identifier_path) identifier_path )argument_list )call )not_operator (block (expression_statement (call (identifier_info) identifier_info (argument_list (call (attribute (string_"creating {}") string_"creating {}" (identifier_format) identifier_format )attribute (argument_list (identifier_path) identifier_path )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_shprint) identifier_shprint (argument_list (attribute (identifier_sh) identifier_sh (identifier_mkdir) identifier_mkdir )attribute (string_'-p') string_'-p' (identifier_path) identifier_path )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Make the build and target directories
(module (function_definition (function_name_do_propset) function_name_do_propset (parameters (identifier_self) identifier_self (identifier_subcmd) identifier_subcmd (identifier_opts) identifier_opts (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (print_statement (binary_operator (string_"'svn %s' opts: %s") string_"'svn %s' opts: %s" (tuple (identifier_subcmd) identifier_subcmd (identifier_opts) identifier_opts )tuple )binary_operator )print_statement (print_statement (binary_operator (string_"'svn %s' args: %s") string_"'svn %s' args: %s" (tuple (identifier_subcmd) identifier_subcmd (identifier_args) identifier_args )tuple )binary_operator )print_statement )block )function_definition )module
Set PROPNAME to PROPVAL on files, dirs, or revisions. usage: 1. propset PROPNAME [PROPVAL | -F VALFILE] PATH... 2. propset PROPNAME --revprop -r REV [PROPVAL | -F VALFILE] [URL] 1. Creates a versioned, local propchange in working copy. 2. Creates an unversioned, remote propchange on repos revision. Note: svn recognizes the following special versioned properties but will store any arbitrary properties set: svn:ignore - A newline separated list of file patterns to ignore. svn:keywords - Keywords to be expanded. Valid keywords are: URL, HeadURL - The URL for the head version of the object. Author, LastChangedBy - The last person to modify the file. Date, LastChangedDate - The date/time the object was last modified. Rev, Revision, - The last revision the object changed. LastChangedRevision Id - A compressed summary of the previous 4 keywords. svn:executable - If present, make the file executable. This property cannot be set on a directory. A non-recursive attempt will fail, and a recursive attempt will set the property only on the file children of the directory. svn:eol-style - One of 'native', 'LF', 'CR', 'CRLF'. svn:mime-type - The mimetype of the file. Used to determine whether to merge the file, and how to serve it from Apache. A mimetype beginning with 'text/' (or an absent mimetype) is treated as text. Anything else is treated as binary. svn:externals - A newline separated list of module specifiers, each of which consists of a relative directory path, optional revision flags, and an URL. For example foo http://example.com/repos/zig foo/bar -r 1234 http://example.com/repos/zag ${cmd_option_list}
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (identifier_story) identifier_story (default_parameter (identifier_params) identifier_params (dictionary )dictionary )default_parameter (dictionary_splat_pattern (identifier_options) identifier_options )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_path) identifier_path (binary_operator (string_"/stories/%s") string_"/stories/%s" (parenthesized_expression (identifier_story) identifier_story )parenthesized_expression )binary_operator )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_delete) identifier_delete )attribute (argument_list (identifier_path) identifier_path (identifier_params) identifier_params (dictionary_splat (identifier_options) identifier_options )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Deletes a story. A user can only delete stories they have created. Returns an empty data record. Parameters ---------- story : {Id} Globally unique identifier for the story.
(module (function_definition (function_name__createMagConversionDict) function_name__createMagConversionDict (parameters )parameters (block (expression_statement (assignment (identifier_magnitude_conversion_filepath) identifier_magnitude_conversion_filepath (call (identifier_resource_stream) identifier_resource_stream (argument_list (identifier___name__) identifier___name__ (string_'data/magnitude_conversion.dat') string_'data/magnitude_conversion.dat' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_raw_table) identifier_raw_table (call (attribute (identifier_np) identifier_np (identifier_loadtxt) identifier_loadtxt )attribute (argument_list (identifier_magnitude_conversion_filepath) identifier_magnitude_conversion_filepath (string_'|S5') string_'|S5' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_magDict) identifier_magDict (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_row) identifier_row (identifier_raw_table) identifier_raw_table (block (if_statement (comparison_operator (attribute (identifier_sys) identifier_sys (identifier_hexversion) identifier_hexversion )attribute (integer_0x03000000) integer_0x03000000 )comparison_operator (block (expression_statement (assignment (identifier_starClass) identifier_starClass (call (attribute (subscript (identifier_row) identifier_row (integer_1) integer_1 )subscript (identifier_decode) identifier_decode )attribute (argument_list (string_"utf-8") string_"utf-8" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tableData) identifier_tableData (list_comprehension (call (attribute (identifier_x) identifier_x (identifier_decode) identifier_decode )attribute (argument_list (string_"utf-8") string_"utf-8" )argument_list )call (for_in_clause (identifier_x) identifier_x (subscript (identifier_row) identifier_row (slice (integer_3) integer_3 (colon) colon )slice )subscript )for_in_clause )list_comprehension )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_starClass) identifier_starClass (subscript (identifier_row) identifier_row (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_tableData) identifier_tableData (subscript (identifier_row) identifier_row (slice (integer_3) integer_3 (colon) colon )slice )subscript )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (subscript (identifier_magDict) identifier_magDict (identifier_starClass) identifier_starClass )subscript (identifier_tableData) identifier_tableData )assignment )expression_statement )block )for_statement (return_statement (identifier_magDict) identifier_magDict )return_statement )block )function_definition )module
loads magnitude_conversion.dat which is table A% 1995ApJS..101..117K
(module (function_definition (function_name_poll_events) function_name_poll_events (parameters (identifier_self) identifier_self )parameters (block (while_statement (attribute (identifier_self) identifier_self (identifier_started) identifier_started )attribute (block (expression_statement (assignment (identifier_event_obj) identifier_event_obj (None) None )assignment )expression_statement (expression_statement (assignment (identifier_event_name) identifier_event_name (None) None )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_event_obj) identifier_event_obj (call (attribute (attribute (identifier_self) identifier_self (identifier__sl4a) identifier__sl4a )attribute (identifier_eventWait) identifier_eventWait )attribute (argument_list (integer_50000) integer_50000 )argument_list )call )assignment )expression_statement )block (except_clause (block (if_statement (attribute (identifier_self) identifier_self (identifier_started) identifier_started )attribute (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Exception happened during polling.") string_"Exception happened during polling." )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (identifier_traceback) identifier_traceback (identifier_format_exc) identifier_format_exc )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (raise_statement )raise_statement )block )if_statement )block )except_clause )try_statement (if_statement (not_operator (identifier_event_obj) identifier_event_obj )not_operator (block (continue_statement )continue_statement )block (elif_clause (comparison_operator (string_'name') string_'name' (identifier_event_obj) identifier_event_obj )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"Received Malformed event {}") string_"Received Malformed event {}" (identifier_format) identifier_format )attribute (argument_list (identifier_event_obj) identifier_event_obj )argument_list )call )argument_list )call )expression_statement (continue_statement )continue_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_event_name) identifier_event_name (subscript (identifier_event_obj) identifier_event_obj (string_'name') string_'name' )subscript )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (identifier_event_name) identifier_event_name (attribute (identifier_self) identifier_self (identifier_handlers) identifier_handlers )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_handle_subscribed_event) identifier_handle_subscribed_event )attribute (argument_list (identifier_event_obj) identifier_event_obj (identifier_event_name) identifier_event_name )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_event_name) identifier_event_name (string_"EventDispatcherShutdown") string_"EventDispatcherShutdown" )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__sl4a) identifier__sl4a )attribute (identifier_closeSl4aSession) identifier_closeSl4aSession )attribute (argument_list )argument_list )call )expression_statement (break_statement )break_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_lock) identifier_lock )attribute (identifier_acquire) identifier_acquire )attribute (argument_list )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_event_name) identifier_event_name (attribute (identifier_self) identifier_self (identifier_event_dict) identifier_event_dict )attribute )comparison_operator (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_event_dict) identifier_event_dict )attribute (identifier_event_name) identifier_event_name )subscript (identifier_put) identifier_put )attribute (argument_list (identifier_event_obj) identifier_event_obj )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_q) identifier_q (call (attribute (identifier_queue) identifier_queue (identifier_Queue) identifier_Queue )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_q) identifier_q (identifier_put) identifier_put )attribute (argument_list (identifier_event_obj) identifier_event_obj )argument_list )call )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_event_dict) identifier_event_dict )attribute (identifier_event_name) identifier_event_name )subscript (identifier_q) identifier_q )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_lock) identifier_lock )attribute (identifier_release) identifier_release )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement )block )while_statement )block )function_definition )module
Continuously polls all types of events from sl4a. Events are sorted by name and store in separate queues. If there are registered handlers, the handlers will be called with corresponding event immediately upon event discovery, and the event won't be stored. If exceptions occur, stop the dispatcher and return
(module (function_definition (function_name_pop) function_name_pop (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__length) identifier__length )attribute (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_IndexError) identifier_IndexError (argument_list )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_newvec) identifier_newvec (call (identifier_ImmutableVector) identifier_ImmutableVector (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_newvec) identifier_newvec (identifier_tree) identifier_tree )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_tree) identifier_tree )attribute (identifier_remove) identifier_remove )attribute (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier__length) identifier__length )attribute (integer_1) integer_1 )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_newvec) identifier_newvec (identifier__length) identifier__length )attribute (binary_operator (attribute (identifier_self) identifier_self (identifier__length) identifier__length )attribute (integer_1) integer_1 )binary_operator )assignment )expression_statement (return_statement (identifier_newvec) identifier_newvec )return_statement )block )function_definition )module
Return a new ImmutableVector with the last item removed.
(module (function_definition (function_name_dpotri) function_name_dpotri (parameters (identifier_A) identifier_A (default_parameter (identifier_lower) identifier_lower (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_A) identifier_A (call (identifier_force_F_ordered) identifier_force_F_ordered (argument_list (identifier_A) identifier_A )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_R) identifier_R (identifier_info) identifier_info )pattern_list (call (attribute (identifier_lapack) identifier_lapack (identifier_dpotri) identifier_dpotri )attribute (argument_list (identifier_A) identifier_A (keyword_argument (identifier_lower) identifier_lower (identifier_lower) identifier_lower )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_symmetrify) identifier_symmetrify (argument_list (identifier_R) identifier_R )argument_list )call )expression_statement (return_statement (expression_list (identifier_R) identifier_R (identifier_info) identifier_info )expression_list )return_statement )block )function_definition )module
Wrapper for lapack dpotri function DPOTRI - compute the inverse of a real symmetric positive definite matrix A using the Cholesky factorization A = U**T*U or A = L*L**T computed by DPOTRF :param A: Matrix A :param lower: is matrix lower (true) or upper (false) :returns: A inverse
(module (function_definition (function_name_required) function_name_required (parameters (identifier_cls) identifier_cls )parameters (block (expression_statement (assignment (identifier_columns) identifier_columns (list )list )assignment )expression_statement (for_statement (identifier_column) identifier_column (attribute (attribute (identifier_cls) identifier_cls (identifier___table__) identifier___table__ )attribute (identifier_columns) identifier_columns )attribute (block (expression_statement (assignment (identifier_is_autoincrement) identifier_is_autoincrement (boolean_operator (comparison_operator (string_'int') string_'int' (call (attribute (call (identifier_str) identifier_str (argument_list (attribute (identifier_column) identifier_column (identifier_type) identifier_type )attribute )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )comparison_operator (attribute (identifier_column) identifier_column (identifier_autoincrement) identifier_autoincrement )attribute )boolean_operator )assignment )expression_statement (if_statement (boolean_operator (parenthesized_expression (boolean_operator (not_operator (attribute (identifier_column) identifier_column (identifier_nullable) identifier_nullable )attribute )not_operator (not_operator (attribute (identifier_column) identifier_column (identifier_primary_key) identifier_primary_key )attribute )not_operator )boolean_operator )parenthesized_expression (parenthesized_expression (boolean_operator (attribute (identifier_column) identifier_column (identifier_primary_key) identifier_primary_key )attribute (not_operator (identifier_is_autoincrement) identifier_is_autoincrement )not_operator )boolean_operator )parenthesized_expression )boolean_operator (block (expression_statement (call (attribute (identifier_columns) identifier_columns (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_column) identifier_column (identifier_name) identifier_name )attribute )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_columns) identifier_columns )return_statement )block )function_definition )module
Return a list of all columns required by the database to create the resource. :param cls: The Model class to gather attributes from :rtype: list
(module (function_definition (function_name_GetDataStream) function_name_GetDataStream (parameters (identifier_self) identifier_self (identifier_name) identifier_name (default_parameter (identifier_case_sensitive) identifier_case_sensitive (True) True )default_parameter )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_name) identifier_name (attribute (identifier_py2to3) identifier_py2to3 (identifier_STRING_TYPES) identifier_STRING_TYPES )attribute )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Name is not a string.') string_'Name is not a string.' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_name_lower) identifier_name_lower (call (attribute (identifier_name) identifier_name (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_matching_data_stream) identifier_matching_data_stream (None) None )assignment )expression_statement (for_statement (identifier_data_stream) identifier_data_stream (call (attribute (identifier_self) identifier_self (identifier__GetDataStreams) identifier__GetDataStreams )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_data_stream) identifier_data_stream (identifier_name) identifier_name )attribute (identifier_name) identifier_name )comparison_operator (block (return_statement (identifier_data_stream) identifier_data_stream )return_statement )block )if_statement (if_statement (boolean_operator (not_operator (identifier_case_sensitive) identifier_case_sensitive )not_operator (comparison_operator (call (attribute (attribute (identifier_data_stream) identifier_data_stream (identifier_name) identifier_name )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_name_lower) identifier_name_lower )comparison_operator )boolean_operator (block (if_statement (not_operator (identifier_matching_data_stream) identifier_matching_data_stream )not_operator (block (expression_statement (assignment (identifier_matching_data_stream) identifier_matching_data_stream (identifier_data_stream) identifier_data_stream )assignment )expression_statement )block )if_statement )block )if_statement )block )for_statement (return_statement (identifier_matching_data_stream) identifier_matching_data_stream )return_statement )block )function_definition )module
Retrieves a data stream by name. Args: name (str): name of the data stream. case_sensitive (Optional[bool]): True if the name is case sensitive. Returns: DataStream: a data stream or None if not available. Raises: ValueError: if the name is not string.
(module (function_definition (function_name_scan) function_name_scan (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_atvs) identifier_atvs (await (call (attribute (identifier_pyatv) identifier_pyatv (identifier_scan_for_apple_tvs) identifier_scan_for_apple_tvs )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_loop) identifier_loop )attribute (keyword_argument (identifier_timeout) identifier_timeout (attribute (attribute (identifier_self) identifier_self (identifier_args) identifier_args )attribute (identifier_scan_timeout) identifier_scan_timeout )attribute )keyword_argument (keyword_argument (identifier_only_usable) identifier_only_usable (False) False )keyword_argument )argument_list )call )await )assignment )expression_statement (expression_statement (call (identifier__print_found_apple_tvs) identifier__print_found_apple_tvs (argument_list (identifier_atvs) identifier_atvs )argument_list )call )expression_statement (return_statement (integer_0) integer_0 )return_statement )block )function_definition )module
Scan for Apple TVs on the network.
(module (function_definition (function_name_getIRThreshold) function_name_getIRThreshold (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_command) identifier_command (string_'$GO') string_'$GO' )assignment )expression_statement (expression_statement (assignment (identifier_threshold) identifier_threshold (call (attribute (identifier_self) identifier_self (identifier_sendCommand) identifier_sendCommand )attribute (argument_list (identifier_command) identifier_command )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_threshold) identifier_threshold (integer_0) integer_0 )subscript (string_'NK') string_'NK' )comparison_operator (block (return_statement (integer_0) integer_0 )return_statement )block (else_clause (block (return_statement (binary_operator (call (identifier_float) identifier_float (argument_list (subscript (identifier_threshold) identifier_threshold (integer_2) integer_2 )subscript )argument_list )call (integer_10) integer_10 )binary_operator )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns the IR temperature threshold in degrees Celcius, or 0 if no Threshold is set
(module (function_definition (function_name_removeReliableListener) function_name_removeReliableListener (parameters (identifier_self) identifier_self (identifier_listener) identifier_listener )parameters (block (expression_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute (identifier_query) identifier_query )attribute (argument_list (identifier__ReliableListener) identifier__ReliableListener (call (attribute (identifier_attributes) identifier_attributes (identifier_AND) identifier_AND )attribute (argument_list (comparison_operator (attribute (identifier__ReliableListener) identifier__ReliableListener (identifier_processor) identifier_processor )attribute (identifier_self) identifier_self )comparison_operator (comparison_operator (attribute (identifier__ReliableListener) identifier__ReliableListener (identifier_listener) identifier_listener )attribute (identifier_listener) identifier_listener )comparison_operator )argument_list )call )argument_list )call (identifier_deleteFromStore) identifier_deleteFromStore )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute (identifier_query) identifier_query )attribute (argument_list (identifier_BatchProcessingError) identifier_BatchProcessingError (call (attribute (identifier_attributes) identifier_attributes (identifier_AND) identifier_AND )attribute (argument_list (comparison_operator (attribute (identifier_BatchProcessingError) identifier_BatchProcessingError (identifier_processor) identifier_processor )attribute (identifier_self) identifier_self )comparison_operator (comparison_operator (attribute (identifier_BatchProcessingError) identifier_BatchProcessingError (identifier_listener) identifier_listener )attribute (identifier_listener) identifier_listener )comparison_operator )argument_list )call )argument_list )call (identifier_deleteFromStore) identifier_deleteFromStore )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Remove a previously added listener.
(module (function_definition (function_name_exp2) function_name_exp2 (parameters (identifier_x) identifier_x (default_parameter (identifier_context) identifier_context (None) None )default_parameter )parameters (block (return_statement (call (identifier__apply_function_in_current_context) identifier__apply_function_in_current_context (argument_list (identifier_BigFloat) identifier_BigFloat (attribute (identifier_mpfr) identifier_mpfr (identifier_mpfr_exp2) identifier_mpfr_exp2 )attribute (tuple (call (attribute (identifier_BigFloat) identifier_BigFloat (identifier__implicit_convert) identifier__implicit_convert )attribute (argument_list (identifier_x) identifier_x )argument_list )call )tuple (identifier_context) identifier_context )argument_list )call )return_statement )block )function_definition )module
Return two raised to the power x.
(module (function_definition (function_name___edge_weight) function_name___edge_weight (parameters (identifier_edge_id) identifier_edge_id (identifier_dfs_data) identifier_dfs_data )parameters (block (expression_statement (assignment (identifier_graph) identifier_graph (subscript (identifier_dfs_data) identifier_dfs_data (string_'graph') string_'graph' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_edge_lookup) identifier_edge_lookup (subscript (identifier_dfs_data) identifier_dfs_data (string_'edge_lookup') string_'edge_lookup' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_edge) identifier_edge (call (attribute (identifier_graph) identifier_graph (identifier_get_edge) identifier_get_edge )attribute (argument_list (identifier_edge_id) identifier_edge_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_u) identifier_u (identifier_v) identifier_v )pattern_list (subscript (identifier_edge) identifier_edge (string_'vertices') string_'vertices' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_d_u) identifier_d_u (call (identifier_D) identifier_D (argument_list (identifier_u) identifier_u (identifier_dfs_data) identifier_dfs_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_d_v) identifier_d_v (call (identifier_D) identifier_D (argument_list (identifier_v) identifier_v (identifier_dfs_data) identifier_dfs_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_lp_1) identifier_lp_1 (call (identifier_L1) identifier_L1 (argument_list (identifier_v) identifier_v (identifier_dfs_data) identifier_dfs_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_d_lp_1) identifier_d_lp_1 (call (identifier_D) identifier_D (argument_list (identifier_lp_1) identifier_lp_1 (identifier_dfs_data) identifier_dfs_data )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (subscript (identifier_edge_lookup) identifier_edge_lookup (identifier_edge_id) identifier_edge_id )subscript (string_'backedge') string_'backedge' )comparison_operator (comparison_operator (identifier_d_v) identifier_d_v (identifier_d_u) identifier_d_u )comparison_operator )boolean_operator (block (return_statement (binary_operator (integer_2) integer_2 (identifier_d_v) identifier_d_v )binary_operator )return_statement )block (elif_clause (call (identifier_is_type_I_branch) identifier_is_type_I_branch (argument_list (identifier_u) identifier_u (identifier_v) identifier_v (identifier_dfs_data) identifier_dfs_data )argument_list )call (block (return_statement (binary_operator (integer_2) integer_2 (identifier_d_lp_1) identifier_d_lp_1 )binary_operator )return_statement )block )elif_clause (elif_clause (call (identifier_is_type_II_branch) identifier_is_type_II_branch (argument_list (identifier_u) identifier_u (identifier_v) identifier_v (identifier_dfs_data) identifier_dfs_data )argument_list )call (block (return_statement (binary_operator (binary_operator (integer_2) integer_2 (identifier_d_lp_1) identifier_d_lp_1 )binary_operator (integer_1) integer_1 )binary_operator )return_statement )block )elif_clause (else_clause (block (return_statement (binary_operator (binary_operator (integer_2) integer_2 (call (attribute (identifier_graph) identifier_graph (identifier_num_nodes) identifier_num_nodes )attribute (argument_list )argument_list )call )binary_operator (integer_1) integer_1 )binary_operator )return_statement )block )else_clause )if_statement )block )function_definition )module
Calculates the edge weight used to sort edges.
(module (function_definition (function_name_make_summaries) function_name_make_summaries (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_summary_df) identifier_summary_df )attribute (call (identifier_save_summaries) identifier_save_summaries (argument_list (attribute (identifier_self) identifier_self (identifier_frames) identifier_frames )attribute (attribute (identifier_self) identifier_self (identifier_keys) identifier_keys )attribute (attribute (identifier_self) identifier_self (identifier_selected_summaries) identifier_selected_summaries )attribute (attribute (identifier_self) identifier_self (identifier_batch_dir) identifier_batch_dir )attribute (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"made and saved summaries") string_"made and saved summaries" )argument_list )call )expression_statement )block )function_definition )module
Make and save summary csv files, each containing values from all cells
(module (function_definition (function_name_fetch_api_description) function_name_fetch_api_description (parameters (typed_parameter (identifier_url) identifier_url (type (subscript (attribute (identifier_typing) identifier_typing (identifier_Union) identifier_Union )attribute (identifier_str) identifier_str (identifier_ParseResult) identifier_ParseResult (identifier_SplitResult) identifier_SplitResult )subscript )type )typed_parameter (typed_default_parameter (identifier_insecure) identifier_insecure (type (identifier_bool) identifier_bool )type (False) False )typed_default_parameter )parameters (block (expression_statement (assignment (identifier_url_describe) identifier_url_describe (call (identifier_urljoin) identifier_urljoin (argument_list (call (identifier__ensure_url_string) identifier__ensure_url_string (argument_list (identifier_url) identifier_url )argument_list )call (string_"describe/") string_"describe/" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_connector) identifier_connector (call (attribute (identifier_aiohttp) identifier_aiohttp (identifier_TCPConnector) identifier_TCPConnector )attribute (argument_list (keyword_argument (identifier_verify_ssl) identifier_verify_ssl (parenthesized_expression (not_operator (identifier_insecure) identifier_insecure )not_operator )parenthesized_expression )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_session) identifier_session (call (attribute (identifier_aiohttp) identifier_aiohttp (identifier_ClientSession) identifier_ClientSession )attribute (argument_list (keyword_argument (identifier_connector) identifier_connector (identifier_connector) identifier_connector )keyword_argument )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (identifier_session) identifier_session )with_item (with_item (as_pattern (call (attribute (identifier_session) identifier_session (identifier_get) identifier_get )attribute (argument_list (identifier_url_describe) identifier_url_describe )argument_list )call (as_pattern_target (identifier_response) identifier_response )as_pattern_target )as_pattern )with_item )with_clause (block (if_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_status) identifier_status )attribute (attribute (identifier_HTTPStatus) identifier_HTTPStatus (identifier_OK) identifier_OK )attribute )comparison_operator (block (raise_statement (call (identifier_RemoteError) identifier_RemoteError (argument_list (call (attribute (string_"{0} -> {1.status} {1.reason}") string_"{0} -> {1.status} {1.reason}" (identifier_format) identifier_format )attribute (argument_list (identifier_url) identifier_url (identifier_response) identifier_response )argument_list )call )argument_list )call )raise_statement )block (elif_clause (comparison_operator (attribute (identifier_response) identifier_response (identifier_content_type) identifier_content_type )attribute (string_"application/json") string_"application/json" )comparison_operator (block (raise_statement (call (identifier_RemoteError) identifier_RemoteError (argument_list (binary_operator (string_"Expected application/json, got: %s") string_"Expected application/json, got: %s" (attribute (identifier_response) identifier_response (identifier_content_type) identifier_content_type )attribute )binary_operator )argument_list )call )raise_statement )block )elif_clause (else_clause (block (return_statement (await (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call )await )return_statement )block )else_clause )if_statement )block )with_statement )block )function_definition )module
Fetch the API description from the remote MAAS instance.
(module (function_definition (function_name__connect) function_name__connect (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_spec) identifier_spec (default_parameter (identifier_via) identifier_via (None) None )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_method) identifier_method (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_self) identifier_self (identifier_router) identifier_router )attribute (subscript (identifier_spec) identifier_spec (string_'method') string_'method' )subscript )argument_list )call )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (raise_statement (call (identifier_Error) identifier_Error (argument_list (binary_operator (string_'unsupported method: %(transport)s') string_'unsupported method: %(transport)s' (identifier_spec) identifier_spec )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_context) identifier_context (call (identifier_method) identifier_method (argument_list (keyword_argument (identifier_via) identifier_via (identifier_via) identifier_via )keyword_argument (keyword_argument (identifier_unidirectional) identifier_unidirectional (True) True )keyword_argument (dictionary_splat (subscript (identifier_spec) identifier_spec (string_'kwargs') string_'kwargs' )subscript )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_via) identifier_via (call (attribute (identifier_spec) identifier_spec (identifier_get) identifier_get )attribute (argument_list (string_'enable_lru') string_'enable_lru' )argument_list )call )boolean_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__update_lru) identifier__update_lru )attribute (argument_list (identifier_context) identifier_context (identifier_spec) identifier_spec (identifier_via) identifier_via )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_mitogen) identifier_mitogen (identifier_core) identifier_core )attribute (identifier_listen) identifier_listen )attribute (argument_list (identifier_context) identifier_context (string_'disconnect') string_'disconnect' (lambda (call (attribute (identifier_self) identifier_self (identifier__on_context_disconnect) identifier__on_context_disconnect )attribute (argument_list (identifier_context) identifier_context )argument_list )call )lambda )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__send_module_forwards) identifier__send_module_forwards )attribute (argument_list (identifier_context) identifier_context )argument_list )call )expression_statement (expression_statement (assignment (identifier_init_child_result) identifier_init_child_result (call (attribute (identifier_context) identifier_context (identifier_call) identifier_call )attribute (argument_list (attribute (attribute (identifier_ansible_mitogen) identifier_ansible_mitogen (identifier_target) identifier_target )attribute (identifier_init_child) identifier_init_child )attribute (keyword_argument (identifier_log_level) identifier_log_level (call (attribute (identifier_LOG) identifier_LOG (identifier_getEffectiveLevel) identifier_getEffectiveLevel )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_candidate_temp_dirs) identifier_candidate_temp_dirs (call (attribute (identifier_self) identifier_self (identifier__get_candidate_temp_dirs) identifier__get_candidate_temp_dirs )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_get) identifier_get )attribute (argument_list (string_'MITOGEN_DUMP_THREAD_STACKS') string_'MITOGEN_DUMP_THREAD_STACKS' )argument_list )call (block (import_from_statement (dotted_name (identifier_mitogen) identifier_mitogen )dotted_name (dotted_name (identifier_debug) identifier_debug )dotted_name )import_from_statement (expression_statement (call (attribute (identifier_context) identifier_context (identifier_call) identifier_call )attribute (argument_list (attribute (identifier_debug) identifier_debug (identifier_dump_to_logger) identifier_dump_to_logger )attribute )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__key_by_context) identifier__key_by_context )attribute (identifier_context) identifier_context )subscript (identifier_key) identifier_key )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__refs_by_context) identifier__refs_by_context )attribute (identifier_context) identifier_context )subscript (integer_0) integer_0 )assignment )expression_statement (return_statement (dictionary (pair (string_'context') string_'context' (identifier_context) identifier_context )pair (pair (string_'via') string_'via' (identifier_via) identifier_via )pair (pair (string_'init_child_result') string_'init_child_result' (identifier_init_child_result) identifier_init_child_result )pair (pair (string_'msg') string_'msg' (None) None )pair )dictionary )return_statement )block )function_definition )module
Actual connect implementation. Arranges for the Mitogen connection to be created and enqueues an asynchronous call to start the forked task parent in the remote context. :param key: Deduplication key representing the connection configuration. :param spec: Connection specification. :returns: Dict like:: { 'context': mitogen.core.Context or None, 'via': mitogen.core.Context or None, 'init_child_result': { 'fork_context': mitogen.core.Context, 'home_dir': str or None, }, 'msg': str or None } Where `context` is a reference to the newly constructed context, `init_child_result` is the result of executing :func:`ansible_mitogen.target.init_child` in that context, `msg` is an error message and the remaining fields are :data:`None`, or `msg` is :data:`None` and the remaining fields are set.