sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_load) function_name_load (parameters (identifier_self) identifier_self (identifier_jamfile_location) identifier_jamfile_location )parameters (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_jamfile_location) identifier_jamfile_location (identifier_basestring) identifier_basestring )argument_list )call )assert_statement (expression_statement (assignment (identifier_absolute) identifier_absolute (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (identifier_os) identifier_os (identifier_getcwd) identifier_getcwd )attribute (argument_list )argument_list )call (identifier_jamfile_location) identifier_jamfile_location )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_absolute) identifier_absolute (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_normpath) identifier_normpath )attribute (argument_list (identifier_absolute) identifier_absolute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_jamfile_location) identifier_jamfile_location (call (attribute (attribute (attribute (identifier_b2) identifier_b2 (identifier_util) identifier_util )attribute (identifier_path) identifier_path )attribute (identifier_relpath) identifier_relpath )attribute (argument_list (call (attribute (identifier_os) identifier_os (identifier_getcwd) identifier_getcwd )attribute (argument_list )argument_list )call (identifier_absolute) identifier_absolute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mname) identifier_mname (call (attribute (identifier_self) identifier_self (identifier_module_name) identifier_module_name )attribute (argument_list (identifier_jamfile_location) identifier_jamfile_location )argument_list )call )assignment )expression_statement (if_statement (not_operator (comparison_operator (identifier_mname) identifier_mname (attribute (identifier_self) identifier_self (identifier_jamfile_modules) identifier_jamfile_modules )attribute )comparison_operator )not_operator (block (if_statement (comparison_operator (string_"--debug-loading") string_"--debug-loading" (call (attribute (attribute (identifier_self) identifier_self (identifier_manager) identifier_manager )attribute (identifier_argv) identifier_argv )attribute (argument_list )argument_list )call )comparison_operator (block (print_statement (binary_operator (string_"Loading Jamfile at '%s'") string_"Loading Jamfile at '%s'" (identifier_jamfile_location) identifier_jamfile_location )binary_operator )print_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_load_jamfile) identifier_load_jamfile )attribute (argument_list (identifier_jamfile_location) identifier_jamfile_location (identifier_mname) identifier_mname )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_load_used_projects) identifier_load_used_projects )attribute (argument_list (identifier_mname) identifier_mname )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_mname) identifier_mname )return_statement )block )function_definition )module
Loads jamfile at the given location. After loading, project global file and jamfile needed by the loaded one will be loaded recursively. If the jamfile at that location is loaded already, does nothing. Returns the project module for the Jamfile.
(module (function_definition (function_name__create_save_scenario_action) function_name__create_save_scenario_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_'save-as-scenario.svg') string_'save-as-scenario.svg' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_action_save_scenario) identifier_action_save_scenario )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_'Save Current Scenario') string_'Save Current Scenario' )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 (assignment (identifier_message) identifier_message (call (attribute (identifier_self) identifier_self (identifier_tr) identifier_tr )attribute (argument_list (string_'Save current scenario to text file') string_'Save current scenario to text file' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_action_save_scenario) identifier_action_save_scenario )attribute (identifier_setStatusTip) identifier_setStatusTip )attribute (argument_list (identifier_message) identifier_message )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_action_save_scenario) identifier_action_save_scenario )attribute (identifier_setWhatsThis) identifier_setWhatsThis )attribute (argument_list (identifier_message) identifier_message )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_action_save_scenario) identifier_action_save_scenario )attribute (identifier_triggered) identifier_triggered )attribute (identifier_connect) identifier_connect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_save_scenario) identifier_save_scenario )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_save_scenario) identifier_action_save_scenario )attribute (keyword_argument (identifier_add_to_toolbar) identifier_add_to_toolbar (attribute (identifier_self) identifier_self (identifier_full_toolbar) identifier_full_toolbar )attribute )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Create action for save scenario dialog.
(module (function_definition (function_name_makePalette) function_name_makePalette (parameters (identifier_color1) identifier_color1 (identifier_color2) identifier_color2 (identifier_N) identifier_N (default_parameter (identifier_hsv) identifier_hsv (True) True )default_parameter )parameters (block (if_statement (identifier_hsv) identifier_hsv (block (expression_statement (assignment (identifier_color1) identifier_color1 (call (identifier_rgb2hsv) identifier_rgb2hsv (argument_list (identifier_color1) identifier_color1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_color2) identifier_color2 (call (identifier_rgb2hsv) identifier_rgb2hsv (argument_list (identifier_color2) identifier_color2 )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_c1) identifier_c1 (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (call (identifier_getColor) identifier_getColor (argument_list (identifier_color1) identifier_color1 )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c2) identifier_c2 (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (call (identifier_getColor) identifier_getColor (argument_list (identifier_color2) identifier_color2 )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cols) identifier_cols (list )list )assignment )expression_statement (for_statement (identifier_f) identifier_f (call (attribute (identifier_np) identifier_np (identifier_linspace) identifier_linspace )attribute (argument_list (integer_0) integer_0 (integer_1) integer_1 (binary_operator (identifier_N) identifier_N (integer_1) integer_1 )binary_operator (keyword_argument (identifier_endpoint) identifier_endpoint (True) True )keyword_argument )argument_list )call (block (expression_statement (assignment (identifier_c) identifier_c (binary_operator (binary_operator (identifier_c1) identifier_c1 (parenthesized_expression (binary_operator (integer_1) integer_1 (identifier_f) identifier_f )binary_operator )parenthesized_expression )binary_operator (binary_operator (identifier_c2) identifier_c2 (identifier_f) identifier_f )binary_operator )binary_operator )assignment )expression_statement (if_statement (identifier_hsv) identifier_hsv (block (expression_statement (assignment (identifier_c) identifier_c (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (call (identifier_hsv2rgb) identifier_hsv2rgb (argument_list (identifier_c) identifier_c )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_cols) identifier_cols (identifier_append) identifier_append )attribute (argument_list (identifier_c) identifier_c )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_cols) identifier_cols )return_statement )block )function_definition )module
Generate N colors starting from `color1` to `color2` by linear interpolation HSV in or RGB spaces. :param int N: number of output colors. :param color1: first rgb color. :param color2: second rgb color. :param bool hsv: if `False`, interpolation is calculated in RGB space. .. hint:: Example: |colorpalette.py|_
(module (function_definition (function_name_split_data) function_name_split_data (parameters (identifier_X) identifier_X (identifier_y) identifier_y (default_parameter (identifier_ratio) identifier_ratio (tuple (float_0.8) float_0.8 (float_0.1) float_0.1 (float_0.1) float_0.1 )tuple )default_parameter )parameters (block (assert_statement (parenthesized_expression (boolean_operator (comparison_operator (call (identifier_sum) identifier_sum (argument_list (identifier_ratio) identifier_ratio )argument_list )call (integer_1) integer_1 )comparison_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_ratio) identifier_ratio )argument_list )call (integer_3) integer_3 )comparison_operator )boolean_operator )parenthesized_expression )assert_statement (expression_statement (assignment (pattern_list (identifier_X_train) identifier_X_train (identifier_X_rest) identifier_X_rest (identifier_y_train) identifier_y_train (identifier_y_rest) identifier_y_rest )pattern_list (call (identifier_train_test_split) identifier_train_test_split (argument_list (identifier_X) identifier_X (identifier_y) identifier_y (keyword_argument (identifier_train_size) identifier_train_size (subscript (identifier_ratio) identifier_ratio (integer_0) integer_0 )subscript )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_X_val) identifier_X_val (identifier_X_test) identifier_X_test (identifier_y_val) identifier_y_val (identifier_y_test) identifier_y_test )pattern_list (call (identifier_train_test_split) identifier_train_test_split (argument_list (identifier_X_rest) identifier_X_rest (identifier_y_rest) identifier_y_rest (keyword_argument (identifier_train_size) identifier_train_size (subscript (identifier_ratio) identifier_ratio (integer_1) integer_1 )subscript )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_X_train) identifier_X_train (identifier_X_val) identifier_X_val (identifier_X_test) identifier_X_test (identifier_y_train) identifier_y_train (identifier_y_val) identifier_y_val (identifier_y_test) identifier_y_test )expression_list )return_statement )block )function_definition )module
Splits data into a training, validation, and test set. Args: X: text data y: data labels ratio: the ratio for splitting. Default: (0.8, 0.1, 0.1) Returns: split data: X_train, X_val, X_test, y_train, y_val, y_test
(module (function_definition (function_name__HasOOOWrite) function_name__HasOOOWrite (parameters (identifier_self) identifier_self (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_size) identifier_size (attribute (call (attribute (attribute (attribute (identifier_tf) identifier_tf (identifier_io) identifier_io )attribute (identifier_gfile) identifier_gfile )attribute (identifier_stat) identifier_stat )attribute (argument_list (identifier_path) identifier_path )argument_list )call (identifier_length) identifier_length )attribute )assignment )expression_statement (expression_statement (assignment (identifier_old_size) identifier_old_size (call (attribute (attribute (identifier_self) identifier_self (identifier__finalized_sizes) identifier__finalized_sizes )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_path) identifier_path (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_size) identifier_size (identifier_old_size) identifier_old_size )comparison_operator (block (if_statement (comparison_operator (identifier_old_size) identifier_old_size (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (concatenated_string (string_'File %s created after file %s even though it\'s ') string_'File %s created after file %s even though it\'s ' (string_'lexicographically earlier') string_'lexicographically earlier' )concatenated_string (identifier_path) identifier_path (attribute (identifier_self) identifier_self (identifier__path) identifier__path )attribute )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (string_'File %s updated even though the current file is %s') string_'File %s updated even though the current file is %s' (identifier_path) identifier_path (attribute (identifier_self) identifier_self (identifier__path) identifier__path )attribute )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (True) True )return_statement )block (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns whether the path has had an out-of-order write.
(module (function_definition (function_name_add_title_translation) function_name_add_title_translation (parameters (identifier_self) identifier_self (identifier_title) identifier_title (identifier_language) identifier_language (default_parameter (identifier_source) identifier_source (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_title_translation) identifier_title_translation (call (attribute (identifier_self) identifier_self (identifier__sourced_dict) identifier__sourced_dict )attribute (argument_list (identifier_source) identifier_source (keyword_argument (identifier_title) identifier_title (identifier_title) identifier_title )keyword_argument (keyword_argument (identifier_language) identifier_language (identifier_language) identifier_language )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__append_to) identifier__append_to )attribute (argument_list (string_'title_translations') string_'title_translations' (identifier_title_translation) identifier_title_translation )argument_list )call )expression_statement )block )function_definition )module
Add title translation. :param title: translated title :type title: string :param language: language for the original title :type language: string (2 characters ISO639-1) :param source: source for the given title :type source: string
(module (function_definition (function_name_getClassInPackageFromName) function_name_getClassInPackageFromName (parameters (identifier_className) identifier_className (identifier_pkg) identifier_pkg )parameters (block (expression_statement (assignment (identifier_n) identifier_n (call (identifier_getAvClassNamesInPackage) identifier_getAvClassNamesInPackage (argument_list (identifier_pkg) identifier_pkg )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_i) identifier_i (call (attribute (identifier_n) identifier_n (identifier_index) identifier_index )attribute (argument_list (identifier_className) identifier_className )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (identifier_getAvailableClassesInPackage) identifier_getAvailableClassesInPackage (argument_list (identifier_pkg) identifier_pkg )argument_list )call )assignment )expression_statement (return_statement (subscript (identifier_c) identifier_c (identifier_i) identifier_i )subscript )return_statement )block )function_definition )module
get a class from name within a package
(module (function_definition (function_name_init_app) function_name_init_app (parameters (identifier_self) identifier_self (identifier_app) identifier_app (default_parameter (identifier_add_context_processor) identifier_add_context_processor (True) True )default_parameter )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_app) identifier_app (string_'login_manager') string_'login_manager' )argument_list )call )not_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_login_manager) identifier_login_manager )attribute (identifier_init_app) identifier_init_app )attribute (argument_list (identifier_app) identifier_app (keyword_argument (identifier_add_context_processor) identifier_add_context_processor (identifier_add_context_processor) identifier_add_context_processor )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_login_manager) identifier_login_manager )attribute (identifier_login_message) identifier_login_message )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_login_manager) identifier_login_manager )attribute (identifier_needs_refresh_message) identifier_needs_refresh_message )attribute (None) None )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_login_manager) identifier_login_manager )attribute (identifier_unauthorized_handler) identifier_unauthorized_handler )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_unauthorized_callback) identifier_unauthorized_callback )attribute )argument_list )call )expression_statement )block )function_definition )module
Initialize with app configuration
(module (function_definition (function_name_available_perm_status) function_name_available_perm_status (parameters (identifier_user) identifier_user )parameters (block (expression_statement (assignment (identifier_roles) identifier_roles (call (identifier_get_user_roles) identifier_get_user_roles (argument_list (identifier_user) identifier_user )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_permission_hash) identifier_permission_hash (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_role) identifier_role (identifier_roles) identifier_roles (block (expression_statement (assignment (identifier_permission_names) identifier_permission_names (call (attribute (identifier_role) identifier_role (identifier_permission_names_list) identifier_permission_names_list )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_permission_name) identifier_permission_name (identifier_permission_names) identifier_permission_names (block (expression_statement (assignment (subscript (identifier_permission_hash) identifier_permission_hash (identifier_permission_name) identifier_permission_name )subscript (comparison_operator (call (identifier_get_permission) identifier_get_permission (argument_list (identifier_permission_name) identifier_permission_name )argument_list )call (call (attribute (attribute (identifier_user) identifier_user (identifier_user_permissions) identifier_user_permissions )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call )comparison_operator )assignment )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_permission_hash) identifier_permission_hash )return_statement )block )function_definition )module
Get a boolean map of the permissions available to a user based on that user's roles.
(module (function_definition (function_name_register_storage_library) function_name_register_storage_library (parameters (typed_parameter (identifier_storage_type) identifier_storage_type (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_c_library) identifier_c_library (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_entry_point) identifier_entry_point (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (None) None )type (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'WalletManager.register_storage_library >>> storage_type %s, c_library %s, entry_point %s') string_'WalletManager.register_storage_library >>> storage_type %s, c_library %s, entry_point %s' (identifier_storage_type) identifier_storage_type (identifier_c_library) identifier_c_library (identifier_entry_point) identifier_entry_point )argument_list )call )expression_statement (try_statement (block (expression_statement (assignment (identifier_stg_lib) identifier_stg_lib (call (identifier_CDLL) identifier_CDLL (argument_list (identifier_c_library) identifier_c_library )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (subscript (identifier_stg_lib) identifier_stg_lib (identifier_entry_point) identifier_entry_point )subscript (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_result) identifier_result (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'WalletManager.register_storage_library <!< indy error code %s on storage library entry at %s') string_'WalletManager.register_storage_library <!< indy error code %s on storage library entry at %s' (identifier_result) identifier_result (identifier_entry_point) identifier_entry_point )argument_list )call )expression_statement (raise_statement (call (identifier_IndyError) identifier_IndyError (argument_list (identifier_result) identifier_result )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_info) identifier_info )attribute (argument_list (string_'Loaded storage library type %s (%s)') string_'Loaded storage library type %s (%s)' (identifier_storage_type) identifier_storage_type (identifier_c_library) identifier_c_library )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_IndyError) identifier_IndyError (as_pattern_target (identifier_x_indy) identifier_x_indy )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'WalletManager.register_storage_library <!< indy error code %s on load of storage library %s %s') string_'WalletManager.register_storage_library <!< indy error code %s on load of storage library %s %s' (attribute (identifier_x_indy) identifier_x_indy (identifier_error_code) identifier_error_code )attribute (identifier_storage_type) identifier_storage_type (identifier_c_library) identifier_c_library )argument_list )call )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'WalletManager.register_storage_library <<<') string_'WalletManager.register_storage_library <<<' )argument_list )call )expression_statement )block )function_definition )module
Load a wallet storage plug-in. An indy-sdk wallet storage plug-in is a shared library; relying parties must explicitly load it before creating or opening a wallet with the plug-in. The implementation loads a dynamic library and calls an entry point; internally, the plug-in calls the indy-sdk wallet async def register_wallet_storage_library(storage_type: str, c_library: str, fn_pfx: str). :param storage_type: wallet storage type :param c_library: plug-in library :param entry_point: function to initialize the library
(module (function_definition (function_name_verify) function_name_verify (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__is_verified) identifier__is_verified )attribute (block (return_statement )return_statement )block )if_statement (for_statement (identifier_proxy) identifier_proxy (call (attribute (attribute (identifier_self) identifier_self (identifier__proxies) identifier__proxies )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_proxy) identifier_proxy (identifier_verify) identifier_verify )attribute (argument_list )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__is_verified) identifier__is_verified )attribute (True) True )assignment )expression_statement )block )function_definition )module
Verifies expectations on all doubled objects. :raise: ``MockExpectationError`` on the first expectation that is not satisfied, if any.
(module (function_definition (function_name_name) function_name_name (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__name) identifier__name )attribute (block (return_statement (attribute (identifier_self) identifier_self (identifier__name) identifier__name )attribute )return_statement )block )if_statement (return_statement (subscript (list_comprehension (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (for_in_clause (identifier_line) identifier_line (call (attribute (attribute (identifier_self) identifier_self (identifier___doc__) identifier___doc__ )attribute (identifier_split) identifier_split )attribute (argument_list (string_"\n") string_"\n" )argument_list )call )for_in_clause (if_clause (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )if_clause )list_comprehension (integer_0) integer_0 )subscript )return_statement )block )function_definition )module
Use the first line of docs string unless name set.
(module (function_definition (function_name_async_put_state) function_name_async_put_state (parameters (identifier_self) identifier_self (typed_parameter (identifier_field) identifier_field (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_data) identifier_data (type (identifier_dict) identifier_dict )type )typed_parameter )parameters (type (identifier_dict) identifier_dict )type (block (expression_statement (assignment (identifier_session) identifier_session (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_put) identifier_put )attribute )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier_api_url) identifier_api_url )attribute (identifier_field) identifier_field )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_jsondata) identifier_jsondata (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response_dict) identifier_response_dict (await (call (identifier_async_request) identifier_async_request (argument_list (identifier_session) identifier_session (identifier_url) identifier_url (keyword_argument (identifier_data) identifier_data (identifier_jsondata) identifier_jsondata )keyword_argument )argument_list )call )await )assignment )expression_statement (return_statement (identifier_response_dict) identifier_response_dict )return_statement )block )function_definition )module
Set state of object in deCONZ. Field is a string representing a specific device in deCONZ e.g. field='/lights/1/state'. Data is a json object with what data you want to alter e.g. data={'on': True}. See Dresden Elektroniks REST API documentation for details: http://dresden-elektronik.github.io/deconz-rest-doc/rest/
(module (function_definition (function_name_save_translations) function_name_save_translations (parameters (identifier_self) identifier_self (identifier_instance) identifier_instance (identifier_translated_data) identifier_translated_data )parameters (block (for_statement (identifier_meta) identifier_meta (attribute (attribute (attribute (identifier_self) identifier_self (identifier_Meta) identifier_Meta )attribute (identifier_model) identifier_model )attribute (identifier__parler_meta) identifier__parler_meta )attribute (block (expression_statement (assignment (identifier_translations) identifier_translations (call (attribute (identifier_translated_data) identifier_translated_data (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_meta) identifier_meta (identifier_rel_name) identifier_rel_name )attribute (dictionary )dictionary )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_lang_code) identifier_lang_code (identifier_model_fields) identifier_model_fields )pattern_list (call (attribute (identifier_translations) identifier_translations (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_translation) identifier_translation (call (attribute (identifier_instance) identifier_instance (identifier__get_translated_model) identifier__get_translated_model )attribute (argument_list (identifier_lang_code) identifier_lang_code (keyword_argument (identifier_auto_create) identifier_auto_create (True) True )keyword_argument (keyword_argument (identifier_meta) identifier_meta (identifier_meta) identifier_meta )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_field) identifier_field (identifier_value) identifier_value )pattern_list (call (attribute (identifier_model_fields) identifier_model_fields (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_translation) identifier_translation (identifier_field) identifier_field (identifier_value) identifier_value )argument_list )call )expression_statement )block )for_statement )block )for_statement )block )for_statement (expression_statement (call (attribute (identifier_instance) identifier_instance (identifier_save_translations) identifier_save_translations )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Save translation data into translation objects.
(module (function_definition (function_name_list) function_name_list (parameters (identifier_self) identifier_self (identifier_wg_uuid) identifier_wg_uuid (default_parameter (identifier_parent) identifier_parent (None) None )default_parameter (default_parameter (identifier_flat) identifier_flat (False) False )default_parameter (default_parameter (identifier_node_types) identifier_node_types (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (string_"%(base)s/%(wg_uuid)s/nodes") string_"%(base)s/%(wg_uuid)s/nodes" (dictionary (pair (string_'base') string_'base' (attribute (identifier_self) identifier_self (identifier_local_base_url) identifier_local_base_url )attribute )pair (pair (string_'wg_uuid') string_'wg_uuid' (identifier_wg_uuid) identifier_wg_uuid )pair )dictionary )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_param) identifier_param (list )list )assignment )expression_statement (if_statement (identifier_parent) identifier_parent (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_parent) identifier_parent (tuple (identifier_list) identifier_list )tuple )argument_list )call (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_parent) identifier_parent )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_parent) identifier_parent (subscript (identifier_parent) identifier_parent (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement )block )if_statement )block )if_statement (expression_statement (call (attribute (identifier_param) identifier_param (identifier_append) identifier_append )attribute (argument_list (tuple (string_"parent") string_"parent" (identifier_parent) identifier_parent )tuple )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_flat) identifier_flat (block (expression_statement (call (attribute (identifier_param) identifier_param (identifier_append) identifier_append )attribute (argument_list (tuple (string_"flat") string_"flat" (True) True )tuple )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_node_types) identifier_node_types (block (for_statement (identifier_node_type) identifier_node_type (identifier_node_types) identifier_node_types (block (expression_statement (call (attribute (identifier_param) identifier_param (identifier_append) identifier_append )attribute (argument_list (tuple (string_"type") string_"type" (identifier_node_type) identifier_node_type )tuple )argument_list )call )expression_statement )block )for_statement )block )if_statement (expression_statement (assignment (identifier_encode) identifier_encode (call (attribute (identifier_urllib) identifier_urllib (identifier_urlencode) identifier_urlencode )attribute (argument_list (identifier_param) identifier_param )argument_list )call )assignment )expression_statement (if_statement (identifier_encode) identifier_encode (block (expression_statement (augmented_assignment (identifier_url) identifier_url (string_"?") string_"?" )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_url) identifier_url (identifier_encode) identifier_encode )augmented_assignment )expression_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_core) identifier_core )attribute (identifier_list) identifier_list )attribute (argument_list (identifier_url) identifier_url )argument_list )call )return_statement )block )function_definition )module
Get a list of workgroup nodes.
(module (function_definition (function_name_pluck) function_name_pluck (parameters (identifier_self) identifier_self (identifier_column) identifier_column )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_self) identifier_self (identifier_first) identifier_first )attribute (argument_list (list (identifier_column) identifier_column )list )argument_list )call )assignment )expression_statement (if_statement (identifier_result) identifier_result (block (return_statement (subscript (identifier_result) identifier_result (identifier_column) identifier_column )subscript )return_statement )block )if_statement )block )function_definition )module
Pluck a single column from the database. :param column: THe column to pluck :type column: str :return: The column value :rtype: mixed
(module (function_definition (function_name_register_value_producer) function_name_register_value_producer (parameters (identifier_self) identifier_self (typed_parameter (identifier_value_name) identifier_value_name (type (identifier_str) identifier_str )type )typed_parameter (typed_default_parameter (identifier_source) identifier_source (type (generic_type (identifier_Callable) identifier_Callable (type_parameter (type (ellipsis_...) ellipsis_... )type (type (attribute (identifier_pd) identifier_pd (identifier_DataFrame) identifier_DataFrame )attribute )type )type_parameter )generic_type )type (None) None )typed_default_parameter (typed_default_parameter (identifier_preferred_combiner) identifier_preferred_combiner (type (identifier_Callable) identifier_Callable )type (identifier_replace_combiner) identifier_replace_combiner )typed_default_parameter (typed_default_parameter (identifier_preferred_post_processor) identifier_preferred_post_processor (type (generic_type (identifier_Callable) identifier_Callable (type_parameter (type (ellipsis_...) ellipsis_... )type (type (attribute (identifier_pd) identifier_pd (identifier_DataFrame) identifier_DataFrame )attribute )type )type_parameter )generic_type )type (None) None )typed_default_parameter )parameters (type (identifier_Pipeline) identifier_Pipeline )type (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__value_manager) identifier__value_manager )attribute (identifier_register_value_producer) identifier_register_value_producer )attribute (argument_list (identifier_value_name) identifier_value_name (identifier_source) identifier_source (identifier_preferred_combiner) identifier_preferred_combiner (identifier_preferred_post_processor) identifier_preferred_post_processor )argument_list )call )return_statement )block )function_definition )module
Marks a ``Callable`` as the producer of a named value. Parameters ---------- value_name : The name of the new dynamic value pipeline. source : A callable source for the dynamic value pipeline. preferred_combiner : A strategy for combining the source and the results of any calls to mutators in the pipeline. ``vivarium`` provides the strategies ``replace_combiner`` (the default), ``list_combiner``, and ``set_combiner`` which are importable from ``vivarium.framework.values``. Client code may define additional strategies as necessary. preferred_post_processor : A strategy for processing the final output of the pipeline. ``vivarium`` provides the strategies ``rescale_post_processor`` and ``joint_value_post_processor`` which are importable from ``vivarium.framework.values``. Client code may define additional strategies as necessary. Returns ------- Callable A callable reference to the named dynamic value pipeline.
(module (function_definition (function_name_initbinset) function_name_initbinset (parameters (identifier_self) identifier_self (default_parameter (identifier_binset) identifier_binset (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_binset) identifier_binset (None) None )comparison_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (binary_operator (string_"(%s) does not have a defined binset in the wavecat table. The waveset of the spectrum will be used instead.") string_"(%s) does not have a defined binset in the wavecat table. The waveset of the spectrum will be used instead." (call (identifier_str) identifier_str (argument_list (attribute (identifier_self) identifier_self (identifier_bandpass) identifier_bandpass )attribute )argument_list )call )binary_operator )assignment )expression_statement (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_binwave) identifier_binwave )attribute (attribute (attribute (identifier_self) identifier_self (identifier_bandpass) identifier_bandpass )attribute (identifier_binset) identifier_binset )attribute )assignment )expression_statement )block (except_clause (tuple (identifier_KeyError) identifier_KeyError (identifier_AttributeError) identifier_AttributeError )tuple (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_binwave) identifier_binwave )attribute (attribute (attribute (identifier_self) identifier_self (identifier_spectrum) identifier_spectrum )attribute (identifier_wave) identifier_wave )attribute )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_msg) identifier_msg )argument_list )call )expression_statement )block )except_clause )try_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_binwave) identifier_binwave )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_binwave) identifier_binwave )attribute (attribute (attribute (identifier_self) identifier_self (identifier_spectrum) identifier_spectrum )attribute (identifier_wave) identifier_wave )attribute )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_msg) identifier_msg )argument_list )call )expression_statement )block )if_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_binwave) identifier_binwave )attribute (identifier_binset) identifier_binset )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Set ``self.binwave``. By default, wavelength values for binning are inherited from bandpass. If the bandpass has no binning information, then source spectrum wavelengths are used. However, if user provides values, then those are used without question. Parameters ---------- binset : array_like or `None` Wavelength values to be used for binning when converting to counts.
(module (function_definition (function_name__auth_plain) function_name__auth_plain (parameters (identifier_self) identifier_self (identifier_username) identifier_username (identifier_password) identifier_password )parameters (block (expression_statement (assignment (identifier_mechanism) identifier_mechanism (string_"PLAIN") string_"PLAIN" )assignment )expression_statement (expression_statement (assignment (identifier_credentials) identifier_credentials (call (attribute (string_"\0{}\0{}") string_"\0{}\0{}" (identifier_format) identifier_format )attribute (argument_list (identifier_username) identifier_username (identifier_password) identifier_password )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_encoded_credentials) identifier_encoded_credentials (call (attribute (identifier_SMTP) identifier_SMTP (identifier_b64enc) identifier_b64enc )attribute (argument_list (identifier_credentials) identifier_credentials )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (pattern_list (identifier_code) identifier_code (identifier_message) identifier_message )pattern_list (await (call (attribute (identifier_self) identifier_self (identifier_do_cmd) identifier_do_cmd )attribute (argument_list (string_"AUTH") string_"AUTH" (identifier_mechanism) identifier_mechanism (identifier_encoded_credentials) identifier_encoded_credentials (keyword_argument (identifier_success) identifier_success (tuple (integer_235) integer_235 (integer_503) integer_503 )tuple )keyword_argument )argument_list )call )await )assignment )expression_statement )block (except_clause (as_pattern (identifier_SMTPCommandFailedError) identifier_SMTPCommandFailedError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_SMTPAuthenticationError) identifier_SMTPAuthenticationError (argument_list (attribute (identifier_e) identifier_e (identifier_code) identifier_code )attribute (attribute (identifier_e) identifier_e (identifier_message) identifier_message )attribute (identifier_mechanism) identifier_mechanism )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (expression_list (identifier_code) identifier_code (identifier_message) identifier_message )expression_list )return_statement )block )function_definition )module
Performs an authentication attempt using the PLAIN mechanism. Protocol: 1. Format the username and password in a suitable way ; 2. The formatted string is base64-encoded ; 3. The string 'AUTH PLAIN' and a space character are prepended to the base64-encoded username and password and sent to the server ; 4. If the server replies with a 235 return code, user is authenticated. Args: username (str): Identifier of the user trying to authenticate. password (str): Password for the user. Raises: ConnectionResetError: If the connection with the server is unexpectedely lost. SMTPAuthenticationError: If the authentication attempt fails. Returns: (int, str): A (code, message) 2-tuple containing the server response.
(module (function_definition (function_name_find) function_name_find (parameters (identifier_self) identifier_self (identifier_node) identifier_node (identifier_path) identifier_path )parameters (block (return_statement (call (attribute (identifier_node) identifier_node (identifier_find) identifier_find )attribute (argument_list (identifier_path) identifier_path (keyword_argument (identifier_namespaces) identifier_namespaces (attribute (identifier_self) identifier_self (identifier_namespaces) identifier_namespaces )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Wrapper for lxml`s find.
(module (function_definition (function_name_querydict_to_multidict) function_name_querydict_to_multidict (parameters (identifier_query_dict) identifier_query_dict (default_parameter (identifier_wrap) identifier_wrap (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_wrap) identifier_wrap (boolean_operator (identifier_wrap) identifier_wrap (parenthesized_expression (lambda (lambda_parameters (identifier_val) identifier_val )lambda_parameters (identifier_val) identifier_val )lambda )parenthesized_expression )boolean_operator )assignment )expression_statement (return_statement (call (identifier_MultiDict) identifier_MultiDict (argument_list (call (attribute (identifier_chain) identifier_chain (identifier_from_iterable) identifier_from_iterable )attribute (generator_expression (call (attribute (attribute (identifier_six) identifier_six (identifier_moves) identifier_moves )attribute (identifier_zip) identifier_zip )attribute (argument_list (call (identifier_repeat) identifier_repeat (argument_list (identifier_key) identifier_key )argument_list )call (generator_expression (call (identifier_wrap) identifier_wrap (argument_list (identifier_v) identifier_v )argument_list )call (for_in_clause (identifier_v) identifier_v (identifier_vals) identifier_vals )for_in_clause )generator_expression )argument_list )call (for_in_clause (pattern_list (identifier_key) identifier_key (identifier_vals) identifier_vals )pattern_list (call (attribute (identifier_six) identifier_six (identifier_iterlists) identifier_iterlists )attribute (argument_list (identifier_query_dict) identifier_query_dict )argument_list )call )for_in_clause )generator_expression )call )argument_list )call )return_statement )block )function_definition )module
Returns a new `webob.MultiDict` from a `django.http.QueryDict`. If `wrap` is provided, it's used to wrap the values.
(module (function_definition (function_name_reverse_complement_sequences) function_name_reverse_complement_sequences (parameters (identifier_records) identifier_records )parameters (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (concatenated_string (string_'Applying _reverse_complement_sequences generator: ') string_'Applying _reverse_complement_sequences generator: ' (string_'transforming sequences into reverse complements.') string_'transforming sequences into reverse complements.' )concatenated_string )argument_list )call )expression_statement (for_statement (identifier_record) identifier_record (identifier_records) identifier_records (block (expression_statement (assignment (identifier_rev_record) identifier_rev_record (call (identifier_SeqRecord) identifier_SeqRecord (argument_list (call (attribute (attribute (identifier_record) identifier_record (identifier_seq) identifier_seq )attribute (identifier_reverse_complement) identifier_reverse_complement )attribute (argument_list )argument_list )call (keyword_argument (identifier_id) identifier_id (attribute (identifier_record) identifier_record (identifier_id) identifier_id )attribute )keyword_argument (keyword_argument (identifier_name) identifier_name (attribute (identifier_record) identifier_record (identifier_name) identifier_name )attribute )keyword_argument (keyword_argument (identifier_description) identifier_description (attribute (identifier_record) identifier_record (identifier_description) identifier_description )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier__reverse_annotations) identifier__reverse_annotations (argument_list (identifier_record) identifier_record (identifier_rev_record) identifier_rev_record )argument_list )call )expression_statement (expression_statement (yield (identifier_rev_record) identifier_rev_record )yield )expression_statement )block )for_statement )block )function_definition )module
Transform sequences into reverse complements.
(module (function_definition (function_name_table_from_cwb) function_name_table_from_cwb (parameters (identifier_source) identifier_source (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (identifier_EventTable) identifier_EventTable (identifier_read) identifier_read )attribute (argument_list (identifier_source) identifier_source (string_'waveburst') string_'waveburst' (list_splat (identifier_args) identifier_args )list_splat (keyword_argument (identifier_format) identifier_format (string_'root') string_'root' )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Read an `EventTable` from a Coherent WaveBurst ROOT file This function just redirects to the format='root' reader with appropriate defaults.
(module (function_definition (function_name_command_exists) function_name_command_exists (parameters (identifier_command) identifier_command )parameters (block (for_statement (pattern_list (identifier_category) identifier_category (identifier_commands) identifier_commands )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (identifier_command_categories) identifier_command_categories )argument_list )call (block (for_statement (identifier_existing_command) identifier_existing_command (identifier_commands) identifier_commands (block (if_statement (call (attribute (identifier_existing_command) identifier_existing_command (identifier_match) identifier_match )attribute (argument_list (identifier_command) identifier_command )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Check if the given command was registered. In another words if it exists.
(module (function_definition (function_name_process_updates) function_name_process_updates (parameters (identifier_self) identifier_self (identifier_updates) identifier_updates (typed_default_parameter (identifier_fast) identifier_fast (type (subscript (attribute (identifier_typing) identifier_typing (identifier_Optional) identifier_Optional )attribute (identifier_bool) identifier_bool )subscript )type (True) True )typed_default_parameter )parameters (block (if_statement (identifier_fast) identifier_fast (block (expression_statement (assignment (identifier_tasks) identifier_tasks (list )list )assignment )expression_statement (for_statement (identifier_update) identifier_update (identifier_updates) identifier_updates (block (expression_statement (call (attribute (identifier_tasks) identifier_tasks (identifier_append) identifier_append )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_updates_handler) identifier_updates_handler )attribute (identifier_notify) identifier_notify )attribute (argument_list (identifier_update) identifier_update )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (await (call (attribute (identifier_asyncio) identifier_asyncio (identifier_gather) identifier_gather )attribute (argument_list (list_splat (identifier_tasks) identifier_tasks )list_splat )argument_list )call )await )return_statement )block )if_statement (expression_statement (assignment (identifier_results) identifier_results (list )list )assignment )expression_statement (for_statement (identifier_update) identifier_update (identifier_updates) identifier_updates (block (expression_statement (call (attribute (identifier_results) identifier_results (identifier_append) identifier_append )attribute (argument_list (await (call (attribute (attribute (identifier_self) identifier_self (identifier_updates_handler) identifier_updates_handler )attribute (identifier_notify) identifier_notify )attribute (argument_list (identifier_update) identifier_update )argument_list )call )await )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
Process list of updates :param updates: :param fast: :return:
(module (function_definition (function_name_color_for_level) function_name_color_for_level (parameters (identifier_level) identifier_level )parameters (block (if_statement (not_operator (identifier_color_available) identifier_color_available )not_operator (block (return_statement (None) None )return_statement )block )if_statement (return_statement (call (attribute (dictionary (pair (attribute (identifier_logging) identifier_logging (identifier_DEBUG) identifier_DEBUG )attribute (attribute (attribute (identifier_colorama) identifier_colorama (identifier_Fore) identifier_Fore )attribute (identifier_WHITE) identifier_WHITE )attribute )pair (pair (attribute (identifier_logging) identifier_logging (identifier_INFO) identifier_INFO )attribute (attribute (attribute (identifier_colorama) identifier_colorama (identifier_Fore) identifier_Fore )attribute (identifier_BLUE) identifier_BLUE )attribute )pair (pair (attribute (identifier_logging) identifier_logging (identifier_WARNING) identifier_WARNING )attribute (attribute (attribute (identifier_colorama) identifier_colorama (identifier_Fore) identifier_Fore )attribute (identifier_YELLOW) identifier_YELLOW )attribute )pair (pair (attribute (identifier_logging) identifier_logging (identifier_ERROR) identifier_ERROR )attribute (attribute (attribute (identifier_colorama) identifier_colorama (identifier_Fore) identifier_Fore )attribute (identifier_RED) identifier_RED )attribute )pair (pair (attribute (identifier_logging) identifier_logging (identifier_CRITICAL) identifier_CRITICAL )attribute (attribute (attribute (identifier_colorama) identifier_colorama (identifier_Fore) identifier_Fore )attribute (identifier_MAGENTA) identifier_MAGENTA )attribute )pair )dictionary (identifier_get) identifier_get )attribute (argument_list (identifier_level) identifier_level (attribute (attribute (identifier_colorama) identifier_colorama (identifier_Fore) identifier_Fore )attribute (identifier_WHITE) identifier_WHITE )attribute )argument_list )call )return_statement )block )function_definition )module
Returns the colorama Fore color for a given log level. If color is not available, returns None.
(module (function_definition (function_name_absent) function_name_absent (parameters (identifier_name) identifier_name (default_parameter (identifier_vhost) identifier_vhost (string_'/') string_'/' )default_parameter (default_parameter (identifier_runas) identifier_runas (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'result') string_'result' (True) True )pair (pair (string_'comment') string_'comment' (string_'') string_'' )pair (pair (string_'changes') string_'changes' (dictionary )dictionary )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_policy_exists) identifier_policy_exists (call (subscript (identifier___salt__) identifier___salt__ (string_'rabbitmq.policy_exists') string_'rabbitmq.policy_exists' )subscript (argument_list (identifier_vhost) identifier_vhost (identifier_name) identifier_name (keyword_argument (identifier_runas) identifier_runas (identifier_runas) identifier_runas )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_policy_exists) identifier_policy_exists )not_operator (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (call (attribute (string_'Policy \'{0} {1}\' is not present.') string_'Policy \'{0} {1}\' is not present.' (identifier_format) identifier_format )attribute (argument_list (identifier_vhost) identifier_vhost (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )if_statement (if_statement (not_operator (subscript (identifier___opts__) identifier___opts__ (string_'test') string_'test' )subscript )not_operator (block (expression_statement (assignment (identifier_result) identifier_result (call (subscript (identifier___salt__) identifier___salt__ (string_'rabbitmq.delete_policy') string_'rabbitmq.delete_policy' )subscript (argument_list (identifier_vhost) identifier_vhost (identifier_name) identifier_name (keyword_argument (identifier_runas) identifier_runas (identifier_runas) identifier_runas )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'Error') string_'Error' (identifier_result) identifier_result )comparison_operator (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (False) False )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (subscript (identifier_result) identifier_result (string_'Error') string_'Error' )subscript )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block (elif_clause (comparison_operator (string_'Deleted') string_'Deleted' (identifier_result) identifier_result )comparison_operator (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (string_'Deleted') string_'Deleted' )assignment )expression_statement )block )elif_clause )if_statement )block )if_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'changes') string_'changes' )subscript (dictionary (pair (string_'new') string_'new' (string_'') string_'' )pair (pair (string_'old') string_'old' (identifier_name) identifier_name )pair )dictionary )assignment )expression_statement (if_statement (subscript (identifier___opts__) identifier___opts__ (string_'test') string_'test' )subscript (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (None) None )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (call (attribute (string_'Policy \'{0} {1}\' will be removed.') string_'Policy \'{0} {1}\' will be removed.' (identifier_format) identifier_format )attribute (argument_list (identifier_vhost) identifier_vhost (identifier_name) identifier_name )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Ensure the named policy is absent Reference: http://www.rabbitmq.com/ha.html name The name of the policy to remove runas Name of the user to run the command as
(module (function_definition (function_name_remove_sonos_playlist) function_name_remove_sonos_playlist (parameters (identifier_self) identifier_self (identifier_sonos_playlist) identifier_sonos_playlist )parameters (block (expression_statement (assignment (identifier_object_id) identifier_object_id (call (identifier_getattr) identifier_getattr (argument_list (identifier_sonos_playlist) identifier_sonos_playlist (string_'item_id') string_'item_id' (identifier_sonos_playlist) identifier_sonos_playlist )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_contentDirectory) identifier_contentDirectory )attribute (identifier_DestroyObject) identifier_DestroyObject )attribute (argument_list (list (tuple (string_'ObjectID') string_'ObjectID' (identifier_object_id) identifier_object_id )tuple )list )argument_list )call )return_statement )block )function_definition )module
Remove a Sonos playlist. Args: sonos_playlist (DidlPlaylistContainer): Sonos playlist to remove or the item_id (str). Returns: bool: True if succesful, False otherwise Raises: SoCoUPnPException: If sonos_playlist does not point to a valid object.
(module (function_definition (function_name_OnActivateReader) function_name_OnActivateReader (parameters (identifier_self) identifier_self (identifier_reader) identifier_reader )parameters (block (expression_statement (call (attribute (identifier_SimpleSCardAppEventObserver) identifier_SimpleSCardAppEventObserver (identifier_OnActivateReader) identifier_OnActivateReader )attribute (argument_list (identifier_self) identifier_self (identifier_reader) identifier_reader )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_feedbacktext) identifier_feedbacktext )attribute (identifier_SetLabel) identifier_SetLabel )attribute (argument_list (binary_operator (string_'Activated reader: ') string_'Activated reader: ' (call (identifier_repr) identifier_repr (argument_list (identifier_reader) identifier_reader )argument_list )call )binary_operator )argument_list )call )expression_statement )block )function_definition )module
Called when a reader is activated by double-clicking on the reader tree control or toolbar.
(module (function_definition (function_name_close) function_name_close (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_stopped) identifier_stopped )attribute (identifier_set) identifier_set )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier_event) identifier_event (attribute (identifier_self) identifier_self (identifier_to_be_stopped) identifier_to_be_stopped )attribute (block (expression_statement (call (attribute (identifier_event) identifier_event (identifier_set) identifier_set )attribute (argument_list )argument_list )call )expression_statement )block )for_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__receiver_thread) identifier__receiver_thread )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__receiver_thread) identifier__receiver_thread )attribute (identifier_join) identifier_join )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__socket) identifier__socket )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Stop the client.
(module (function_definition (function_name_with_respect_to) function_name_with_respect_to (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_order_with_respect_to) identifier_order_with_respect_to )attribute )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_name) identifier_name )argument_list )call )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (return_statement (dictionary )dictionary )return_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_field) identifier_field (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_field) identifier_field (identifier_GenericForeignKey) identifier_GenericForeignKey )argument_list )call (block (expression_statement (assignment (identifier_names) identifier_names (tuple (attribute (identifier_field) identifier_field (identifier_ct_field) identifier_ct_field )attribute (attribute (identifier_field) identifier_field (identifier_fk_field) identifier_fk_field )attribute )tuple )assignment )expression_statement (return_statement (call (identifier_dict) identifier_dict (argument_list (list_comprehension (tuple (identifier_n) identifier_n (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_n) identifier_n )argument_list )call )tuple (for_in_clause (identifier_n) identifier_n (identifier_names) identifier_names )for_in_clause )list_comprehension )argument_list )call )return_statement )block )if_statement (return_statement (dictionary (pair (identifier_name) identifier_name (identifier_value) identifier_value )pair )dictionary )return_statement )block )function_definition )module
Returns a dict to use as a filter for ordering operations containing the original ``Meta.order_with_respect_to`` value if provided. If the field is a Generic Relation, the dict returned contains names and values for looking up the relation's ``ct_field`` and ``fk_field`` attributes.
(module (function_definition (function_name_get_unit_property) function_name_get_unit_property (parameters (identifier_self) identifier_self (identifier_unit_id) identifier_unit_id (identifier_property_name) identifier_property_name )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_unit_id) identifier_unit_id (tuple (identifier_int) identifier_int (attribute (identifier_np) identifier_np (identifier_integer) identifier_integer )attribute )tuple )argument_list )call (block (if_statement (comparison_operator (identifier_unit_id) identifier_unit_id (call (attribute (identifier_self) identifier_self (identifier_get_unit_ids) identifier_get_unit_ids )attribute (argument_list )argument_list )call )comparison_operator (block (if_statement (comparison_operator (identifier_unit_id) identifier_unit_id (attribute (identifier_self) identifier_self (identifier__unit_properties) identifier__unit_properties )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__unit_properties) identifier__unit_properties )attribute (identifier_unit_id) identifier_unit_id )subscript (dictionary )dictionary )assignment )expression_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_property_name) identifier_property_name (identifier_str) identifier_str )argument_list )call (block (if_statement (comparison_operator (identifier_property_name) identifier_property_name (call (identifier_list) identifier_list (argument_list (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__unit_properties) identifier__unit_properties )attribute (identifier_unit_id) identifier_unit_id )subscript (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )comparison_operator (block (return_statement (subscript (subscript (attribute (identifier_self) identifier_self (identifier__unit_properties) identifier__unit_properties )attribute (identifier_unit_id) identifier_unit_id )subscript (identifier_property_name) identifier_property_name )subscript )return_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (binary_operator (call (identifier_str) identifier_str (argument_list (identifier_property_name) identifier_property_name )argument_list )call (string_" has not been added to unit ") string_" has not been added to unit " )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_unit_id) identifier_unit_id )argument_list )call )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (call (identifier_str) identifier_str (argument_list (identifier_property_name) identifier_property_name )argument_list )call (string_" must be a string") string_" must be a string" )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (call (identifier_str) identifier_str (argument_list (identifier_unit_id) identifier_unit_id )argument_list )call (string_" is not a valid unit_id") string_" is not a valid unit_id" )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (call (identifier_str) identifier_str (argument_list (identifier_unit_id) identifier_unit_id )argument_list )call (string_" must be an int") string_" must be an int" )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
This function rerturns the data stored under the property name given from the given unit. Parameters ---------- unit_id: int The unit id for which the property will be returned property_name: str The name of the property Returns ---------- value The data associated with the given property name. Could be many formats as specified by the user.
(module (function_definition (function_name_clear) function_name_clear (parameters (identifier_self) identifier_self (default_parameter (identifier_key) identifier_key (None) None )default_parameter )parameters (block (if_statement (not_operator (attribute (attribute (identifier_self) identifier_self (identifier_options) identifier_options )attribute (identifier_enabled) identifier_enabled )attribute )not_operator (block (return_statement (identifier_CACHE_DISABLED) identifier_CACHE_DISABLED )return_statement )block )if_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_'clear(key={})') string_'clear(key={})' (identifier_format) identifier_format )attribute (argument_list (call (identifier_repr) identifier_repr (argument_list (identifier_key) identifier_key )argument_list )call )argument_list )call )argument_list )call )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_key) identifier_key (None) None )comparison_operator (comparison_operator (identifier_key) identifier_key (call (attribute (attribute (identifier_self) identifier_self (identifier__dict) identifier__dict )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator )boolean_operator (block (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier__dict) identifier__dict )attribute (identifier_key) identifier_key )subscript )delete_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_'cache cleared for key: ') string_'cache cleared for key: ' (call (identifier_repr) identifier_repr (argument_list (identifier_key) identifier_key )argument_list )call )binary_operator )argument_list )call )expression_statement )block (elif_clause (not_operator (identifier_key) identifier_key )not_operator (block (for_statement (identifier_cached_key) identifier_cached_key (list_comprehension (identifier_k) identifier_k (for_in_clause (identifier_k) identifier_k (call (attribute (attribute (identifier_self) identifier_self (identifier__dict) identifier__dict )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension (block (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier__dict) identifier__dict )attribute (identifier_cached_key) identifier_cached_key )subscript )delete_statement )block )for_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_'cache cleared for ALL keys') string_'cache cleared for ALL keys' )argument_list )call )expression_statement )block )elif_clause )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Clear a cache entry, or the entire cache if no key is given Returns CACHE_DISABLED if the cache is disabled Returns True on successful operation :param key: optional key to limit the clear operation to (defaults to None)
(module (function_definition (function_name__get_response) function_name__get_response (parameters (identifier_self) identifier_self (identifier_connection) identifier_connection )parameters (block (expression_statement (assignment (identifier_response_header) identifier_response_header (call (attribute (identifier_self) identifier_self (identifier__receive) identifier__receive )attribute (argument_list (identifier_connection) identifier_connection (integer_13) integer_13 )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_'Response header: %s') string_'Response header: %s' (identifier_response_header) identifier_response_header )argument_list )call )expression_statement (if_statement (parenthesized_expression (boolean_operator (not_operator (call (attribute (identifier_response_header) identifier_response_header (identifier_startswith) identifier_startswith )attribute (argument_list (string_b'ZBXD\x01') string_b'ZBXD\x01' )argument_list )call )not_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_response_header) identifier_response_header )argument_list )call (integer_13) integer_13 )comparison_operator )boolean_operator )parenthesized_expression (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_'Zabbix return not valid response.') string_'Zabbix return not valid response.' )argument_list )call )expression_statement (expression_statement (assignment (identifier_result) identifier_result (False) False )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_response_len) identifier_response_len (subscript (call (attribute (identifier_struct) identifier_struct (identifier_unpack) identifier_unpack )attribute (argument_list (string_'<Q') string_'<Q' (subscript (identifier_response_header) identifier_response_header (slice (integer_5) integer_5 (colon) colon )slice )subscript )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_response_body) identifier_response_body (call (attribute (identifier_connection) identifier_connection (identifier_recv) identifier_recv )attribute (argument_list (identifier_response_len) identifier_response_len )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (call (attribute (identifier_response_body) identifier_response_body (identifier_decode) identifier_decode )attribute (argument_list (string_"utf-8") string_"utf-8" )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_'Data received: %s') string_'Data received: %s' (identifier_result) identifier_result )argument_list )call )expression_statement )block )else_clause )if_statement (try_statement (block (expression_statement (call (attribute (identifier_connection) identifier_connection (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Get response from zabbix server, reads from self.socket. :type connection: :class:`socket._socketobject` :param connection: Socket to read. :rtype: dict :return: Response from zabbix server or False in case of error.
(module (function_definition (function_name_byte_adaptor) function_name_byte_adaptor (parameters (identifier_fbuffer) identifier_fbuffer )parameters (block (if_statement (attribute (identifier_six) identifier_six (identifier_PY3) identifier_PY3 )attribute (block (expression_statement (assignment (identifier_strings) identifier_strings (call (attribute (call (attribute (identifier_fbuffer) identifier_fbuffer (identifier_read) identifier_read )attribute (argument_list )argument_list )call (identifier_decode) identifier_decode )attribute (argument_list (string_'latin-1') string_'latin-1' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fbuffer) identifier_fbuffer (call (attribute (identifier_six) identifier_six (identifier_StringIO) identifier_StringIO )attribute (argument_list (identifier_strings) identifier_strings )argument_list )call )assignment )expression_statement (return_statement (identifier_fbuffer) identifier_fbuffer )return_statement )block (else_clause (block (return_statement (identifier_fbuffer) identifier_fbuffer )return_statement )block )else_clause )if_statement )block )function_definition )module
provides py3 compatibility by converting byte based file stream to string based file stream Arguments: fbuffer: file like objects containing bytes Returns: string buffer
(module (function_definition (function_name_find_one) function_name_find_one (parameters (identifier_self) identifier_self (default_parameter (identifier_filter) identifier_filter (None) None )default_parameter (default_parameter (identifier_fields) identifier_fields (None) None )default_parameter (default_parameter (identifier_skip) identifier_skip (integer_0) integer_0 )default_parameter (default_parameter (identifier_sort) identifier_sort (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_self) identifier_self (identifier_find) identifier_find )attribute (argument_list (keyword_argument (identifier_filter) identifier_filter (identifier_filter) identifier_filter )keyword_argument (keyword_argument (identifier_fields) identifier_fields (identifier_fields) identifier_fields )keyword_argument (keyword_argument (identifier_skip) identifier_skip (identifier_skip) identifier_skip )keyword_argument (keyword_argument (identifier_limit) identifier_limit (integer_1) integer_1 )keyword_argument (keyword_argument (identifier_sort) identifier_sort (identifier_sort) identifier_sort )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_result) identifier_result )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement (subscript (identifier_result) identifier_result (integer_0) integer_0 )subscript )return_statement )block (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement )block )function_definition )module
Similar to find. This method will only retrieve one row. If no row matches, returns None
(module (function_definition (function_name_image) function_name_image (parameters (identifier_cam) identifier_cam )parameters (block (expression_statement (yield (call (attribute (identifier_marv) identifier_marv (identifier_set_header) identifier_set_header )attribute (argument_list (keyword_argument (identifier_title) identifier_title (attribute (identifier_cam) identifier_cam (identifier_topic) identifier_topic )attribute )keyword_argument )argument_list )call )yield )expression_statement (expression_statement (assignment (identifier_msg) identifier_msg (yield (call (attribute (identifier_marv) identifier_marv (identifier_pull) identifier_pull )attribute (argument_list (identifier_cam) identifier_cam )argument_list )call )yield )assignment )expression_statement (if_statement (comparison_operator (identifier_msg) identifier_msg (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_pytype) identifier_pytype (call (identifier_get_message_type) identifier_get_message_type (argument_list (identifier_cam) identifier_cam )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rosmsg) identifier_rosmsg (call (identifier_pytype) identifier_pytype (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_rosmsg) identifier_rosmsg (identifier_deserialize) identifier_deserialize )attribute (argument_list (attribute (identifier_msg) identifier_msg (identifier_data) identifier_data )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_name) identifier_name (call (attribute (string_'{}.jpg') string_'{}.jpg' (identifier_format) identifier_format )attribute (argument_list (subscript (call (attribute (attribute (identifier_cam) identifier_cam (identifier_topic) identifier_topic )attribute (identifier_replace) identifier_replace )attribute (argument_list (string_'/') string_'/' (string_':') string_':' )argument_list )call (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_imgfile) identifier_imgfile (yield (call (attribute (identifier_marv) identifier_marv (identifier_make_file) identifier_make_file )attribute (argument_list (identifier_name) identifier_name )argument_list )call )yield )assignment )expression_statement (expression_statement (assignment (identifier_img) identifier_img (call (identifier_imgmsg_to_cv2) identifier_imgmsg_to_cv2 (argument_list (identifier_rosmsg) identifier_rosmsg (string_"rgb8") string_"rgb8" )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cv2) identifier_cv2 (identifier_imwrite) identifier_imwrite )attribute (argument_list (attribute (identifier_imgfile) identifier_imgfile (identifier_path) identifier_path )attribute (identifier_img) identifier_img (tuple (attribute (identifier_cv2) identifier_cv2 (identifier_IMWRITE_JPEG_QUALITY) identifier_IMWRITE_JPEG_QUALITY )attribute (integer_60) integer_60 )tuple )argument_list )call )expression_statement (expression_statement (yield (call (attribute (identifier_marv) identifier_marv (identifier_push) identifier_push )attribute (argument_list (identifier_imgfile) identifier_imgfile )argument_list )call )yield )expression_statement )block )function_definition )module
Extract first image of input stream to jpg file. Args: cam: Input stream of raw rosbag messages. Returns: File instance for first image of input stream.
(module (function_definition (function_name_file_content_list) function_name_file_content_list (parameters (identifier_self) identifier_self (identifier_project) identifier_project )parameters (block (expression_statement (assignment (identifier_project_list) identifier_project_list (False) False )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_load_project_flag_list_file) identifier_load_project_flag_list_file )attribute (argument_list (call (attribute (identifier_il) identifier_il (identifier_get) identifier_get )attribute (argument_list (string_'project_exceptions') string_'project_exceptions' )argument_list )call (identifier_project) identifier_project )argument_list )call )expression_statement (try_statement (block (expression_statement (assignment (identifier_flag_list) identifier_flag_list (parenthesized_expression (subscript (subscript (identifier_fl) identifier_fl (string_'file_audits') string_'file_audits' )subscript (string_'file_contents') string_'file_contents' )subscript )parenthesized_expression )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (string_'Key Error processing file_contents list values') string_'Key Error processing file_contents list values' )argument_list )call )expression_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (identifier_ignore_list) identifier_ignore_list (subscript (subscript (identifier_il) identifier_il (string_'file_audits') string_'file_audits' )subscript (string_'file_contents') string_'file_contents' )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (string_'Key Error processing file_contents list values') string_'Key Error processing file_contents list values' )argument_list )call )expression_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (identifier_project_list) identifier_project_list (subscript (subscript (subscript (identifier_fl) identifier_fl (string_'file_audits') string_'file_audits' )subscript (identifier_project) identifier_project )subscript (string_'file_contents') string_'file_contents' )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_'Loaded %s specific file_contents entries') string_'Loaded %s specific file_contents entries' (identifier_project) identifier_project )argument_list )call )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_'No project specific file_contents section for project %s') string_'No project specific file_contents section for project %s' (identifier_project) identifier_project )argument_list )call )expression_statement )block )except_clause )try_statement (if_statement (identifier_project_list) identifier_project_list (block (expression_statement (assignment (identifier_ignore_list_merge) identifier_ignore_list_merge (binary_operator (identifier_project_list) identifier_project_list (identifier_ignore_list) identifier_ignore_list )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_ignore_list_re) identifier_ignore_list_re (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (call (attribute (string_"|") string_"|" (identifier_join) identifier_join )attribute (argument_list (identifier_ignore_list_merge) identifier_ignore_list_merge )argument_list )call (keyword_argument (identifier_flags) identifier_flags (attribute (identifier_re) identifier_re (identifier_IGNORECASE) identifier_IGNORECASE )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_flag_list) identifier_flag_list (identifier_ignore_list_re) identifier_ignore_list_re )expression_list )return_statement )block (else_clause (block (expression_statement (assignment (identifier_ignore_list_re) identifier_ignore_list_re (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (call (attribute (string_"|") string_"|" (identifier_join) identifier_join )attribute (argument_list (identifier_ignore_list) identifier_ignore_list )argument_list )call (keyword_argument (identifier_flags) identifier_flags (attribute (identifier_re) identifier_re (identifier_IGNORECASE) identifier_IGNORECASE )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_flag_list) identifier_flag_list (identifier_ignore_list_re) identifier_ignore_list_re )expression_list )return_statement )block )else_clause )if_statement )block )function_definition )module
gathers content strings
(module (function_definition (function_name_rytov_sc) function_name_rytov_sc (parameters (default_parameter (identifier_radius) identifier_radius (float_5e-6) float_5e-6 )default_parameter (default_parameter (identifier_sphere_index) identifier_sphere_index (float_1.339) float_1.339 )default_parameter (default_parameter (identifier_medium_index) identifier_medium_index (float_1.333) float_1.333 )default_parameter (default_parameter (identifier_wavelength) identifier_wavelength (float_550e-9) float_550e-9 )default_parameter (default_parameter (identifier_pixel_size) identifier_pixel_size (float_1e-7) float_1e-7 )default_parameter (default_parameter (identifier_grid_size) identifier_grid_size (tuple (integer_80) integer_80 (integer_80) integer_80 )tuple )default_parameter (default_parameter (identifier_center) identifier_center (tuple (float_39.5) float_39.5 (float_39.5) float_39.5 )tuple )default_parameter (default_parameter (identifier_radius_sampling) identifier_radius_sampling (integer_42) integer_42 )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (pattern_list (identifier_r_ryt) identifier_r_ryt (identifier_n_ryt) identifier_n_ryt )pattern_list (call (identifier_correct_rytov_sc_input) identifier_correct_rytov_sc_input (argument_list (keyword_argument (identifier_radius_sc) identifier_radius_sc (identifier_radius) identifier_radius )keyword_argument (keyword_argument (identifier_sphere_index_sc) identifier_sphere_index_sc (identifier_sphere_index) identifier_sphere_index )keyword_argument (keyword_argument (identifier_medium_index) identifier_medium_index (identifier_medium_index) identifier_medium_index )keyword_argument (keyword_argument (identifier_radius_sampling) identifier_radius_sampling (identifier_radius_sampling) identifier_radius_sampling )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_qpi) identifier_qpi (call (attribute (identifier_mod_rytov) identifier_mod_rytov (identifier_rytov) identifier_rytov )attribute (argument_list (keyword_argument (identifier_radius) identifier_radius (identifier_r_ryt) identifier_r_ryt )keyword_argument (keyword_argument (identifier_sphere_index) identifier_sphere_index (identifier_n_ryt) identifier_n_ryt )keyword_argument (keyword_argument (identifier_medium_index) identifier_medium_index (identifier_medium_index) identifier_medium_index )keyword_argument (keyword_argument (identifier_wavelength) identifier_wavelength (identifier_wavelength) identifier_wavelength )keyword_argument (keyword_argument (identifier_pixel_size) identifier_pixel_size (identifier_pixel_size) identifier_pixel_size )keyword_argument (keyword_argument (identifier_grid_size) identifier_grid_size (identifier_grid_size) identifier_grid_size )keyword_argument (keyword_argument (identifier_center) identifier_center (identifier_center) identifier_center )keyword_argument (keyword_argument (identifier_radius_sampling) identifier_radius_sampling (identifier_radius_sampling) identifier_radius_sampling )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_qpi) identifier_qpi (string_"sim radius") string_"sim radius" )subscript (identifier_radius) identifier_radius )assignment )expression_statement (expression_statement (assignment (subscript (identifier_qpi) identifier_qpi (string_"sim index") string_"sim index" )subscript (identifier_sphere_index) identifier_sphere_index )assignment )expression_statement (expression_statement (assignment (subscript (identifier_qpi) identifier_qpi (string_"sim model") string_"sim model" )subscript (string_"rytov-sc") string_"rytov-sc" )assignment )expression_statement (return_statement (identifier_qpi) identifier_qpi )return_statement )block )function_definition )module
r"""Field behind a dielectric sphere, systematically corrected Rytov This method implements a correction of :func:`qpsphere.models.rytov`, where the `radius` :math:`r_\text{Ryt}` and the `sphere_index` :math:`n_\text{Ryt}` are corrected using the approach described in :cite:`Mueller2018` (eqns. 3,4, and 5). .. math:: n_\text{Ryt-SC} &= n_\text{Ryt} + n_\text{med} \cdot \left( a_n x^2 + b_n x + c_n \right) r_\text{Ryt-SC} &= r_\text{Ryt} \cdot \left( a_r x^2 +b_r x + c_r \right) &\text{with} x = \frac{n_\text{Ryt}}{n_\text{med}} - 1 The correction factors are given in :data:`qpsphere.models.mod_rytov_sc.RSC_PARAMS`. Parameters ---------- radius: float Radius of the sphere [m] sphere_index: float Refractive index of the sphere medium_index: float Refractive index of the surrounding medium wavelength: float Vacuum wavelength of the imaging light [m] pixel_size: float Pixel size [m] grid_size: tuple of floats Resulting image size in x and y [px] center: tuple of floats Center position in image coordinates [px] radius_sampling: int Number of pixels used to sample the sphere radius when computing the Rytov field. The default value of 42 pixels is a reasonable number for single-cell analysis. Returns ------- qpi: qpimage.QPImage Quantitative phase data set
(module (function_definition (function_name_validate_word) function_name_validate_word (parameters (identifier_self) identifier_self (identifier_word) identifier_word )parameters (block (while_statement (identifier_word) identifier_word (block (expression_statement (assignment (identifier_match) identifier_match (call (attribute (attribute (identifier_self) identifier_self (identifier_seg_regex) identifier_seg_regex )attribute (identifier_match) identifier_match )attribute (argument_list (identifier_word) identifier_word )argument_list )call )assignment )expression_statement (if_statement (identifier_match) identifier_match (block (expression_statement (assignment (identifier_word) identifier_word (subscript (identifier_word) identifier_word (slice (call (identifier_len) identifier_len (argument_list (call (attribute (identifier_match) identifier_match (identifier_group) identifier_group )attribute (argument_list (integer_0) integer_0 )argument_list )call )argument_list )call (colon) colon )slice )subscript )assignment )expression_statement )block (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block )while_statement (return_statement (True) True )return_statement )block )function_definition )module
Returns True if `word` consists exhaustively of valid IPA segments Args: word (unicode): input word as Unicode IPA string Returns: bool: True if `word` can be divided exhaustively into IPA segments that exist in the database
(module (function_definition (function_name_did_you_mean) function_name_did_you_mean (parameters (identifier_unknown_command) identifier_unknown_command (identifier_entry_points) identifier_entry_points )parameters (block (import_from_statement (dotted_name (identifier_difflib) identifier_difflib )dotted_name (dotted_name (identifier_SequenceMatcher) identifier_SequenceMatcher )dotted_name )import_from_statement (expression_statement (assignment (identifier_similarity) identifier_similarity (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (call (attribute (call (identifier_SequenceMatcher) identifier_SequenceMatcher (argument_list (None) None (identifier_x) identifier_x (identifier_unknown_command) identifier_unknown_command )argument_list )call (identifier_ratio) identifier_ratio )attribute (argument_list )argument_list )call )lambda )assignment )expression_statement (expression_statement (assignment (identifier_did_you_mean) identifier_did_you_mean (call (identifier_sorted) identifier_sorted (argument_list (identifier_entry_points) identifier_entry_points (keyword_argument (identifier_key) identifier_key (identifier_similarity) identifier_similarity )keyword_argument (keyword_argument (identifier_reverse) identifier_reverse (True) True )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (subscript (identifier_did_you_mean) identifier_did_you_mean (integer_0) integer_0 )subscript )return_statement )block )function_definition )module
Return the command with the name most similar to what the user typed. This is used to suggest a correct command when the user types an illegal command.
(module (function_definition (function_name_block_specification_to_number) function_name_block_specification_to_number (parameters (typed_parameter (identifier_block) identifier_block (type (identifier_BlockSpecification) identifier_BlockSpecification )type )typed_parameter (typed_parameter (identifier_web3) identifier_web3 (type (identifier_Web3) identifier_Web3 )type )typed_parameter )parameters (type (identifier_BlockNumber) identifier_BlockNumber )type (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_block) identifier_block (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_msg) identifier_msg (string_f"string block specification can't contain {block}") string_f"string block specification can't contain {block}" )assignment )expression_statement (assert_statement (comparison_operator (identifier_block) identifier_block (tuple (string_'latest') string_'latest' (string_'pending') string_'pending' )tuple )comparison_operator (identifier_msg) identifier_msg )assert_statement (expression_statement (assignment (identifier_number) identifier_number (subscript (call (attribute (attribute (identifier_web3) identifier_web3 (identifier_eth) identifier_eth )attribute (identifier_getBlock) identifier_getBlock )attribute (argument_list (identifier_block) identifier_block )argument_list )call (string_'number') string_'number' )subscript )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_block) identifier_block (identifier_T_BlockHash) identifier_T_BlockHash )argument_list )call (block (expression_statement (assignment (identifier_number) identifier_number (subscript (call (attribute (attribute (identifier_web3) identifier_web3 (identifier_eth) identifier_eth )attribute (identifier_getBlock) identifier_getBlock )attribute (argument_list (identifier_block) identifier_block )argument_list )call (string_'number') string_'number' )subscript )assignment )expression_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_block) identifier_block (identifier_T_BlockNumber) identifier_T_BlockNumber )argument_list )call (block (expression_statement (assignment (identifier_number) identifier_number (identifier_block) identifier_block )assignment )expression_statement )block )elif_clause (else_clause (block (if_statement (identifier___debug__) identifier___debug__ (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (string_f'Unknown type {type(block)} given for block specification') string_f'Unknown type {type(block)} given for block specification' )argument_list )call )raise_statement )block )if_statement )block )else_clause )if_statement (return_statement (call (identifier_BlockNumber) identifier_BlockNumber (argument_list (identifier_number) identifier_number )argument_list )call )return_statement )block )function_definition )module
Converts a block specification to an actual block number
(module (function_definition (function_name_from_requirement) function_name_from_requirement (parameters (identifier_cls) identifier_cls (identifier_provider) identifier_provider (identifier_requirement) identifier_requirement (identifier_parent) identifier_parent )parameters (block (expression_statement (assignment (identifier_candidates) identifier_candidates (call (attribute (identifier_provider) identifier_provider (identifier_find_matches) identifier_find_matches )attribute (argument_list (identifier_requirement) identifier_requirement )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_candidates) identifier_candidates )not_operator (block (raise_statement (call (identifier_NoVersionsAvailable) identifier_NoVersionsAvailable (argument_list (identifier_requirement) identifier_requirement (identifier_parent) identifier_parent )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (keyword_argument (identifier_candidates) identifier_candidates (identifier_candidates) identifier_candidates )keyword_argument (keyword_argument (identifier_information) identifier_information (list (call (identifier_RequirementInformation) identifier_RequirementInformation (argument_list (identifier_requirement) identifier_requirement (identifier_parent) identifier_parent )argument_list )call )list )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Build an instance from a requirement.
(module (function_definition (function_name_job) function_name_job (parameters (identifier_name) identifier_name (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (identifier_task) identifier_task (argument_list (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_schedulable) identifier_schedulable (True) True )keyword_argument (keyword_argument (identifier_base) identifier_base (identifier_JobTask) identifier_JobTask )keyword_argument (keyword_argument (identifier_bind) identifier_bind (True) True )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
A shortcut decorator for declaring jobs
(module (function_definition (function_name_get_modpath_from_modname) function_name_get_modpath_from_modname (parameters (identifier_modname) identifier_modname (default_parameter (identifier_prefer_pkg) identifier_prefer_pkg (False) False )default_parameter (default_parameter (identifier_prefer_main) identifier_prefer_main (False) False )default_parameter )parameters (block (import_from_statement (dotted_name (identifier_os) identifier_os (identifier_path) identifier_path )dotted_name (dotted_name (identifier_dirname) identifier_dirname )dotted_name (dotted_name (identifier_basename) identifier_basename )dotted_name (dotted_name (identifier_join) identifier_join )dotted_name (dotted_name (identifier_exists) identifier_exists )dotted_name )import_from_statement (expression_statement (assignment (identifier_initname) identifier_initname (string_'__init__.py') string_'__init__.py' )assignment )expression_statement (expression_statement (assignment (identifier_mainname) identifier_mainname (string_'__main__.py') string_'__main__.py' )assignment )expression_statement (if_statement (comparison_operator (identifier_modname) identifier_modname (attribute (identifier_sys) identifier_sys (identifier_modules) identifier_modules )attribute )comparison_operator (block (expression_statement (assignment (identifier_modpath) identifier_modpath (call (attribute (attribute (subscript (attribute (identifier_sys) identifier_sys (identifier_modules) identifier_modules )attribute (identifier_modname) identifier_modname )subscript (identifier___file__) identifier___file__ )attribute (identifier_replace) identifier_replace )attribute (argument_list (string_'.pyc') string_'.pyc' (string_'.py') string_'.py' )argument_list )call )assignment )expression_statement )block (else_clause (block (import_statement (dotted_name (identifier_pkgutil) identifier_pkgutil )dotted_name )import_statement (expression_statement (assignment (identifier_loader) identifier_loader (call (attribute (identifier_pkgutil) identifier_pkgutil (identifier_find_loader) identifier_find_loader )attribute (argument_list (identifier_modname) identifier_modname )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_modpath) identifier_modpath (call (attribute (attribute (identifier_loader) identifier_loader (identifier_filename) identifier_filename )attribute (identifier_replace) identifier_replace )attribute (argument_list (string_'.pyc') string_'.pyc' (string_'.py') string_'.py' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'.') string_'.' (call (identifier_basename) identifier_basename (argument_list (identifier_modpath) identifier_modpath )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_modpath) identifier_modpath (call (identifier_join) identifier_join (argument_list (identifier_modpath) identifier_modpath (identifier_initname) identifier_initname )argument_list )call )assignment )expression_statement )block )if_statement )block )else_clause )if_statement (if_statement (identifier_prefer_pkg) identifier_prefer_pkg (block (if_statement (boolean_operator (call (attribute (identifier_modpath) identifier_modpath (identifier_endswith) identifier_endswith )attribute (argument_list (identifier_initname) identifier_initname )argument_list )call (call (attribute (identifier_modpath) identifier_modpath (identifier_endswith) identifier_endswith )attribute (argument_list (identifier_mainname) identifier_mainname )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_modpath) identifier_modpath (call (identifier_dirname) identifier_dirname (argument_list (identifier_modpath) identifier_modpath )argument_list )call )assignment )expression_statement )block )if_statement )block )if_statement (if_statement (identifier_prefer_main) identifier_prefer_main (block (if_statement (call (attribute (identifier_modpath) identifier_modpath (identifier_endswith) identifier_endswith )attribute (argument_list (identifier_initname) identifier_initname )argument_list )call (block (expression_statement (assignment (identifier_main_modpath) identifier_main_modpath (binary_operator (subscript (identifier_modpath) identifier_modpath (slice (colon) colon (unary_operator (call (identifier_len) identifier_len (argument_list (identifier_initname) identifier_initname )argument_list )call )unary_operator )slice )subscript (identifier_mainname) identifier_mainname )binary_operator )assignment )expression_statement (if_statement (call (identifier_exists) identifier_exists (argument_list (identifier_main_modpath) identifier_main_modpath )argument_list )call (block (expression_statement (assignment (identifier_modpath) identifier_modpath (identifier_main_modpath) identifier_main_modpath )assignment )expression_statement )block )if_statement )block )if_statement )block )if_statement (return_statement (identifier_modpath) identifier_modpath )return_statement )block )function_definition )module
Same as get_modpath but doesnt import directly SeeAlso: get_modpath
(module (function_definition (function_name__close_app) function_name__close_app (parameters (identifier_app) identifier_app (identifier_mongo_client) identifier_mongo_client (identifier_client) identifier_client )parameters (block (expression_statement (call (attribute (identifier_app) identifier_app (identifier_stop) identifier_stop )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_client) identifier_client (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_mongo_client) identifier_mongo_client (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Ensures that the app is properly closed
(module (function_definition (function_name_htmresearchCorePrereleaseInstalled) function_name_htmresearchCorePrereleaseInstalled (parameters )parameters (block (try_statement (block (expression_statement (assignment (identifier_coreDistribution) identifier_coreDistribution (call (attribute (identifier_pkg_resources) identifier_pkg_resources (identifier_get_distribution) identifier_get_distribution )attribute (argument_list (string_"htmresearch-core") string_"htmresearch-core" )argument_list )call )assignment )expression_statement (if_statement (attribute (call (attribute (identifier_pkg_resources) identifier_pkg_resources (identifier_parse_version) identifier_parse_version )attribute (argument_list (attribute (identifier_coreDistribution) identifier_coreDistribution (identifier_version) identifier_version )attribute )argument_list )call (identifier_is_prerelease) identifier_is_prerelease )attribute (block (return_statement (True) True )return_statement )block )if_statement )block (except_clause (attribute (identifier_pkg_resources) identifier_pkg_resources (identifier_DistributionNotFound) identifier_DistributionNotFound )attribute (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement (False) False )return_statement )block )function_definition )module
Make an attempt to determine if a pre-release version of htmresearch-core is installed already. @return: boolean
(module (function_definition (function_name_cursor_after) function_name_cursor_after (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier__cursor_after) identifier__cursor_after )attribute (identifier_BaseException) identifier_BaseException )argument_list )call (block (raise_statement (attribute (identifier_self) identifier_self (identifier__cursor_after) identifier__cursor_after )attribute )raise_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__cursor_after) identifier__cursor_after )attribute )return_statement )block )function_definition )module
Return the cursor after the current item. You must pass a QueryOptions object with produce_cursors=True for this to work. If there is no cursor or no current item, raise BadArgumentError. Before next() has returned there is no cursor. Once the loop is exhausted, this returns the cursor after the last item.
(module (function_definition (function_name_unregister_listener) function_name_unregister_listener (parameters (identifier_self) identifier_self (identifier_address) identifier_address (identifier_func) identifier_func )parameters (block (expression_statement (assignment (identifier_listeners) identifier_listeners (subscript (attribute (identifier_self) identifier_self (identifier_address_listeners) identifier_address_listeners )attribute (identifier_address) identifier_address )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_listeners) identifier_listeners (None) None )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (comparison_operator (identifier_func) identifier_func (identifier_listeners) identifier_listeners )comparison_operator (block (expression_statement (call (attribute (identifier_listeners) identifier_listeners (identifier_remove) identifier_remove )attribute (argument_list (identifier_func) identifier_func )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Removes a listener function for a given address Remove the listener for the given address. Returns true if the listener was found and removed, false otherwise
(module (function_definition (function_name__format_generic) function_name__format_generic (parameters (identifier_lines) identifier_lines (identifier_element) identifier_element (identifier_printed) identifier_printed (default_parameter (identifier_spacer) identifier_spacer (string_"") string_"" )default_parameter )parameters (block (for_statement (identifier_doc) identifier_doc (attribute (identifier_element) identifier_element (identifier_docstring) identifier_docstring )attribute (block (if_statement (comparison_operator (call (attribute (attribute (identifier_doc) identifier_doc (identifier_doctype) identifier_doctype )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_printed) identifier_printed )comparison_operator (block (expression_statement (call (attribute (identifier_lines) identifier_lines (identifier_append) identifier_append )attribute (argument_list (binary_operator (identifier_spacer) identifier_spacer (call (attribute (identifier_doc) identifier_doc (identifier___str__) identifier___str__ )attribute (argument_list )argument_list )call )binary_operator )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Generically formats all remaining docstrings and custom XML tags that don't appear in the list of already printed documentation. :arg printed: a list of XML tags for the element that have already been handled by a higher method.
(module (function_definition (function_name_wash_html_id) function_name_wash_html_id (parameters (identifier_dirty) identifier_dirty )parameters (block (import_statement (dotted_name (identifier_re) identifier_re )dotted_name )import_statement (if_statement (not_operator (call (attribute (subscript (identifier_dirty) identifier_dirty (integer_0) integer_0 )subscript (identifier_isalpha) identifier_isalpha )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (assignment (identifier_dirty) identifier_dirty (binary_operator (string_'i') string_'i' (identifier_dirty) identifier_dirty )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_non_word) identifier_non_word (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (string_r'[^\w]+') string_r'[^\w]+' )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_non_word) identifier_non_word (identifier_sub) identifier_sub )attribute (argument_list (string_'') string_'' (identifier_dirty) identifier_dirty )argument_list )call )return_statement )block )function_definition )module
Strip non-alphabetic or newline characters from a given string. It can be used as a HTML element ID (also with jQuery and in all browsers). :param dirty: the string to wash :returns: the HTML ID ready string
(module (function_definition (function_name__build_sentence) function_name__build_sentence (parameters (identifier_word) identifier_word )parameters (block (return_statement (call (attribute (parenthesized_expression (concatenated_string (string_"(?:{word}|[{non_stops}]|(?<![{stops} ]) )+") string_"(?:{word}|[{non_stops}]|(?<![{stops} ]) )+" (string_"[{stops}]['\"\]\}}\)]*") string_"[{stops}]['\"\]\}}\)]*" )concatenated_string )parenthesized_expression (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_word) identifier_word (identifier_word) identifier_word )keyword_argument (keyword_argument (identifier_non_stops) identifier_non_stops (call (attribute (identifier_non_stops) identifier_non_stops (identifier_replace) identifier_replace )attribute (argument_list (string_'-') string_'-' (string_'\-') string_'\-' )argument_list )call )keyword_argument (keyword_argument (identifier_stops) identifier_stops (identifier_stops) identifier_stops )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Builds a Pinyin sentence re pattern from a Pinyin word re pattern. A sentence is defined as a series of valid Pinyin words, punctuation (non-stops), and spaces followed by a single stop and zero or more container-closing punctuation marks (e.g. apostrophe and brackets).
(module (function_definition (function_name_get_available_options) function_name_get_available_options (parameters (identifier_self) identifier_self (identifier_service_name) identifier_service_name )parameters (block (expression_statement (assignment (identifier_options) identifier_options (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_data_dir) identifier_data_dir (attribute (identifier_self) identifier_self (identifier_data_dirs) identifier_data_dirs )attribute (block (expression_statement (assignment (identifier_service_glob) identifier_service_glob (call (attribute (string_"{0}-*.json") string_"{0}-*.json" (identifier_format) identifier_format )attribute (argument_list (identifier_service_name) identifier_service_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_data_dir) identifier_data_dir (identifier_service_glob) identifier_service_glob )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_found) identifier_found (call (attribute (identifier_glob) identifier_glob (identifier_glob) identifier_glob )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (for_statement (identifier_match) identifier_match (identifier_found) identifier_found (block (expression_statement (assignment (identifier_base) identifier_base (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_match) identifier_match )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bits) identifier_bits (call (attribute (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (identifier_base) identifier_base )argument_list )call (integer_0) integer_0 )subscript (identifier_split) identifier_split )attribute (argument_list (string_'-') string_'-' (integer_1) integer_1 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_bits) identifier_bits )argument_list )call (integer_2) integer_2 )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_api_version) identifier_api_version (subscript (identifier_bits) identifier_bits (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_options) identifier_options (identifier_setdefault) identifier_setdefault )attribute (argument_list (identifier_api_version) identifier_api_version (list )list )argument_list )call )expression_statement (expression_statement (call (attribute (subscript (identifier_options) identifier_options (identifier_api_version) identifier_api_version )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_match) identifier_match )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_options) identifier_options )return_statement )block )function_definition )module
Fetches a collection of all JSON files for a given service. This checks user-created files (if present) as well as including the default service files. Example:: >>> loader.get_available_options('s3') { '2013-11-27': [ '~/.boto-overrides/s3-2013-11-27.json', '/path/to/kotocore/data/aws/resources/s3-2013-11-27.json', ], '2010-10-06': [ '/path/to/kotocore/data/aws/resources/s3-2010-10-06.json', ], '2007-09-15': [ '~/.boto-overrides/s3-2007-09-15.json', ], } :param service_name: The name of the desired service :type service_name: string :returns: A dictionary of api_version keys, with a list of filepaths for that version (in preferential order). :rtype: dict
(module (function_definition (function_name_service_desks) function_name_service_desks (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (subscript (attribute (identifier_self) identifier_self (identifier__options) identifier__options )attribute (string_'server') string_'server' )subscript (string_'/rest/servicedeskapi/servicedesk') string_'/rest/servicedeskapi/servicedesk' )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_headers) identifier_headers (dictionary (pair (string_'X-ExperimentalApi') string_'X-ExperimentalApi' (string_'opt-in') string_'opt-in' )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_r_json) identifier_r_json (call (identifier_json_loads) identifier_json_loads (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__session) identifier__session )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_projects) identifier_projects (list_comprehension (call (identifier_ServiceDesk) identifier_ServiceDesk (argument_list (attribute (identifier_self) identifier_self (identifier__options) identifier__options )attribute (attribute (identifier_self) identifier_self (identifier__session) identifier__session )attribute (identifier_raw_project_json) identifier_raw_project_json )argument_list )call (for_in_clause (identifier_raw_project_json) identifier_raw_project_json (subscript (identifier_r_json) identifier_r_json (string_'values') string_'values' )subscript )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (identifier_projects) identifier_projects )return_statement )block )function_definition )module
Get a list of ServiceDesk Resources from the server visible to the current authenticated user. :rtype: List[ServiceDesk]
(module (function_definition (function_name_sign) function_name_sign (parameters (identifier_self) identifier_self (identifier_private_keys) identifier_private_keys )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_private_keys) identifier_private_keys (None) None )comparison_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_private_keys) identifier_private_keys (identifier_list) identifier_list )argument_list )call )not_operator )boolean_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_'`private_keys` must be a list instance') string_'`private_keys` must be a list instance' )argument_list )call )raise_statement )block )if_statement (function_definition (function_name_gen_public_key) function_name_gen_public_key (parameters (identifier_private_key) identifier_private_key )parameters (block (expression_statement (assignment (identifier_public_key) identifier_public_key (call (attribute (call (attribute (identifier_private_key) identifier_private_key (identifier_get_verifying_key) identifier_get_verifying_key )attribute (argument_list )argument_list )call (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_public_key) identifier_public_key (identifier_decode) identifier_decode )attribute (argument_list )argument_list )call )return_statement )block )function_definition (expression_statement (assignment (identifier_key_pairs) identifier_key_pairs (dictionary_comprehension (pair (call (identifier_gen_public_key) identifier_gen_public_key (argument_list (call (identifier_PrivateKey) identifier_PrivateKey (argument_list (identifier_private_key) identifier_private_key )argument_list )call )argument_list )call (call (identifier_PrivateKey) identifier_PrivateKey (argument_list (identifier_private_key) identifier_private_key )argument_list )call )pair (for_in_clause (identifier_private_key) identifier_private_key (identifier_private_keys) identifier_private_keys )for_in_clause )dictionary_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_tx_dict) identifier_tx_dict (call (attribute (identifier_self) identifier_self (identifier_to_dict) identifier_to_dict )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tx_dict) identifier_tx_dict (call (attribute (identifier_Transaction) identifier_Transaction (identifier__remove_signatures) identifier__remove_signatures )attribute (argument_list (identifier_tx_dict) identifier_tx_dict )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tx_serialized) identifier_tx_serialized (call (attribute (identifier_Transaction) identifier_Transaction (identifier__to_str) identifier__to_str )attribute (argument_list (identifier_tx_dict) identifier_tx_dict )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_input_) identifier_input_ )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_self) identifier_self (identifier_inputs) identifier_inputs )attribute )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_inputs) identifier_inputs )attribute (identifier_i) identifier_i )subscript (call (attribute (identifier_self) identifier_self (identifier__sign_input) identifier__sign_input )attribute (argument_list (identifier_input_) identifier_input_ (identifier_tx_serialized) identifier_tx_serialized (identifier_key_pairs) identifier_key_pairs )argument_list )call )assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__hash) identifier__hash )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Fulfills a previous Transaction's Output by signing Inputs. Note: This method works only for the following Cryptoconditions currently: - Ed25519Fulfillment - ThresholdSha256 Furthermore, note that all keys required to fully sign the Transaction have to be passed to this method. A subset of all will cause this method to fail. Args: private_keys (:obj:`list` of :obj:`str`): A complete list of all private keys needed to sign all Fulfillments of this Transaction. Returns: :class:`~bigchaindb.common.transaction.Transaction`
(module (function_definition (function_name_close) function_name_close (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__check_device_status) identifier__check_device_status )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_hidapi) identifier_hidapi (identifier_hid_close) identifier_hid_close )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__device) identifier__device )attribute )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__device) identifier__device )attribute (None) None )assignment )expression_statement )block )function_definition )module
Close connection to HID device. Automatically run when a Device object is garbage-collected, though manual invocation is recommended.
(module (function_definition (function_name_dt2ts) function_name_dt2ts (parameters (identifier_dt) identifier_dt )parameters (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_dt) identifier_dt (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 )assert_statement (expression_statement (assignment (identifier_ret) identifier_ret (call (attribute (identifier_time) identifier_time (identifier_mktime) identifier_mktime )attribute (argument_list (call (attribute (identifier_dt) identifier_dt (identifier_timetuple) identifier_timetuple )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_dt) identifier_dt (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute )argument_list )call (block (expression_statement (augmented_assignment (identifier_ret) identifier_ret (binary_operator (float_1e-6) float_1e-6 (attribute (identifier_dt) identifier_dt (identifier_microsecond) identifier_microsecond )attribute )binary_operator )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Converts to float representing number of seconds since 1970-01-01 GMT.
(module (function_definition (function_name__check_permission) function_name__check_permission (parameters (identifier_self) identifier_self (identifier_name) identifier_name (default_parameter (identifier_obj) identifier_obj (None) None )default_parameter )parameters (block (function_definition (function_name_redirect_or_exception) function_name_redirect_or_exception (parameters (identifier_ex) identifier_ex )parameters (block (if_statement (boolean_operator (not_operator (attribute (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (identifier_user) identifier_user )attribute )not_operator (not_operator (attribute (attribute (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (identifier_user) identifier_user )attribute (identifier_is_authenticated) identifier_is_authenticated )attribute )not_operator )boolean_operator (block (if_statement (attribute (identifier_self) identifier_self (identifier_auto_login_redirect) identifier_auto_login_redirect )attribute (block (expression_statement (call (identifier_redirect_to_login) identifier_redirect_to_login (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (identifier_get_full_path) identifier_get_full_path )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (raise_statement (identifier_HTTPUnauthorizedResponseException) identifier_HTTPUnauthorizedResponseException )raise_statement )block )else_clause )if_statement )block (else_clause (block (raise_statement (identifier_ex) identifier_ex )raise_statement )block )else_clause )if_statement )block )function_definition (try_statement (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier__has_permission) identifier__has_permission )attribute (argument_list (identifier_name) identifier_name (identifier_obj) identifier_obj )argument_list )call )not_operator (block (expression_statement (call (identifier_redirect_or_exception) identifier_redirect_or_exception (argument_list (identifier_HTTPForbiddenResponseException) identifier_HTTPForbiddenResponseException )argument_list )call )expression_statement )block )if_statement )block (except_clause (as_pattern (identifier_Http404) identifier_Http404 (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (call (identifier_redirect_or_exception) identifier_redirect_or_exception (argument_list (identifier_ex) identifier_ex )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
If customer is not authorized he should not get information that object is exists. Therefore 403 is returned if object was not found or is redirected to the login page. If custmer is authorized and object was not found is returned 404. If object was found and user is not authorized is returned 403 or redirect to login page. If object was found and user is authorized is returned 403 or 200 according of result of _has_permission method.
(module (function_definition (function_name_fetch) function_name_fetch (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (type (string_'FetchContextManager') string_'FetchContextManager' )type (block (assert_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_method) identifier_method )attribute (attribute (identifier_self) identifier_self (identifier__allowed_methods) identifier__allowed_methods )attribute )comparison_operator (call (attribute (string_'Disallowed HTTP method: {}') string_'Disallowed HTTP method: {}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_method) identifier_method )attribute )argument_list )call )assert_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_date) identifier_date )attribute (call (attribute (identifier_datetime) identifier_datetime (identifier_now) identifier_now )attribute (argument_list (call (identifier_tzutc) identifier_tzutc (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute (string_'Date') string_'Date' )subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_date) identifier_date )attribute (identifier_isoformat) identifier_isoformat )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_content_type) identifier_content_type )attribute (None) None )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute (string_'Content-Type') string_'Content-Type' )subscript (attribute (identifier_self) identifier_self (identifier_content_type) identifier_content_type )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_full_url) identifier_full_url (call (attribute (identifier_self) identifier_self (identifier__build_url) identifier__build_url )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__sign) identifier__sign )attribute (argument_list (call (attribute (identifier_full_url) identifier_full_url (identifier_relative) identifier_relative )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_rqst_ctx) identifier_rqst_ctx (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_aiohttp_session) identifier_aiohttp_session )attribute (identifier_request) identifier_request )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_method) identifier_method )attribute (call (identifier_str) identifier_str (argument_list (identifier_full_url) identifier_full_url )argument_list )call (keyword_argument (identifier_data) identifier_data (call (attribute (identifier_self) identifier_self (identifier__pack_content) identifier__pack_content )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier__default_request_timeout) identifier__default_request_timeout )keyword_argument (keyword_argument (identifier_headers) identifier_headers (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_FetchContextManager) identifier_FetchContextManager (argument_list (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_rqst_ctx) identifier_rqst_ctx (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Sends the request to the server and reads the response. You may use this method either with plain synchronous Session or AsyncSession. Both the followings patterns are valid: .. code-block:: python3 from ai.backend.client.request import Request from ai.backend.client.session import Session with Session() as sess: rqst = Request(sess, 'GET', ...) with rqst.fetch() as resp: print(resp.text()) .. code-block:: python3 from ai.backend.client.request import Request from ai.backend.client.session import AsyncSession async with AsyncSession() as sess: rqst = Request(sess, 'GET', ...) async with rqst.fetch() as resp: print(await resp.text())
(module (function_definition (function_name_retrieve_data) function_name_retrieve_data (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_df) identifier_df (call (attribute (attribute (identifier_self) identifier_self (identifier_manager) identifier_manager )attribute (identifier_get_historic_data) identifier_get_historic_data )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_start) identifier_start )attribute (identifier_date) identifier_date )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_end) identifier_end )attribute (identifier_date) identifier_date )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_df) identifier_df (identifier_replace) identifier_replace )attribute (argument_list (integer_0) integer_0 (attribute (identifier_np) identifier_np (identifier_nan) identifier_nan )attribute (keyword_argument (identifier_inplace) identifier_inplace (True) True )keyword_argument )argument_list )call )expression_statement (return_statement (identifier_df) identifier_df )return_statement )block )function_definition )module
Retrives data as a DataFrame.
(module (function_definition (function_name_find_nearest) function_name_find_nearest (parameters (identifier_x) identifier_x (identifier_x0) identifier_x0 )parameters (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_int) identifier_int )type (type (identifier_Any) identifier_Any )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_x) identifier_x (call (attribute (identifier_np) identifier_np (identifier_asanyarray) identifier_asanyarray )attribute (argument_list (identifier_x) identifier_x )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_x0) identifier_x0 (call (attribute (identifier_np) identifier_np (identifier_atleast_1d) identifier_atleast_1d )attribute (argument_list (identifier_x0) identifier_x0 )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_x) identifier_x (identifier_size) identifier_size )attribute (integer_0) integer_0 )comparison_operator (comparison_operator (attribute (identifier_x0) identifier_x0 (identifier_size) identifier_size )attribute (integer_0) integer_0 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'empty input(s)') string_'empty input(s)' )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_x0) identifier_x0 (identifier_ndim) identifier_ndim )attribute (tuple (integer_0) integer_0 (integer_1) integer_1 )tuple )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'2-D x0 not handled yet') string_'2-D x0 not handled yet' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_ind) identifier_ind (call (attribute (identifier_np) identifier_np (identifier_empty_like) identifier_empty_like )attribute (argument_list (identifier_x0) identifier_x0 (keyword_argument (identifier_dtype) identifier_dtype (identifier_int) identifier_int )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_xi) identifier_xi )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_x0) identifier_x0 )argument_list )call (block (if_statement (boolean_operator (comparison_operator (identifier_xi) identifier_xi (None) None )comparison_operator (parenthesized_expression (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_xi) identifier_xi (tuple (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (attribute (identifier_datetime) identifier_datetime (identifier_date) identifier_date )attribute (attribute (identifier_np) identifier_np (identifier_datetime64) identifier_datetime64 )attribute )tuple )argument_list )call (call (attribute (identifier_np) identifier_np (identifier_isfinite) identifier_isfinite )attribute (argument_list (identifier_xi) identifier_xi )argument_list )call )boolean_operator )parenthesized_expression )boolean_operator (block (expression_statement (assignment (subscript (identifier_ind) identifier_ind (identifier_i) identifier_i )subscript (call (attribute (identifier_np) identifier_np (identifier_nanargmin) identifier_nanargmin )attribute (argument_list (call (identifier_abs) identifier_abs (argument_list (binary_operator (identifier_x) identifier_x (identifier_xi) identifier_xi )binary_operator )argument_list )call )argument_list )call )assignment )expression_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'x0 must NOT be None or NaN to avoid surprising None return value') string_'x0 must NOT be None or NaN to avoid surprising None return value' )argument_list )call )raise_statement )block )else_clause )if_statement )block )for_statement (return_statement (expression_list (subscript (call (attribute (identifier_ind) identifier_ind (identifier_squeeze) identifier_squeeze )attribute (argument_list )argument_list )call (tuple )tuple )subscript (subscript (call (attribute (subscript (identifier_x) identifier_x (identifier_ind) identifier_ind )subscript (identifier_squeeze) identifier_squeeze )attribute (argument_list )argument_list )call (tuple )tuple )subscript )expression_list )return_statement )block )function_definition )module
This find_nearest function does NOT assume sorted input inputs: x: array (float, int, datetime, h5py.Dataset) within which to search for x0 x0: singleton or array of values to search for in x outputs: idx: index of flattened x nearest to x0 (i.e. works with higher than 1-D arrays also) xidx: x[idx] Observe how bisect.bisect() gives the incorrect result! idea based on: http://stackoverflow.com/questions/2566412/find-nearest-value-in-numpy-array
(module (function_definition (function_name_submit) function_name_submit (parameters (identifier_self) identifier_self (identifier_port_id) identifier_port_id (identifier_tuple_) identifier_tuple_ )parameters (block (expression_statement (assignment (identifier_port_index) identifier_port_index (subscript (attribute (identifier_self) identifier_self (identifier__splpy_output_ports) identifier__splpy_output_ports )attribute (identifier_port_id) identifier_port_id )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_ec) identifier_ec (identifier__submit) identifier__submit )attribute (argument_list (identifier_self) identifier_self (identifier_port_index) identifier_port_index (identifier_tuple_) identifier_tuple_ )argument_list )call )expression_statement )block )function_definition )module
Submit a tuple to the output port. The value to be submitted (``tuple_``) can be a ``None`` (nothing will be submitted), ``tuple``, ``dict` or ``list`` of those types. For details on how the ``tuple_`` is mapped to an SPL tuple see :ref:`submit-from-python`. Args: port_id: Identifier of the port specified in the ``output_ports`` parameter of the ``@spl.primitive_operator`` decorator. tuple_: Tuple (or tuples) to be submitted to the output port.
(module (function_definition (function_name_build_request_relationship) function_name_build_request_relationship (parameters (identifier_type) identifier_type (identifier_ids) identifier_ids )parameters (block (if_statement (comparison_operator (identifier_ids) identifier_ids (None) None )comparison_operator (block (return_statement (dictionary (pair (string_'data') string_'data' (None) None )pair )dictionary )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_ids) identifier_ids (identifier_str) identifier_str )argument_list )call (block (return_statement (dictionary (pair (string_'data') string_'data' (dictionary (pair (string_'id') string_'id' (identifier_ids) identifier_ids )pair (pair (string_'type') string_'type' (identifier_type) identifier_type )pair )dictionary )pair )dictionary )return_statement )block )elif_clause (else_clause (block (return_statement (dictionary (pair (string_"data") string_"data" (list_comprehension (dictionary (pair (string_"id") string_"id" (identifier_id) identifier_id )pair (pair (string_"type") string_"type" (identifier_type) identifier_type )pair )dictionary (for_in_clause (identifier_id) identifier_id (identifier_ids) identifier_ids )for_in_clause )list_comprehension )pair )dictionary )return_statement )block )else_clause )if_statement )block )function_definition )module
Build a relationship list. A relationship list is used to update relationships between two resources. Setting sensors on a label, for example, uses this function to construct the list of sensor ids to pass to the Helium API. Args: type(string): The resource type for the ids in the relationship ids([uuid] or uuid): Just one or a list of resource uuids to use in the relationship Returns: A ready to use relationship JSON object.
(module (function_definition (function_name_init_search) function_name_init_search (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_verbose) identifier_verbose )attribute (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"Initializing search.") string_"Initializing search." )argument_list )call )expression_statement )block )if_statement (for_statement (identifier_generator) identifier_generator (attribute (identifier_self) identifier_self (identifier_generators) identifier_generators )attribute (block (expression_statement (assignment (identifier_graph) identifier_graph (call (attribute (call (identifier_generator) identifier_generator (argument_list (attribute (identifier_self) identifier_self (identifier_n_classes) identifier_n_classes )attribute (attribute (identifier_self) identifier_self (identifier_input_shape) identifier_input_shape )attribute )argument_list )call (identifier_generate) identifier_generate )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_default_model_len) identifier_default_model_len )attribute (attribute (identifier_self) identifier_self (identifier_default_model_width) identifier_default_model_width )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_model_id) identifier_model_id (attribute (identifier_self) identifier_self (identifier_model_count) identifier_model_count )attribute )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_model_count) identifier_model_count )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_training_queue) identifier_training_queue )attribute (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_graph) identifier_graph (unary_operator (integer_1) integer_1 )unary_operator (identifier_model_id) identifier_model_id )tuple )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_descriptors) identifier_descriptors )attribute (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_graph) identifier_graph (identifier_extract_descriptor) identifier_extract_descriptor )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )for_statement (if_statement (attribute (identifier_self) identifier_self (identifier_verbose) identifier_verbose )attribute (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"Initialization finished.") string_"Initialization finished." )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Call the generators to generate the initial architectures for the search.
(module (function_definition (function_name_get_publisher) function_name_get_publisher (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_doi_prefix) identifier_doi_prefix (subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_doi) identifier_doi )attribute (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_publisher_mod) identifier_publisher_mod (call (attribute (attribute (identifier_openaccess_epub) identifier_openaccess_epub (identifier_publisher) identifier_publisher )attribute (identifier_import_by_doi) identifier_import_by_doi )attribute (argument_list (identifier_doi_prefix) identifier_doi_prefix )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_ImportError) identifier_ImportError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_exception) identifier_exception )attribute (argument_list (identifier_e) identifier_e )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )except_clause )try_statement (return_statement (call (attribute (identifier_publisher_mod) identifier_publisher_mod (identifier_pub_class) identifier_pub_class )attribute (argument_list (identifier_self) identifier_self )argument_list )call )return_statement )block )function_definition )module
This method defines how the Article tries to determine the publisher of the article. This method relies on the success of the get_DOI method to fetch the appropriate full DOI for the article. It then takes the DOI prefix which corresponds to the publisher and then uses that to attempt to load the correct publisher-specific code. This may fail; if the DOI is not mapped to a code file, if the DOI is mapped but the code file could not be located, or if the mapped code file is malformed then this method will issue/log an informative error message and return None. This method will not try to infer the publisher based on any metadata other than the DOI of the article. Returns ------- publisher : Publisher instance or None
(module (function_definition (function_name_file_copy) function_name_file_copy (parameters (identifier_name) identifier_name (default_parameter (identifier_dest) identifier_dest (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'changes') string_'changes' (dictionary )dictionary )pair (pair (string_'result') string_'result' (True) True )pair (pair (string_'comment') string_'comment' (string_'') string_'' )pair )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'changes') string_'changes' )subscript (call (subscript (identifier___salt__) identifier___salt__ (string_'junos.file_copy') string_'junos.file_copy' )subscript (argument_list (identifier_name) identifier_name (identifier_dest) identifier_dest (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Copies the file from the local device to the junos device. .. code-block:: yaml /home/m2/info.txt: junos: - file_copy - dest: info_copy.txt Parameters: Required * src: The sorce path where the file is kept. * dest: The destination path where the file will be copied.
(module (function_definition (function_name_hook_drag) function_name_hook_drag (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_widget) identifier_widget (attribute (identifier_self) identifier_self (identifier_widget) identifier_widget )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_widget) identifier_widget (identifier_mousePressEvent) identifier_mousePressEvent )attribute (attribute (identifier_self) identifier_self (identifier_mousePressEvent) identifier_mousePressEvent )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_widget) identifier_widget (identifier_mouseMoveEvent) identifier_mouseMoveEvent )attribute (attribute (identifier_self) identifier_self (identifier_mouseMoveEvent) identifier_mouseMoveEvent )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_widget) identifier_widget (identifier_mouseReleaseEvent) identifier_mouseReleaseEvent )attribute (attribute (identifier_self) identifier_self (identifier_mouseReleaseEvent) identifier_mouseReleaseEvent )attribute )assignment )expression_statement )block )function_definition )module
Install the hooks for drag operations.
(module (function_definition (function_name_removeSubscribers) function_name_removeSubscribers (parameters (identifier_self) identifier_self (identifier_emails_list) identifier_emails_list )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_emails_list) identifier_emails_list (string_"__iter__") string_"__iter__" )argument_list )call )not_operator (block (expression_statement (assignment (identifier_error_msg) identifier_error_msg (string_"Input parameter 'emails_list' is not iterable") string_"Input parameter 'emails_list' is not iterable" )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_error) identifier_error )attribute (argument_list (identifier_error_msg) identifier_error_msg )argument_list )call )expression_statement (raise_statement (call (attribute (identifier_exception) identifier_exception (identifier_BadValue) identifier_BadValue )attribute (argument_list (identifier_error_msg) identifier_error_msg )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_missing_flags) identifier_missing_flags (True) True )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_headers) identifier_headers (identifier_raw_data) identifier_raw_data )pattern_list (call (attribute (identifier_self) identifier_self (identifier__perform_subscribe) identifier__perform_subscribe )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_email) identifier_email (identifier_emails_list) identifier_emails_list (block (expression_statement (assignment (pattern_list (identifier_missing_flag) identifier_missing_flag (identifier_raw_data) identifier_raw_data )pattern_list (call (attribute (identifier_self) identifier_self (identifier__remove_subscriber) identifier__remove_subscriber )attribute (argument_list (identifier_email) identifier_email (identifier_raw_data) identifier_raw_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_missing_flags) identifier_missing_flags (boolean_operator (identifier_missing_flags) identifier_missing_flags (identifier_missing_flag) identifier_missing_flag )boolean_operator )assignment )expression_statement )block )for_statement (if_statement (identifier_missing_flags) identifier_missing_flags (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__update_subscribe) identifier__update_subscribe )attribute (argument_list (identifier_headers) identifier_headers (identifier_raw_data) identifier_raw_data )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_info) identifier_info )attribute (argument_list (string_"Successfully remove subscribers: %s for <Workitem %s>") string_"Successfully remove subscribers: %s for <Workitem %s>" (identifier_emails_list) identifier_emails_list (identifier_self) identifier_self )argument_list )call )expression_statement )block )function_definition )module
Remove subscribers from this workitem If the subscribers have not been added, no more actions will be performed. :param emails_list: a :class:`list`/:class:`tuple`/:class:`set` contains the the subscribers' emails
(module (function_definition (function_name_ellipsis) function_name_ellipsis (parameters (identifier_text) identifier_text (identifier_length) identifier_length (default_parameter (identifier_symbol) identifier_symbol (string_"...") string_"..." )default_parameter )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_text) identifier_text )argument_list )call (identifier_length) identifier_length )comparison_operator (block (expression_statement (assignment (identifier_pos) identifier_pos (call (attribute (identifier_text) identifier_text (identifier_rfind) identifier_rfind )attribute (argument_list (string_" ") string_" " (integer_0) integer_0 (identifier_length) identifier_length )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_pos) identifier_pos (integer_0) integer_0 )comparison_operator (block (return_statement (binary_operator (call (attribute (subscript (identifier_text) identifier_text (slice (colon) colon (identifier_length) identifier_length )slice )subscript (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_".") string_"." )argument_list )call (identifier_symbol) identifier_symbol )binary_operator )return_statement )block (else_clause (block (return_statement (binary_operator (call (attribute (subscript (identifier_text) identifier_text (slice (colon) colon (identifier_pos) identifier_pos )slice )subscript (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_".") string_"." )argument_list )call (identifier_symbol) identifier_symbol )binary_operator )return_statement )block )else_clause )if_statement )block (else_clause (block (return_statement (identifier_text) identifier_text )return_statement )block )else_clause )if_statement )block )function_definition )module
Present a block of text of given length. If the length of available text exceeds the requested length, truncate and intelligently append an ellipsis.
(module (function_definition (function_name_load_data) function_name_load_data (parameters (identifier_self) identifier_self (identifier_data_np) identifier_data_np )parameters (block (expression_statement (assignment (identifier_image) identifier_image (call (attribute (identifier_AstroImage) identifier_AstroImage (identifier_AstroImage) identifier_AstroImage )attribute (argument_list (keyword_argument (identifier_logger) identifier_logger (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_image) identifier_image (identifier_set_data) identifier_set_data )attribute (argument_list (identifier_data_np) identifier_data_np )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_image) identifier_set_image )attribute (argument_list (identifier_image) identifier_image )argument_list )call )expression_statement )block )function_definition )module
Load raw numpy data into the viewer.
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_update_compute) identifier_update_compute (False) False )assignment )expression_statement (expression_statement (assignment (identifier_old_json) identifier_old_json (call (attribute (identifier_self) identifier_self (identifier___json__) identifier___json__ )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_compute_properties) identifier_compute_properties (None) None )assignment )expression_statement (for_statement (identifier_prop) identifier_prop (identifier_kwargs) identifier_kwargs (block (if_statement (comparison_operator (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_prop) identifier_prop )argument_list )call (subscript (identifier_kwargs) identifier_kwargs (identifier_prop) identifier_prop )subscript )comparison_operator (block (if_statement (comparison_operator (identifier_prop) identifier_prop (attribute (identifier_self) identifier_self (identifier_CONTROLLER_ONLY_PROPERTIES) identifier_CONTROLLER_ONLY_PROPERTIES )attribute )comparison_operator (block (expression_statement (assignment (identifier_update_compute) identifier_update_compute (True) True )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_prop) identifier_prop (string_"properties") string_"properties" )comparison_operator (block (expression_statement (assignment (identifier_compute_properties) identifier_compute_properties (subscript (identifier_kwargs) identifier_kwargs (identifier_prop) identifier_prop )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_prop) identifier_prop (subscript (identifier_kwargs) identifier_kwargs (identifier_prop) identifier_prop )subscript )argument_list )call )expression_statement )block )else_clause )if_statement )block )if_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__list_ports) identifier__list_ports )attribute (argument_list )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_old_json) identifier_old_json (call (attribute (identifier_self) identifier_self (identifier___json__) identifier___json__ )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (call (attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_project) identifier_project )attribute (identifier_controller) identifier_controller )attribute (identifier_notification) identifier_notification )attribute (identifier_emit) identifier_emit )attribute (argument_list (string_"node.updated") string_"node.updated" (call (attribute (identifier_self) identifier_self (identifier___json__) identifier___json__ )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_update_compute) identifier_update_compute (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_self) identifier_self (identifier__node_data) identifier__node_data )attribute (argument_list (keyword_argument (identifier_properties) identifier_properties (identifier_compute_properties) identifier_compute_properties )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (yield (call (attribute (identifier_self) identifier_self (identifier_put) identifier_put )attribute (argument_list (None) None (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument )argument_list )call )yield )assignment )expression_statement (expression_statement (yield (call (attribute (identifier_self) identifier_self (identifier_parse_node_response) identifier_parse_node_response )attribute (argument_list (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute )argument_list )call )yield )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_project) identifier_project )attribute (identifier_dump) identifier_dump )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Update the node on the compute server :param kwargs: Node properties
(module (function_definition (function_name_to_geojson) function_name_to_geojson (parameters (identifier_self) identifier_self (identifier_filename) identifier_filename )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_fd) identifier_fd )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_json) identifier_json (identifier_dump) identifier_dump )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_to_record) identifier_to_record )attribute (argument_list (identifier_WGS84_CRS) identifier_WGS84_CRS )argument_list )call (identifier_fd) identifier_fd )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Save vector as geojson.
(module (function_definition (function_name__make_concept) function_name__make_concept (parameters (identifier_self) identifier_self (identifier_entity) identifier_entity )parameters (block (expression_statement (assignment (identifier_name) identifier_name (call (attribute (identifier_self) identifier_self (identifier__sanitize) identifier__sanitize )attribute (argument_list (subscript (identifier_entity) identifier_entity (string_'canonicalName') string_'canonicalName' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_db_refs) identifier_db_refs (call (identifier__get_grounding) identifier__get_grounding (argument_list (identifier_entity) identifier_entity )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_concept) identifier_concept (call (identifier_Concept) identifier_Concept (argument_list (identifier_name) identifier_name (keyword_argument (identifier_db_refs) identifier_db_refs (identifier_db_refs) identifier_db_refs )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_metadata) identifier_metadata (dictionary_comprehension (pair (subscript (identifier_arg) identifier_arg (string_'type') string_'type' )subscript (subscript (subscript (identifier_arg) identifier_arg (string_'value') string_'value' )subscript (string_'@id') string_'@id' )subscript )pair (for_in_clause (identifier_arg) identifier_arg (subscript (identifier_entity) identifier_entity (string_'arguments') string_'arguments' )subscript )for_in_clause )dictionary_comprehension )assignment )expression_statement (return_statement (expression_list (identifier_concept) identifier_concept (identifier_metadata) identifier_metadata )expression_list )return_statement )block )function_definition )module
Return Concept from a Hume entity.
(module (function_definition (function_name_tip_fdr) function_name_tip_fdr (parameters (identifier_a) identifier_a (default_parameter (identifier_alpha) identifier_alpha (float_0.05) float_0.05 )default_parameter )parameters (block (expression_statement (assignment (identifier_zscores) identifier_zscores (call (identifier_tip_zscores) identifier_tip_zscores (argument_list (identifier_a) identifier_a )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pvals) identifier_pvals (call (attribute (attribute (identifier_stats) identifier_stats (identifier_norm) identifier_norm )attribute (identifier_pdf) identifier_pdf )attribute (argument_list (identifier_zscores) identifier_zscores )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_rejected) identifier_rejected (identifier_fdrs) identifier_fdrs )pattern_list (call (identifier_fdrcorrection) identifier_fdrcorrection (argument_list (identifier_pvals) identifier_pvals )argument_list )call )assignment )expression_statement (return_statement (identifier_fdrs) identifier_fdrs )return_statement )block )function_definition )module
Returns adjusted TIP p-values for a particular `alpha`. (see :func:`tip_zscores` for more info) :param a: NumPy array, where each row is the signal for a feature :param alpha: False discovery rate
(module (function_definition (function_name_run) function_name_run (parameters (identifier_self) identifier_self )parameters (block (import_from_statement (dotted_name (identifier_zengine) identifier_zengine (identifier_lib) identifier_lib (identifier_cache) identifier_cache )dotted_name (dotted_name (identifier_WFSpecNames) identifier_WFSpecNames )dotted_name )import_from_statement (if_statement (attribute (attribute (attribute (identifier_self) identifier_self (identifier_manager) identifier_manager )attribute (identifier_args) identifier_args )attribute (identifier_clear) identifier_clear )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__clear_models) identifier__clear_models )attribute (argument_list )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (if_statement (attribute (attribute (attribute (identifier_self) identifier_self (identifier_manager) identifier_manager )attribute (identifier_args) identifier_args )attribute (identifier_wf_path) identifier_wf_path )attribute (block (expression_statement (assignment (identifier_paths) identifier_paths (call (attribute (identifier_self) identifier_self (identifier_get_wf_from_path) identifier_get_wf_from_path )attribute (argument_list (attribute (attribute (attribute (identifier_self) identifier_self (identifier_manager) identifier_manager )attribute (identifier_args) identifier_args )attribute (identifier_wf_path) identifier_wf_path )attribute )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_paths) identifier_paths (call (attribute (identifier_self) identifier_self (identifier_get_workflows) identifier_get_workflows )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_count) identifier_count )attribute (integer_0) integer_0 )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_do_with_submit) identifier_do_with_submit )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_load_diagram) identifier_load_diagram )attribute (identifier_paths) identifier_paths (keyword_argument (identifier_threads) identifier_threads (attribute (attribute (attribute (identifier_self) identifier_self (identifier_manager) identifier_manager )attribute (identifier_args) identifier_args )attribute (identifier_threads) identifier_threads )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (call (identifier_WFSpecNames) identifier_WFSpecNames (argument_list )argument_list )call (identifier_refresh) identifier_refresh )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"%s BPMN file loaded") string_"%s BPMN file loaded" (attribute (identifier_self) identifier_self (identifier_count) identifier_count )attribute )binary_operator )argument_list )call )expression_statement )block )function_definition )module
read workflows, checks if it's updated, tries to update if there aren't any running instances of that wf
(module (function_definition (function_name_make_and_return_path_from_path_and_folder_names) function_name_make_and_return_path_from_path_and_folder_names (parameters (identifier_path) identifier_path (identifier_folder_names) identifier_folder_names )parameters (block (for_statement (identifier_folder_name) identifier_folder_name (identifier_folder_names) identifier_folder_names (block (expression_statement (augmented_assignment (identifier_path) identifier_path (binary_operator (identifier_folder_name) identifier_folder_name (string_'/') string_'/' )binary_operator )augmented_assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_path) identifier_path )argument_list )call )expression_statement )block (except_clause (identifier_FileExistsError) identifier_FileExistsError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (return_statement (identifier_path) identifier_path )return_statement )block )function_definition )module
For a given path, create a directory structure composed of a set of folders and return the path to the \ inner-most folder. For example, if path='/path/to/folders', and folder_names=['folder1', 'folder2'], the directory created will be '/path/to/folders/folder1/folder2/' and the returned path will be '/path/to/folders/folder1/folder2/'. If the folders already exist, routine continues as normal. Parameters ---------- path : str The path where the directories are created. folder_names : [str] The names of the folders which are created in the path directory. Returns ------- path A string specifying the path to the inner-most folder created. Examples -------- path = '/path/to/folders' path = make_and_return_path(path=path, folder_names=['folder1', 'folder2'].
(module (function_definition (function_name_get_buffer) function_name_get_buffer (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_doc_to_update) identifier_doc_to_update )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update_sources) identifier_update_sources )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_ES_buffer) identifier_ES_buffer (attribute (identifier_self) identifier_self (identifier_action_buffer) identifier_action_buffer )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_clean_up) identifier_clean_up )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_ES_buffer) identifier_ES_buffer )return_statement )block )function_definition )module
Get buffer which needs to be bulked to elasticsearch
(module (function_definition (function_name_traverse_inorder) function_name_traverse_inorder (parameters (identifier_self) identifier_self (default_parameter (identifier_leaves) identifier_leaves (True) True )default_parameter (default_parameter (identifier_internal) identifier_internal (True) True )default_parameter )parameters (block (for_statement (identifier_node) identifier_node (call (attribute (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute (identifier_traverse_inorder) identifier_traverse_inorder )attribute (argument_list (keyword_argument (identifier_leaves) identifier_leaves (identifier_leaves) identifier_leaves )keyword_argument (keyword_argument (identifier_internal) identifier_internal (identifier_internal) identifier_internal )keyword_argument )argument_list )call (block (expression_statement (yield (identifier_node) identifier_node )yield )expression_statement )block )for_statement )block )function_definition )module
Perform an inorder traversal of the ``Node`` objects in this ``Tree`` Args: ``leaves`` (``bool``): ``True`` to include leaves, otherwise ``False`` ``internal`` (``bool``): ``True`` to include internal nodes, otherwise ``False``
(module (function_definition (function_name_cmd_watch) function_name_cmd_watch (parameters (identifier_args) identifier_args )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (attribute (attribute (identifier_mpstate) identifier_mpstate (identifier_status) identifier_status )attribute (identifier_watch) identifier_watch )attribute (None) None )assignment )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (attribute (attribute (identifier_mpstate) identifier_mpstate (identifier_status) identifier_status )attribute (identifier_watch) identifier_watch )attribute (identifier_args) identifier_args )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"Watching %s") string_"Watching %s" (attribute (attribute (identifier_mpstate) identifier_mpstate (identifier_status) identifier_status )attribute (identifier_watch) identifier_watch )attribute )binary_operator )argument_list )call )expression_statement )block )function_definition )module
watch a mavlink packet pattern
(module (function_definition (function_name_serialize_on_post_delete) function_name_serialize_on_post_delete (parameters (identifier_sender) identifier_sender (identifier_instance) identifier_instance (identifier_using) identifier_using (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (try_statement (block (expression_statement (assignment (identifier_wrapped_instance) identifier_wrapped_instance (call (attribute (identifier_site_offline_models) identifier_site_offline_models (identifier_get_wrapped_instance) identifier_get_wrapped_instance )attribute (argument_list (identifier_instance) identifier_instance )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ModelNotRegistered) identifier_ModelNotRegistered (block (pass_statement )pass_statement )block )except_clause (else_clause (block (expression_statement (call (attribute (identifier_wrapped_instance) identifier_wrapped_instance (identifier_to_outgoing_transaction) identifier_to_outgoing_transaction )attribute (argument_list (identifier_using) identifier_using (keyword_argument (identifier_created) identifier_created (False) False )keyword_argument (keyword_argument (identifier_deleted) identifier_deleted (True) True )keyword_argument )argument_list )call )expression_statement )block )else_clause )try_statement )block )function_definition )module
Creates a serialized OutgoingTransaction when a model instance is deleted. Skip those not registered.
(module (function_definition (function_name_predict) function_name_predict (parameters (identifier_self) identifier_self (identifier_X) identifier_X (default_parameter (identifier_nsamples) identifier_nsamples (integer_200) integer_200 )default_parameter (default_parameter (identifier_likelihood_args) identifier_likelihood_args (tuple )tuple )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_Ey) identifier_Ey (identifier__) identifier__ )pattern_list (call (attribute (identifier_self) identifier_self (identifier_predict_moments) identifier_predict_moments )attribute (argument_list (identifier_X) identifier_X (identifier_nsamples) identifier_nsamples (identifier_likelihood_args) identifier_likelihood_args )argument_list )call )assignment )expression_statement (return_statement (identifier_Ey) identifier_Ey )return_statement )block )function_definition )module
Predict target values from Bayesian generalized linear regression. Parameters ---------- X : ndarray (N*,d) array query input dataset (N* samples, d dimensions). nsamples : int, optional Number of samples for sampling the expected target values from the predictive distribution. likelihood_args : sequence, optional sequence of arguments to pass to the likelihood function. These are non-learnable parameters. They can be scalars or arrays of length N. Returns ------- Ey : ndarray The expected value of y* for the query inputs, X* of shape (N*,).
(module (function_definition (function_name__load) function_name__load (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )argument_list )call (block (expression_statement (assignment (identifier_root) identifier_root (call (attribute (call (attribute (identifier_ET) identifier_ET (identifier_parse) identifier_parse )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )argument_list )call (identifier_getroot) identifier_getroot )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (parenthesized_expression (boolean_operator (boolean_operator (boolean_operator (boolean_operator (comparison_operator (attribute (identifier_root) identifier_root (identifier_tag) identifier_tag )attribute (string_"fortpy") string_"fortpy" )comparison_operator (comparison_operator (string_"mode") string_"mode" (attribute (identifier_root) identifier_root (identifier_attrib) identifier_attrib )attribute )comparison_operator )boolean_operator (comparison_operator (subscript (attribute (identifier_root) identifier_root (identifier_attrib) identifier_attrib )attribute (string_"mode") string_"mode" )subscript (string_"template") string_"template" )comparison_operator )boolean_operator (comparison_operator (string_"direction") string_"direction" (attribute (identifier_root) identifier_root (identifier_attrib) identifier_attrib )attribute )comparison_operator )boolean_operator (comparison_operator (subscript (attribute (identifier_root) identifier_root (identifier_attrib) identifier_attrib )attribute (string_"direction") string_"direction" )subscript (attribute (identifier_self) identifier_self (identifier_direction) identifier_direction )attribute )comparison_operator )boolean_operator )parenthesized_expression (block (for_statement (identifier_v) identifier_v (call (identifier__get_xml_version) identifier__get_xml_version (argument_list (identifier_root) identifier_root )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_versions) identifier_versions )attribute (identifier_v) identifier_v )subscript (call (identifier_TemplateContents) identifier_TemplateContents (argument_list )argument_list )call )assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__load_entries) identifier__load_entries )attribute (argument_list (identifier_root) identifier_root )argument_list )call )expression_statement (if_statement (comparison_operator (string_"autoname") string_"autoname" (attribute (identifier_root) identifier_root (identifier_attrib) identifier_attrib )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (subscript (attribute (identifier_root) identifier_root (identifier_attrib) identifier_attrib )attribute (string_"autoname") string_"autoname" )subscript )assignment )expression_statement )block )if_statement )block (else_clause (block (expression_statement (call (attribute (identifier_msg) identifier_msg (identifier_err) identifier_err )attribute (argument_list (binary_operator (call (attribute (string_"the specified template {} ") string_"the specified template {} " (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )argument_list )call (string_"is missing the mode and direction attributes.") string_"is missing the mode and direction attributes." )binary_operator )argument_list )call )expression_statement (expression_statement (call (identifier_exit) identifier_exit (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (call (attribute (identifier_msg) identifier_msg (identifier_err) identifier_err )attribute (argument_list (call (attribute (string_"could not find the template {}.") string_"could not find the template {}." (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_exit) identifier_exit (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Extracts the XML template data from the file.
(module (function_definition (function_name_get_extra) function_name_get_extra (parameters (identifier_cls) identifier_cls (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (if_statement (not_operator (identifier_name) identifier_name )not_operator (block (return_statement (attribute (identifier_cls) identifier_cls (identifier__extra_config) identifier__extra_config )attribute )return_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_cls) identifier_cls (identifier__extra_config) identifier__extra_config )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name (None) None )argument_list )call )return_statement )block )function_definition )module
Gets extra configuration parameters. These parameters should be loaded through load_extra or load_extra_data. Args: name: str, the name of the configuration data to load. Returns: A dictionary containing the requested configuration data. None if data was never loaded under that name.
(module (function_definition (function_name_take) function_name_take (parameters (identifier_self) identifier_self (typed_default_parameter (identifier_num_instances) identifier_num_instances (type (identifier_int) identifier_int )type (integer_1) integer_1 )typed_default_parameter (typed_default_parameter (identifier_timeout) identifier_timeout (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_float) identifier_float )type )type_parameter )generic_type )type (None) None )typed_default_parameter )parameters (type (None) None )type (block (if_statement (comparison_operator (identifier_num_instances) identifier_num_instances (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_f"Process must request at least 1 instance; here requested {num_instances}.") string_f"Process must request at least 1 instance; here requested {num_instances}." )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_num_instances) identifier_num_instances (attribute (identifier_self) identifier_self (identifier_num_instances_total) identifier_num_instances_total )attribute )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_f"Process must request at most {self.num_instances_total} instances; here requested {num_instances}.") string_f"Process must request at most {self.num_instances_total} instances; here requested {num_instances}." )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier__logger) identifier__logger (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__log) identifier__log )attribute (argument_list (identifier_INFO) identifier_INFO (string_"take") string_"take" (keyword_argument (identifier_num_instances) identifier_num_instances (identifier_num_instances) identifier_num_instances )keyword_argument (keyword_argument (identifier_free) identifier_free (attribute (identifier_self) identifier_self (identifier_num_instances_free) identifier_num_instances_free )attribute )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_proc) identifier_proc (call (attribute (identifier_Process) identifier_Process (identifier_current) identifier_current )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__num_instances_free) identifier__num_instances_free )attribute (identifier_num_instances) identifier_num_instances )comparison_operator (block (expression_statement (assignment (attribute (attribute (identifier_proc) identifier_proc (identifier_local) identifier_local )attribute (identifier___num_instances_required) identifier___num_instances_required )attribute (identifier_num_instances) identifier_num_instances )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__waiting) identifier__waiting )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_timeout) identifier_timeout )argument_list )call )expression_statement )block (finally_clause (block (delete_statement (attribute (attribute (identifier_proc) identifier_proc (identifier_local) identifier_local )attribute (identifier___num_instances_required) identifier___num_instances_required )attribute )delete_statement )block )finally_clause )try_statement )block )if_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__num_instances_free) identifier__num_instances_free )attribute (identifier_num_instances) identifier_num_instances )augmented_assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier__logger) identifier__logger (None) None )comparison_operator (comparison_operator (identifier_proc) identifier_proc (attribute (identifier_self) identifier_self (identifier__usage) identifier__usage )attribute )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__log) identifier__log )attribute (argument_list (identifier_WARNING) identifier_WARNING (string_"take-again") string_"take-again" (keyword_argument (identifier_already) identifier_already (subscript (attribute (identifier_self) identifier_self (identifier__usage) identifier__usage )attribute (identifier_proc) identifier_proc )subscript )keyword_argument (keyword_argument (identifier_more) identifier_more (identifier_num_instances) identifier_num_instances )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__usage) identifier__usage )attribute (identifier_setdefault) identifier_setdefault )attribute (argument_list (identifier_proc) identifier_proc (integer_0) integer_0 )argument_list )call )expression_statement (expression_statement (augmented_assignment (subscript (attribute (identifier_self) identifier_self (identifier__usage) identifier__usage )attribute (identifier_proc) identifier_proc )subscript (identifier_num_instances) identifier_num_instances )augmented_assignment )expression_statement )block )function_definition )module
The current process reserves a certain number of instances. If there are not enough instances available, the process is made to join a queue. When this method returns, the process holds the instances it has requested to take. :param num_instances: Number of resource instances to take. :param timeout: If this parameter is not ``None``, it is taken as a delay at the end of which the process times out, and leaves the queue forcibly. In such a situation, a :py:class:`Timeout` exception is raised on the process.
(module (function_definition (function_name__get_billing_cycle_number) function_name__get_billing_cycle_number (parameters (identifier_self) identifier_self (identifier_billing_cycle) identifier_billing_cycle )parameters (block (expression_statement (assignment (identifier_begins_before_initial_date) identifier_begins_before_initial_date (comparison_operator (attribute (attribute (identifier_billing_cycle) identifier_billing_cycle (identifier_date_range) identifier_date_range )attribute (identifier_lower) identifier_lower )attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_initial_billing_cycle) identifier_initial_billing_cycle )attribute (identifier_date_range) identifier_date_range )attribute (identifier_lower) identifier_lower )attribute )comparison_operator )assignment )expression_statement (if_statement (identifier_begins_before_initial_date) identifier_begins_before_initial_date (block (raise_statement (call (identifier_ProvidedBillingCycleBeginsBeforeInitialBillingCycle) identifier_ProvidedBillingCycleBeginsBeforeInitialBillingCycle (argument_list (call (attribute (string_'{} precedes initial cycle {}') string_'{} precedes initial cycle {}' (identifier_format) identifier_format )attribute (argument_list (identifier_billing_cycle) identifier_billing_cycle (attribute (identifier_self) identifier_self (identifier_initial_billing_cycle) identifier_initial_billing_cycle )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_billing_cycle_number) identifier_billing_cycle_number (call (attribute (call (attribute (attribute (identifier_BillingCycle) identifier_BillingCycle (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_date_range__contained_by) identifier_date_range__contained_by (call (identifier_DateRange) identifier_DateRange (argument_list (attribute (attribute (attribute (identifier_self) identifier_self (identifier_initial_billing_cycle) identifier_initial_billing_cycle )attribute (identifier_date_range) identifier_date_range )attribute (identifier_lower) identifier_lower )attribute (attribute (attribute (identifier_billing_cycle) identifier_billing_cycle (identifier_date_range) identifier_date_range )attribute (identifier_upper) identifier_upper )attribute (keyword_argument (identifier_bounds) identifier_bounds (string_'[]') string_'[]' )keyword_argument )argument_list )call )keyword_argument )argument_list )call (identifier_count) identifier_count )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (identifier_billing_cycle_number) identifier_billing_cycle_number )return_statement )block )function_definition )module
Gets the 1-indexed number of the billing cycle relative to the provided billing cycle
(module (function_definition (function_name_unzip_file) function_name_unzip_file (parameters (identifier_source_file) identifier_source_file (default_parameter (identifier_dest_dir) identifier_dest_dir (None) None )default_parameter (default_parameter (identifier_mkdir) identifier_mkdir (False) False )default_parameter )parameters (block (if_statement (comparison_operator (identifier_dest_dir) identifier_dest_dir (None) None )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_dest_dir) identifier_dest_dir (identifier_fname) identifier_fname )pattern_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (identifier_source_file) identifier_source_file )argument_list )call )assignment )expression_statement )block (elif_clause (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_dest_dir) identifier_dest_dir )argument_list )call )not_operator (block (if_statement (identifier_mkdir) identifier_mkdir (block (expression_statement (call (identifier_preparedir) identifier_preparedir (argument_list (identifier_dest_dir) identifier_dest_dir )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_created) identifier_created (call (identifier_preparedir) identifier_preparedir (argument_list (identifier_dest_dir) identifier_dest_dir (False) False )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_created) identifier_created )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Failed to find %s.") string_"Failed to find %s." (identifier_dest_dir) identifier_dest_dir )binary_operator )argument_list )call )raise_statement )block )if_statement )block )else_clause )if_statement )block )elif_clause )if_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_zipfile) identifier_zipfile (identifier_ZipFile) identifier_ZipFile )attribute (argument_list (identifier_source_file) identifier_source_file )argument_list )call (as_pattern_target (identifier_zf) identifier_zf )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_member) identifier_member (call (attribute (identifier_zf) identifier_zf (identifier_infolist) identifier_infolist )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_words) identifier_words (call (attribute (attribute (identifier_member) identifier_member (identifier_filename) identifier_filename )attribute (identifier_split) identifier_split )attribute (argument_list (string_'\\') string_'\\' )argument_list )call )assignment )expression_statement (for_statement (identifier_word) identifier_word (subscript (identifier_words) identifier_words (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript (block (expression_statement (assignment (pattern_list (identifier_drive) identifier_drive (identifier_word) identifier_word )pattern_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitdrive) identifier_splitdrive )attribute (argument_list (identifier_word) identifier_word )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_head) identifier_head (identifier_word) identifier_word )pattern_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (identifier_word) identifier_word )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_word) identifier_word (tuple (attribute (identifier_os) identifier_os (identifier_curdir) identifier_curdir )attribute (attribute (identifier_os) identifier_os (identifier_pardir) identifier_pardir )attribute (string_'') string_'' )tuple )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_dest_dir) identifier_dest_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_dest_dir) identifier_dest_dir (identifier_word) identifier_word )argument_list )call )assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_zf) identifier_zf (identifier_extract) identifier_extract )attribute (argument_list (identifier_member) identifier_member (identifier_dest_dir) identifier_dest_dir )argument_list )call )expression_statement )block )for_statement )block )with_statement )block )function_definition )module
Unzip a compressed file. Args: source_file: Full path to a valid compressed file (e.g. c:/ladybug/testPts.zip) dest_dir: Target folder to extract to (e.g. c:/ladybug). Default is set to the same directory as the source file. mkdir: Set to True to create the directory if doesn't exist (Default: False)
(module (function_definition (function_name__get_retention_policy_value) function_name__get_retention_policy_value (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_RetentionPolicy) identifier_RetentionPolicy )attribute (None) None )comparison_operator (comparison_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_RetentionPolicy) identifier_RetentionPolicy )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_RETAIN) identifier_RETAIN )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )comparison_operator )boolean_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier_RETAIN) identifier_RETAIN )attribute )return_statement )block (elif_clause (comparison_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_RetentionPolicy) identifier_RetentionPolicy )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_DELETE) identifier_DELETE )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )comparison_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier_DELETE) identifier_DELETE )attribute )return_statement )block )elif_clause (elif_clause (comparison_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_RetentionPolicy) identifier_RetentionPolicy )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (attribute (identifier_self) identifier_self (identifier_retention_policy_options) identifier_retention_policy_options )attribute )comparison_operator (block (raise_statement (call (identifier_InvalidResourceException) identifier_InvalidResourceException (argument_list (attribute (identifier_self) identifier_self (identifier_logical_id) identifier_logical_id )attribute (call (attribute (string_"'{}' must be one of the following options: {}.") string_"'{}' must be one of the following options: {}." (identifier_format) identifier_format )attribute (argument_list (string_'RetentionPolicy') string_'RetentionPolicy' (list (attribute (identifier_self) identifier_self (identifier_RETAIN) identifier_RETAIN )attribute (attribute (identifier_self) identifier_self (identifier_DELETE) identifier_DELETE )attribute )list )argument_list )call )argument_list )call )raise_statement )block )elif_clause )if_statement )block )function_definition )module
Sets the deletion policy on this resource. The default is 'Retain'. :return: value for the DeletionPolicy attribute.
(module (function_definition (function_name_fen) function_name_fen (parameters (identifier_self) identifier_self (keyword_separator )keyword_separator (typed_default_parameter (identifier_shredder) identifier_shredder (type (identifier_bool) identifier_bool )type (False) False )typed_default_parameter (typed_default_parameter (identifier_en_passant) identifier_en_passant (type (identifier_str) identifier_str )type (string_"legal") string_"legal" )typed_default_parameter (typed_default_parameter (identifier_promoted) identifier_promoted (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_bool) identifier_bool )type )type_parameter )generic_type )type (None) None )typed_default_parameter )parameters (type (identifier_str) identifier_str )type (block (return_statement (call (attribute (string_" ") string_" " (identifier_join) identifier_join )attribute (argument_list (list (call (attribute (identifier_self) identifier_self (identifier_epd) identifier_epd )attribute (argument_list (keyword_argument (identifier_shredder) identifier_shredder (identifier_shredder) identifier_shredder )keyword_argument (keyword_argument (identifier_en_passant) identifier_en_passant (identifier_en_passant) identifier_en_passant )keyword_argument (keyword_argument (identifier_promoted) identifier_promoted (identifier_promoted) identifier_promoted )keyword_argument )argument_list )call (call (identifier_str) identifier_str (argument_list (attribute (identifier_self) identifier_self (identifier_halfmove_clock) identifier_halfmove_clock )attribute )argument_list )call (call (identifier_str) identifier_str (argument_list (attribute (identifier_self) identifier_self (identifier_fullmove_number) identifier_fullmove_number )attribute )argument_list )call )list )argument_list )call )return_statement )block )function_definition )module
Gets a FEN representation of the position. A FEN string (e.g., ``rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1``) consists of the position part :func:`~chess.Board.board_fen()`, the :data:`~chess.Board.turn`, the castling part (:data:`~chess.Board.castling_rights`), the en passant square (:data:`~chess.Board.ep_square`), the :data:`~chess.Board.halfmove_clock` and the :data:`~chess.Board.fullmove_number`. :param shredder: Use :func:`~chess.Board.castling_shredder_fen()` and encode castling rights by the file of the rook (like ``HAha``) instead of the default :func:`~chess.Board.castling_xfen()` (like ``KQkq``). :param en_passant: By default, only fully legal en passant squares are included (:func:`~chess.Board.has_legal_en_passant()`). Pass ``fen`` to strictly follow the FEN specification (always include the en passant square after a two-step pawn move) or ``xfen`` to follow the X-FEN specification (:func:`~chess.Board.has_pseudo_legal_en_passant()`). :param promoted: Mark promoted pieces like ``Q~``. By default, this is only enabled in chess variants where this is relevant.
(module (function_definition (function_name__exec_info) function_name__exec_info (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__info) identifier__info )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__info) identifier__info )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_exec_inspect) identifier_exec_inspect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_exec_id) identifier_exec_id )attribute )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__info) identifier__info )attribute )return_statement )block )function_definition )module
Caching wrapper around client.exec_inspect
(module (function_definition (function_name_get_field_setup_query) function_name_get_field_setup_query (parameters (identifier_query) identifier_query (identifier_model) identifier_model (identifier_column_name) identifier_column_name )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_model) identifier_model (identifier_column_name) identifier_column_name )argument_list )call )not_operator (block (expression_statement (assignment (identifier_rel_model) identifier_rel_model (attribute (attribute (call (identifier_getattr) identifier_getattr (argument_list (identifier_model) identifier_model (subscript (call (attribute (identifier_column_name) identifier_column_name (identifier_split) identifier_split )attribute (argument_list (string_".") string_"." )argument_list )call (integer_0) integer_0 )subscript )argument_list )call (identifier_mapper) identifier_mapper )attribute (identifier_class_) identifier_class_ )attribute )assignment )expression_statement (expression_statement (assignment (identifier_query) identifier_query (call (attribute (identifier_query) identifier_query (identifier_join) identifier_join )attribute (argument_list (identifier_rel_model) identifier_rel_model )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_query) identifier_query (call (identifier_getattr) identifier_getattr (argument_list (identifier_rel_model) identifier_rel_model (subscript (call (attribute (identifier_column_name) identifier_column_name (identifier_split) identifier_split )attribute (argument_list (string_".") string_"." )argument_list )call (integer_1) integer_1 )subscript )argument_list )call )expression_list )return_statement )block (else_clause (block (return_statement (expression_list (identifier_query) identifier_query (call (identifier_getattr) identifier_getattr (argument_list (identifier_model) identifier_model (identifier_column_name) identifier_column_name )argument_list )call )expression_list )return_statement )block )else_clause )if_statement )block )function_definition )module
Help function for SQLA filters, checks for dot notation on column names. If it exists, will join the query with the model from the first part of the field name. example: Contact.created_by: if created_by is a User model, it will be joined to the query.
(module (function_definition (function_name__completion_checker) function_name__completion_checker (parameters (identifier_async_id) identifier_async_id (identifier_context_id) identifier_context_id )parameters (block (if_statement (not_operator (identifier_context_id) identifier_context_id )not_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (string_"Context for async %s does not exist") string_"Context for async %s does not exist" (identifier_async_id) identifier_async_id )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_context) identifier_context (call (attribute (identifier_FuriousContext) identifier_FuriousContext (identifier_from_id) identifier_from_id )attribute (argument_list (identifier_context_id) identifier_context_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_marker) identifier_marker (call (attribute (identifier_FuriousCompletionMarker) identifier_FuriousCompletionMarker (identifier_get_by_id) identifier_get_by_id )attribute (argument_list (identifier_context_id) identifier_context_id )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_marker) identifier_marker (attribute (identifier_marker) identifier_marker (identifier_complete) identifier_complete )attribute )boolean_operator (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_"Context %s already complete") string_"Context %s already complete" (identifier_context_id) identifier_context_id )binary_operator )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )if_statement (expression_statement (assignment (identifier_task_ids) identifier_task_ids (attribute (identifier_context) identifier_context (identifier_task_ids) identifier_task_ids )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_async_id) identifier_async_id (identifier_task_ids) identifier_task_ids )comparison_operator (block (expression_statement (call (attribute (identifier_task_ids) identifier_task_ids (identifier_remove) identifier_remove )attribute (argument_list (identifier_async_id) identifier_async_id )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (string_"Loaded context.") string_"Loaded context." )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (identifier_task_ids) identifier_task_ids )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_done) identifier_done (identifier_has_errors) identifier_has_errors )pattern_list (call (identifier__check_markers) identifier__check_markers (argument_list (identifier_task_ids) identifier_task_ids )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_done) identifier_done )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (call (identifier__mark_context_complete) identifier__mark_context_complete (argument_list (identifier_marker) identifier_marker (identifier_context) identifier_context (identifier_has_errors) identifier_has_errors )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Check if all Async jobs within a Context have been run.
(module (function_definition (function_name__transliterate) function_name__transliterate (parameters (identifier_self) identifier_self (identifier_text) identifier_text (identifier_outFormat) identifier_outFormat )parameters (block (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_self) identifier_self (identifier__preprocess) identifier__preprocess )attribute (argument_list (identifier_text) identifier_text )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_i) identifier_i (integer_0) integer_0 )assignment )expression_statement (while_statement (comparison_operator (identifier_i) identifier_i (call (identifier_len) identifier_len (argument_list (identifier_text) identifier_text )argument_list )call )comparison_operator (block (if_statement (call (attribute (subscript (identifier_text) identifier_text (identifier_i) identifier_i )subscript (identifier_isspace) identifier_isspace )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_text) identifier_text (identifier_i) identifier_i )subscript )argument_list )call )expression_statement (expression_statement (assignment (identifier_i) identifier_i (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_chr) identifier_chr (call (attribute (identifier_self) identifier_self (identifier__getNextChar) identifier__getNextChar )attribute (argument_list (identifier_text) identifier_text (identifier_i) identifier_i )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (attribute (subscript (identifier_self) identifier_self (identifier_chr) identifier_chr )subscript (identifier_unichr) identifier_unichr )attribute )argument_list )call )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (call (identifier__unrecognised) identifier__unrecognised (argument_list (identifier_chr) identifier_chr )argument_list )call )argument_list )call )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_i) identifier_i (binary_operator (identifier_i) identifier_i (call (identifier_len) identifier_len (argument_list (identifier_chr) identifier_chr )argument_list )call )binary_operator )assignment )expression_statement )block )else_clause )if_statement )block )while_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Transliterate the text to Unicode.
(module (function_definition (function_name_close) function_name_close (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_"%r: close") string_"%r: close" (identifier_self) identifier_self )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__closing) identifier__closing )attribute (True) True )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_brokerclients) identifier_brokerclients (attribute (identifier_self) identifier_self (identifier_clients) identifier_clients )attribute )pattern_list (expression_list (attribute (identifier_self) identifier_self (identifier_clients) identifier_clients )attribute (None) None )expression_list )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__close_brokerclients) identifier__close_brokerclients )attribute (argument_list (call (attribute (identifier_brokerclients) identifier_brokerclients (identifier_values) identifier_values )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_reset_all_metadata) identifier_reset_all_metadata )attribute (argument_list )argument_list )call )expression_statement (return_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_close_dlist) identifier_close_dlist )attribute (call (attribute (identifier_defer) identifier_defer (identifier_succeed) identifier_succeed )attribute (argument_list (None) None )argument_list )call )boolean_operator )return_statement )block )function_definition )module
Permanently dispose of the client - Immediately mark the client as closed, causing current operations to fail with :exc:`~afkak.common.CancelledError` and future operations to fail with :exc:`~afkak.common.ClientError`. - Clear cached metadata. - Close any connections to Kafka brokers. :returns: deferred that fires when all resources have been released
(module (function_definition (function_name_serialize_upload) function_name_serialize_upload (parameters (identifier_name) identifier_name (identifier_storage) identifier_storage (identifier_url) identifier_url )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_storage) identifier_storage (identifier_LazyObject) identifier_LazyObject )argument_list )call (block (expression_statement (call (attribute (identifier_storage) identifier_storage (identifier__setup) identifier__setup )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_cls) identifier_cls (attribute (attribute (identifier_storage) identifier_storage (identifier__wrapped) identifier__wrapped )attribute (identifier___class__) identifier___class__ )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_cls) identifier_cls (attribute (identifier_storage) identifier_storage (identifier___class__) identifier___class__ )attribute )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (attribute (identifier_signing) identifier_signing (identifier_dumps) identifier_dumps )attribute (argument_list (dictionary (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'storage') string_'storage' (binary_operator (string_'%s.%s') string_'%s.%s' (tuple (attribute (identifier_cls) identifier_cls (identifier___module__) identifier___module__ )attribute (attribute (identifier_cls) identifier_cls (identifier___name__) identifier___name__ )attribute )tuple )binary_operator )pair )dictionary (keyword_argument (identifier_salt) identifier_salt (identifier_url) identifier_url )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Serialize uploaded file by name and storage. Namespaced by the upload url.
(module (function_definition (function_name_diffsp) function_name_diffsp (parameters (identifier_self) identifier_self (typed_parameter (identifier_col) identifier_col (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_serie) identifier_serie (type (string_"iterable") string_"iterable" )type )typed_parameter (typed_default_parameter (identifier_name) identifier_name (type (identifier_str) identifier_str )type (string_"Diff") string_"Diff" )typed_default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_d) identifier_d (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_row) identifier_row )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_df) identifier_df )attribute (identifier_iterrows) identifier_iterrows )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_v) identifier_v (binary_operator (parenthesized_expression (binary_operator (subscript (identifier_row) identifier_row (identifier_col) identifier_col )subscript (integer_100) integer_100 )binary_operator )parenthesized_expression (subscript (identifier_serie) identifier_serie (identifier_i) identifier_i )subscript )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_d) identifier_d (identifier_append) identifier_append )attribute (argument_list (identifier_v) identifier_v )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_df) identifier_df )attribute (identifier_name) identifier_name )subscript (identifier_d) identifier_d )assignment )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_self) identifier_self (identifier_err) identifier_err )attribute (argument_list (identifier_e) identifier_e (attribute (identifier_self) identifier_self (identifier__append) identifier__append )attribute (string_"Can not diff column from serie") string_"Can not diff column from serie" )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Add a diff column in percentage from a serie. The serie is an iterable of the same length than the dataframe :param col: column to diff :type col: str :param serie: serie to diff from :type serie: iterable :param name: name of the diff col, defaults to "Diff" :param name: str, optional :example: ``ds.diffp("Col 1", [1, 1, 4], "New col")``
(module (function_definition (function_name_cancel_orders) function_name_cancel_orders (parameters (identifier_self) identifier_self (typed_parameter (identifier_order_ids) identifier_order_ids (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type )typed_parameter )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_orders_to_cancel) identifier_orders_to_cancel (identifier_order_ids) identifier_order_ids )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_f'Canceling orders on {self.name}: ids={orders_to_cancel}') string_f'Canceling orders on {self.name}: ids={orders_to_cancel}' )argument_list )call )expression_statement (expression_statement (assignment (identifier_cancelled_orders) identifier_cancelled_orders (list )list )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_dry_run) identifier_dry_run )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_warning) identifier_warning )attribute (argument_list (string_f'DRY RUN: Orders cancelled on {self.name}: {orders_to_cancel}') string_f'DRY RUN: Orders cancelled on {self.name}: {orders_to_cancel}' )argument_list )call )expression_statement (return_statement (identifier_orders_to_cancel) identifier_orders_to_cancel )return_statement )block )if_statement (try_statement (block (if_statement (attribute (identifier_self) identifier_self (identifier_has_batch_cancel) identifier_has_batch_cancel )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__cancel_orders) identifier__cancel_orders )attribute (argument_list (identifier_orders_to_cancel) identifier_orders_to_cancel )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_cancelled_orders) identifier_cancelled_orders (identifier_append) identifier_append )attribute (argument_list (identifier_orders_to_cancel) identifier_orders_to_cancel )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_orders_to_cancel) identifier_orders_to_cancel (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement )block (else_clause (block (for_statement (pattern_list (identifier_i) identifier_i (identifier_order_id) identifier_order_id )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_orders_to_cancel) identifier_orders_to_cancel )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__cancel_order) identifier__cancel_order )attribute (argument_list (identifier_order_id) identifier_order_id )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_cancelled_orders) identifier_cancelled_orders (identifier_append) identifier_append )attribute (argument_list (identifier_order_id) identifier_order_id )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_orders_to_cancel) identifier_orders_to_cancel (identifier_pop) identifier_pop )attribute (argument_list (identifier_i) identifier_i )argument_list )call )expression_statement )block )for_statement )block )else_clause )if_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 (assignment (identifier_msg) identifier_msg (string_f'Failed to cancel {len(orders_to_cancel)} orders on {self.name}: ids={orders_to_cancel}') string_f'Failed to cancel {len(orders_to_cancel)} orders on {self.name}: ids={orders_to_cancel}' )assignment )expression_statement (raise_statement (call (attribute (identifier_self) identifier_self (identifier_exception) identifier_exception )attribute (argument_list (identifier_OrderNotFound) identifier_OrderNotFound (identifier_msg) identifier_msg (identifier_e) identifier_e )argument_list )call (identifier_e) identifier_e )raise_statement )block )except_clause )try_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_info) identifier_info )attribute (argument_list (string_f'Orders cancelled on {self.name}: ids={cancelled_orders}') string_f'Orders cancelled on {self.name}: ids={cancelled_orders}' )argument_list )call )expression_statement (return_statement (identifier_cancelled_orders) identifier_cancelled_orders )return_statement )block )function_definition )module
Cancel multiple orders by a list of IDs.
(module (function_definition (function_name__copy_selection) function_name__copy_selection (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_event) identifier_event )list_splat_pattern )parameters (block (if_statement (call (identifier_react_to_event) identifier_react_to_event (argument_list (attribute (identifier_self) identifier_self (identifier_view) identifier_view )attribute (attribute (attribute (identifier_self) identifier_self (identifier_view) identifier_view )attribute (identifier_editor) identifier_editor )attribute (identifier_event) identifier_event )argument_list )call (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"copy selection") string_"copy selection" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_global_clipboard) identifier_global_clipboard (identifier_copy) identifier_copy )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (identifier_selection) identifier_selection )attribute )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )if_statement )block )function_definition )module
Copies the current selection to the clipboard.
(module (function_definition (function_name_folder) function_name_folder (parameters (identifier_self) identifier_self )parameters (type (subscript (attribute (identifier_typing) identifier_typing (identifier_Union) identifier_Union )attribute (identifier_str) identifier_str (None) None )subscript )type (block (if_statement (comparison_operator (string_'folder') string_'folder' (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute )comparison_operator (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_get) identifier_get )attribute (argument_list (string_'folder') string_'folder' )argument_list )call )return_statement )block (elif_clause (attribute (identifier_self) identifier_self (identifier_project_folder) identifier_project_folder )attribute (block (if_statement (call (identifier_callable) identifier_callable (argument_list (attribute (identifier_self) identifier_self (identifier_project_folder) identifier_project_folder )attribute )argument_list )call (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_project_folder) identifier_project_folder )attribute (argument_list )argument_list )call )return_statement )block (else_clause (block (return_statement (attribute (identifier_self) identifier_self (identifier_project_folder) identifier_project_folder )attribute )return_statement )block )else_clause )if_statement )block )elif_clause )if_statement (return_statement (None) None )return_statement )block )function_definition )module
The folder, relative to the project source_directory, where the file resides :return:
(module (function_definition (function_name_get_repository_configuration) function_name_get_repository_configuration (parameters (identifier_id) identifier_id )parameters (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_utils) identifier_utils (identifier_checked_api_call) identifier_checked_api_call )attribute (argument_list (attribute (identifier_pnc_api) identifier_pnc_api (identifier_repositories) identifier_repositories )attribute (string_'get_specific') string_'get_specific' (keyword_argument (identifier_id) identifier_id (identifier_id) identifier_id )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_response) identifier_response (block (return_statement (attribute (identifier_response) identifier_response (identifier_content) identifier_content )attribute )return_statement )block )if_statement )block )function_definition )module
Retrieve a specific RepositoryConfiguration
(module (function_definition (function_name_del_graph) function_name_del_graph (parameters (identifier_self) identifier_self (identifier_graph) identifier_graph )parameters (block (expression_statement (assignment (identifier_g) identifier_g (call (attribute (identifier_self) identifier_self (identifier_pack) identifier_pack )attribute (argument_list (identifier_graph) identifier_graph )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_sql) identifier_sql )attribute (argument_list (string_'del_edge_val_graph') string_'del_edge_val_graph' (identifier_g) identifier_g )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_sql) identifier_sql )attribute (argument_list (string_'del_node_val_graph') string_'del_node_val_graph' (identifier_g) identifier_g )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_sql) identifier_sql )attribute (argument_list (string_'del_edge_val_graph') string_'del_edge_val_graph' (identifier_g) identifier_g )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_sql) identifier_sql )attribute (argument_list (string_'del_edges_graph') string_'del_edges_graph' (identifier_g) identifier_g )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_sql) identifier_sql )attribute (argument_list (string_'del_nodes_graph') string_'del_nodes_graph' (identifier_g) identifier_g )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_sql) identifier_sql )attribute (argument_list (string_'del_graph') string_'del_graph' (identifier_g) identifier_g )argument_list )call )expression_statement )block )function_definition )module
Delete all records to do with the graph