sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_SaveData) function_name_SaveData (parameters (identifier_self) identifier_self (identifier_raw_data) identifier_raw_data )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_filename) identifier_filename )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (string_"Unknown filename") string_"Unknown filename" )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (string_"Writing back configuration to file %s") string_"Writing back configuration to file %s" (attribute (identifier_self) identifier_self (identifier_filename) identifier_filename )attribute )argument_list )call )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_filename) identifier_filename )attribute )argument_list )call )argument_list )call )expression_statement )block (except_clause (tuple (identifier_IOError) identifier_IOError (identifier_OSError) identifier_OSError )tuple (block (pass_statement )pass_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (identifier_mode) identifier_mode (binary_operator (binary_operator (attribute (identifier_os) identifier_os (identifier_O_WRONLY) identifier_O_WRONLY )attribute (attribute (identifier_os) identifier_os (identifier_O_CREAT) identifier_O_CREAT )attribute )binary_operator (attribute (identifier_os) identifier_os (identifier_O_TRUNC) identifier_O_TRUNC )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_fd) identifier_fd (call (attribute (identifier_os) identifier_os (identifier_open) identifier_open )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_filename) identifier_filename )attribute (identifier_mode) identifier_mode (integer_0o600) integer_0o600 )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_os) identifier_os (identifier_fdopen) identifier_fdopen )attribute (argument_list (identifier_fd) identifier_fd (string_"wb") string_"wb" )argument_list )call (as_pattern_target (identifier_config_file) identifier_config_file )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_SaveDataToFD) identifier_SaveDataToFD )attribute (argument_list (identifier_raw_data) identifier_raw_data (identifier_config_file) identifier_config_file )argument_list )call )expression_statement )block )with_statement )block (except_clause (as_pattern (identifier_OSError) identifier_OSError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_warning) identifier_warning )attribute (argument_list (string_"Unable to write config file %s: %s.") string_"Unable to write config file %s: %s." (attribute (identifier_self) identifier_self (identifier_filename) identifier_filename )attribute (identifier_e) identifier_e )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Store the raw data as our configuration.
(module (function_definition (function_name_float) function_name_float (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (for_statement (identifier_key) identifier_key (identifier_kwargs) identifier_kwargs (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_key) identifier_key (subscript (identifier_kwargs) identifier_kwargs (identifier_key) identifier_key )subscript )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_command) identifier_command )attribute (attribute (identifier_self) identifier_self (identifier_COMMAND_FLOAT) identifier_COMMAND_FLOAT )attribute )assignment )expression_statement )block )function_definition )module
Remove power from the motor.
(module (function_definition (function_name__sexagesimalize_to_int) function_name__sexagesimalize_to_int (parameters (identifier_value) identifier_value (default_parameter (identifier_places) identifier_places (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_sign) identifier_sign (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_np) identifier_np (identifier_sign) identifier_sign )attribute (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (call (identifier_abs) identifier_abs (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_power) identifier_power (binary_operator (integer_10) integer_10 (identifier_places) identifier_places )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_n) identifier_n (binary_operator (call (identifier_int) identifier_int (argument_list (binary_operator (binary_operator (binary_operator (integer_7200) integer_7200 (identifier_power) identifier_power )binary_operator (identifier_value) identifier_value )binary_operator (integer_1) integer_1 )binary_operator )argument_list )call (integer_2) integer_2 )binary_operator )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_n) identifier_n (identifier_fraction) identifier_fraction )pattern_list (call (identifier_divmod) identifier_divmod (argument_list (identifier_n) identifier_n (identifier_power) identifier_power )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_n) identifier_n (identifier_seconds) identifier_seconds )pattern_list (call (identifier_divmod) identifier_divmod (argument_list (identifier_n) identifier_n (integer_60) integer_60 )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_n) identifier_n (identifier_minutes) identifier_minutes )pattern_list (call (identifier_divmod) identifier_divmod (argument_list (identifier_n) identifier_n (integer_60) integer_60 )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_sign) identifier_sign (identifier_n) identifier_n (identifier_minutes) identifier_minutes (identifier_seconds) identifier_seconds (identifier_fraction) identifier_fraction )expression_list )return_statement )block )function_definition )module
Decompose `value` into units, minutes, seconds, and second fractions. This routine prepares a value for sexagesimal display, with its seconds fraction expressed as an integer with `places` digits. The result is a tuple of five integers: ``(sign [either +1 or -1], units, minutes, seconds, second_fractions)`` The integers are properly rounded per astronomical convention so that, for example, given ``places=3`` the result tuple ``(1, 11, 22, 33, 444)`` means that the input was closer to 11u 22' 33.444" than to either 33.443" or 33.445" in its value.
(module (function_definition (function_name_open_ioc) function_name_open_ioc (parameters (identifier_fn) identifier_fn )parameters (block (expression_statement (assignment (identifier_parsed_xml) identifier_parsed_xml (call (attribute (identifier_xmlutils) identifier_xmlutils (identifier_read_xml_no_ns) identifier_read_xml_no_ns )attribute (argument_list (identifier_fn) identifier_fn )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_parsed_xml) identifier_parsed_xml )not_operator (block (raise_statement (call (identifier_IOCParseError) identifier_IOCParseError (argument_list (string_'Error occured parsing XML') string_'Error occured parsing XML' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_root) identifier_root (call (attribute (identifier_parsed_xml) identifier_parsed_xml (identifier_getroot) identifier_getroot )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_metadata_node) identifier_metadata_node (call (attribute (identifier_root) identifier_root (identifier_find) identifier_find )attribute (argument_list (string_'metadata') string_'metadata' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_top_level_indicator) identifier_top_level_indicator (call (identifier_get_top_level_indicator_node) identifier_get_top_level_indicator_node (argument_list (identifier_root) identifier_root )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_parameters_node) identifier_parameters_node (call (attribute (identifier_root) identifier_root (identifier_find) identifier_find )attribute (argument_list (string_'parameters') string_'parameters' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_parameters_node) identifier_parameters_node (None) None )comparison_operator (block (expression_statement (assignment (identifier_parameters_node) identifier_parameters_node (call (attribute (identifier_ioc_et) identifier_ioc_et (identifier_make_parameters_node) identifier_make_parameters_node )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_root) identifier_root (identifier_append) identifier_append )attribute (argument_list (identifier_parameters_node) identifier_parameters_node )argument_list )call )expression_statement )block )if_statement (return_statement (expression_list (identifier_root) identifier_root (identifier_metadata_node) identifier_metadata_node (identifier_top_level_indicator) identifier_top_level_indicator (identifier_parameters_node) identifier_parameters_node )expression_list )return_statement )block )function_definition )module
Opens an IOC file, or XML string. Returns the root element, top level indicator element, and parameters element. If the IOC or string fails to parse, an IOCParseError is raised. This is a helper function used by __init__. :param fn: This is a path to a file to open, or a string containing XML representing an IOC. :return: a tuple containing three elementTree Element objects The first element, the root, contains the entire IOC itself. The second element, the top level OR indicator, allows the user to add additional IndicatorItem or Indicator nodes to the IOC easily. The third element, the parameters node, allows the user to quickly parse the parameters.
(module (function_definition (function_name__load) function_name__load (parameters (identifier_self) identifier_self (identifier_data) identifier_data (default_parameter (identifier_check) identifier_check (True) True )default_parameter )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'Load proxies from the raw data') string_'Load proxies from the raw data' )argument_list )call )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (attribute (identifier_io) identifier_io (identifier_TextIOWrapper) identifier_TextIOWrapper )attribute )argument_list )call (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_data) identifier_data (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_IPPortPatternLine) identifier_IPPortPatternLine (identifier_findall) identifier_findall )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_proxies) identifier_proxies (call (identifier_set) identifier_set (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (for_statement (identifier_proxy) identifier_proxy (identifier_proxies) identifier_proxies (block (expression_statement (await (call (attribute (identifier_self) identifier_self (identifier__handle) identifier__handle )attribute (argument_list (identifier_proxy) identifier_proxy (keyword_argument (identifier_check) identifier_check (identifier_check) identifier_check )keyword_argument )argument_list )call )await )expression_statement )block )for_statement (expression_statement (await (call (attribute (attribute (identifier_self) identifier_self (identifier__on_check) identifier__on_check )attribute (identifier_join) identifier_join )attribute (argument_list )argument_list )call )await )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__done) identifier__done )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Looking for proxies in the passed data. Transform the passed data from [raw string | file-like object | list] to set {(host, port), ...}: {('192.168.0.1', '80'), }
(module (function_definition (function_name_list_arguments) function_name_list_arguments (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_size) identifier_size (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_uint) identifier_c_uint )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sarr) identifier_sarr (call (call (attribute (identifier_ctypes) identifier_ctypes (identifier_POINTER) identifier_POINTER )attribute (argument_list (attribute (identifier_ctypes) identifier_ctypes (identifier_c_char_p) identifier_c_char_p )attribute )argument_list )call (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_check_call) identifier_check_call (argument_list (call (attribute (identifier__LIB) identifier__LIB (identifier_MXSymbolListArguments) identifier_MXSymbolListArguments )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_size) identifier_size )argument_list )call (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_sarr) identifier_sarr )argument_list )call )argument_list )call )argument_list )call )expression_statement (return_statement (list_comprehension (call (identifier_py_str) identifier_py_str (argument_list (subscript (identifier_sarr) identifier_sarr (identifier_i) identifier_i )subscript )argument_list )call (for_in_clause (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (attribute (identifier_size) identifier_size (identifier_value) identifier_value )attribute )argument_list )call )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Lists all the arguments in the symbol. Example ------- >>> a = mx.sym.var('a') >>> b = mx.sym.var('b') >>> c = a + b >>> c.list_arguments ['a', 'b'] Returns ------- args : list of string List containing the names of all the arguments required to compute the symbol.
(module (function_definition (function_name_visit_Name) function_name_visit_Name (parameters (identifier_self) identifier_self (identifier_node) identifier_node )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_node) identifier_node (identifier_ctx) identifier_ctx )attribute (tuple (attribute (identifier_ast) identifier_ast (identifier_Store) identifier_Store )attribute (attribute (identifier_ast) identifier_ast (identifier_Param) identifier_Param )attribute )tuple )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_result) identifier_result )attribute (identifier_add) identifier_add )attribute (argument_list (attribute (identifier_node) identifier_node (identifier_id) identifier_id )attribute )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Any node with Store or Param context is a new identifier.
(module (function_definition (function_name_parse_rule) function_name_parse_rule (parameters (typed_parameter (identifier_rule) identifier_rule (type (identifier_str) identifier_str )type )typed_parameter (default_parameter (identifier_raise_error) identifier_raise_error (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_parser) identifier_parser (call (identifier_Parser) identifier_Parser (argument_list (identifier_raise_error) identifier_raise_error )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_parser) identifier_parser (identifier_parse) identifier_parse )attribute (argument_list (identifier_rule) identifier_rule )argument_list )call )return_statement )block )function_definition )module
Parses policy to a tree of Check objects.
(module (function_definition (function_name_create) function_name_create (parameters (identifier_url) identifier_url (identifier_filename) identifier_filename )parameters (block (expression_statement (assignment (identifier_files) identifier_files (dictionary (pair (string_'file') string_'file' (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'rb') string_'rb' )argument_list )call )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_requests) identifier_requests (identifier_post) identifier_post )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_files) identifier_files (identifier_files) identifier_files )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute (integer_201) integer_201 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_'invalid file: ') string_'invalid file: ' (identifier_filename) identifier_filename )binary_operator )argument_list )call )raise_statement (return_statement (subscript (call (identifier_references_to_dict) identifier_references_to_dict (argument_list (subscript (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call (string_'links') string_'links' )subscript )argument_list )call (identifier_REF_SELF) identifier_REF_SELF )subscript )return_statement )block )if_statement )block )function_definition )module
Create new fMRI for given experiment by uploading local file. Expects an tar-archive. Parameters ---------- url : string Url to POST fMRI create request filename : string Path to tar-archive on local disk Returns ------- string Url of created functional data resource
(module (function_definition (function_name__Notify) function_name__Notify (parameters (identifier_username) identifier_username (identifier_notification_type) identifier_notification_type (identifier_message) identifier_message (identifier_object_reference) identifier_object_reference )parameters (block (if_statement (comparison_operator (identifier_username) identifier_username (attribute (attribute (identifier_aff4_users) identifier_aff4_users (identifier_GRRUser) identifier_GRRUser )attribute (identifier_SYSTEM_USERS) identifier_SYSTEM_USERS )attribute )comparison_operator (block (return_statement )return_statement )block )if_statement (if_statement (identifier_object_reference) identifier_object_reference (block (expression_statement (assignment (identifier_uc) identifier_uc (call (attribute (identifier_object_reference) identifier_object_reference (identifier_UnionCast) identifier_UnionCast )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_uc) identifier_uc (string_"client_id") string_"client_id" )argument_list )call (block (expression_statement (assignment (identifier_message) identifier_message (binary_operator (call (identifier__HostPrefix) identifier__HostPrefix (argument_list (attribute (identifier_uc) identifier_uc (identifier_client_id) identifier_client_id )attribute )argument_list )call (identifier_message) identifier_message )binary_operator )assignment )expression_statement )block )if_statement )block )if_statement (expression_statement (assignment (identifier_n) identifier_n (call (attribute (identifier_rdf_objects) identifier_rdf_objects (identifier_UserNotification) identifier_UserNotification )attribute (argument_list (keyword_argument (identifier_username) identifier_username (identifier_username) identifier_username )keyword_argument (keyword_argument (identifier_notification_type) identifier_notification_type (identifier_notification_type) identifier_notification_type )keyword_argument (keyword_argument (identifier_state) identifier_state (attribute (attribute (attribute (identifier_rdf_objects) identifier_rdf_objects (identifier_UserNotification) identifier_UserNotification )attribute (identifier_State) identifier_State )attribute (identifier_STATE_PENDING) identifier_STATE_PENDING )attribute )keyword_argument (keyword_argument (identifier_message) identifier_message (identifier_message) identifier_message )keyword_argument (keyword_argument (identifier_reference) identifier_reference (identifier_object_reference) identifier_object_reference )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_data_store) identifier_data_store (identifier_REL_DB) identifier_REL_DB )attribute (identifier_WriteUserNotification) identifier_WriteUserNotification )attribute (argument_list (identifier_n) identifier_n )argument_list )call )expression_statement )block )function_definition )module
Schedules a new-style REL_DB user notification.
(module (function_definition (function_name_create) function_name_create (parameters (identifier_cls) identifier_cls (default_parameter (identifier_data) identifier_data (None) None )default_parameter (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_cls) identifier_cls (identifier_validate) identifier_validate )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement (expression_statement (call (attribute (call (identifier_getattr) identifier_getattr (argument_list (identifier_Entity) identifier_Entity (string_'create') string_'create' )argument_list )call (identifier___func__) identifier___func__ )attribute (argument_list (identifier_cls) identifier_cls (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Validate and then create a Vendor entity.
(module (function_definition (function_name_dump) function_name_dump (parameters (identifier_self) identifier_self (identifier_blob) identifier_blob (identifier_stream) identifier_stream )parameters (block (expression_statement (call (attribute (identifier_json) identifier_json (identifier_dump) identifier_dump )attribute (argument_list (identifier_blob) identifier_blob (identifier_stream) identifier_stream (keyword_argument (identifier_indent) identifier_indent (attribute (identifier_self) identifier_self (identifier_indent) identifier_indent )attribute )keyword_argument (keyword_argument (identifier_sort_keys) identifier_sort_keys (True) True )keyword_argument (keyword_argument (identifier_separators) identifier_separators (attribute (identifier_self) identifier_self (identifier_separators) identifier_separators )attribute )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Call json.dump with the attributes of this instance as arguments.
(module (function_definition (function_name_on_accel_cleared) function_name_on_accel_cleared (parameters (identifier_self) identifier_self (identifier_cellrendereraccel) identifier_cellrendereraccel (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_dconf_path) identifier_dconf_path (subscript (subscript (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute (identifier_path) identifier_path )subscript (identifier_HOTKET_MODEL_INDEX_DCONF) identifier_HOTKET_MODEL_INDEX_DCONF )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_dconf_path) identifier_dconf_path (string_"show-hide") string_"show-hide" )comparison_operator (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warn) identifier_warn )attribute (argument_list (string_"Cannot disable 'show-hide' hotkey") string_"Cannot disable 'show-hide' hotkey" )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (identifier_keybindingsGlobal) identifier_keybindingsGlobal )attribute (identifier_set_string) identifier_set_string )attribute (argument_list (identifier_dconf_path) identifier_dconf_path (identifier_old_accel) identifier_old_accel )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute (identifier_path) identifier_path )subscript (identifier_HOTKET_MODEL_INDEX_HUMAN_ACCEL) identifier_HOTKET_MODEL_INDEX_HUMAN_ACCEL )subscript (string_"") string_"" )assignment )expression_statement (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute (identifier_path) identifier_path )subscript (identifier_HOTKET_MODEL_INDEX_ACCEL) identifier_HOTKET_MODEL_INDEX_ACCEL )subscript (string_"None") string_"None" )assignment )expression_statement (if_statement (comparison_operator (identifier_dconf_path) identifier_dconf_path (string_"show-focus") string_"show-focus" )comparison_operator (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (identifier_keybindingsGlobal) identifier_keybindingsGlobal )attribute (identifier_set_string) identifier_set_string )attribute (argument_list (identifier_dconf_path) identifier_dconf_path (string_'disabled') string_'disabled' )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (identifier_keybindingsLocal) identifier_keybindingsLocal )attribute (identifier_set_string) identifier_set_string )attribute (argument_list (identifier_dconf_path) identifier_dconf_path (string_'disabled') string_'disabled' )argument_list )call )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )function_definition )module
If the user tries to clear a keybinding with the backspace key this callback will be called and it just fill the model with an empty key and set the 'disabled' string in dconf path.
(module (function_definition (function_name_authenticate) function_name_authenticate (parameters (identifier_self) identifier_self (identifier_username) identifier_username (identifier_password) identifier_password )parameters (block (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_requests) identifier_requests (identifier_post) identifier_post )attribute (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_apiurl) identifier_apiurl )attribute (string_"/token") string_"/token" )binary_operator (keyword_argument (identifier_params) identifier_params (dictionary (pair (string_"grant_type") string_"grant_type" (string_"password") string_"password" )pair (pair (string_"username") string_"username" (identifier_username) identifier_username )pair (pair (string_"password") string_"password" (identifier_password) identifier_password )pair (pair (string_"client_id") string_"client_id" (attribute (identifier_self) identifier_self (identifier_cid) identifier_cid )attribute )pair (pair (string_"client_secret") string_"client_secret" (attribute (identifier_self) identifier_self (identifier_csecret) identifier_csecret )attribute )pair )dictionary )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_r) identifier_r (identifier_status_code) identifier_status_code )attribute (integer_200) integer_200 )comparison_operator (block (raise_statement (identifier_ServerError) identifier_ServerError )raise_statement )block )if_statement (expression_statement (assignment (identifier_jsd) identifier_jsd (call (attribute (identifier_r) identifier_r (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_remember) identifier_remember )attribute (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_token_storage) identifier_token_storage )attribute (identifier_username) identifier_username )subscript (dictionary (pair (string_'token') string_'token' (subscript (identifier_jsd) identifier_jsd (string_'access_token') string_'access_token' )subscript )pair (pair (string_'refresh') string_'refresh' (subscript (identifier_jsd) identifier_jsd (string_'refresh_token') string_'refresh_token' )subscript )pair (pair (string_'expiration') string_'expiration' (binary_operator (call (identifier_int) identifier_int (argument_list (subscript (identifier_jsd) identifier_jsd (string_'created_at') string_'created_at' )subscript )argument_list )call (call (identifier_int) identifier_int (argument_list (subscript (identifier_jsd) identifier_jsd (string_'expires_in') string_'expires_in' )subscript )argument_list )call )binary_operator )pair )dictionary )assignment )expression_statement )block )if_statement (return_statement (expression_list (subscript (identifier_jsd) identifier_jsd (string_'access_token') string_'access_token' )subscript (binary_operator (call (identifier_int) identifier_int (argument_list (subscript (identifier_jsd) identifier_jsd (string_'expires_in') string_'expires_in' )subscript )argument_list )call (call (identifier_int) identifier_int (argument_list (subscript (identifier_jsd) identifier_jsd (string_'created_at') string_'created_at' )subscript )argument_list )call )binary_operator (subscript (identifier_jsd) identifier_jsd (string_'refresh_token') string_'refresh_token' )subscript )expression_list )return_statement )block )function_definition )module
Obtain an oauth token. Pass username and password. Get a token back. If KitsuAuth is set to remember your tokens for this session, it will store the token under the username given. :param username: username :param password: password :param alias: A list of alternative names for a person if using the KitsuAuth token storage :return: A tuple of (token, expiration time in unix time stamp, refresh_token) or ServerError
(module (function_definition (function_name_read_gps_ifd) function_name_read_gps_ifd (parameters (identifier_fh) identifier_fh (identifier_byteorder) identifier_byteorder (identifier_dtype) identifier_dtype (identifier_count) identifier_count (identifier_offsetsize) identifier_offsetsize )parameters (block (return_statement (call (identifier_read_tags) identifier_read_tags (argument_list (identifier_fh) identifier_fh (identifier_byteorder) identifier_byteorder (identifier_offsetsize) identifier_offsetsize (attribute (identifier_TIFF) identifier_TIFF (identifier_GPS_TAGS) identifier_GPS_TAGS )attribute (keyword_argument (identifier_maxifds) identifier_maxifds (integer_1) integer_1 )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Read GPS tags from file and return as dict.
(module (function_definition (function_name_read) function_name_read (parameters (identifier_self) identifier_self (identifier_fname) identifier_fname (default_parameter (identifier_psw) identifier_psw (None) None )default_parameter )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_self) identifier_self (identifier_open) identifier_open )attribute (argument_list (identifier_fname) identifier_fname (string_'r') string_'r' (identifier_psw) identifier_psw )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Return uncompressed data for archive entry. For longer files using :meth:`RarFile.open` may be better idea. Parameters: fname filename or RarInfo instance psw password to use for extracting.
(module (function_definition (function_name_gen_WS_DF) function_name_gen_WS_DF (parameters (identifier_df_WS_data) identifier_df_WS_data )parameters (block (expression_statement (assignment (identifier_df_fs) identifier_df_fs (call (identifier_gen_FS_DF) identifier_gen_FS_DF (argument_list (identifier_df_WS_data) identifier_df_WS_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_list_index) identifier_list_index (list (tuple (string_'mean') string_'mean' (string_'T2') string_'T2' )tuple (tuple (string_'max') string_'max' (string_'T2') string_'T2' )tuple (tuple (string_'min') string_'min' (string_'T2') string_'T2' )tuple (tuple (string_'mean') string_'mean' (string_'U10') string_'U10' )tuple (tuple (string_'max') string_'max' (string_'U10') string_'U10' )tuple (tuple (string_'min') string_'min' (string_'U10') string_'U10' )tuple (tuple (string_'mean') string_'mean' (string_'RH2') string_'RH2' )tuple (tuple (string_'max') string_'max' (string_'RH2') string_'RH2' )tuple (tuple (string_'min') string_'min' (string_'RH2') string_'RH2' )tuple (tuple (string_'mean') string_'mean' (string_'Kdown') string_'Kdown' )tuple )list )assignment )expression_statement (expression_statement (assignment (identifier_list_const) identifier_list_const (list_comprehension (call (identifier_getattr) identifier_getattr (argument_list (identifier_const) identifier_const (identifier_attr) identifier_attr )argument_list )call (for_in_clause (identifier_attr) identifier_attr (list (string_'T_MEAN') string_'T_MEAN' (string_'T_MAX') string_'T_MAX' (string_'T_MIN') string_'T_MIN' (string_'WIND_MEAN') string_'WIND_MEAN' (string_'WIND_MAX') string_'WIND_MAX' (string_'WIND_MIN') string_'WIND_MIN' (string_'RH_MEAN') string_'RH_MEAN' (string_'RH_MAX') string_'RH_MAX' (string_'RH_MIN') string_'RH_MIN' (string_'SOLAR_RADIATION_GLOBAL') string_'SOLAR_RADIATION_GLOBAL' )list )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_list_ws) identifier_list_ws (list_comprehension (binary_operator (subscript (attribute (identifier_df_fs) identifier_df_fs (identifier_loc) identifier_loc )attribute (identifier_idx) identifier_idx )subscript (identifier_cst) identifier_cst )binary_operator (for_in_clause (pattern_list (identifier_idx) identifier_idx (identifier_cst) identifier_cst )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_list_index) identifier_list_index (identifier_list_const) identifier_list_const )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_df_ws) identifier_df_ws (call (attribute (call (attribute (call (attribute (call (attribute (identifier_pd) identifier_pd (identifier_concat) identifier_concat )attribute (argument_list (identifier_list_ws) identifier_list_ws (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call (identifier_sum) identifier_sum )attribute (argument_list (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument )argument_list )call (identifier_unstack) identifier_unstack )attribute (argument_list )argument_list )call (identifier_dropna) identifier_dropna )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (identifier_df_ws) identifier_df_ws )return_statement )block )function_definition )module
generate DataFrame of weighted sums. Parameters ---------- df_WS_data : type Description of parameter `df_WS_data`. Returns ------- type Description of returned object.
(module (function_definition (function_name_average) function_name_average (parameters (identifier_self) identifier_self (typed_parameter (identifier_rows) identifier_rows (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_Row) identifier_Row )type )type_parameter )generic_type )type )typed_parameter (typed_parameter (identifier_column) identifier_column (type (identifier_NumberColumn) identifier_NumberColumn )type )typed_parameter )parameters (type (identifier_Number) identifier_Number )type (block (expression_statement (assignment (identifier_cell_values) identifier_cell_values (list_comprehension (subscript (attribute (identifier_row) identifier_row (identifier_values) identifier_values )attribute (attribute (identifier_column) identifier_column (identifier_name) identifier_name )attribute )subscript (for_in_clause (identifier_row) identifier_row (identifier_rows) identifier_rows )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (not_operator (identifier_cell_values) identifier_cell_values )not_operator (block (return_statement (float_0.0) float_0.0 )return_statement )block )if_statement (return_statement (binary_operator (call (identifier_sum) identifier_sum (argument_list (identifier_cell_values) identifier_cell_values )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_cell_values) identifier_cell_values )argument_list )call )binary_operator )return_statement )block )function_definition )module
Takes a list of rows and a column and returns the mean of the values under that column in those rows.
(module (function_definition (function_name_name_resolve) function_name_name_resolve (parameters (identifier_self) identifier_self (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_recursive) identifier_recursive (False) False )default_parameter (default_parameter (identifier_nocache) identifier_nocache (False) False )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_"opts") string_"opts" (dictionary (pair (string_"recursive") string_"recursive" (identifier_recursive) identifier_recursive )pair (pair (string_"nocache") string_"nocache" (identifier_nocache) identifier_nocache )pair )dictionary )argument_list )call )expression_statement (expression_statement (assignment (identifier_args) identifier_args (conditional_expression (tuple (identifier_name) identifier_name )tuple (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (tuple )tuple )conditional_expression )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_request) identifier_request )attribute (argument_list (string_'/name/resolve') string_'/name/resolve' (identifier_args) identifier_args (keyword_argument (identifier_decoder) identifier_decoder (string_'json') string_'json' )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Gets the value currently published at an IPNS name. IPNS is a PKI namespace, where names are the hashes of public keys, and the private key enables publishing new (signed) values. In resolve, the default value of ``name`` is your own identity public key. .. code-block:: python >>> c.name_resolve() {'Path': '/ipfs/QmfZY61ukoQuCX8e5Pt7v8pRfhkyxwZKZMTodAtmvyGZ5d'} Parameters ---------- name : str The IPNS name to resolve (defaults to the connected node) recursive : bool Resolve until the result is not an IPFS name (default: false) nocache : bool Do not use cached entries (default: false) Returns ------- dict : The IPFS path the IPNS hash points at
(module (function_definition (function_name_open_conn) function_name_open_conn (parameters (identifier_host) identifier_host (identifier_db) identifier_db (identifier_user) identifier_user (identifier_password) identifier_password (default_parameter (identifier_retries) identifier_retries (integer_0) integer_0 )default_parameter (default_parameter (identifier_sleep) identifier_sleep (float_0.5) float_0.5 )default_parameter )parameters (block (assert_statement (comparison_operator (identifier_retries) identifier_retries (integer_0) integer_0 )comparison_operator )assert_statement (try_statement (block (return_statement (call (attribute (identifier_MySQLdb) identifier_MySQLdb (identifier_connect) identifier_connect )attribute (argument_list (keyword_argument (identifier_host) identifier_host (identifier_host) identifier_host )keyword_argument (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument (keyword_argument (identifier_passwd) identifier_passwd (identifier_password) identifier_password )keyword_argument (keyword_argument (identifier_db) identifier_db (identifier_db) identifier_db )keyword_argument )argument_list )call )return_statement )block (except_clause (identifier_Exception) identifier_Exception (block (if_statement (comparison_operator (identifier_retries) identifier_retries (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (identifier_sleep) identifier_sleep )argument_list )call )expression_statement (return_statement (call (identifier_open_conn) identifier_open_conn (argument_list (identifier_host) identifier_host (identifier_db) identifier_db (identifier_user) identifier_user (identifier_password) identifier_password (binary_operator (identifier_retries) identifier_retries (integer_1) integer_1 )binary_operator (identifier_sleep) identifier_sleep )argument_list )call )return_statement )block (else_clause (block (raise_statement )raise_statement )block )else_clause )if_statement )block )except_clause )try_statement )block )function_definition )module
Return an open mysql db connection using the given credentials. Use `retries` and `sleep` to be robust to the occassional transient connection failure. retries: if an exception when getting the connection, try again at most this many times. sleep: pause between retries for this many seconds. a float >= 0.
(module (function_definition (function_name_clone) function_name_clone (parameters (identifier_self) identifier_self (identifier_repo) identifier_repo (identifier_ref) identifier_ref (default_parameter (identifier_deps) identifier_deps (tuple )tuple )default_parameter )parameters (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_repo) identifier_repo )argument_list )call (block (expression_statement (assignment (identifier_repo) identifier_repo (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (identifier_repo) identifier_repo )argument_list )call )assignment )expression_statement )block )if_statement (function_definition (function_name_clone_strategy) function_name_clone_strategy (parameters (identifier_directory) identifier_directory )parameters (block (expression_statement (assignment (identifier_env) identifier_env (call (attribute (identifier_git) identifier_git (identifier_no_git_env) identifier_no_git_env )attribute (argument_list )argument_list )call )assignment )expression_statement (function_definition (function_name__git_cmd) function_name__git_cmd (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (call (identifier_cmd_output) identifier_cmd_output (argument_list (string_'git') string_'git' (list_splat (identifier_args) identifier_args )list_splat (keyword_argument (identifier_cwd) identifier_cwd (identifier_directory) identifier_directory )keyword_argument (keyword_argument (identifier_env) identifier_env (identifier_env) identifier_env )keyword_argument )argument_list )call )expression_statement )block )function_definition (expression_statement (call (identifier__git_cmd) identifier__git_cmd (argument_list (string_'init') string_'init' (string_'.') string_'.' )argument_list )call )expression_statement (expression_statement (call (identifier__git_cmd) identifier__git_cmd (argument_list (string_'remote') string_'remote' (string_'add') string_'add' (string_'origin') string_'origin' (identifier_repo) identifier_repo )argument_list )call )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__shallow_clone) identifier__shallow_clone )attribute (argument_list (identifier_ref) identifier_ref (identifier__git_cmd) identifier__git_cmd )argument_list )call )expression_statement )block (except_clause (identifier_CalledProcessError) identifier_CalledProcessError (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__complete_clone) identifier__complete_clone )attribute (argument_list (identifier_ref) identifier_ref (identifier__git_cmd) identifier__git_cmd )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition (return_statement (call (attribute (identifier_self) identifier_self (identifier__new_repo) identifier__new_repo )attribute (argument_list (identifier_repo) identifier_repo (identifier_ref) identifier_ref (identifier_deps) identifier_deps (identifier_clone_strategy) identifier_clone_strategy )argument_list )call )return_statement )block )function_definition )module
Clone the given url and checkout the specific ref.
(module (function_definition (function_name_write_grindstone) function_name_write_grindstone (parameters (identifier_self) identifier_self )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (attribute (identifier_self) identifier_self (identifier_grindstone_path) identifier_grindstone_path )attribute (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_grindstone) identifier_grindstone )attribute )argument_list )call )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Writes self.gs to self.grindstone_path.
(module (function_definition (function_name_likelihood) function_name_likelihood (parameters (identifier_self) identifier_self (identifier_outcomes) identifier_outcomes (identifier_modelparams) identifier_modelparams (identifier_expparams) identifier_expparams )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__call_count) identifier__call_count )attribute (parenthesized_expression (binary_operator (binary_operator (call (identifier_safe_shape) identifier_safe_shape (argument_list (identifier_outcomes) identifier_outcomes )argument_list )call (call (identifier_safe_shape) identifier_safe_shape (argument_list (identifier_modelparams) identifier_modelparams )argument_list )call )binary_operator (call (identifier_safe_shape) identifier_safe_shape (argument_list (identifier_expparams) identifier_expparams )argument_list )call )binary_operator )parenthesized_expression )augmented_assignment )expression_statement )block )function_definition )module
r""" Calculates the probability of each given outcome, conditioned on each given model parameter vector and each given experimental control setting. :param np.ndarray modelparams: A shape ``(n_models, n_modelparams)`` array of model parameter vectors describing the hypotheses for which the likelihood function is to be calculated. :param np.ndarray expparams: A shape ``(n_experiments, )`` array of experimental control settings, with ``dtype`` given by :attr:`~qinfer.Simulatable.expparams_dtype`, describing the experiments from which the given outcomes were drawn. :rtype: np.ndarray :return: A three-index tensor ``L[i, j, k]``, where ``i`` is the outcome being considered, ``j`` indexes which vector of model parameters was used, and where ``k`` indexes which experimental parameters where used. Each element ``L[i, j, k]`` then corresponds to the likelihood :math:`\Pr(d_i | \vec{x}_j; e_k)`.
(module (function_definition (function_name_to_files) function_name_to_files (parameters (identifier_self) identifier_self (identifier_resource) identifier_resource (identifier_directory) identifier_directory )parameters (block (expression_statement (assignment (identifier_collections) identifier_collections (call (attribute (identifier_self) identifier_self (identifier___collect) identifier___collect )attribute (argument_list (identifier_resource) identifier_resource )argument_list )call )assignment )expression_statement (for_statement (tuple_pattern (identifier_mb_cls) identifier_mb_cls (identifier_coll) identifier_coll )tuple_pattern (call (identifier_iteritems_) identifier_iteritems_ (argument_list (identifier_collections) identifier_collections )argument_list )call (block (expression_statement (assignment (identifier_fn) identifier_fn (call (identifier_get_write_collection_path) identifier_get_write_collection_path (argument_list (identifier_mb_cls) identifier_mb_cls (attribute (identifier_self) identifier_self (identifier___content_type) identifier___content_type )attribute (keyword_argument (identifier_directory) identifier_directory (identifier_directory) identifier_directory )keyword_argument )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open_text) identifier_open_text (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_directory) identifier_directory (identifier_fn) identifier_fn )argument_list )call )argument_list )call (as_pattern_target (identifier_strm) identifier_strm )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (identifier_dump_resource) identifier_dump_resource (argument_list (identifier_coll) identifier_coll (identifier_strm) identifier_strm (keyword_argument (identifier_content_type) identifier_content_type (attribute (identifier_self) identifier_self (identifier___content_type) identifier___content_type )attribute )keyword_argument )argument_list )call )expression_statement )block )with_statement )block )for_statement )block )function_definition )module
Dumps the given resource and all resources linked to it into a set of representation files in the given directory.
(module (function_definition (function_name_status_code) function_name_status_code (parameters (identifier_code) identifier_code )parameters (block (expression_statement (assignment (identifier_redirect) identifier_redirect (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_headers) identifier_headers (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_location) identifier_location (identifier_REDIRECT_LOCATION) identifier_REDIRECT_LOCATION )keyword_argument )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_code_map) identifier_code_map (dictionary (pair (integer_301) integer_301 (identifier_redirect) identifier_redirect )pair (pair (integer_302) integer_302 (identifier_redirect) identifier_redirect )pair (pair (integer_303) integer_303 (identifier_redirect) identifier_redirect )pair (pair (integer_304) integer_304 (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_data) identifier_data (string_'') string_'' )keyword_argument )argument_list )call )pair (pair (integer_305) integer_305 (identifier_redirect) identifier_redirect )pair (pair (integer_307) integer_307 (identifier_redirect) identifier_redirect )pair (pair (integer_401) integer_401 (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_headers) identifier_headers (dictionary (pair (string_'WWW-Authenticate') string_'WWW-Authenticate' (string_'Basic realm="Fake Realm"') string_'Basic realm="Fake Realm"' )pair )dictionary )keyword_argument )argument_list )call )pair (pair (integer_402) integer_402 (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_data) identifier_data (string_'Fuck you, pay me!') string_'Fuck you, pay me!' )keyword_argument (keyword_argument (identifier_headers) identifier_headers (dictionary (pair (string_'x-more-info') string_'x-more-info' (string_'http://vimeo.com/22053820') string_'http://vimeo.com/22053820' )pair )dictionary )keyword_argument )argument_list )call )pair (pair (integer_406) integer_406 (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_data) identifier_data (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (dictionary (pair (string_'message') string_'message' (string_'Client did not request a supported media type.') string_'Client did not request a supported media type.' )pair (pair (string_'accept') string_'accept' (identifier_ACCEPTED_MEDIA_TYPES) identifier_ACCEPTED_MEDIA_TYPES )pair )dictionary )argument_list )call )keyword_argument (keyword_argument (identifier_headers) identifier_headers (dictionary (pair (string_'Content-Type') string_'Content-Type' (string_'application/json') string_'application/json' )pair )dictionary )keyword_argument )argument_list )call )pair (pair (integer_407) integer_407 (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_headers) identifier_headers (dictionary (pair (string_'Proxy-Authenticate') string_'Proxy-Authenticate' (string_'Basic realm="Fake Realm"') string_'Basic realm="Fake Realm"' )pair )dictionary )keyword_argument )argument_list )call )pair (pair (integer_418) integer_418 (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_data) identifier_data (identifier_ASCII_ART) identifier_ASCII_ART )keyword_argument (keyword_argument (identifier_headers) identifier_headers (dictionary (pair (string_'x-more-info') string_'x-more-info' (string_'http://tools.ietf.org/html/rfc2324') string_'http://tools.ietf.org/html/rfc2324' )pair )dictionary )keyword_argument )argument_list )call )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (identifier_make_response) identifier_make_response (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_r) identifier_r (identifier_status_code) identifier_status_code )attribute (identifier_code) identifier_code )assignment )expression_statement (if_statement (comparison_operator (identifier_code) identifier_code (identifier_code_map) identifier_code_map )comparison_operator (block (expression_statement (assignment (identifier_m) identifier_m (subscript (identifier_code_map) identifier_code_map (identifier_code) identifier_code )subscript )assignment )expression_statement (if_statement (comparison_operator (string_'data') string_'data' (identifier_m) identifier_m )comparison_operator (block (expression_statement (assignment (attribute (identifier_r) identifier_r (identifier_data) identifier_data )attribute (subscript (identifier_m) identifier_m (string_'data') string_'data' )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'headers') string_'headers' (identifier_m) identifier_m )comparison_operator (block (expression_statement (assignment (attribute (identifier_r) identifier_r (identifier_headers) identifier_headers )attribute (subscript (identifier_m) identifier_m (string_'headers') string_'headers' )subscript )assignment )expression_statement )block )if_statement )block )if_statement (return_statement (identifier_r) identifier_r )return_statement )block )function_definition )module
Returns response object of given status code.
(module (function_definition (function_name_execute) function_name_execute (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_options) identifier_options )dictionary_splat_pattern )parameters (block (try_statement (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_EmailNotificationCommand) identifier_EmailNotificationCommand (identifier_self) identifier_self )argument_list )call (identifier_execute) identifier_execute )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_options) identifier_options )dictionary_splat )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (if_statement (boolean_operator (subscript (identifier_options) identifier_options (string_'email_exception') string_'email_exception' )subscript (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (string_'email_exception') string_'email_exception' (False) False )argument_list )call )boolean_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send_email_notification) identifier_send_email_notification )attribute (argument_list (keyword_argument (identifier_include_traceback) identifier_include_traceback (True) True )keyword_argument )argument_list )call )expression_statement )block )if_statement (raise_statement )raise_statement )block )except_clause )try_statement )block )function_definition )module
Overriden in order to send emails on unhandled exception. If an unhandled exception in ``def handle(self, *args, **options)`` occurs and `--email-exception` is set or `self.email_exception` is set to True send an email to ADMINS with the traceback and then reraise the exception.
(module (function_definition (function_name_open) function_name_open (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_hwman) identifier_hwman )attribute (call (identifier_HardwareManager) identifier_HardwareManager (argument_list (keyword_argument (identifier_port) identifier_port (attribute (identifier_self) identifier_self (identifier__port) identifier__port )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_opened) identifier_opened )attribute (True) True )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__connection_string) identifier__connection_string )attribute (None) None )comparison_operator (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_hwman) identifier_hwman )attribute (identifier_connect_direct) identifier_connect_direct )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__connection_string) identifier__connection_string )attribute )argument_list )call )expression_statement )block (except_clause (identifier_HardwareError) identifier_HardwareError (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_hwman) identifier_hwman )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier__connect_id) identifier__connect_id )attribute (None) None )comparison_operator (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_hwman) identifier_hwman )attribute (identifier_connect) identifier_connect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__connect_id) identifier__connect_id )attribute )argument_list )call )expression_statement )block (except_clause (identifier_HardwareError) identifier_HardwareError (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_hwman) identifier_hwman )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement )block )elif_clause )if_statement )block )function_definition )module
Open and potentially connect to a device.
(module (function_definition (function_name_query_string_attribute) function_name_query_string_attribute (parameters (identifier_self) identifier_self (identifier_target) identifier_target (identifier_display_mask) identifier_display_mask (identifier_attr) identifier_attr )parameters (block (expression_statement (assignment (identifier_reply) identifier_reply (call (identifier_NVCtrlQueryStringAttributeReplyRequest) identifier_NVCtrlQueryStringAttributeReplyRequest (argument_list (keyword_argument (identifier_display) identifier_display (attribute (identifier_self) identifier_self (identifier_display) identifier_display )attribute )keyword_argument (keyword_argument (identifier_opcode) identifier_opcode (call (attribute (attribute (identifier_self) identifier_self (identifier_display) identifier_display )attribute (identifier_get_extension_major) identifier_get_extension_major )attribute (argument_list (identifier_extname) identifier_extname )argument_list )call )keyword_argument (keyword_argument (identifier_target_id) identifier_target_id (call (attribute (identifier_target) identifier_target (identifier_id) identifier_id )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_target_type) identifier_target_type (call (attribute (identifier_target) identifier_target (identifier_type) identifier_type )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_display_mask) identifier_display_mask (identifier_display_mask) identifier_display_mask )keyword_argument (keyword_argument (identifier_attr) identifier_attr (identifier_attr) identifier_attr )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_reply) identifier_reply (identifier__data) identifier__data )attribute (identifier_get) identifier_get )attribute (argument_list (string_'flags') string_'flags' )argument_list )call )not_operator (block (return_statement (None) None )return_statement )block )if_statement (return_statement (call (attribute (call (identifier_str) identifier_str (argument_list (call (attribute (attribute (identifier_reply) identifier_reply (identifier__data) identifier__data )attribute (identifier_get) identifier_get )attribute (argument_list (string_'string') string_'string' )argument_list )call )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list (string_'\0') string_'\0' )argument_list )call )return_statement )block )function_definition )module
Return the value of a string attribute
(module (function_definition (function_name_compute_knot_vector) function_name_compute_knot_vector (parameters (identifier_degree) identifier_degree (identifier_num_points) identifier_num_points (identifier_params) identifier_params )parameters (block (expression_statement (assignment (identifier_kv) identifier_kv (list_comprehension (float_0.0) float_0.0 (for_in_clause (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (binary_operator (identifier_degree) identifier_degree (integer_1) integer_1 )binary_operator )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (binary_operator (binary_operator (identifier_num_points) identifier_num_points (identifier_degree) identifier_degree )binary_operator (integer_1) integer_1 )binary_operator )argument_list )call (block (expression_statement (assignment (identifier_temp_kv) identifier_temp_kv (binary_operator (parenthesized_expression (binary_operator (float_1.0) float_1.0 (identifier_degree) identifier_degree )binary_operator )parenthesized_expression (call (identifier_sum) identifier_sum (argument_list (list_comprehension (subscript (identifier_params) identifier_params (identifier_j) identifier_j )subscript (for_in_clause (identifier_j) identifier_j (call (identifier_range) identifier_range (argument_list (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator (binary_operator (binary_operator (identifier_i) identifier_i (identifier_degree) identifier_degree )binary_operator (integer_1) integer_1 )binary_operator )argument_list )call )for_in_clause )list_comprehension )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_kv) identifier_kv (identifier_append) identifier_append )attribute (argument_list (identifier_temp_kv) identifier_temp_kv )argument_list )call )expression_statement )block )for_statement (expression_statement (augmented_assignment (identifier_kv) identifier_kv (list_comprehension (float_1.0) float_1.0 (for_in_clause (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (binary_operator (identifier_degree) identifier_degree (integer_1) integer_1 )binary_operator )argument_list )call )for_in_clause )list_comprehension )augmented_assignment )expression_statement (return_statement (identifier_kv) identifier_kv )return_statement )block )function_definition )module
Computes a knot vector from the parameter list using averaging method. Please refer to the Equation 9.8 on The NURBS Book (2nd Edition), pp.365 for details. :param degree: degree :type degree: int :param num_points: number of data points :type num_points: int :param params: list of parameters, :math:`\\overline{u}_{k}` :type params: list, tuple :return: knot vector :rtype: list
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (identifier_task) identifier_task (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_"/tasks/%s") string_"/tasks/%s" (parenthesized_expression (identifier_task) identifier_task )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
A specific, existing task can be deleted by making a DELETE request on the URL for that task. Deleted tasks go into the "trash" of the user making the delete request. Tasks can be recovered from the trash within a period of 30 days; afterward they are completely removed from the system. Returns an empty data record. Parameters ---------- task : {Id} The task to delete.
(module (function_definition (function_name_listen) function_name_listen (parameters (identifier_ctx) identifier_ctx )parameters (block (expression_statement (assignment (identifier_wva) identifier_wva (call (identifier_get_wva) identifier_get_wva (argument_list (identifier_ctx) identifier_ctx )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_es) identifier_es (call (attribute (identifier_wva) identifier_wva (identifier_get_event_stream) identifier_get_event_stream )attribute (argument_list )argument_list )call )assignment )expression_statement (function_definition (function_name_cb) function_name_cb (parameters (identifier_event) identifier_event )parameters (block (expression_statement (call (identifier_cli_pprint) identifier_cli_pprint (argument_list (identifier_event) identifier_event )argument_list )call )expression_statement )block )function_definition (expression_statement (call (attribute (identifier_es) identifier_es (identifier_add_event_listener) identifier_add_event_listener )attribute (argument_list (identifier_cb) identifier_cb )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_es) identifier_es (identifier_enable) identifier_enable )attribute (argument_list )argument_list )call )expression_statement (while_statement (True) True (block (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (integer_5) integer_5 )argument_list )call )expression_statement )block )while_statement )block )function_definition )module
Output the contents of the WVA event stream This command shows the data being received from the WVA event stream based on the subscriptions that have been set up and the data on the WVA vehicle bus. \b $ wva subscriptions listen {'data': {'VehicleSpeed': {'timestamp': '2015-03-25T00:11:53Z', 'value': 198.272461}, 'sequence': 124, 'short_name': 'speed', 'timestamp': '2015-03-25T00:11:53Z', 'uri': 'vehicle/data/VehicleSpeed'}} {'data': {'EngineSpeed': {'timestamp': '2015-03-25T00:11:54Z', 'value': 6425.5}, 'sequence': 274, 'short_name': 'rpm', 'timestamp': '2015-03-25T00:11:54Z', 'uri': 'vehicle/data/EngineSpeed'}} ... ^C Aborted! This command can be useful for debugging subscriptions or getting a quick glimpse at what data is coming in to a WVA device.
(module (function_definition (function_name_asset) function_name_asset (parameters (identifier_self) identifier_self (identifier_id) identifier_id )parameters (block (expression_statement (assignment (identifier_data) identifier_data (None) None )assignment )expression_statement (if_statement (comparison_operator (call (identifier_int) identifier_int (argument_list (identifier_id) identifier_id )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier__build_url) identifier__build_url )attribute (argument_list (string_'releases') string_'releases' (string_'assets') string_'assets' (call (identifier_str) identifier_str (argument_list (identifier_id) identifier_id )argument_list )call (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_data) identifier_data (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 (keyword_argument (identifier_headers) identifier_headers (attribute (identifier_Release) identifier_Release (identifier_CUSTOM_HEADERS) identifier_CUSTOM_HEADERS )attribute )keyword_argument )argument_list )call (integer_200) integer_200 )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (conditional_expression (call (identifier_Asset) identifier_Asset (argument_list (identifier_data) identifier_data (identifier_self) identifier_self )argument_list )call (identifier_data) identifier_data (None) None )conditional_expression )return_statement )block )function_definition )module
Returns a single Asset. :param int id: (required), id of the asset :returns: :class:`Asset <github3.repos.release.Asset>`
(module (function_definition (function_name_mean_cl_boot) function_name_mean_cl_boot (parameters (identifier_series) identifier_series (default_parameter (identifier_n_samples) identifier_n_samples (integer_1000) integer_1000 )default_parameter (default_parameter (identifier_confidence_interval) identifier_confidence_interval (float_0.95) float_0.95 )default_parameter (default_parameter (identifier_random_state) identifier_random_state (None) None )default_parameter )parameters (block (return_statement (call (identifier_bootstrap_statistics) identifier_bootstrap_statistics (argument_list (identifier_series) identifier_series (attribute (identifier_np) identifier_np (identifier_mean) identifier_mean )attribute (keyword_argument (identifier_n_samples) identifier_n_samples (identifier_n_samples) identifier_n_samples )keyword_argument (keyword_argument (identifier_confidence_interval) identifier_confidence_interval (identifier_confidence_interval) identifier_confidence_interval )keyword_argument (keyword_argument (identifier_random_state) identifier_random_state (identifier_random_state) identifier_random_state )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Bootstrapped mean with confidence limits
(module (function_definition (function_name_assert_not_called) function_name_assert_not_called (parameters (identifier__mock_self) identifier__mock_self )parameters (block (expression_statement (assignment (identifier_self) identifier_self (identifier__mock_self) identifier__mock_self )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_call_count) identifier_call_count )attribute (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (parenthesized_expression (binary_operator (string_"Expected '%s' to not have been called. Called %s times.") string_"Expected '%s' to not have been called. Called %s times." (tuple (boolean_operator (attribute (identifier_self) identifier_self (identifier__mock_name) identifier__mock_name )attribute (string_'mock') string_'mock' )boolean_operator (attribute (identifier_self) identifier_self (identifier_call_count) identifier_call_count )attribute )tuple )binary_operator )parenthesized_expression )assignment )expression_statement (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
assert that the mock was never called.
(module (function_definition (function_name_rfc2822_format) function_name_rfc2822_format (parameters (identifier_val) identifier_val )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call (block (return_statement (identifier_val) identifier_val )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (tuple (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (attribute (identifier_datetime) identifier_datetime (identifier_date) identifier_date )attribute )tuple )argument_list )call (block (expression_statement (assignment (identifier_val) identifier_val (call (attribute (identifier_time) identifier_time (identifier_mktime) identifier_mktime )attribute (argument_list (call (attribute (identifier_val) identifier_val (identifier_timetuple) identifier_timetuple )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (attribute (identifier_numbers) identifier_numbers (identifier_Number) identifier_Number )attribute )argument_list )call (block (return_statement (call (attribute (attribute (identifier_email) identifier_email (identifier_utils) identifier_utils )attribute (identifier_formatdate) identifier_formatdate )attribute (argument_list (identifier_val) identifier_val )argument_list )call )return_statement )block (else_clause (block (return_statement (identifier_val) identifier_val )return_statement )block )else_clause )if_statement )block )function_definition )module
Takes either a date, a datetime, or a string, and returns a string that represents the value in RFC 2822 format. If a string is passed it is returned unchanged.
(module (function_definition (function_name_parse_url_to_dict) function_name_parse_url_to_dict (parameters (identifier_url) identifier_url )parameters (block (expression_statement (assignment (identifier_p) identifier_p (call (identifier_urlparse) identifier_urlparse (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (return_statement (dictionary (pair (string_'scheme') string_'scheme' (attribute (identifier_p) identifier_p (identifier_scheme) identifier_scheme )attribute )pair (pair (string_'netloc') string_'netloc' (attribute (identifier_p) identifier_p (identifier_netloc) identifier_netloc )attribute )pair (pair (string_'path') string_'path' (attribute (identifier_p) identifier_p (identifier_path) identifier_path )attribute )pair (pair (string_'params') string_'params' (attribute (identifier_p) identifier_p (identifier_params) identifier_params )attribute )pair (pair (string_'query') string_'query' (attribute (identifier_p) identifier_p (identifier_query) identifier_query )attribute )pair (pair (string_'fragment') string_'fragment' (attribute (identifier_p) identifier_p (identifier_fragment) identifier_fragment )attribute )pair (pair (string_'username') string_'username' (attribute (identifier_p) identifier_p (identifier_username) identifier_username )attribute )pair (pair (string_'password') string_'password' (attribute (identifier_p) identifier_p (identifier_password) identifier_password )attribute )pair (pair (string_'hostname') string_'hostname' (attribute (identifier_p) identifier_p (identifier_hostname) identifier_hostname )attribute )pair (pair (string_'port') string_'port' (attribute (identifier_p) identifier_p (identifier_port) identifier_port )attribute )pair )dictionary )return_statement )block )function_definition )module
Parse a url and return a dict with keys for all of the parts. The urlparse function() returns a wacky combination of a namedtuple with properties.
(module (function_definition (function_name_delete_project) function_name_delete_project (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_current_active_project) identifier_current_active_project )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_switch_to_plugin) identifier_switch_to_plugin )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_path) identifier_path (attribute (attribute (identifier_self) identifier_self (identifier_current_active_project) identifier_current_active_project )attribute (identifier_root_path) identifier_root_path )attribute )assignment )expression_statement (expression_statement (assignment (identifier_buttons) identifier_buttons (binary_operator (attribute (identifier_QMessageBox) identifier_QMessageBox (identifier_Yes) identifier_Yes )attribute (attribute (identifier_QMessageBox) identifier_QMessageBox (identifier_No) identifier_No )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_answer) identifier_answer (call (attribute (identifier_QMessageBox) identifier_QMessageBox (identifier_warning) identifier_warning )attribute (argument_list (identifier_self) identifier_self (call (identifier__) identifier__ (argument_list (string_"Delete") string_"Delete" )argument_list )call (call (attribute (call (identifier__) identifier__ (argument_list (concatenated_string (string_"Do you really want to delete <b>{filename}</b>?<br><br>") string_"Do you really want to delete <b>{filename}</b>?<br><br>" (string_"<b>Note:</b> This action will only delete the project. ") string_"<b>Note:</b> This action will only delete the project. " (string_"Its files are going to be preserved on disk.") string_"Its files are going to be preserved on disk." )concatenated_string )argument_list )call (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_filename) identifier_filename (call (attribute (identifier_osp) identifier_osp (identifier_basename) identifier_basename )attribute (argument_list (identifier_path) identifier_path )argument_list )call )keyword_argument )argument_list )call (identifier_buttons) identifier_buttons )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_answer) identifier_answer (attribute (identifier_QMessageBox) identifier_QMessageBox (identifier_Yes) identifier_Yes )attribute )comparison_operator (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_close_project) identifier_close_project )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_rmtree) identifier_rmtree )attribute (argument_list (call (attribute (identifier_osp) identifier_osp (identifier_join) identifier_join )attribute (argument_list (identifier_path) identifier_path (string_'.spyproject') string_'.spyproject' )argument_list )call )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_EnvironmentError) identifier_EnvironmentError (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_QMessageBox) identifier_QMessageBox (identifier_critical) identifier_critical )attribute (argument_list (identifier_self) identifier_self (call (identifier__) identifier__ (argument_list (string_"Project Explorer") string_"Project Explorer" )argument_list )call (call (attribute (call (identifier__) identifier__ (argument_list (concatenated_string (string_"<b>Unable to delete <i>{varpath}</i></b>") string_"<b>Unable to delete <i>{varpath}</i></b>" (string_"<br><br>The error message was:<br>{error}") string_"<br><br>The error message was:<br>{error}" )concatenated_string )argument_list )call (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_varpath) identifier_varpath (identifier_path) identifier_path )keyword_argument (keyword_argument (identifier_error) identifier_error (call (identifier_to_text_string) identifier_to_text_string (argument_list (identifier_error) identifier_error )argument_list )call )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )except_clause )try_statement )block )if_statement )block )if_statement )block )function_definition )module
Delete the current project without deleting the files in the directory.
(module (function_definition (function_name_real_dtype) function_name_real_dtype (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_base) identifier_base (attribute (identifier_self) identifier_self (identifier_base_dtype) identifier_base_dtype )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_base) identifier_base (identifier_complex64) identifier_complex64 )comparison_operator (block (return_statement (identifier_float32) identifier_float32 )return_statement )block (elif_clause (comparison_operator (identifier_base) identifier_base (identifier_complex128) identifier_complex128 )comparison_operator (block (return_statement (identifier_float64) identifier_float64 )return_statement )block )elif_clause (else_clause (block (return_statement (identifier_self) identifier_self )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns the dtype correspond to this dtype's real part.
(module (function_definition (function_name_is_adjacent_before) function_name_is_adjacent_before (parameters (identifier_self) identifier_self (identifier_other) identifier_other )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_other) identifier_other (identifier_TimeInterval) identifier_TimeInterval )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_u"other is not an instance of TimeInterval") string_u"other is not an instance of TimeInterval" )argument_list )call )raise_statement )block )if_statement (return_statement (parenthesized_expression (comparison_operator (attribute (identifier_self) identifier_self (identifier_end) identifier_end )attribute (attribute (identifier_other) identifier_other (identifier_begin) identifier_begin )attribute )comparison_operator )parenthesized_expression )return_statement )block )function_definition )module
Return ``True`` if this time interval ends when the given other time interval begins. :param other: the other interval :type other: :class:`~aeneas.exacttiming.TimeInterval` :raises TypeError: if ``other`` is not an instance of ``TimeInterval`` :rtype: bool
(module (function_definition (function_name_csd) function_name_csd (parameters (identifier_timeseries) identifier_timeseries (identifier_other) identifier_other (identifier_segmentlength) identifier_segmentlength (default_parameter (identifier_noverlap) identifier_noverlap (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (try_statement (block (expression_statement (assignment (pattern_list (identifier_freqs) identifier_freqs (identifier_csd_) identifier_csd_ )pattern_list (call (attribute (attribute (identifier_scipy) identifier_scipy (identifier_signal) identifier_signal )attribute (identifier_csd) identifier_csd )attribute (argument_list (attribute (identifier_timeseries) identifier_timeseries (identifier_value) identifier_value )attribute (attribute (identifier_other) identifier_other (identifier_value) identifier_value )attribute (keyword_argument (identifier_noverlap) identifier_noverlap (identifier_noverlap) identifier_noverlap )keyword_argument (keyword_argument (identifier_fs) identifier_fs (attribute (call (attribute (attribute (identifier_timeseries) identifier_timeseries (identifier_sample_rate) identifier_sample_rate )attribute (identifier_decompose) identifier_decompose )attribute (argument_list )argument_list )call (identifier_value) identifier_value )attribute )keyword_argument (keyword_argument (identifier_nperseg) identifier_nperseg (identifier_segmentlength) identifier_segmentlength )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_AttributeError) identifier_AttributeError (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (assignment (attribute (identifier_exc) identifier_exc (identifier_args) identifier_args )attribute (tuple (call (attribute (string_'{}, scipy>=0.16 is required') string_'{}, scipy>=0.16 is required' (identifier_format) identifier_format )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_exc) identifier_exc )argument_list )call )argument_list )call )tuple )assignment )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_unit) identifier_unit (call (identifier_scale_timeseries_unit) identifier_scale_timeseries_unit (argument_list (attribute (identifier_timeseries) identifier_timeseries (identifier_unit) identifier_unit )attribute (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'scaling') string_'scaling' (string_'density') string_'density' )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (identifier_FrequencySeries) identifier_FrequencySeries (argument_list (identifier_csd_) identifier_csd_ (keyword_argument (identifier_unit) identifier_unit (identifier_unit) identifier_unit )keyword_argument (keyword_argument (identifier_frequencies) identifier_frequencies (identifier_freqs) identifier_freqs )keyword_argument (keyword_argument (identifier_name) identifier_name (binary_operator (binary_operator (call (identifier_str) identifier_str (argument_list (attribute (identifier_timeseries) identifier_timeseries (identifier_name) identifier_name )attribute )argument_list )call (string_'---') string_'---' )binary_operator (call (identifier_str) identifier_str (argument_list (attribute (identifier_other) identifier_other (identifier_name) identifier_name )attribute )argument_list )call )binary_operator )keyword_argument (keyword_argument (identifier_epoch) identifier_epoch (attribute (identifier_timeseries) identifier_timeseries (identifier_epoch) identifier_epoch )attribute )keyword_argument (keyword_argument (identifier_channel) identifier_channel (attribute (identifier_timeseries) identifier_timeseries (identifier_channel) identifier_channel )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Calculate the CSD of two `TimeSeries` using Welch's method Parameters ---------- timeseries : `~gwpy.timeseries.TimeSeries` time-series of data other : `~gwpy.timeseries.TimeSeries` time-series of data segmentlength : `int` number of samples in single average. noverlap : `int` number of samples to overlap between segments, defaults to 50%. **kwargs other keyword arguments are passed to :meth:`scipy.signal.csd` Returns ------- spectrum : `~gwpy.frequencyseries.FrequencySeries` average power `FrequencySeries` See also -------- scipy.signal.csd
(module (function_definition (function_name_cast_to_seq_record) function_name_cast_to_seq_record (parameters (identifier_obj) identifier_obj (default_parameter (identifier_alphabet) identifier_alphabet (attribute (identifier_IUPAC) identifier_IUPAC (identifier_extended_protein) identifier_extended_protein )attribute )default_parameter (default_parameter (identifier_id) identifier_id (string_"<unknown id>") string_"<unknown id>" )default_parameter (default_parameter (identifier_name) identifier_name (string_"<unknown name>") string_"<unknown name>" )default_parameter (default_parameter (identifier_description) identifier_description (string_"<unknown description>") string_"<unknown description>" )default_parameter (default_parameter (identifier_dbxrefs) identifier_dbxrefs (None) None )default_parameter (default_parameter (identifier_features) identifier_features (None) None )default_parameter (default_parameter (identifier_annotations) identifier_annotations (None) None )default_parameter (default_parameter (identifier_letter_annotations) identifier_letter_annotations (None) None )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_SeqRecord) identifier_SeqRecord )argument_list )call (block (return_statement (identifier_obj) identifier_obj )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_Seq) identifier_Seq )argument_list )call (block (return_statement (call (identifier_SeqRecord) identifier_SeqRecord (argument_list (identifier_obj) identifier_obj (identifier_id) identifier_id (identifier_name) identifier_name (identifier_description) identifier_description (identifier_dbxrefs) identifier_dbxrefs (identifier_features) identifier_features (identifier_annotations) identifier_annotations (identifier_letter_annotations) identifier_letter_annotations )argument_list )call )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_obj) identifier_obj (call (attribute (identifier_obj) identifier_obj (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (identifier_SeqRecord) identifier_SeqRecord (argument_list (call (identifier_Seq) identifier_Seq (argument_list (identifier_obj) identifier_obj (identifier_alphabet) identifier_alphabet )argument_list )call (identifier_id) identifier_id (identifier_name) identifier_name (identifier_description) identifier_description (identifier_dbxrefs) identifier_dbxrefs (identifier_features) identifier_features (identifier_annotations) identifier_annotations (identifier_letter_annotations) identifier_letter_annotations )argument_list )call )return_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Must provide a string, Seq, or SeqRecord object.') string_'Must provide a string, Seq, or SeqRecord object.' )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Return a SeqRecord representation of a string or Seq object. Args: obj (str, Seq, SeqRecord): Sequence string or Biopython Seq object alphabet: See Biopython SeqRecord docs id: See Biopython SeqRecord docs name: See Biopython SeqRecord docs description: See Biopython SeqRecord docs dbxrefs: See Biopython SeqRecord docs features: See Biopython SeqRecord docs annotations: See Biopython SeqRecord docs letter_annotations: See Biopython SeqRecord docs Returns: SeqRecord: SeqRecord representation of the sequence
(module (function_definition (function_name_GetAdGroups) function_name_GetAdGroups (parameters (identifier_self) identifier_self (identifier_client_customer_id) identifier_client_customer_id (identifier_campaign_id) identifier_campaign_id )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_SetClientCustomerId) identifier_SetClientCustomerId )attribute (argument_list (identifier_client_customer_id) identifier_client_customer_id )argument_list )call )expression_statement (expression_statement (assignment (identifier_selector) identifier_selector (dictionary (pair (string_'fields') string_'fields' (list (string_'Id') string_'Id' (string_'Name') string_'Name' (string_'Status') string_'Status' )list )pair (pair (string_'predicates') string_'predicates' (list (dictionary (pair (string_'field') string_'field' (string_'CampaignId') string_'CampaignId' )pair (pair (string_'operator') string_'operator' (string_'EQUALS') string_'EQUALS' )pair (pair (string_'values') string_'values' (list (identifier_campaign_id) identifier_campaign_id )list )pair )dictionary (dictionary (pair (string_'field') string_'field' (string_'Status') string_'Status' )pair (pair (string_'operator') string_'operator' (string_'NOT_EQUALS') string_'NOT_EQUALS' )pair (pair (string_'values') string_'values' (list (string_'REMOVED') string_'REMOVED' )list )pair )dictionary )list )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_adgroups) identifier_adgroups (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_GetService) identifier_GetService )attribute (argument_list (string_'AdGroupService') string_'AdGroupService' )argument_list )call (identifier_get) identifier_get )attribute (argument_list (identifier_selector) identifier_selector )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_int) identifier_int (argument_list (subscript (identifier_adgroups) identifier_adgroups (string_'totalNumEntries') string_'totalNumEntries' )subscript )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement (subscript (identifier_adgroups) identifier_adgroups (string_'entries') string_'entries' )subscript )return_statement )block (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement )block )function_definition )module
Retrieves all AdGroups for the given campaign that haven't been removed. Args: client_customer_id: str Client Customer Id being used in API request. campaign_id: str id of the campaign for which to fetch ad groups. Returns: list List of AdGroup data objects.
(module (function_definition (function_name_flexibility) function_name_flexibility (parameters (identifier_communities) identifier_communities )parameters (block (expression_statement (assignment (identifier_flex) identifier_flex (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (subscript (attribute (identifier_communities) identifier_communities (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (for_statement (identifier_t) identifier_t (call (identifier_range) identifier_range (argument_list (integer_1) integer_1 (subscript (attribute (identifier_communities) identifier_communities (identifier_shape) identifier_shape )attribute (integer_1) integer_1 )subscript )argument_list )call (block (expression_statement (augmented_assignment (subscript (identifier_flex) identifier_flex (comparison_operator (subscript (identifier_communities) identifier_communities (slice (colon) colon )slice (identifier_t) identifier_t )subscript (subscript (identifier_communities) identifier_communities (slice (colon) colon )slice (binary_operator (identifier_t) identifier_t (integer_1) integer_1 )binary_operator )subscript )comparison_operator )subscript (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_flex) identifier_flex (binary_operator (identifier_flex) identifier_flex (parenthesized_expression (binary_operator (subscript (attribute (identifier_communities) identifier_communities (identifier_shape) identifier_shape )attribute (integer_1) integer_1 )subscript (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (return_statement (identifier_flex) identifier_flex )return_statement )block )function_definition )module
Amount a node changes community Parameters ---------- communities : array Community array of shape (node,time) Returns -------- flex : array Size with the flexibility of each node. Notes ----- Flexbility calculates the number of times a node switches its community label during a time series. It is normalized by the number of possible changes which could occur. It is important to make sure that the different community labels accross time points are not artbirary. References ----------- Bassett, DS, Wymbs N, Porter MA, Mucha P, Carlson JM, Grafton ST. Dynamic reconfiguration of human brain networks during learning. PNAS, 2011, 108(18):7641-6.
(module (function_definition (function_name_get_content_models) function_name_get_content_models (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_models) identifier_models (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_PageAdmin) identifier_PageAdmin (identifier_self) identifier_self )argument_list )call (identifier_get_content_models) identifier_get_content_models )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_order) identifier_order (list_comprehension (call (attribute (identifier_name) identifier_name (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (for_in_clause (identifier_name) identifier_name (attribute (identifier_settings) identifier_settings (identifier_ADD_PAGE_ORDER) identifier_ADD_PAGE_ORDER )attribute )for_in_clause )list_comprehension )assignment )expression_statement (function_definition (function_name_sort_key) function_name_sort_key (parameters (identifier_page) identifier_page )parameters (block (expression_statement (assignment (identifier_name) identifier_name (binary_operator (string_"%s.%s") string_"%s.%s" (tuple (attribute (attribute (identifier_page) identifier_page (identifier__meta) identifier__meta )attribute (identifier_app_label) identifier_app_label )attribute (attribute (attribute (identifier_page) identifier_page (identifier__meta) identifier__meta )attribute (identifier_object_name) identifier_object_name )attribute )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_unordered) identifier_unordered (call (identifier_len) identifier_len (argument_list (identifier_order) identifier_order )argument_list )call )assignment )expression_statement (try_statement (block (return_statement (tuple (call (attribute (identifier_order) identifier_order (identifier_index) identifier_index )attribute (argument_list (call (attribute (identifier_name) identifier_name (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )argument_list )call (string_"") string_"" )tuple )return_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (return_statement (tuple (identifier_unordered) identifier_unordered (attribute (identifier_page) identifier_page (identifier_meta_verbose_name) identifier_meta_verbose_name )attribute )tuple )return_statement )block )except_clause )try_statement )block )function_definition (return_statement (call (identifier_sorted) identifier_sorted (argument_list (identifier_models) identifier_models (keyword_argument (identifier_key) identifier_key (identifier_sort_key) identifier_sort_key )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return all Page subclasses that are admin registered, ordered based on the ``ADD_PAGE_ORDER`` setting.
(module (function_definition (function_name_option_from_wire) function_name_option_from_wire (parameters (identifier_otype) identifier_otype (identifier_wire) identifier_wire (identifier_current) identifier_current (identifier_olen) identifier_olen )parameters (block (expression_statement (assignment (identifier_cls) identifier_cls (call (identifier_get_option_class) identifier_get_option_class (argument_list (identifier_otype) identifier_otype )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_cls) identifier_cls (identifier_from_wire) identifier_from_wire )attribute (argument_list (identifier_otype) identifier_otype (identifier_wire) identifier_wire (identifier_current) identifier_current (identifier_olen) identifier_olen )argument_list )call )return_statement )block )function_definition )module
Build an EDNS option object from wire format @param otype: The option type @type otype: int @param wire: The wire-format message @type wire: string @param current: The offet in wire of the beginning of the rdata. @type current: int @param olen: The length of the wire-format option data @type olen: int @rtype: dns.ends.Option instance
(module (function_definition (function_name_execute) function_name_execute (parameters (identifier_self) identifier_self (default_parameter (identifier_dc) identifier_dc (None) None )default_parameter (default_parameter (identifier_token) identifier_token (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_token_id) identifier_token_id (call (identifier_extract_attr) identifier_extract_attr (argument_list (identifier_token) identifier_token (keyword_argument (identifier_keys) identifier_keys (list (string_"ID") string_"ID" )list )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_response) identifier_response (await (call (attribute (attribute (identifier_self) identifier_self (identifier__api) identifier__api )attribute (identifier_put) identifier_put )attribute (argument_list (string_"/v1/txn") string_"/v1/txn" (keyword_argument (identifier_data) identifier_data (attribute (identifier_self) identifier_self (identifier_operations) identifier_operations )attribute )keyword_argument (keyword_argument (identifier_params) identifier_params (dictionary (pair (string_"dc") string_"dc" (identifier_dc) identifier_dc )pair (pair (string_"token") string_"token" (identifier_token_id) identifier_token_id )pair )dictionary )keyword_argument )argument_list )call )await )assignment )expression_statement )block (except_clause (as_pattern (identifier_ConflictError) identifier_ConflictError (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_errors) identifier_errors (dictionary_comprehension (pair (subscript (identifier_elt) identifier_elt (string_"OpIndex") string_"OpIndex" )subscript (identifier_elt) identifier_elt )pair (for_in_clause (identifier_elt) identifier_elt (subscript (attribute (identifier_error) identifier_error (identifier_value) identifier_value )attribute (string_"Errors") string_"Errors" )subscript )for_in_clause )dictionary_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_operations) identifier_operations (list_comprehension (subscript (identifier_op) identifier_op (string_"KV") string_"KV" )subscript (for_in_clause (identifier_op) identifier_op (attribute (identifier_self) identifier_self (identifier_operations) identifier_operations )attribute )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_meta) identifier_meta (attribute (identifier_error) identifier_error (identifier_meta) identifier_meta )attribute )assignment )expression_statement (raise_statement (call (identifier_TransactionError) identifier_TransactionError (argument_list (identifier_errors) identifier_errors (identifier_operations) identifier_operations (identifier_meta) identifier_meta )argument_list )call (identifier_error) identifier_error )raise_statement )block )except_clause (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (raise_statement (identifier_error) identifier_error )raise_statement )block )except_clause (else_clause (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_operations) identifier_operations )attribute (slice (colon) colon )slice )subscript (list )list )assignment )expression_statement )block )else_clause )try_statement (expression_statement (assignment (identifier_results) identifier_results (list )list )assignment )expression_statement (for_statement (identifier__) identifier__ (subscript (attribute (identifier_response) identifier_response (identifier_body) identifier_body )attribute (string_"Results") string_"Results" )subscript (block (expression_statement (assignment (identifier_data) identifier_data (subscript (identifier__) identifier__ (string_"KV") string_"KV" )subscript )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_data) identifier_data (string_"Value") string_"Value" )subscript (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_"Value") string_"Value" )subscript (call (identifier_decode_value) identifier_decode_value (argument_list (subscript (identifier_data) identifier_data (string_"Value") string_"Value" )subscript (subscript (identifier_data) identifier_data (string_"Flags") string_"Flags" )subscript )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_results) identifier_results (identifier_append) identifier_append )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
Execute stored operations Parameters: dc (str): Specify datacenter that will be used. Defaults to the agent's local datacenter. token (ObjectID): Token ID Returns: Collection: Results of operations. Raises: TransactionError: Transaction failed
(module (function_definition (function_name_create_view) function_name_create_view (parameters (identifier_self) identifier_self (identifier_callback) identifier_callback (identifier_method) identifier_method (default_parameter (identifier_request) identifier_request (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_view) identifier_view (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_WaldurSchemaGenerator) identifier_WaldurSchemaGenerator (identifier_self) identifier_self )argument_list )call (identifier_create_view) identifier_create_view )attribute (argument_list (identifier_callback) identifier_callback (identifier_method) identifier_method (identifier_request) identifier_request )argument_list )call )assignment )expression_statement (if_statement (call (identifier_is_disabled_action) identifier_is_disabled_action (argument_list (identifier_view) identifier_view )argument_list )call (block (expression_statement (assignment (attribute (identifier_view) identifier_view (identifier_exclude_from_schema) identifier_exclude_from_schema )attribute (True) True )assignment )expression_statement )block )if_statement (return_statement (identifier_view) identifier_view )return_statement )block )function_definition )module
Given a callback, return an actual view instance.
(module (function_definition (function_name_get_initial_data) function_name_get_initial_data (parameters (identifier_self) identifier_self (identifier_request) identifier_request (identifier_user) identifier_user (identifier_profile) identifier_profile (identifier_client) identifier_client )parameters (block (if_statement (identifier_INITAL_DATA_FUNCTION) identifier_INITAL_DATA_FUNCTION (block (expression_statement (assignment (identifier_func) identifier_func (call (attribute (identifier_self) identifier_self (identifier_import_attribute) identifier_import_attribute )attribute (argument_list (identifier_INITAL_DATA_FUNCTION) identifier_INITAL_DATA_FUNCTION )argument_list )call )assignment )expression_statement (return_statement (call (identifier_func) identifier_func (argument_list (identifier_request) identifier_request (identifier_user) identifier_user (identifier_profile) identifier_profile (identifier_client) identifier_client )argument_list )call )return_statement )block )if_statement (return_statement (dictionary )dictionary )return_statement )block )function_definition )module
Return initial data for the setup form. The function can be controlled with ``SOCIALREGISTRATION_INITIAL_DATA_FUNCTION``. :param request: The current request object :param user: The unsaved user object :param profile: The unsaved profile object :param client: The API client
(module (function_definition (function_name__get_credentials_from_settings) function_name__get_credentials_from_settings (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_remember_me) identifier_remember_me (call (attribute (identifier_CONF) identifier_CONF (identifier_get) identifier_get )attribute (argument_list (string_'main') string_'main' (string_'report_error/remember_me') string_'report_error/remember_me' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_remember_token) identifier_remember_token (call (attribute (identifier_CONF) identifier_CONF (identifier_get) identifier_get )attribute (argument_list (string_'main') string_'main' (string_'report_error/remember_token') string_'report_error/remember_token' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_username) identifier_username (call (attribute (identifier_CONF) identifier_CONF (identifier_get) identifier_get )attribute (argument_list (string_'main') string_'main' (string_'report_error/username') string_'report_error/username' (string_'') string_'' )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_remember_me) identifier_remember_me )not_operator (block (expression_statement (assignment (identifier_username) identifier_username (string_'') string_'' )assignment )expression_statement )block )if_statement (return_statement (expression_list (identifier_username) identifier_username (identifier_remember_me) identifier_remember_me (identifier_remember_token) identifier_remember_token )expression_list )return_statement )block )function_definition )module
Get the stored credentials if any.
(module (function_definition (function_name_set_ylim) function_name_set_ylim (parameters (identifier_self) identifier_self (identifier_xlims) identifier_xlims (identifier_dx) identifier_dx (identifier_xscale) identifier_xscale (default_parameter (identifier_reverse) identifier_reverse (False) False )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set_axis_limits) identifier__set_axis_limits )attribute (argument_list (string_'y') string_'y' (identifier_xlims) identifier_xlims (identifier_dx) identifier_dx (identifier_xscale) identifier_xscale (identifier_reverse) identifier_reverse )argument_list )call )expression_statement (return_statement )return_statement )block )function_definition )module
Set y limits for plot. This will set the limits for the y axis for the specific plot. Args: ylims (len-2 list of floats): The limits for the axis. dy (float): Amount to increment by between the limits. yscale (str): Scale of the axis. Either `log` or `lin`. reverse (bool, optional): If True, reverse the axis tick marks. Default is False.
(module (function_definition (function_name_markAsDelivered) function_name_markAsDelivered (parameters (identifier_self) identifier_self (identifier_thread_id) identifier_thread_id (identifier_message_id) identifier_message_id )parameters (block (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_"message_ids[0]") string_"message_ids[0]" (identifier_message_id) identifier_message_id )pair (pair (binary_operator (string_"thread_ids[%s][0]") string_"thread_ids[%s][0]" (identifier_thread_id) identifier_thread_id )binary_operator (identifier_message_id) identifier_message_id )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_self) identifier_self (identifier__post) identifier__post )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_req_url) identifier_req_url )attribute (identifier_DELIVERED) identifier_DELIVERED )attribute (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_r) identifier_r (identifier_ok) identifier_ok )attribute )return_statement )block )function_definition )module
Mark a message as delivered :param thread_id: User/Group ID to which the message belongs. See :ref:`intro_threads` :param message_id: Message ID to set as delivered. See :ref:`intro_threads` :return: Whether the request was successful :raises: FBchatException if request failed
(module (function_definition (function_name_Reset) function_name_Reset (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__displayed) identifier__displayed )attribute (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__currentpagelines) identifier__currentpagelines )attribute (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__lastscroll) identifier__lastscroll )attribute (integer_1) integer_1 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__lines_to_show) identifier__lines_to_show )attribute (attribute (identifier_self) identifier_self (identifier__cli_lines) identifier__cli_lines )attribute )assignment )expression_statement )block )function_definition )module
Reset the pager to the top of the text.
(module (function_definition (function_name_reverse) function_name_reverse (parameters (identifier_self) identifier_self (identifier_query) identifier_query (default_parameter (identifier_lang) identifier_lang (string_'en') string_'en' )default_parameter (default_parameter (identifier_exactly_one) identifier_exactly_one (True) True )default_parameter (default_parameter (identifier_timeout) identifier_timeout (identifier_DEFAULT_SENTINEL) identifier_DEFAULT_SENTINEL )default_parameter )parameters (block (expression_statement (assignment (identifier_lang) identifier_lang (call (attribute (identifier_lang) identifier_lang (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'coords') string_'coords' (call (attribute (identifier_self) identifier_self (identifier__coerce_point_to_string) identifier__coerce_point_to_string )attribute (argument_list (identifier_query) identifier_query )argument_list )call )pair (pair (string_'lang') string_'lang' (call (attribute (identifier_lang) identifier_lang (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )pair (pair (string_'key') string_'key' (attribute (identifier_self) identifier_self (identifier_api_key) identifier_api_key )attribute )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (string_"?") string_"?" (identifier_join) identifier_join )attribute (argument_list (tuple (attribute (identifier_self) identifier_self (identifier_reverse_api) identifier_reverse_api )attribute (call (identifier_urlencode) identifier_urlencode (argument_list (identifier_params) identifier_params )argument_list )call )tuple )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"%s.reverse: %s") string_"%s.reverse: %s" (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute (identifier_url) identifier_url )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__parse_reverse_json) identifier__parse_reverse_json )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__call_geocoder) identifier__call_geocoder )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call (keyword_argument (identifier_exactly_one) identifier_exactly_one (identifier_exactly_one) identifier_exactly_one )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return a `3 words` address by location point. Each point on surface has a `3 words` address, so there's always a non-empty response. :param query: The coordinates for which you wish to obtain the 3 word address. :type query: :class:`geopy.point.Point`, list or tuple of ``(latitude, longitude)``, or string as ``"%(latitude)s, %(longitude)s"``. :param str lang: two character language codes as supported by the API (https://docs.what3words.com/api/v2/#lang). :param bool exactly_one: Return one result or a list of results, if available. Due to the address scheme there is always exactly one result for each `3 words` address, so this parameter is rather useless for this geocoder. .. versionchanged:: 1.14.0 ``exactly_one=False`` now returns a list of a single location. This option wasn't respected before. :param int timeout: Time, in seconds, to wait for the geocoding service to respond before raising a :class:`geopy.exc.GeocoderTimedOut` exception. Set this only if you wish to override, on this call only, the value set during the geocoder's initialization. :rtype: :class:`geopy.location.Location` or a list of them, if ``exactly_one=False``.
(module (function_definition (function_name_set_status) function_name_set_status (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (if_statement (not_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier__status) identifier__status )attribute (identifier_value) identifier_value )comparison_operator )not_operator (block (expression_statement (assignment (identifier_old) identifier_old (attribute (identifier_self) identifier_self (identifier__status) identifier__status )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__status) identifier__status )attribute (identifier_value) identifier_value )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_"{} changing status from {} to {}") string_"{} changing status from {} to {}" (identifier_format) identifier_format )attribute (argument_list (identifier_self) identifier_self (attribute (identifier_old) identifier_old (identifier_name) identifier_name )attribute (attribute (identifier_value) identifier_value (identifier_name) identifier_name )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__statusChanged) identifier__statusChanged )attribute (argument_list (identifier_old) identifier_old (identifier_value) identifier_value )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Set the status of the motor to the specified value if not already set.
(module (function_definition (function_name_is_missing_variable) function_name_is_missing_variable (parameters (typed_parameter (identifier_value_node) identifier_value_node (type (identifier_ValueNode) identifier_ValueNode )type )typed_parameter (typed_default_parameter (identifier_variables) identifier_variables (type (generic_type (identifier_Dict) identifier_Dict (type_parameter (type (identifier_str) identifier_str )type (type (identifier_Any) identifier_Any )type )type_parameter )generic_type )type (None) None )typed_default_parameter )parameters (type (identifier_bool) identifier_bool )type (block (return_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value_node) identifier_value_node (identifier_VariableNode) identifier_VariableNode )argument_list )call (parenthesized_expression (boolean_operator (not_operator (identifier_variables) identifier_variables )not_operator (call (identifier_is_invalid) identifier_is_invalid (argument_list (call (attribute (identifier_variables) identifier_variables (identifier_get) identifier_get )attribute (argument_list (attribute (attribute (identifier_value_node) identifier_value_node (identifier_name) identifier_name )attribute (identifier_value) identifier_value )attribute (identifier_INVALID) identifier_INVALID )argument_list )call )argument_list )call )boolean_operator )parenthesized_expression )boolean_operator )return_statement )block )function_definition )module
Check if `value_node` is a variable not defined in the `variables` dict.
(module (function_definition (function_name_almostequal) function_name_almostequal (parameters (identifier_first) identifier_first (identifier_second) identifier_second (default_parameter (identifier_places) identifier_places (integer_7) integer_7 )default_parameter (default_parameter (identifier_printit) identifier_printit (True) True )default_parameter )parameters (block (if_statement (comparison_operator (identifier_first) identifier_first (identifier_second) identifier_second )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (comparison_operator (call (identifier_round) identifier_round (argument_list (call (identifier_abs) identifier_abs (argument_list (binary_operator (identifier_second) identifier_second (identifier_first) identifier_first )binary_operator )argument_list )call (identifier_places) identifier_places )argument_list )call (integer_0) integer_0 )comparison_operator (block (if_statement (identifier_printit) identifier_printit (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (identifier_round) identifier_round (argument_list (call (identifier_abs) identifier_abs (argument_list (binary_operator (identifier_second) identifier_second (identifier_first) identifier_first )binary_operator )argument_list )call (identifier_places) identifier_places )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"notalmost: %s != %s to %i places") string_"notalmost: %s != %s to %i places" (tuple (identifier_first) identifier_first (identifier_second) identifier_second (identifier_places) identifier_places )tuple )binary_operator )argument_list )call )expression_statement )block )if_statement (return_statement (False) False )return_statement )block (else_clause (block (return_statement (True) True )return_statement )block )else_clause )if_statement )block )function_definition )module
Test if two values are equal to a given number of places. This is based on python's unittest so may be covered by Python's license.
(module (function_definition (function_name_parse) function_name_parse (parameters (identifier_self) identifier_self (identifier_extent) identifier_extent (identifier_length) identifier_length (identifier_fp) identifier_fp (identifier_log_block_size) identifier_log_block_size )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__initialized) identifier__initialized )attribute (block (raise_statement (call (attribute (identifier_pycdlibexception) identifier_pycdlibexception (identifier_PyCdlibInternalError) identifier_PyCdlibInternalError )attribute (argument_list (string_'Inode is already initialized') string_'Inode is already initialized' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_orig_extent_loc) identifier_orig_extent_loc )attribute (identifier_extent) identifier_extent )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_data_length) identifier_data_length )attribute (identifier_length) identifier_length )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_data_fp) identifier_data_fp )attribute (identifier_fp) identifier_fp )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_manage_fp) identifier_manage_fp )attribute (False) False )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_fp_offset) identifier_fp_offset )attribute (binary_operator (identifier_extent) identifier_extent (identifier_log_block_size) identifier_log_block_size )binary_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_original_data_location) identifier_original_data_location )attribute (attribute (identifier_self) identifier_self (identifier_DATA_ON_ORIGINAL_ISO) identifier_DATA_ON_ORIGINAL_ISO )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__initialized) identifier__initialized )attribute (True) True )assignment )expression_statement )block )function_definition )module
Parse an existing Inode. This just saves off the extent for later use. Parameters: extent - The original extent that the data lives at. Returns: Nothing.
(module (function_definition (function_name_get_fragment) function_name_get_fragment (parameters (identifier_self) identifier_self (identifier_offset) identifier_offset )parameters (block (expression_statement (assignment (identifier_fragment_len) identifier_fragment_len (integer_10) integer_10 )assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (binary_operator (string_'%r') string_'%r' (parenthesized_expression (subscript (attribute (identifier_self) identifier_self (identifier_source) identifier_source )attribute (slice (identifier_offset) identifier_offset (colon) colon (binary_operator (identifier_offset) identifier_offset (identifier_fragment_len) identifier_fragment_len )binary_operator )slice )subscript )parenthesized_expression )binary_operator )assignment )expression_statement (if_statement (comparison_operator (binary_operator (identifier_offset) identifier_offset (identifier_fragment_len) identifier_fragment_len )binary_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_source) identifier_source )attribute )argument_list )call )comparison_operator (block (expression_statement (augmented_assignment (identifier_s) identifier_s (string_'...') string_'...' )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_s) identifier_s )return_statement )block )function_definition )module
Get the part of the source which is causing a problem.
(module (function_definition (function_name_handle_reboot) function_name_handle_reboot (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_services) identifier_services )attribute (identifier_stop_all) identifier_stop_all )attribute (argument_list )argument_list )call )expression_statement (try_statement (block (expression_statement (yield )yield )expression_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_wait_for_boot_completion) identifier_wait_for_boot_completion )attribute (argument_list )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_is_rootable) identifier_is_rootable )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_root_adb) identifier_root_adb )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )finally_clause )try_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_services) identifier_services )attribute (identifier_start_all) identifier_start_all )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Properly manage the service life cycle when the device needs to temporarily disconnect. The device can temporarily lose adb connection due to user-triggered reboot. Use this function to make sure the services started by Mobly are properly stopped and restored afterwards. For sample usage, see self.reboot().
(module (function_definition (function_name_label) function_name_label (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_c) identifier_c (attribute (attribute (identifier_self) identifier_self (identifier_table) identifier_table )attribute (identifier_columns) identifier_columns )attribute (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_c) identifier_c (identifier_parent) identifier_parent )attribute (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )comparison_operator (comparison_operator (string_'label') string_'label' (attribute (identifier_c) identifier_c (identifier_valuetype) identifier_valuetype )attribute )comparison_operator )boolean_operator (block (return_statement (call (identifier_PartitionColumn) identifier_PartitionColumn (argument_list (identifier_c) identifier_c (attribute (identifier_self) identifier_self (identifier__partition) identifier__partition )attribute )argument_list )call )return_statement )block )if_statement )block )for_statement )block )function_definition )module
Return first child that of the column that is marked as a label
(module (function_definition (function_name_add_time) function_name_add_time (parameters (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_payload) identifier_payload (subscript (identifier_data) identifier_data (string_'data') string_'data' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_updated) identifier_updated (call (attribute (subscript (identifier_data) identifier_data (string_'updated') string_'updated' )subscript (identifier_date) identifier_date )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_updated) identifier_updated (call (attribute (identifier_date) identifier_date (identifier_today) identifier_today )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (assignment (subscript (identifier_payload) identifier_payload (string_'last_updated') string_'last_updated' )subscript (call (attribute (subscript (identifier_data) identifier_data (string_'updated') string_'updated' )subscript (identifier_strftime) identifier_strftime )attribute (argument_list (string_'today at %H:%M:%S') string_'today at %H:%M:%S' )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_updated) identifier_updated (parenthesized_expression (binary_operator (call (attribute (identifier_date) identifier_date (identifier_today) identifier_today )attribute (argument_list )argument_list )call (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_days) identifier_days (integer_1) integer_1 )keyword_argument )argument_list )call )binary_operator )parenthesized_expression )comparison_operator (block (expression_statement (assignment (subscript (identifier_payload) identifier_payload (string_'last_updated') string_'last_updated' )subscript (string_'yesterday') string_'yesterday' )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_updated) identifier_updated (parenthesized_expression (binary_operator (call (attribute (identifier_date) identifier_date (identifier_today) identifier_today )attribute (argument_list )argument_list )call (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_days) identifier_days (integer_7) integer_7 )keyword_argument )argument_list )call )binary_operator )parenthesized_expression )comparison_operator (block (expression_statement (assignment (subscript (identifier_payload) identifier_payload (string_'last_updated') string_'last_updated' )subscript (call (attribute (identifier_updated) identifier_updated (identifier_strftime) identifier_strftime )attribute (argument_list (string_'on %A') string_'on %A' )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (subscript (identifier_payload) identifier_payload (string_'last_updated') string_'last_updated' )subscript (call (attribute (identifier_updated) identifier_updated (identifier_strftime) identifier_strftime )attribute (argument_list (string_'%Y-%m-%d') string_'%Y-%m-%d' )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_payload) identifier_payload )return_statement )block )function_definition )module
And a friendly update time to the supplied data. Arguments: data (:py:class:`dict`): The response data and its update time. Returns: :py:class:`dict`: The data with a friendly update time.
(module (function_definition (function_name_calc_fwhm) function_name_calc_fwhm (parameters (identifier_img) identifier_img (identifier_region) identifier_region (default_parameter (identifier_fexpand) identifier_fexpand (integer_3) integer_3 )default_parameter (default_parameter (identifier_axis) identifier_axis (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_xpregion) identifier_xpregion (call (identifier_expand_region) identifier_expand_region (argument_list (identifier_region) identifier_region (identifier_fexpand) identifier_fexpand (identifier_fexpand) identifier_fexpand )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cslit) identifier_cslit (subscript (identifier_img) identifier_img (identifier_xpregion) identifier_xpregion )subscript )assignment )expression_statement (expression_statement (assignment (identifier_pslit) identifier_pslit (call (attribute (identifier_cslit) identifier_cslit (identifier_mean) identifier_mean )attribute (argument_list (keyword_argument (identifier_axis) identifier_axis (identifier_axis) identifier_axis )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_x2) identifier_x2 (call (identifier_len) identifier_len (argument_list (identifier_pslit) identifier_pslit )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_y1) identifier_y1 (identifier_y2) identifier_y2 )pattern_list (expression_list (subscript (identifier_pslit) identifier_pslit (integer_0) integer_0 )subscript (subscript (identifier_pslit) identifier_pslit (unary_operator (integer_1) integer_1 )unary_operator )subscript )expression_list )assignment )expression_statement (expression_statement (assignment (identifier_mslope) identifier_mslope (binary_operator (parenthesized_expression (binary_operator (identifier_y2) identifier_y2 (identifier_y1) identifier_y1 )binary_operator )parenthesized_expression (identifier_x2) identifier_x2 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_backstim) identifier_backstim (binary_operator (binary_operator (identifier_mslope) identifier_mslope (call (attribute (identifier_numpy) identifier_numpy (identifier_arange) identifier_arange )attribute (argument_list (identifier_x2) identifier_x2 )argument_list )call )binary_operator (identifier_y1) identifier_y1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_qslit) identifier_qslit (binary_operator (identifier_pslit) identifier_pslit (identifier_backstim) identifier_backstim )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_pidx) identifier_pidx (call (attribute (identifier_numpy) identifier_numpy (identifier_argmax) identifier_argmax )attribute (argument_list (identifier_qslit) identifier_qslit )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_peak) identifier_peak (identifier_fwhm) identifier_fwhm )pattern_list (call (attribute (identifier_fmod) identifier_fmod (identifier_compute_fwhm_1d_simple) identifier_compute_fwhm_1d_simple )attribute (argument_list (identifier_qslit) identifier_qslit (identifier_pidx) identifier_pidx )argument_list )call )assignment )expression_statement (return_statement (identifier_fwhm) identifier_fwhm )return_statement )block )function_definition )module
Compute the FWHM in the direction given by axis
(module (function_definition (function_name_inspect) function_name_inspect (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_what) identifier_what (call (attribute (identifier_kwargs) identifier_kwargs (identifier_pop) identifier_pop )attribute (argument_list (string_"what") string_"what" (string_"hist") string_"hist" )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_what) identifier_what (string_"hist") string_"hist" )comparison_operator (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_self) identifier_self (identifier_open_hist) identifier_open_hist )attribute (argument_list )argument_list )call (as_pattern_target (identifier_hist) identifier_hist )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (conditional_expression (call (attribute (identifier_hist) identifier_hist (identifier_plot) identifier_plot )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (identifier_hist) identifier_hist (None) None )conditional_expression )return_statement )block )with_statement )block (elif_clause (comparison_operator (identifier_what) identifier_what (string_"scf") string_"scf" )comparison_operator (block (expression_statement (assignment (identifier_relaxation) identifier_relaxation (call (attribute (attribute (identifier_abiinspect) identifier_abiinspect (identifier_Relaxation) identifier_Relaxation )attribute (identifier_from_file) identifier_from_file )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_output_file) identifier_output_file )attribute (identifier_path) identifier_path )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_"title") string_"title" (identifier_kwargs) identifier_kwargs )comparison_operator (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_"title") string_"title" )subscript (call (identifier_str) identifier_str (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (conditional_expression (call (attribute (identifier_relaxation) identifier_relaxation (identifier_plot) identifier_plot )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (comparison_operator (identifier_relaxation) identifier_relaxation (None) None )comparison_operator (None) None )conditional_expression )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Wrong value for what %s") string_"Wrong value for what %s" (identifier_what) identifier_what )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Plot the evolution of the structural relaxation with matplotlib. Args: what: Either "hist" or "scf". The first option (default) extracts data from the HIST file and plot the evolution of the structural parameters, forces, pressures and energies. The second option, extracts data from the main output file and plot the evolution of the SCF cycles (etotal, residuals, etc). Returns: `matplotlib` figure, None if some error occurred.
(module (function_definition (function_name_freeze) function_name_freeze (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_remote_path) identifier_remote_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_venv) identifier_venv )attribute (string_'requirements.txt') string_'requirements.txt' )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_run) identifier_run (argument_list (call (attribute (string_'{} freeze > {}') string_'{} freeze > {}' (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_pip) identifier_pip )attribute (argument_list )argument_list )call (identifier_remote_path) identifier_remote_path )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_get) identifier_get (argument_list (identifier_remote_path) identifier_remote_path (attribute (identifier_self) identifier_self (identifier_requirements) identifier_requirements )attribute )argument_list )call )expression_statement )block )function_definition )module
Use pip to freeze the requirements and save them to the local requirements.txt file.
(module (function_definition (function_name_dump_json) function_name_dump_json (parameters (identifier_obj) identifier_obj )parameters (block (return_statement (call (attribute (identifier_simplejson) identifier_simplejson (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_obj) identifier_obj (keyword_argument (identifier_ignore_nan) identifier_ignore_nan (True) True )keyword_argument (keyword_argument (identifier_default) identifier_default (attribute (identifier_json_util) identifier_json_util (identifier_default) identifier_default )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Dump Python object as JSON string.
(module (function_definition (function_name_exists) function_name_exists (parameters (identifier_self) identifier_self (identifier_file_path) identifier_file_path (default_parameter (identifier_check_link) identifier_check_link (False) False )default_parameter )parameters (block (if_statement (boolean_operator (identifier_check_link) identifier_check_link (call (attribute (identifier_self) identifier_self (identifier_islink) identifier_islink )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (expression_statement (assignment (identifier_file_path) identifier_file_path (call (identifier_make_string_path) identifier_make_string_path (argument_list (identifier_file_path) identifier_file_path )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_file_path) identifier_file_path (None) None )comparison_operator (block (raise_statement (identifier_TypeError) identifier_TypeError )raise_statement )block )if_statement (if_statement (not_operator (identifier_file_path) identifier_file_path )not_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (comparison_operator (identifier_file_path) identifier_file_path (attribute (attribute (identifier_self) identifier_self (identifier_dev_null) identifier_dev_null )attribute (identifier_name) identifier_name )attribute )comparison_operator (block (return_statement (not_operator (attribute (identifier_self) identifier_self (identifier_is_windows_fs) identifier_is_windows_fs )attribute )not_operator )return_statement )block )if_statement (try_statement (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_is_filepath_ending_with_separator) identifier_is_filepath_ending_with_separator )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_file_path) identifier_file_path (call (attribute (identifier_self) identifier_self (identifier_resolve_path) identifier_resolve_path )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call )assignment )expression_statement )block (except_clause (tuple (identifier_IOError) identifier_IOError (identifier_OSError) identifier_OSError )tuple (block (return_statement (False) False )return_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_file_path) identifier_file_path (attribute (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute (identifier_name) identifier_name )attribute )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (expression_statement (assignment (identifier_path_components) identifier_path_components (call (attribute (identifier_self) identifier_self (identifier__path_components) identifier__path_components )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_current_dir) identifier_current_dir (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute )assignment )expression_statement (for_statement (identifier_component) identifier_component (identifier_path_components) identifier_path_components (block (expression_statement (assignment (identifier_current_dir) identifier_current_dir (subscript (call (attribute (identifier_self) identifier_self (identifier__directory_content) identifier__directory_content )attribute (argument_list (identifier_current_dir) identifier_current_dir (identifier_component) identifier_component )argument_list )call (integer_1) integer_1 )subscript )assignment )expression_statement (if_statement (not_operator (identifier_current_dir) identifier_current_dir )not_operator (block (return_statement (False) False )return_statement )block )if_statement )block )for_statement (return_statement (True) True )return_statement )block )function_definition )module
Return true if a path points to an existing file system object. Args: file_path: The path to examine. Returns: (bool) True if the corresponding object exists. Raises: TypeError: if file_path is None.
(module (function_definition (function_name_upload_profiler_report) function_name_upload_profiler_report (parameters (identifier_url) identifier_url (identifier_filename) identifier_filename (identifier_config) identifier_config )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Uploading profiler report to IOpipe") string_"Uploading profiler report to IOpipe" )argument_list )call )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_"rb") string_"rb" )argument_list )call (as_pattern_target (identifier_data) identifier_data )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_requests) identifier_requests (identifier_put) identifier_put )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (subscript (identifier_config) identifier_config (string_"network_timeout") string_"network_timeout" )subscript )keyword_argument )argument_list )call )assignment )expression_statement )block )with_statement (expression_statement (call (attribute (identifier_response) identifier_response (identifier_raise_for_status) identifier_raise_for_status )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Error while uploading profiler report: %s") string_"Error while uploading profiler report: %s" (identifier_e) identifier_e )argument_list )call )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_e) identifier_e (string_"response") string_"response" )argument_list )call (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (attribute (attribute (identifier_e) identifier_e (identifier_response) identifier_response )attribute (identifier_content) identifier_content )attribute )argument_list )call )expression_statement )block )if_statement )block )except_clause (else_clause (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Profiler report uploaded successfully") string_"Profiler report uploaded successfully" )argument_list )call )expression_statement )block )else_clause (finally_clause (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )expression_statement )block )if_statement )block )finally_clause )try_statement )block )function_definition )module
Uploads a profiler report to IOpipe :param url: The signed URL :param filename: The profiler report file :param config: The IOpipe config
(module (function_definition (function_name_make_project) function_name_make_project (parameters (identifier_self) identifier_self (identifier_executable) identifier_executable (identifier_target) identifier_target )parameters (block (expression_statement (assignment (identifier_command) identifier_command (call (attribute (string_'make -f ../Makefile -C {0} {1}') string_'make -f ../Makefile -C {0} {1}' (identifier_format) identifier_format )attribute (argument_list (identifier_SRC_PATH) identifier_SRC_PATH (identifier_target) identifier_target )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pipe) identifier_pipe (call (identifier_Popen) identifier_Popen (argument_list (identifier_command) identifier_command (keyword_argument (identifier_shell) identifier_shell (True) True )keyword_argument (keyword_argument (identifier_stdout) identifier_stdout (identifier_PIPE) identifier_PIPE )keyword_argument (keyword_argument (identifier_stderr) identifier_stderr (identifier_STDOUT) identifier_STDOUT )keyword_argument (keyword_argument (identifier_env) identifier_env (identifier_CHILD_ENV) identifier_CHILD_ENV )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output) identifier_output (subscript (call (attribute (identifier_pipe) identifier_pipe (identifier_communicate) identifier_communicate )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_pipe) identifier_pipe (identifier_returncode) identifier_returncode )attribute (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_MakeFailed) identifier_MakeFailed (argument_list (identifier_output) identifier_output )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_SRC_PATH) identifier_SRC_PATH (identifier_executable) identifier_executable )argument_list )call )argument_list )call )not_operator (block (raise_statement (call (identifier_NonexistentExecutable) identifier_NonexistentExecutable (argument_list (identifier_output) identifier_output )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_output) identifier_output )return_statement )block )function_definition )module
Build the project and verify the executable exists.
(module (function_definition (function_name__merge_default_values) function_name__merge_default_values (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_values) identifier_values (call (attribute (identifier_self) identifier_self (identifier__get_default_values) identifier__get_default_values )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_values) identifier_values (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (not_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key )argument_list )call )not_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Merge default values with resource data.
(module (function_definition (function_name__check_fields) function_name__check_fields (parameters (identifier_self) identifier_self (identifier_x) identifier_x (identifier_y) identifier_y )parameters (block (if_statement (comparison_operator (identifier_x) identifier_x (None) None )comparison_operator (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_err) identifier_err )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__check_fields) identifier__check_fields )attribute (string_"X field is not set: please specify a parameter") string_"X field is not set: please specify a parameter" )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_y) identifier_y (None) None )comparison_operator (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_y) identifier_y )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_err) identifier_err )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__check_fields) identifier__check_fields )attribute (string_"Y field is not set: please specify a parameter") string_"Y field is not set: please specify a parameter" )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_y) identifier_y (attribute (identifier_self) identifier_self (identifier_y) identifier_y )attribute )assignment )expression_statement )block )if_statement (return_statement (expression_list (identifier_x) identifier_x (identifier_y) identifier_y )expression_list )return_statement )block )function_definition )module
Check x and y fields parameters and initialize
(module (function_definition (function_name_setup) function_name_setup (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (identifier_db) identifier_db (await (attribute (identifier_self) identifier_self (identifier_db) identifier_db )attribute )await )assignment )expression_statement (expression_statement (assignment (identifier_collections) identifier_collections (await (call (attribute (identifier_db) identifier_db (identifier_list_collection_names) identifier_list_collection_names )attribute (argument_list )argument_list )call )await )assignment )expression_statement (expression_statement (assignment (identifier_created) identifier_created (False) False )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_table_name) identifier_table_name )attribute (identifier_collections) identifier_collections )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_"Creating MongoDB collection [{}]") string_"Creating MongoDB collection [{}]" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_table_name) identifier_table_name )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (await (call (attribute (identifier_db) identifier_db (identifier_create_collection) identifier_create_collection )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_table_name) identifier_table_name )attribute )argument_list )call )await )expression_statement (expression_statement (await (call (attribute (subscript (identifier_db) identifier_db (attribute (identifier_self) identifier_self (identifier_table_name) identifier_table_name )attribute )subscript (identifier_create_index) identifier_create_index )attribute (argument_list (list (tuple (string_"target_id") string_"target_id" (identifier_DESCENDING) identifier_DESCENDING )tuple (tuple (string_"post_id") string_"post_id" (identifier_DESCENDING) identifier_DESCENDING )tuple )list )argument_list )call )await )expression_statement (expression_statement (assignment (identifier_created) identifier_created (True) True )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_control_table_name) identifier_control_table_name )attribute (comparison_operator (attribute (identifier_self) identifier_self (identifier_control_table_name) identifier_control_table_name )attribute (identifier_collections) identifier_collections )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_"Creating MongoDB control data collection [{}]") string_"Creating MongoDB control data collection [{}]" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_control_table_name) identifier_control_table_name )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (await (call (attribute (identifier_db) identifier_db (identifier_create_collection) identifier_create_collection )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_control_table_name) identifier_control_table_name )attribute )argument_list )call )await )expression_statement (expression_statement (assignment (identifier_created) identifier_created (True) True )assignment )expression_statement )block )if_statement (return_statement (identifier_created) identifier_created )return_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_"[DB] Error when setting up MongoDB collections: {}") string_"[DB] Error when setting up MongoDB collections: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_exc) identifier_exc )argument_list )call )argument_list )call )expression_statement )block )except_clause )try_statement (return_statement (False) False )return_statement )block )function_definition )module
Setting up MongoDB collections, if they not exist.
(module (function_definition (function_name_priv) function_name_priv (parameters (identifier_x) identifier_x )parameters (block (if_statement (call (attribute (identifier_x) identifier_x (identifier_startswith) identifier_startswith )attribute (argument_list (string_u'172.') string_u'172.' )argument_list )call (block (return_statement (comparison_operator (integer_16) integer_16 (call (identifier_int) identifier_int (argument_list (subscript (call (attribute (identifier_x) identifier_x (identifier_split) identifier_split )attribute (argument_list (string_u'.') string_u'.' )argument_list )call (integer_1) integer_1 )subscript )argument_list )call (integer_32) integer_32 )comparison_operator )return_statement )block )if_statement (return_statement (call (attribute (identifier_x) identifier_x (identifier_startswith) identifier_startswith )attribute (argument_list (tuple (string_u'192.168.') string_u'192.168.' (string_u'10.') string_u'10.' (string_u'172.') string_u'172.' )tuple )argument_list )call )return_statement )block )function_definition )module
Quick and dirty method to find an IP on a private network given a correctly formatted IPv4 quad.
(module (function_definition (function_name_find_column) function_name_find_column (parameters (identifier_t) identifier_t )parameters (block (expression_statement (assignment (identifier_pos) identifier_pos (attribute (attribute (identifier_t) identifier_t (identifier_lexer) identifier_lexer )attribute (identifier_lexpos) identifier_lexpos )attribute )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (attribute (attribute (identifier_t) identifier_t (identifier_lexer) identifier_lexer )attribute (identifier_lexdata) identifier_lexdata )attribute )assignment )expression_statement (expression_statement (assignment (identifier_last_cr) identifier_last_cr (call (attribute (identifier_data) identifier_data (identifier_rfind) identifier_rfind )attribute (argument_list (string_'\n') string_'\n' (integer_0) integer_0 (identifier_pos) identifier_pos )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_last_cr) identifier_last_cr (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_last_cr) identifier_last_cr (unary_operator (integer_1) integer_1 )unary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_column) identifier_column (binary_operator (identifier_pos) identifier_pos (identifier_last_cr) identifier_last_cr )binary_operator )assignment )expression_statement (return_statement (identifier_column) identifier_column )return_statement )block )function_definition )module
Get cursor position, based on previous newline
(module (function_definition (function_name_get_sequence_rule_enablers_by_search) function_name_get_sequence_rule_enablers_by_search (parameters (identifier_self) identifier_self (identifier_sequence_rule_enabler_query) identifier_sequence_rule_enabler_query (identifier_sequence_rule_enabler_search) identifier_sequence_rule_enabler_search )parameters (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier__can) identifier__can )attribute (argument_list (string_'search') string_'search' )argument_list )call )not_operator (block (raise_statement (call (identifier_PermissionDenied) identifier_PermissionDenied (argument_list )argument_list )call )raise_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__provider_session) identifier__provider_session )attribute (identifier_get_sequence_rule_enablers_by_search) identifier_get_sequence_rule_enablers_by_search )attribute (argument_list (identifier_sequence_rule_enabler_query) identifier_sequence_rule_enabler_query (identifier_sequence_rule_enabler_search) identifier_sequence_rule_enabler_search )argument_list )call )return_statement )block )function_definition )module
Pass through to provider SequenceRuleEnablerSearchSession.get_sequence_rule_enablers_by_search
(module (function_definition (function_name_validate_tag) function_name_validate_tag (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_value) identifier_value )parameters (block (if_statement (comparison_operator (identifier_key) identifier_key (string_'owner') string_'owner' )comparison_operator (block (return_statement (call (identifier_validate_email) identifier_validate_email (argument_list (identifier_value) identifier_value (attribute (identifier_self) identifier_self (identifier_partial_owner_match) identifier_partial_owner_match )attribute )argument_list )call )return_statement )block (elif_clause (comparison_operator (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier_gdpr_tag) identifier_gdpr_tag )attribute )comparison_operator (block (return_statement (comparison_operator (identifier_value) identifier_value (attribute (identifier_self) identifier_self (identifier_gdpr_tag_values) identifier_gdpr_tag_values )attribute )comparison_operator )return_statement )block )elif_clause (else_clause (block (return_statement (True) True )return_statement )block )else_clause )if_statement )block )function_definition )module
Check whether a tag value is valid Args: key: A tag key value: A tag value Returns: `(True or False)` A boolean indicating whether or not the value is valid
(module (function_definition (function_name_request) function_name_request (parameters (identifier_self) identifier_self (identifier_host) identifier_host (identifier_handler) identifier_handler (identifier_request_body) identifier_request_body (identifier_verbose) identifier_verbose )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_verbose) identifier_verbose )attribute (identifier_verbose) identifier_verbose )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (binary_operator (binary_operator (string_'http://') string_'http://' (identifier_host) identifier_host )binary_operator (identifier_handler) identifier_handler )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_request) identifier_request (call (attribute (identifier_urllib2) identifier_urllib2 (identifier_Request) identifier_Request )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_request) identifier_request (identifier_add_data) identifier_add_data )attribute (argument_list (identifier_request_body) identifier_request_body )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_request) identifier_request (identifier_add_header) identifier_add_header )attribute (argument_list (string_'User-Agent') string_'User-Agent' (attribute (identifier_self) identifier_self (identifier_user_agent) identifier_user_agent )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_request) identifier_request (identifier_add_header) identifier_add_header )attribute (argument_list (string_'Content-Type') string_'Content-Type' (string_'text/xml') string_'text/xml' )argument_list )call )expression_statement (expression_statement (assignment (identifier_proxy_handler) identifier_proxy_handler (call (attribute (identifier_urllib2) identifier_urllib2 (identifier_ProxyHandler) identifier_ProxyHandler )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_opener) identifier_opener (call (attribute (identifier_urllib2) identifier_urllib2 (identifier_build_opener) identifier_build_opener )attribute (argument_list (identifier_proxy_handler) identifier_proxy_handler )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fhandle) identifier_fhandle (call (attribute (identifier_opener) identifier_opener (identifier_open) identifier_open )attribute (argument_list (identifier_request) identifier_request )argument_list )call )assignment )expression_statement (return_statement (parenthesized_expression (call (attribute (identifier_self) identifier_self (identifier_parse_response) identifier_parse_response )attribute (argument_list (identifier_fhandle) identifier_fhandle )argument_list )call )parenthesized_expression )return_statement )block )function_definition )module
Send xml-rpc request using proxy
(module (function_definition (function_name_as_dict) function_name_as_dict (parameters (identifier_self) identifier_self (default_parameter (identifier_voigt) identifier_voigt (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_input_array) identifier_input_array (conditional_expression (attribute (identifier_self) identifier_self (identifier_voigt) identifier_voigt )attribute (identifier_voigt) identifier_voigt (identifier_self) identifier_self )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_d) identifier_d (dictionary (pair (string_"@module") string_"@module" (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___module__) identifier___module__ )attribute )pair (pair (string_"@class") string_"@class" (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )pair (pair (string_"input_array") string_"input_array" (call (attribute (identifier_input_array) identifier_input_array (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )pair )dictionary )assignment )expression_statement (if_statement (identifier_voigt) identifier_voigt (block (expression_statement (call (attribute (identifier_d) identifier_d (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_"voigt") string_"voigt" (identifier_voigt) identifier_voigt )pair )dictionary )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
Serializes the tensor object Args: voigt (bool): flag for whether to store entries in voigt-notation. Defaults to false, as information may be lost in conversion. Returns (Dict): serialized format tensor object
(module (function_definition (function_name_get_window_at_mouse) function_name_get_window_at_mouse (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_window_ret) identifier_window_ret (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_ulong) identifier_c_ulong )attribute (argument_list (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier__libxdo) identifier__libxdo (identifier_xdo_get_window_at_mouse) identifier_xdo_get_window_at_mouse )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__xdo) identifier__xdo )attribute (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_window_ret) identifier_window_ret )argument_list )call )argument_list )call )expression_statement (return_statement (attribute (identifier_window_ret) identifier_window_ret (identifier_value) identifier_value )attribute )return_statement )block )function_definition )module
Get the window the mouse is currently over
(module (function_definition (function_name_ReportLength) function_name_ReportLength (parameters (identifier_cls) identifier_cls (identifier_header) identifier_header )parameters (block (expression_statement (assignment (identifier_parsed_header) identifier_parsed_header (call (attribute (identifier_cls) identifier_cls (identifier__parse_header) identifier__parse_header )attribute (argument_list (identifier_header) identifier_header )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_auth_size) identifier_auth_size (call (attribute (attribute (identifier_cls) identifier_cls (identifier__AUTH_BLOCK_LENGTHS) identifier__AUTH_BLOCK_LENGTHS )attribute (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_parsed_header) identifier_parsed_header (identifier_auth_type) identifier_auth_type )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_auth_size) identifier_auth_size (None) None )comparison_operator (block (raise_statement (call (identifier_DataError) identifier_DataError (argument_list (string_"Unknown auth block size in BroadcastReport") string_"Unknown auth block size in BroadcastReport" )argument_list )call )raise_statement )block )if_statement (return_statement (binary_operator (binary_operator (attribute (identifier_cls) identifier_cls (identifier__HEADER_LENGTH) identifier__HEADER_LENGTH )attribute (attribute (identifier_parsed_header) identifier_parsed_header (identifier_reading_length) identifier_reading_length )attribute )binary_operator (identifier_auth_size) identifier_auth_size )binary_operator )return_statement )block )function_definition )module
Given a header of HeaderLength bytes, calculate the size of this report. Returns: int: The total length of the report including the header that we are passed.
(module (function_definition (function_name_from_gpx) function_name_from_gpx (parameters (identifier_gpx_segment) identifier_gpx_segment )parameters (block (expression_statement (assignment (identifier_points) identifier_points (list )list )assignment )expression_statement (for_statement (identifier_point) identifier_point (attribute (identifier_gpx_segment) identifier_gpx_segment (identifier_points) identifier_points )attribute (block (expression_statement (call (attribute (identifier_points) identifier_points (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_Point) identifier_Point (identifier_from_gpx) identifier_from_gpx )attribute (argument_list (identifier_point) identifier_point )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (call (identifier_Segment) identifier_Segment (argument_list (identifier_points) identifier_points )argument_list )call )return_statement )block )function_definition )module
Creates a segment from a GPX format. No preprocessing is done. Arguments: gpx_segment (:obj:`gpxpy.GPXTrackSegment`) Return: :obj:`Segment`
(module (function_definition (function_name_add_bgp_error_metadata) function_name_add_bgp_error_metadata (parameters (identifier_code) identifier_code (identifier_sub_code) identifier_sub_code (default_parameter (identifier_def_desc) identifier_def_desc (string_'unknown') string_'unknown' )default_parameter )parameters (block (if_statement (comparison_operator (call (attribute (identifier__EXCEPTION_REGISTRY) identifier__EXCEPTION_REGISTRY (identifier_get) identifier_get )attribute (argument_list (tuple (identifier_code) identifier_code (identifier_sub_code) identifier_sub_code )tuple )argument_list )call (None) None )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (concatenated_string (string_'BGPSException with code %d and sub-code %d ') string_'BGPSException with code %d and sub-code %d ' (string_'already defined.') string_'already defined.' )concatenated_string (tuple (identifier_code) identifier_code (identifier_sub_code) identifier_sub_code )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (function_definition (function_name_decorator) function_name_decorator (parameters (identifier_subclass) identifier_subclass )parameters (block (if_statement (call (identifier_issubclass) identifier_issubclass (argument_list (identifier_subclass) identifier_subclass (identifier_BGPSException) identifier_BGPSException )argument_list )call (block (expression_statement (assignment (subscript (identifier__EXCEPTION_REGISTRY) identifier__EXCEPTION_REGISTRY (tuple (identifier_code) identifier_code (identifier_sub_code) identifier_sub_code )tuple )subscript (identifier_subclass) identifier_subclass )assignment )expression_statement (expression_statement (assignment (attribute (identifier_subclass) identifier_subclass (identifier_CODE) identifier_CODE )attribute (identifier_code) identifier_code )assignment )expression_statement (expression_statement (assignment (attribute (identifier_subclass) identifier_subclass (identifier_SUB_CODE) identifier_SUB_CODE )attribute (identifier_sub_code) identifier_sub_code )assignment )expression_statement (expression_statement (assignment (attribute (identifier_subclass) identifier_subclass (identifier_DEF_DESC) identifier_DEF_DESC )attribute (identifier_def_desc) identifier_def_desc )assignment )expression_statement )block )if_statement (return_statement (identifier_subclass) identifier_subclass )return_statement )block )function_definition (return_statement (identifier_decorator) identifier_decorator )return_statement )block )function_definition )module
Decorator for all exceptions that want to set exception class meta-data.
(module (function_definition (function_name_map_metabolite2kegg) function_name_map_metabolite2kegg (parameters (identifier_metabolite) identifier_metabolite )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Looking for KEGG compound identifier for %s.") string_"Looking for KEGG compound identifier for %s." (attribute (identifier_metabolite) identifier_metabolite (identifier_id) identifier_id )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_kegg_annotation) identifier_kegg_annotation (call (attribute (attribute (identifier_metabolite) identifier_metabolite (identifier_annotation) identifier_annotation )attribute (identifier_get) identifier_get )attribute (argument_list (string_"kegg.compound") string_"kegg.compound" )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_kegg_annotation) identifier_kegg_annotation (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (string_"No kegg.compound annotation for metabolite %s.") string_"No kegg.compound annotation for metabolite %s." (attribute (identifier_metabolite) identifier_metabolite (identifier_id) identifier_id )attribute )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_kegg_annotation) identifier_kegg_annotation (identifier_string_types) identifier_string_types )argument_list )call (line_continuation_\) line_continuation_\ (call (attribute (identifier_kegg_annotation) identifier_kegg_annotation (identifier_startswith) identifier_startswith )attribute (argument_list (string_"C") string_"C" )argument_list )call )boolean_operator (block (return_statement (identifier_kegg_annotation) identifier_kegg_annotation )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_kegg_annotation) identifier_kegg_annotation (identifier_Iterable) identifier_Iterable )argument_list )call (block (try_statement (block (return_statement (call (identifier_get_smallest_compound_id) identifier_get_smallest_compound_id (argument_list (identifier_kegg_annotation) identifier_kegg_annotation )argument_list )call )return_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (return_statement )return_statement )block )except_clause )try_statement )block )elif_clause )if_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (string_"No matching kegg.compound annotation for metabolite %s.") string_"No matching kegg.compound annotation for metabolite %s." (attribute (identifier_metabolite) identifier_metabolite (identifier_id) identifier_id )attribute )argument_list )call )expression_statement (return_statement )return_statement )block )function_definition )module
Return a KEGG compound identifier for the metabolite if it exists. First see if there is an unambiguous mapping to a single KEGG compound ID provided with the model. If not, check if there is any KEGG compound ID in a list of mappings. KEGG IDs may map to compounds, drugs and glycans. KEGG compound IDs are sorted so we keep the lowest that is there. If none of this works try mapping to KEGG via the CompoundMatcher by the name of the metabolite. If the metabolite cannot be mapped at all we simply map it back to its own ID. Parameters ---------- metabolite : cobra.Metabolite The metabolite to be mapped to its KEGG compound identifier. Returns ------- None If the metabolite could not be mapped. str The smallest KEGG compound identifier that was found.
(module (function_definition (function_name_uncheck_all_local) function_name_uncheck_all_local (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_buttons) identifier_buttons (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_event) identifier_event )attribute (string_'local') string_'local' )subscript (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (if_statement (not_operator (call (attribute (subscript (identifier_buttons) identifier_buttons (integer_0) integer_0 )subscript (identifier_get_value) identifier_get_value )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (call (attribute (subscript (subscript (attribute (identifier_self) identifier_self (identifier_event) identifier_event )attribute (string_'global') string_'global' )subscript (string_'all_local') string_'all_local' )subscript (identifier_setChecked) identifier_setChecked )attribute (argument_list (False) False )argument_list )call )expression_statement )block )if_statement (if_statement (boolean_operator (call (attribute (subscript (identifier_buttons) identifier_buttons (integer_1) integer_1 )subscript (identifier_isEnabled) identifier_isEnabled )attribute (argument_list )argument_list )call (not_operator (call (attribute (subscript (identifier_buttons) identifier_buttons (integer_1) integer_1 )subscript (identifier_get_value) identifier_get_value )attribute (argument_list )argument_list )call )not_operator )boolean_operator (block (expression_statement (call (attribute (subscript (subscript (attribute (identifier_self) identifier_self (identifier_event) identifier_event )attribute (string_'global') string_'global' )subscript (string_'all_local_prep') string_'all_local_prep' )subscript (identifier_setChecked) identifier_setChecked )attribute (argument_list (False) False )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Uncheck 'all local' box when a local event is unchecked.
(module (function_definition (function_name_make_psf_kernel) function_name_make_psf_kernel (parameters (identifier_psf) identifier_psf (identifier_npix) identifier_npix (identifier_cdelt) identifier_cdelt (identifier_xpix) identifier_xpix (identifier_ypix) identifier_ypix (default_parameter (identifier_psf_scale_fn) identifier_psf_scale_fn (None) None )default_parameter (default_parameter (identifier_normalize) identifier_normalize (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_egy) identifier_egy (attribute (identifier_psf) identifier_psf (identifier_energies) identifier_energies )attribute )assignment )expression_statement (expression_statement (assignment (identifier_x) identifier_x (call (identifier_make_pixel_distance) identifier_make_pixel_distance (argument_list (identifier_npix) identifier_npix (identifier_xpix) identifier_xpix (identifier_ypix) identifier_ypix )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_x) identifier_x (identifier_cdelt) identifier_cdelt )augmented_assignment )expression_statement (expression_statement (assignment (identifier_k) identifier_k (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (tuple (call (identifier_len) identifier_len (argument_list (identifier_egy) identifier_egy )argument_list )call (identifier_npix) identifier_npix (identifier_npix) identifier_npix )tuple )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_egy) identifier_egy )argument_list )call )argument_list )call (block (expression_statement (assignment (subscript (identifier_k) identifier_k (identifier_i) identifier_i )subscript (call (attribute (identifier_psf) identifier_psf (identifier_eval) identifier_eval )attribute (argument_list (identifier_i) identifier_i (identifier_x) identifier_x (keyword_argument (identifier_scale_fn) identifier_scale_fn (identifier_psf_scale_fn) identifier_psf_scale_fn )keyword_argument )argument_list )call )assignment )expression_statement )block )for_statement (if_statement (identifier_normalize) identifier_normalize (block (expression_statement (augmented_assignment (identifier_k) identifier_k (parenthesized_expression (binary_operator (subscript (call (attribute (identifier_np) identifier_np (identifier_sum) identifier_sum )attribute (argument_list (identifier_k) identifier_k (keyword_argument (identifier_axis) identifier_axis (integer_0) integer_0 )keyword_argument )argument_list )call (attribute (identifier_np) identifier_np (identifier_newaxis) identifier_newaxis )attribute (ellipsis_...) ellipsis_... )subscript (binary_operator (call (attribute (identifier_np) identifier_np (identifier_radians) identifier_radians )attribute (argument_list (identifier_cdelt) identifier_cdelt )argument_list )call (integer_2) integer_2 )binary_operator )binary_operator )parenthesized_expression )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_k) identifier_k )return_statement )block )function_definition )module
Generate a kernel for a point-source. Parameters ---------- psf : `~fermipy.irfs.PSFModel` npix : int Number of pixels in X and Y dimensions. cdelt : float Pixel size in degrees.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (default_parameter (identifier_blc) identifier_blc (tuple )tuple )default_parameter (default_parameter (identifier_trc) identifier_trc (tuple )tuple )default_parameter (default_parameter (identifier_inc) identifier_inc (tuple )tuple )default_parameter )parameters (block (return_statement (call (attribute (identifier_nma) identifier_nma (identifier_masked_array) identifier_masked_array )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_getdata) identifier_getdata )attribute (argument_list (identifier_blc) identifier_blc (identifier_trc) identifier_trc (identifier_inc) identifier_inc )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_getmask) identifier_getmask )attribute (argument_list (identifier_blc) identifier_blc (identifier_trc) identifier_trc (identifier_inc) identifier_inc )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Get image data and mask. Get the image data and mask (see ::func:`getdata` and :func:`getmask`) as a numpy masked array.
(module (function_definition (function_name_get_credentials) function_name_get_credentials (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_login) identifier_login (parenthesized_expression (boolean_operator (boolean_operator (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_"user") string_"user" )argument_list )call (call (attribute (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_get) identifier_get )attribute (argument_list (string_"POLARION_USERNAME") string_"POLARION_USERNAME" )argument_list )call )boolean_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_get) identifier_get )attribute (argument_list (string_"username") string_"username" )argument_list )call )boolean_operator )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_pwd) identifier_pwd (parenthesized_expression (boolean_operator (boolean_operator (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_"password") string_"password" )argument_list )call (call (attribute (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_get) identifier_get )attribute (argument_list (string_"POLARION_PASSWORD") string_"POLARION_PASSWORD" )argument_list )call )boolean_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_get) identifier_get )attribute (argument_list (string_"password") string_"password" )argument_list )call )boolean_operator )parenthesized_expression )assignment )expression_statement (if_statement (not_operator (call (identifier_all) identifier_all (argument_list (list (identifier_login) identifier_login (identifier_pwd) identifier_pwd )list )argument_list )call )not_operator (block (raise_statement (call (identifier_Dump2PolarionException) identifier_Dump2PolarionException (argument_list (string_"Failed to submit to Polarion - missing credentials") string_"Failed to submit to Polarion - missing credentials" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_credentials) identifier_credentials )attribute (tuple (identifier_login) identifier_login (identifier_pwd) identifier_pwd )tuple )assignment )expression_statement )block )function_definition )module
Sets credentails.
(module (function_definition (function_name_get_child_vaults) function_name_get_child_vaults (parameters (identifier_self) identifier_self (identifier_vault_id) identifier_vault_id )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__catalog_session) identifier__catalog_session )attribute (None) None )comparison_operator (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__catalog_session) identifier__catalog_session )attribute (identifier_get_child_catalogs) identifier_get_child_catalogs )attribute (argument_list (keyword_argument (identifier_catalog_id) identifier_catalog_id (identifier_vault_id) identifier_vault_id )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (call (identifier_VaultLookupSession) identifier_VaultLookupSession (argument_list (attribute (identifier_self) identifier_self (identifier__proxy) identifier__proxy )attribute (attribute (identifier_self) identifier_self (identifier__runtime) identifier__runtime )attribute )argument_list )call (identifier_get_vaults_by_ids) identifier_get_vaults_by_ids )attribute (argument_list (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_child_vault_ids) identifier_get_child_vault_ids )attribute (argument_list (identifier_vault_id) identifier_vault_id )argument_list )call )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Gets the children of the given vault. arg: vault_id (osid.id.Id): the ``Id`` to query return: (osid.authorization.VaultList) - the children of the vault raise: NotFound - ``vault_id`` is not found raise: NullArgument - ``vault_id`` is ``null`` raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method must be implemented.*
(module (function_definition (function_name__create_keywords_wizard_action) function_name__create_keywords_wizard_action (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_icon) identifier_icon (call (identifier_resources_path) identifier_resources_path (argument_list (string_'img') string_'img' (string_'icons') string_'icons' (string_'show-keyword-wizard.svg') string_'show-keyword-wizard.svg' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_action_keywords_wizard) identifier_action_keywords_wizard )attribute (call (identifier_QAction) identifier_QAction (argument_list (call (identifier_QIcon) identifier_QIcon (argument_list (identifier_icon) identifier_icon )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_tr) identifier_tr )attribute (argument_list (string_'Keywords Creation Wizard') string_'Keywords Creation Wizard' )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_iface) identifier_iface )attribute (identifier_mainWindow) identifier_mainWindow )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_action_keywords_wizard) identifier_action_keywords_wizard )attribute (identifier_setStatusTip) identifier_setStatusTip )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_tr) identifier_tr )attribute (argument_list (string_'Open InaSAFE keywords creation wizard') string_'Open InaSAFE keywords creation wizard' )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_action_keywords_wizard) identifier_action_keywords_wizard )attribute (identifier_setWhatsThis) identifier_setWhatsThis )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_tr) identifier_tr )attribute (argument_list (string_'Open InaSAFE keywords creation wizard') string_'Open InaSAFE keywords creation wizard' )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_action_keywords_wizard) identifier_action_keywords_wizard )attribute (identifier_setEnabled) identifier_setEnabled )attribute (argument_list (False) False )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_action_keywords_wizard) identifier_action_keywords_wizard )attribute (identifier_triggered) identifier_triggered )attribute (identifier_connect) identifier_connect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_show_keywords_wizard) identifier_show_keywords_wizard )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_action) identifier_add_action )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_action_keywords_wizard) identifier_action_keywords_wizard )attribute (keyword_argument (identifier_add_to_legend) identifier_add_to_legend (True) True )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Create action for keywords creation wizard.
(module (function_definition (function_name__init_view) function_name__init_view (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_views_engine) identifier_views_engine (call (identifier_get_config) identifier_get_config (argument_list (string_'rails.views.engine') string_'rails.views.engine' (string_'jinja') string_'jinja' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_templates_dir) identifier_templates_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__project_dir) identifier__project_dir )attribute (string_"views") string_"views" (string_"templates") string_"templates" )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__view) identifier__view )attribute (call (identifier_View) identifier_View (argument_list (identifier_views_engine) identifier_views_engine (identifier_templates_dir) identifier_templates_dir )argument_list )call )assignment )expression_statement )block )function_definition )module
Initialize View with project settings.
(module (function_definition (function_name___get_all_lowpoints) function_name___get_all_lowpoints (parameters (identifier_dfs_data) identifier_dfs_data )parameters (block (expression_statement (assignment (identifier_lowpoint_1_lookup) identifier_lowpoint_1_lookup (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_lowpoint_2_lookup) identifier_lowpoint_2_lookup (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_ordering) identifier_ordering (subscript (identifier_dfs_data) identifier_dfs_data (string_'ordering') string_'ordering' )subscript )assignment )expression_statement (for_statement (identifier_node) identifier_node (identifier_ordering) identifier_ordering (block (expression_statement (assignment (pattern_list (identifier_low_1) identifier_low_1 (identifier_low_2) identifier_low_2 )pattern_list (call (identifier___get_lowpoints) identifier___get_lowpoints (argument_list (identifier_node) identifier_node (identifier_dfs_data) identifier_dfs_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_lowpoint_1_lookup) identifier_lowpoint_1_lookup (identifier_node) identifier_node )subscript (identifier_low_1) identifier_low_1 )assignment )expression_statement (expression_statement (assignment (subscript (identifier_lowpoint_2_lookup) identifier_lowpoint_2_lookup (identifier_node) identifier_node )subscript (identifier_low_2) identifier_low_2 )assignment )expression_statement )block )for_statement (return_statement (expression_list (identifier_lowpoint_1_lookup) identifier_lowpoint_1_lookup (identifier_lowpoint_2_lookup) identifier_lowpoint_2_lookup )expression_list )return_statement )block )function_definition )module
Calculates the lowpoints for each node in a graph.
(module (function_definition (function_name_contains) function_name_contains (parameters (identifier_self) identifier_self (identifier_location) identifier_location )parameters (block (for_statement (pattern_list (identifier_i) identifier_i (identifier_coord) identifier_coord )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_location) identifier_location )argument_list )call (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_almostEqual) identifier_almostEqual )attribute (argument_list (call (identifier_abs) identifier_abs (argument_list (identifier_coord) identifier_coord )argument_list )call (binary_operator (subscript (attribute (identifier_self) identifier_self (identifier_dimensions) identifier_dimensions )attribute (identifier_i) identifier_i )subscript (float_2.) float_2. )binary_operator )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
A location is on the box if one of the dimension is "satured").
(module (function_definition (function_name_create_result) function_name_create_result (parameters (identifier_self) identifier_self (identifier_env_name) identifier_env_name (identifier_other_val) identifier_other_val (identifier_meta) identifier_meta (identifier_val) identifier_val (identifier_dividers) identifier_dividers )parameters (block (expression_statement (assignment (identifier_args) identifier_args (list (identifier_env_name) identifier_env_name )list )assignment )expression_statement (if_statement (comparison_operator (identifier_other_val) identifier_other_val (identifier_NotSpecified) identifier_NotSpecified )comparison_operator (block (expression_statement (assignment (identifier_other_val) identifier_other_val (None) None )assignment )expression_statement )block )if_statement (if_statement (not_operator (identifier_dividers) identifier_dividers )not_operator (block (expression_statement (call (attribute (identifier_args) identifier_args (identifier_extend) identifier_extend )attribute (argument_list (list (None) None (None) None )list )argument_list )call )expression_statement )block (elif_clause (comparison_operator (subscript (identifier_dividers) identifier_dividers (integer_0) integer_0 )subscript (string_':') string_':' )comparison_operator (block (expression_statement (call (attribute (identifier_args) identifier_args (identifier_extend) identifier_extend )attribute (argument_list (list (identifier_other_val) identifier_other_val (None) None )list )argument_list )call )expression_statement )block )elif_clause (elif_clause (comparison_operator (subscript (identifier_dividers) identifier_dividers (integer_0) integer_0 )subscript (string_'=') string_'=' )comparison_operator (block (expression_statement (call (attribute (identifier_args) identifier_args (identifier_extend) identifier_extend )attribute (argument_list (list (None) None (identifier_other_val) identifier_other_val )list )argument_list )call )expression_statement )block )elif_clause )if_statement (return_statement (call (identifier_Environment) identifier_Environment (argument_list (list_splat (identifier_args) identifier_args )list_splat )argument_list )call )return_statement )block )function_definition )module
Set default_val and set_val depending on the seperator
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self (identifier_data) identifier_data (default_parameter (identifier_size) identifier_size (unary_operator (integer_1) integer_1 )unary_operator )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (attribute (identifier_self) identifier_self (identifier__ffi) identifier__ffi )attribute (identifier_from_buffer) identifier_from_buffer )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (pass_statement )pass_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_size) identifier_size (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_size) identifier_size (identifier_rest) identifier_rest )pattern_list (call (identifier_divmod) identifier_divmod (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__ffi) identifier__ffi )attribute (identifier_sizeof) identifier_sizeof )attribute (argument_list (identifier_data) identifier_data )argument_list )call (attribute (identifier_self) identifier_self (identifier_elementsize) identifier_elementsize )attribute )argument_list )call )assignment )expression_statement (if_statement (identifier_rest) identifier_rest (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'data size must be multiple of elementsize') string_'data size must be multiple of elementsize' )argument_list )call )raise_statement )block )if_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__lib) identifier__lib )attribute (identifier_PaUtil_WriteRingBuffer) identifier_PaUtil_WriteRingBuffer )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__ptr) identifier__ptr )attribute (identifier_data) identifier_data (identifier_size) identifier_size )argument_list )call )return_statement )block )function_definition )module
Write data to the ring buffer. This advances the write index after writing; calling :meth:`advance_write_index` is *not* necessary. :param data: Data to write to the buffer. :type data: CData pointer or buffer or bytes :param size: The number of elements to be written. :type size: int, optional :returns: The number of elements written. :rtype: int
(module (function_definition (function_name_stop) function_name_stop (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_BufferedReader) identifier_BufferedReader (identifier_stop) identifier_stop )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__stop_running_event) identifier__stop_running_event )attribute (identifier_set) identifier_set )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__writer_thread) identifier__writer_thread )attribute (identifier_join) identifier_join )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_BaseIOHandler) identifier_BaseIOHandler (identifier_stop) identifier_stop )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement )block )function_definition )module
Stops the reader an writes all remaining messages to the database. Thus, this might take a while and block.
(module (function_definition (function_name_calculate_matrices) function_name_calculate_matrices (parameters (identifier_states) identifier_states (default_parameter (identifier_Omega) identifier_Omega (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_iso) identifier_iso (attribute (subscript (identifier_states) identifier_states (integer_0) integer_0 )subscript (identifier_isotope) identifier_isotope )attribute )assignment )expression_statement (expression_statement (assignment (identifier_element) identifier_element (attribute (subscript (identifier_states) identifier_states (integer_0) integer_0 )subscript (identifier_element) identifier_element )attribute )assignment )expression_statement (for_statement (identifier_state) identifier_state (subscript (identifier_states) identifier_states (slice (integer_1) integer_1 (colon) colon )slice )subscript (block (if_statement (comparison_operator (attribute (identifier_state) identifier_state (identifier_element) identifier_element )attribute (identifier_element) identifier_element )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'All states must belong to the same element.') string_'All states must belong to the same element.' )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_state) identifier_state (identifier_isotope) identifier_isotope )attribute (identifier_iso) identifier_iso )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'All states must belong to the same isotope.') string_'All states must belong to the same isotope.' )argument_list )call )raise_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_fine_states) identifier_fine_states (call (identifier_find_fine_states) identifier_find_fine_states (argument_list (identifier_states) identifier_states )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_full_magnetic_states) identifier_full_magnetic_states (call (identifier_make_list_of_states) identifier_make_list_of_states (argument_list (identifier_fine_states) identifier_fine_states (string_'magnetic') string_'magnetic' (keyword_argument (identifier_verbose) identifier_verbose (integer_0) integer_0 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_omega_full) identifier_omega_full (call (identifier_calculate_omega_matrix) identifier_calculate_omega_matrix (argument_list (identifier_full_magnetic_states) identifier_full_magnetic_states (identifier_Omega) identifier_Omega )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_gamma_full) identifier_gamma_full (call (identifier_calculate_gamma_matrix) identifier_calculate_gamma_matrix (argument_list (identifier_full_magnetic_states) identifier_full_magnetic_states (identifier_Omega) identifier_Omega )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_reduced_matrix_elements) identifier_reduced_matrix_elements (call (identifier_calculate_reduced_matrix_elements) identifier_calculate_reduced_matrix_elements (argument_list (identifier_fine_states) identifier_fine_states )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_r_full) identifier_r_full (call (identifier_calculate_r_matrices) identifier_calculate_r_matrices (argument_list (identifier_fine_states) identifier_fine_states (identifier_reduced_matrix_elements) identifier_reduced_matrix_elements )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_omega) identifier_omega (identifier_omega_full) identifier_omega_full )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (identifier_r_full) identifier_r_full )assignment )expression_statement (expression_statement (assignment (identifier_gamma) identifier_gamma (identifier_gamma_full) identifier_gamma_full )assignment )expression_statement (return_statement (expression_list (identifier_omega) identifier_omega (identifier_gamma) identifier_gamma (identifier_r) identifier_r )expression_list )return_statement )block )function_definition )module
r"""Calculate the matrices omega_ij, gamma_ij, r_pij. This function calculates the matrices omega_ij, gamma_ij and r_pij given a list of atomic states. The states can be arbitrarily in their fine, hyperfine or magnetic detail.
(module (function_definition (function_name_unshare) function_name_unshare (parameters (identifier_flags) identifier_flags )parameters (block (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_lib) identifier_lib (identifier_unshare) identifier_unshare )attribute (argument_list (identifier_flags) identifier_flags )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_res) identifier_res (integer_0) integer_0 )comparison_operator (block (expression_statement (call (identifier__check_error) identifier__check_error (argument_list (attribute (identifier_ffi) identifier_ffi (identifier_errno) identifier_errno )attribute )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Disassociate parts of the process execution context. :param flags int: A bitmask that specifies which parts of the execution context should be unshared.
(module (function_definition (function_name_number_of_trajectories) function_name_number_of_trajectories (parameters (identifier_self) identifier_self (default_parameter (identifier_stride) identifier_stride (None) None )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (not_operator (call (attribute (identifier_IteratorState) identifier_IteratorState (identifier_is_uniform_stride) identifier_is_uniform_stride )attribute (argument_list (identifier_stride) identifier_stride )argument_list )call )not_operator (block (expression_statement (assignment (identifier_n) identifier_n (call (identifier_len) identifier_len (argument_list (call (attribute (identifier_np) identifier_np (identifier_unique) identifier_unique )attribute (argument_list (subscript (identifier_stride) identifier_stride (slice (colon) colon )slice (integer_0) integer_0 )subscript )argument_list )call )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_n) identifier_n (attribute (identifier_self) identifier_self (identifier_ntraj) identifier_ntraj )attribute )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_n) identifier_n )return_statement )block )function_definition )module
r""" Returns the number of trajectories. Parameters ---------- stride: None (default) or np.ndarray Returns ------- int : number of trajectories
(module (function_definition (function_name_get_stop_words) function_name_get_stop_words (parameters (identifier_self) identifier_self (identifier_language) identifier_language (default_parameter (identifier_fail_safe) identifier_fail_safe (False) False )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_language) identifier_language (subscript (attribute (identifier_self) identifier_self (identifier_language_codes) identifier_language_codes )attribute (identifier_language) identifier_language )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_collection) identifier_collection (call (attribute (attribute (identifier_self) identifier_self (identifier_LOADED_LANGUAGES_CACHE) identifier_LOADED_LANGUAGES_CACHE )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_language) identifier_language )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_collection) identifier_collection (None) None )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_collection) identifier_collection (call (attribute (identifier_self) identifier_self (identifier__get_stop_words) identifier__get_stop_words )attribute (argument_list (identifier_language) identifier_language )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_LOADED_LANGUAGES_CACHE) identifier_LOADED_LANGUAGES_CACHE )attribute (identifier_language) identifier_language )subscript (identifier_collection) identifier_collection )assignment )expression_statement )block (except_clause (as_pattern (identifier_StopWordError) identifier_StopWordError (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (if_statement (not_operator (identifier_fail_safe) identifier_fail_safe )not_operator (block (raise_statement (identifier_error) identifier_error )raise_statement )block )if_statement (expression_statement (assignment (identifier_collection) identifier_collection (list )list )assignment )expression_statement )block )except_clause )try_statement )block )if_statement (expression_statement (assignment (identifier_stop_words) identifier_stop_words (call (identifier_StopWord) identifier_StopWord (argument_list (identifier_language) identifier_language (identifier_collection) identifier_collection )argument_list )call )assignment )expression_statement (return_statement (identifier_stop_words) identifier_stop_words )return_statement )block )function_definition )module
Returns a StopWord object initialized with the stop words collection requested by ``language``. If the requested language is not available a StopWordError is raised. If ``fail_safe`` is set to True, an empty StopWord object is returned.
(module (function_definition (function_name_construct) function_name_construct (parameters (identifier_generator) identifier_generator (identifier_subtopic) identifier_subtopic )parameters (block (expression_statement (assignment (identifier_type) identifier_type (subscript (identifier_subtopic) identifier_subtopic (integer_3) integer_3 )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_type) identifier_type (attribute (identifier_Item) identifier_Item (identifier_constructors) identifier_constructors )attribute )comparison_operator (block (raise_statement (call (identifier_LookupError) identifier_LookupError (argument_list (identifier_type) identifier_type )argument_list )call )raise_statement )block )if_statement (return_statement (call (subscript (attribute (identifier_Item) identifier_Item (identifier_constructors) identifier_constructors )attribute (identifier_type) identifier_type )subscript (argument_list (identifier_generator) identifier_generator (identifier_subtopic) identifier_subtopic )argument_list )call )return_statement )block )function_definition )module
Method constructor of Item-derived classes. Given a subtopic tuple, this method attempts to construct an Item-derived class, currently either ItemText or ItemImage, from the subtopic's type, found in its 4th element. :param generator: Reference to the owning ReportGenerator instance :param subtopic: Tuple containing content_id, meta_url, subtopic_id, type and type-specific data. :returns An instantiated Item-derived class.
(module (function_definition (function_name_get_perms) function_name_get_perms (parameters (identifier_self) identifier_self (identifier_username) identifier_username )parameters (block (expression_statement (assignment (identifier_account) identifier_account (call (attribute (identifier_self) identifier_self (identifier_get_account) identifier_get_account )attribute (argument_list (identifier_username) identifier_username )argument_list )call )assignment )expression_statement (return_statement (boolean_operator (identifier_account) identifier_account (call (attribute (identifier_account) identifier_account (identifier_get_perms) identifier_get_perms )attribute (argument_list )argument_list )call )boolean_operator )return_statement )block )function_definition )module
return user permissions