sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_date_to_datetime) function_name_date_to_datetime (parameters (identifier_self) identifier_self (identifier_time_input) identifier_time_input (default_parameter (identifier_tz) identifier_tz (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_dt) identifier_dt (None) None )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_dt) identifier_dt (call (attribute (identifier_parser) identifier_parser (identifier_parse) identifier_parse )attribute (argument_list (identifier_time_input) identifier_time_input )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_tz) identifier_tz (None) None )comparison_operator (comparison_operator (identifier_tz) identifier_tz (call (attribute (identifier_dt) identifier_dt (identifier_tzname) identifier_tzname )attribute (argument_list )argument_list )call )comparison_operator )boolean_operator (block (if_statement (comparison_operator (attribute (identifier_dt) identifier_dt (identifier_tzinfo) identifier_tzinfo )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_dt) identifier_dt (call (attribute (identifier_self) identifier_self (identifier__replace_timezone) identifier__replace_timezone )attribute (argument_list (identifier_dt) identifier_dt )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_dt) identifier_dt (call (attribute (identifier_dt) identifier_dt (identifier_astimezone) identifier_astimezone )attribute (argument_list (call (identifier_timezone) identifier_timezone (argument_list (identifier_tz) identifier_tz )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (pass_statement )pass_statement )block )except_clause (except_clause (identifier_TypeError) identifier_TypeError (block (pass_statement )pass_statement )block )except_clause (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement (identifier_dt) identifier_dt )return_statement )block )function_definition )module
Convert ISO 8601 and other date strings to datetime.datetime type. Args: time_input (string): The time input string (see formats above). tz (string): The time zone for the returned data. Returns: (datetime.datetime): Python datetime.datetime object.
(module (function_definition (function_name__on_wheel_event) function_name__on_wheel_event (parameters (identifier_self) identifier_self (identifier_event) identifier_event )parameters (block (try_statement (block (expression_statement (assignment (identifier_delta) identifier_delta (call (attribute (call (attribute (identifier_event) identifier_event (identifier_angleDelta) identifier_angleDelta )attribute (argument_list )argument_list )call (identifier_y) identifier_y )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (expression_statement (assignment (identifier_delta) identifier_delta (call (attribute (identifier_event) identifier_event (identifier_delta) identifier_delta )attribute (argument_list )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (if_statement (comparison_operator (binary_operator (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_event) identifier_event (identifier_modifiers) identifier_modifiers )attribute (argument_list )argument_list )call )argument_list )call (attribute (attribute (identifier_QtCore) identifier_QtCore (identifier_Qt) identifier_Qt )attribute (identifier_ControlModifier) identifier_ControlModifier )attribute )binary_operator (integer_0) integer_0 )comparison_operator (block (if_statement (comparison_operator (identifier_delta) identifier_delta (attribute (identifier_self) identifier_self (identifier_prev_delta) identifier_prev_delta )attribute )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_editor) identifier_editor )attribute (identifier_zoom_out) identifier_zoom_out )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_event) identifier_event (identifier_accept) identifier_accept )attribute (argument_list )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_editor) identifier_editor )attribute (identifier_zoom_in) identifier_zoom_in )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_event) identifier_event (identifier_accept) identifier_accept )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement )block )if_statement )block )function_definition )module
Increments or decrements editor fonts settings on mouse wheel event if ctrl modifier is on. :param event: wheel event :type event: QWheelEvent
(module (function_definition (function_name_display_exc) function_name_display_exc (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_errmsg) identifier_errmsg (call (attribute (identifier_self) identifier_self (identifier_get_error) identifier_get_error )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_errmsg) identifier_errmsg (None) None )comparison_operator (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_errmsg_lines) identifier_errmsg_lines (list (binary_operator (binary_operator (string_"in ") string_"in " (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )binary_operator (string_":") string_":" )binary_operator )list )assignment )expression_statement (for_statement (identifier_line) identifier_line (call (attribute (identifier_errmsg) identifier_errmsg (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call (block (if_statement (identifier_line) identifier_line (block (expression_statement (assignment (identifier_line) identifier_line (binary_operator (binary_operator (string_" ") string_" " (identifier_taberrfmt) identifier_taberrfmt )binary_operator (identifier_line) identifier_line )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_errmsg_lines) identifier_errmsg_lines (identifier_append) identifier_append )attribute (argument_list (identifier_line) identifier_line )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_errmsg) identifier_errmsg (call (attribute (string_"\n") string_"\n" (identifier_join) identifier_join )attribute (argument_list (identifier_errmsg_lines) identifier_errmsg_lines )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (identifier_printerr) identifier_printerr (argument_list (identifier_errmsg) identifier_errmsg )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Properly prints an exception in the exception context.
(module (function_definition (function_name_load_event_list) function_name_load_event_list (parameters (identifier_filename) identifier_filename (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (call (attribute (attribute (identifier_dcase_util) identifier_dcase_util (identifier_containers) identifier_containers )attribute (identifier_MetaDataContainer) identifier_MetaDataContainer )attribute (argument_list )argument_list )call (identifier_load) identifier_load )attribute (argument_list (keyword_argument (identifier_filename) identifier_filename (identifier_filename) identifier_filename )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Load event list from csv formatted text-file Supported formats (see more `dcase_util.containers.MetaDataContainer.load()` method): - [event onset (float >= 0)][delimiter][event offset (float >= 0)] - [event onset (float >= 0)][delimiter][event offset (float >= 0)][delimiter][label] - [filename][delimiter][event onset (float >= 0)][delimiter][event offset (float >= 0)][delimiter][event label] - [filename][delimiter][scene_label][delimiter][event onset (float >= 0)][delimiter][event offset (float >= 0)][delimiter][event label] - [filename] Supported delimiters: ``,``, ``;``, ``tab`` Example of event list file:: 21.64715 23.00552 alert 36.91184 38.27021 alert 69.72575 71.09029 alert 63.53990 64.89827 alert 84.25553 84.83920 alert 20.92974 21.82661 clearthroat 28.39992 29.29679 clearthroat 80.47837 81.95937 clearthroat 44.48363 45.96463 clearthroat 78.13073 79.05953 clearthroat 15.17031 16.27235 cough 20.54931 21.65135 cough 27.79964 28.90168 cough 75.45959 76.32490 cough 70.81708 71.91912 cough 21.23203 22.55902 doorslam 7.546220 9.014880 doorslam 34.11303 35.04183 doorslam 45.86001 47.32867 doorslam Parameters ---------- filename : str Path to the csv-file Returns ------- list of dict Event list
(module (function_definition (function_name_iiscgi) function_name_iiscgi (parameters (identifier_application) identifier_application )parameters (block (try_statement (block (import_from_statement (dotted_name (identifier_wsgiref) identifier_wsgiref (identifier_handlers) identifier_handlers )dotted_name (dotted_name (identifier_IISCGIHandler) identifier_IISCGIHandler )dotted_name )import_from_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Python 3.2 or newer is required.") string_"Python 3.2 or newer is required." )argument_list )call )expression_statement )block )except_clause )try_statement (if_statement (not_operator (identifier___debug__) identifier___debug__ )not_operator (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (string_"Interactive debugging and other persistence-based processes will not work.") string_"Interactive debugging and other persistence-based processes will not work." )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (call (identifier_IISCGIHandler) identifier_IISCGIHandler (argument_list )argument_list )call (identifier_run) identifier_run )attribute (argument_list (identifier_application) identifier_application )argument_list )call )expression_statement )block )function_definition )module
A specialized version of the reference WSGI-CGI server to adapt to Microsoft IIS quirks. This is not a production quality interface and will behave badly under load.
(module (function_definition (function_name_emit_containers) function_name_emit_containers (parameters (identifier_self) identifier_self (identifier_containers) identifier_containers (default_parameter (identifier_verbose) identifier_verbose (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_containers) identifier_containers (call (identifier_sorted) identifier_sorted (argument_list (identifier_containers) identifier_containers (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_c) identifier_c )lambda_parameters (call (attribute (identifier_c) identifier_c (identifier_get) identifier_get )attribute (argument_list (string_'name') string_'name' )argument_list )call )lambda )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_task_definition) identifier_task_definition (dictionary (pair (string_'family') string_'family' (attribute (identifier_self) identifier_self (identifier_family) identifier_family )attribute )pair (pair (string_'containerDefinitions') string_'containerDefinitions' (identifier_containers) identifier_containers )pair (pair (string_'volumes') string_'volumes' (boolean_operator (attribute (identifier_self) identifier_self (identifier_volumes) identifier_volumes )attribute (list )list )boolean_operator )pair )dictionary )assignment )expression_statement (if_statement (identifier_verbose) identifier_verbose (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_task_definition) identifier_task_definition (keyword_argument (identifier_indent) identifier_indent (integer_4) integer_4 )keyword_argument (keyword_argument (identifier_sort_keys) identifier_sort_keys (True) True )keyword_argument )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_task_definition) identifier_task_definition )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Emits the task definition and sorts containers by name :param containers: List of the container definitions :type containers: list of dict :param verbose: Print out newlines and indented JSON :type verbose: bool :returns: The text output :rtype: str
(module (function_definition (function_name_create_config) function_name_create_config (parameters (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_subvolume) identifier_subvolume (None) None )default_parameter (default_parameter (identifier_fstype) identifier_fstype (None) None )default_parameter (default_parameter (identifier_template) identifier_template (None) None )default_parameter (default_parameter (identifier_extra_opts) identifier_extra_opts (None) None )default_parameter )parameters (block (function_definition (function_name_raise_arg_error) function_name_raise_arg_error (parameters (identifier_argname) identifier_argname )parameters (block (raise_statement (call (identifier_CommandExecutionError) identifier_CommandExecutionError (argument_list (call (attribute (string_'You must provide a "{0}" for the new configuration') string_'You must provide a "{0}" for the new configuration' (identifier_format) identifier_format )attribute (argument_list (identifier_argname) identifier_argname )argument_list )call )argument_list )call )raise_statement )block )function_definition (if_statement (not_operator (identifier_name) identifier_name )not_operator (block (expression_statement (call (identifier_raise_arg_error) identifier_raise_arg_error (argument_list (string_"name") string_"name" )argument_list )call )expression_statement )block )if_statement (if_statement (not_operator (identifier_subvolume) identifier_subvolume )not_operator (block (expression_statement (call (identifier_raise_arg_error) identifier_raise_arg_error (argument_list (string_"subvolume") string_"subvolume" )argument_list )call )expression_statement )block )if_statement (if_statement (not_operator (identifier_fstype) identifier_fstype )not_operator (block (expression_statement (call (identifier_raise_arg_error) identifier_raise_arg_error (argument_list (string_"fstype") string_"fstype" )argument_list )call )expression_statement )block )if_statement (if_statement (not_operator (identifier_template) identifier_template )not_operator (block (expression_statement (assignment (identifier_template) identifier_template (string_"") string_"" )assignment )expression_statement )block )if_statement (try_statement (block (expression_statement (call (attribute (identifier_snapper) identifier_snapper (identifier_CreateConfig) identifier_CreateConfig )attribute (argument_list (identifier_name) identifier_name (identifier_subvolume) identifier_subvolume (identifier_fstype) identifier_fstype (identifier_template) identifier_template )argument_list )call )expression_statement (if_statement (identifier_extra_opts) identifier_extra_opts (block (expression_statement (call (identifier_set_config) identifier_set_config (argument_list (identifier_name) identifier_name (dictionary_splat (identifier_extra_opts) identifier_extra_opts )dictionary_splat )argument_list )call )expression_statement )block )if_statement (return_statement (call (identifier_get_config) identifier_get_config (argument_list (identifier_name) identifier_name )argument_list )call )return_statement )block (except_clause (as_pattern (attribute (identifier_dbus) identifier_dbus (identifier_DBusException) identifier_DBusException )attribute (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (raise_statement (call (identifier_CommandExecutionError) identifier_CommandExecutionError (argument_list (call (attribute (string_'Error encountered while creating the new configuration: {0}') string_'Error encountered while creating the new configuration: {0}' (identifier_format) identifier_format )attribute (argument_list (call (identifier__dbus_exception_to_reason) identifier__dbus_exception_to_reason (argument_list (identifier_exc) identifier_exc (call (identifier_locals) identifier_locals (argument_list )argument_list )call )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Creates a new Snapper configuration name Name of the new Snapper configuration. subvolume Path to the related subvolume. fstype Filesystem type of the subvolume. template Configuration template to use. (Default: default) extra_opts Extra Snapper configuration opts dictionary. It will override the values provided by the given template (if any). CLI example: .. code-block:: bash salt '*' snapper.create_config name=myconfig subvolume=/foo/bar/ fstype=btrfs salt '*' snapper.create_config name=myconfig subvolume=/foo/bar/ fstype=btrfs template="default" salt '*' snapper.create_config name=myconfig subvolume=/foo/bar/ fstype=btrfs extra_opts='{"NUMBER_CLEANUP": False}'
(module (function_definition (function_name_register_components) function_name_register_components (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_unregistered_components) identifier_unregistered_components (list )list )assignment )expression_statement (for_statement (identifier_path) identifier_path (attribute (identifier_self) identifier_self (identifier_paths) identifier_paths )attribute (block (for_statement (identifier_file) identifier_file (call (attribute (attribute (identifier_foundations) identifier_foundations (identifier_walkers) identifier_walkers )attribute (identifier_files_walker) identifier_files_walker )attribute (argument_list (identifier_path) identifier_path (tuple (call (attribute (string_"\.{0}$") string_"\.{0}$" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___extension) identifier___extension )attribute )argument_list )call )tuple (tuple (string_"\._") string_"\._" )tuple )argument_list )call (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_register_component) identifier_register_component )attribute (argument_list (identifier_file) identifier_file )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_unregistered_components) identifier_unregistered_components (identifier_append) identifier_append )attribute (argument_list (identifier_file) identifier_file )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )for_statement (if_statement (not_operator (identifier_unregistered_components) identifier_unregistered_components )not_operator (block (return_statement (True) True )return_statement )block (else_clause (block (raise_statement (call (attribute (attribute (identifier_manager) identifier_manager (identifier_exceptions) identifier_exceptions )attribute (identifier_ComponentRegistrationError) identifier_ComponentRegistrationError )attribute (argument_list (call (attribute (string_"{0} | '{1}' Components failed to register!") string_"{0} | '{1}' Components failed to register!" (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute (call (attribute (string_", ") string_", " (identifier_join) identifier_join )attribute (argument_list (identifier_unregistered_components) identifier_unregistered_components )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Registers the Components. Usage:: >>> manager = Manager(("./manager/tests/tests_manager/resources/components/core",)) >>> manager.register_components() True >>> manager.components.keys() [u'core.tests_component_a', u'core.tests_component_b'] :return: Method success. :rtype: bool
(module (function_definition (function_name_get_all_external_accounts) function_name_get_all_external_accounts (parameters (identifier_resource_root) identifier_resource_root (identifier_type_name) identifier_type_name (default_parameter (identifier_view) identifier_view (None) None )default_parameter )parameters (block (return_statement (call (identifier_call) identifier_call (argument_list (attribute (identifier_resource_root) identifier_resource_root (identifier_get) identifier_get )attribute (binary_operator (identifier_EXTERNAL_ACCOUNT_FETCH_PATH) identifier_EXTERNAL_ACCOUNT_FETCH_PATH (tuple (string_"type") string_"type" (identifier_type_name) identifier_type_name )tuple )binary_operator (identifier_ApiExternalAccount) identifier_ApiExternalAccount (True) True (keyword_argument (identifier_params) identifier_params (boolean_operator (boolean_operator (identifier_view) identifier_view (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_view) identifier_view (identifier_view) identifier_view )keyword_argument )argument_list )call )boolean_operator (None) None )boolean_operator )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Lookup all external accounts of a particular type, by type name. @param resource_root: The root Resource object. @param type_name: Type name @param view: View @return: An ApiList of ApiExternalAccount objects matching the specified type
(module (function_definition (function_name_addUnexpectedSuccess) function_name_addUnexpectedSuccess (parameters (identifier_self) identifier_self (identifier_test) identifier_test )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_self) identifier_self (identifier__handle_result) identifier__handle_result )attribute (argument_list (identifier_test) identifier_test (attribute (identifier_TestCompletionStatus) identifier_TestCompletionStatus (identifier_unexpected_success) identifier_unexpected_success )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_unexpectedSuccesses) identifier_unexpectedSuccesses )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_result) identifier_result )argument_list )call )expression_statement )block )function_definition )module
Register a test that passed unexpectedly. Parameters ---------- test : unittest.TestCase The test that has completed.
(module (function_definition (function_name_get_what_follows_raw) function_name_get_what_follows_raw (parameters (typed_parameter (identifier_s) identifier_s (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_prefix) identifier_prefix (type (identifier_str) identifier_str )type )typed_parameter (typed_default_parameter (identifier_onlyatstart) identifier_onlyatstart (type (identifier_bool) identifier_bool )type (True) True )typed_default_parameter (typed_default_parameter (identifier_stripwhitespace) identifier_stripwhitespace (type (identifier_bool) identifier_bool )type (True) True )typed_default_parameter )parameters (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_bool) identifier_bool )type (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_prefixstart) identifier_prefixstart (call (attribute (identifier_s) identifier_s (identifier_find) identifier_find )attribute (argument_list (identifier_prefix) identifier_prefix )argument_list )call )assignment )expression_statement (if_statement (parenthesized_expression (boolean_operator (parenthesized_expression (boolean_operator (comparison_operator (identifier_prefixstart) identifier_prefixstart (integer_0) integer_0 )comparison_operator (identifier_onlyatstart) identifier_onlyatstart )boolean_operator )parenthesized_expression (parenthesized_expression (boolean_operator (comparison_operator (identifier_prefixstart) identifier_prefixstart (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (not_operator (identifier_onlyatstart) identifier_onlyatstart )not_operator )boolean_operator )parenthesized_expression )boolean_operator )parenthesized_expression (block (expression_statement (assignment (identifier_resultstart) identifier_resultstart (binary_operator (identifier_prefixstart) identifier_prefixstart (call (identifier_len) identifier_len (argument_list (identifier_prefix) identifier_prefix )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (subscript (identifier_s) identifier_s (slice (identifier_resultstart) identifier_resultstart (colon) colon )slice )subscript )assignment )expression_statement (if_statement (identifier_stripwhitespace) identifier_stripwhitespace (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_result) identifier_result (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (expression_list (True) True (identifier_result) identifier_result )expression_list )return_statement )block )if_statement (return_statement (expression_list (False) False (string_"") string_"" )expression_list )return_statement )block )function_definition )module
Find the part of ``s`` that is after ``prefix``. Args: s: string to analyse prefix: prefix to find onlyatstart: only accept the prefix if it is right at the start of ``s`` stripwhitespace: remove whitespace from the result Returns: tuple: ``(found, result)``
(module (function_definition (function_name_get_all) function_name_get_all (parameters )parameters (block (expression_statement (assignment (identifier_info_dir) identifier_info_dir (call (identifier__get_info_dir) identifier__get_info_dir (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_results) identifier_results (list )list )assignment )expression_statement (for_statement (identifier_filename) identifier_filename (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (identifier_info_dir) identifier_info_dir )argument_list )call (block (expression_statement (assignment (identifier_filepath) identifier_filepath (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_info_dir) identifier_info_dir (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (try_statement (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filepath) identifier_filepath )argument_list )call (as_pattern_target (identifier_infile) identifier_infile )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_contents) identifier_contents (call (attribute (identifier_infile) identifier_infile (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement )block )with_statement )block (except_clause (as_pattern (identifier_IOError) identifier_IOError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (if_statement (comparison_operator (attribute (identifier_e) identifier_e (identifier_errno) identifier_errno )attribute (attribute (identifier_errno) identifier_errno (identifier_EACCES) identifier_EACCES )attribute )comparison_operator (block (continue_statement )continue_statement )block (else_clause (block (raise_statement )raise_statement )block )else_clause )if_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (identifier_info) identifier_info (call (identifier__info_from_string) identifier__info_from_string (argument_list (identifier_contents) identifier_contents )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (call (attribute (call (attribute (identifier_tb_logging) identifier_tb_logging (identifier_get_logger) identifier_get_logger )attribute (argument_list )argument_list )call (identifier_warning) identifier_warning )attribute (argument_list (string_"invalid info file: %r") string_"invalid info file: %r" (identifier_filepath) identifier_filepath (keyword_argument (identifier_exc_info) identifier_exc_info (True) True )keyword_argument )argument_list )call )expression_statement )block )except_clause (else_clause (block (expression_statement (call (attribute (identifier_results) identifier_results (identifier_append) identifier_append )attribute (argument_list (identifier_info) identifier_info )argument_list )call )expression_statement )block )else_clause )try_statement )block )for_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
Return TensorBoardInfo values for running TensorBoard processes. This function may not provide a perfect snapshot of the set of running processes. Its result set may be incomplete if the user has cleaned their /tmp/ directory while TensorBoard processes are running. It may contain extraneous entries if TensorBoard processes exited uncleanly (e.g., with SIGKILL or SIGQUIT). Returns: A fresh list of `TensorBoardInfo` objects.
(module (function_definition (function_name_drop_columns) function_name_drop_columns (parameters (identifier_self) identifier_self (identifier_colnames) identifier_colnames (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_new_arr) identifier_new_arr (call (attribute (identifier_rfn) identifier_rfn (identifier_drop_fields) identifier_drop_fields )attribute (argument_list (identifier_self) identifier_self (identifier_colnames) identifier_colnames (keyword_argument (identifier_usemask) identifier_usemask (False) False )keyword_argument (keyword_argument (identifier_asrecarray) identifier_asrecarray (True) True )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (argument_list (identifier_new_arr) identifier_new_arr (keyword_argument (identifier_h5loc) identifier_h5loc (attribute (identifier_self) identifier_self (identifier_h5loc) identifier_h5loc )attribute )keyword_argument (keyword_argument (identifier_split_h5) identifier_split_h5 (attribute (identifier_self) identifier_self (identifier_split_h5) identifier_split_h5 )attribute )keyword_argument (keyword_argument (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )keyword_argument (keyword_argument (identifier_h5singleton) identifier_h5singleton (attribute (identifier_self) identifier_self (identifier_h5singleton) identifier_h5singleton )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Drop columns from the table. See the docs for ``numpy.lib.recfunctions.drop_fields`` for an explanation of the remaining options.
(module (function_definition (function_name_reference) function_name_reference (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier___reference) identifier___reference )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___reference) identifier___reference )attribute (call (identifier__ConstructReference) identifier__ConstructReference (argument_list (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (keyword_argument (identifier_pairs) identifier_pairs (attribute (identifier_self) identifier_self (identifier___pairs) identifier___pairs )attribute )keyword_argument (keyword_argument (identifier_app) identifier_app (attribute (identifier_self) identifier_self (identifier___app) identifier___app )attribute )keyword_argument (keyword_argument (identifier_namespace) identifier_namespace (attribute (identifier_self) identifier_self (identifier___namespace) identifier___namespace )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier___reference) identifier___reference )attribute )return_statement )block )function_definition )module
Return the Reference object for this Key. This is a entity_pb.Reference instance -- a protocol buffer class used by the lower-level API to the datastore. NOTE: The caller should not mutate the return value.
(module (function_definition (function_name_add_relationship) function_name_add_relationship (parameters (identifier_self) identifier_self (identifier_term1) identifier_term1 (identifier_relationship) identifier_relationship (identifier_term2) identifier_term2 )parameters (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier_base_path) identifier_base_path )attribute (string_'term/add-relationship') string_'term/add-relationship' )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_'term1_id') string_'term1_id' (subscript (identifier_term1) identifier_term1 (string_'id') string_'id' )subscript )pair (pair (string_'relationship_tid') string_'relationship_tid' (subscript (identifier_relationship) identifier_relationship (string_'id') string_'id' )subscript )pair (pair (string_'term2_id') string_'term2_id' (subscript (identifier_term2) identifier_term2 (string_'id') string_'id' )subscript )pair (pair (string_'term1_version') string_'term1_version' (subscript (identifier_term1) identifier_term1 (string_'version') string_'version' )subscript )pair (pair (string_'relationship_term_version') string_'relationship_term_version' (subscript (identifier_relationship) identifier_relationship (string_'version') string_'version' )subscript )pair (pair (string_'term2_version') string_'term2_version' (subscript (identifier_term2) identifier_term2 (string_'version') string_'version' )subscript )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_post) identifier_post )attribute (argument_list (identifier_url) identifier_url (identifier_data) identifier_data )argument_list )call )return_statement )block )function_definition )module
Creates a relationship between 3 entities in database
(module (function_definition (function_name_step) function_name_step (parameters (identifier_self) identifier_self (identifier_provided_inputs) identifier_provided_inputs )parameters (block (for_statement (pattern_list (identifier_wire) identifier_wire (identifier_value) identifier_value )pattern_list (call (attribute (identifier_provided_inputs) identifier_provided_inputs (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_wire) identifier_wire (conditional_expression (call (attribute (attribute (identifier_self) identifier_self (identifier_block) identifier_block )attribute (identifier_get_wirevector_by_name) identifier_get_wirevector_by_name )attribute (argument_list (identifier_wire) identifier_wire )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_wire) identifier_wire (identifier_str) identifier_str )argument_list )call (identifier_wire) identifier_wire )conditional_expression )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_value) identifier_value (attribute (identifier_wire) identifier_wire (identifier_bitmask) identifier_bitmask )attribute )comparison_operator (comparison_operator (identifier_value) identifier_value (integer_0) integer_0 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_PyrtlError) identifier_PyrtlError (argument_list (call (attribute (concatenated_string (string_"Wire {} has value {} which cannot be represented") string_"Wire {} has value {} which cannot be represented" (string_" using its bitwidth") string_" using its bitwidth" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_wire) identifier_wire (identifier_value) identifier_value )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_ins) identifier_ins (dictionary_comprehension (pair (call (attribute (identifier_self) identifier_self (identifier__to_name) identifier__to_name )attribute (argument_list (identifier_wire) identifier_wire )argument_list )call (identifier_value) identifier_value )pair (for_in_clause (pattern_list (identifier_wire) identifier_wire (identifier_value) identifier_value )pattern_list (call (attribute (identifier_provided_inputs) identifier_provided_inputs (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )assignment )expression_statement (expression_statement (call (attribute (identifier_ins) identifier_ins (identifier_update) identifier_update )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_regs) identifier_regs )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_ins) identifier_ins (identifier_update) identifier_update )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_mems) identifier_mems )attribute )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (attribute (identifier_self) identifier_self (identifier_regs) identifier_regs )attribute (attribute (identifier_self) identifier_self (identifier_outs) identifier_outs )attribute (identifier_mem_writes) identifier_mem_writes )pattern_list (call (attribute (identifier_self) identifier_self (identifier_sim_func) identifier_sim_func )attribute (argument_list (identifier_ins) identifier_ins )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_mem) identifier_mem (identifier_addr) identifier_addr (identifier_value) identifier_value )pattern_list (identifier_mem_writes) identifier_mem_writes (block (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier_mems) identifier_mems )attribute (identifier_mem) identifier_mem )subscript (identifier_addr) identifier_addr )subscript (identifier_value) identifier_value )assignment )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_outs) identifier_outs )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (identifier_update) identifier_update )attribute (argument_list (identifier_ins) identifier_ins )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_tracer) identifier_tracer )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_tracer) identifier_tracer )attribute (identifier_add_fast_step) identifier_add_fast_step )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement )block )if_statement (expression_statement (call (identifier_check_rtl_assertions) identifier_check_rtl_assertions (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement )block )function_definition )module
Run the simulation for a cycle :param provided_inputs: a dictionary mapping WireVectors (or their names) to their values for this step eg: {wire: 3, "wire_name": 17}
(module (function_definition (function_name_get_background_sids) function_name_get_background_sids (parameters (identifier_self) identifier_self (identifier_src_filter) identifier_src_filter )parameters (block (expression_statement (assignment (identifier_branch_key) identifier_branch_key (subscript (attribute (identifier_self) identifier_self (identifier_idx_set) identifier_idx_set )attribute (string_"grid_key") string_"grid_key" )subscript )assignment )expression_statement (expression_statement (assignment (identifier_idist) identifier_idist (call (attribute (identifier_src_filter) identifier_src_filter (identifier_integration_distance) identifier_integration_distance )attribute (argument_list (identifier_DEFAULT_TRT) identifier_DEFAULT_TRT )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_h5py) identifier_h5py (identifier_File) identifier_File )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_source_file) identifier_source_file )attribute (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_hdf5) identifier_hdf5 )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_bg_locations) identifier_bg_locations (attribute (subscript (identifier_hdf5) identifier_hdf5 (string_"Grid/Locations") string_"Grid/Locations" )subscript (identifier_value) identifier_value )attribute )assignment )expression_statement (expression_statement (assignment (identifier_distances) identifier_distances (call (identifier_min_geodetic_distance) identifier_min_geodetic_distance (argument_list (attribute (attribute (identifier_src_filter) identifier_src_filter (identifier_sitecol) identifier_sitecol )attribute (identifier_xyz) identifier_xyz )attribute (tuple (subscript (identifier_bg_locations) identifier_bg_locations (slice (colon) colon )slice (integer_0) integer_0 )subscript (subscript (identifier_bg_locations) identifier_bg_locations (slice (colon) colon )slice (integer_1) integer_1 )subscript )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mmax_areas) identifier_mmax_areas (call (attribute (attribute (identifier_self) identifier_self (identifier_msr) identifier_msr )attribute (identifier_get_median_area) identifier_get_median_area )attribute (argument_list (attribute (subscript (identifier_hdf5) identifier_hdf5 (call (attribute (string_"/") string_"/" (identifier_join) identifier_join )attribute (argument_list (list (string_"Grid") string_"Grid" (identifier_branch_key) identifier_branch_key (string_"MMax") string_"MMax" )list )argument_list )call )subscript (identifier_value) identifier_value )attribute (float_0.0) float_0.0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mmax_lengths) identifier_mmax_lengths (call (attribute (identifier_numpy) identifier_numpy (identifier_sqrt) identifier_sqrt )attribute (argument_list (binary_operator (identifier_mmax_areas) identifier_mmax_areas (attribute (identifier_self) identifier_self (identifier_aspect) identifier_aspect )attribute )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ok) identifier_ok (comparison_operator (identifier_distances) identifier_distances (parenthesized_expression (binary_operator (binary_operator (float_0.5) float_0.5 (identifier_mmax_lengths) identifier_mmax_lengths )binary_operator (identifier_idist) identifier_idist )binary_operator )parenthesized_expression )comparison_operator )assignment )expression_statement (return_statement (call (attribute (subscript (call (attribute (identifier_numpy) identifier_numpy (identifier_where) identifier_where )attribute (argument_list (identifier_ok) identifier_ok )argument_list )call (integer_0) integer_0 )subscript (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )return_statement )block )with_statement )block )function_definition )module
We can apply the filtering of the background sites as a pre-processing step - this is done here rather than in the sampling of the ruptures themselves
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (identifier_key) identifier_key (default_parameter (identifier_fallback) identifier_fallback (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_value) identifier_value (None) None )assignment )expression_statement (if_statement (comparison_operator (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier__config) identifier__config )attribute )comparison_operator (block (expression_statement (assignment (identifier_value) identifier_value (subscript (attribute (identifier_self) identifier_self (identifier__config) identifier__config )attribute (identifier_key) identifier_key )subscript )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_Section) identifier_Section )argument_list )call (block (expression_statement (assignment (identifier_value) identifier_value (None) None )assignment )expression_statement )block )if_statement )block )if_statement (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (expression_statement (assignment (identifier_value) identifier_value (identifier_fallback) identifier_fallback )assignment )expression_statement )block )if_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
look up global config values from alot's config :param key: key to look up :type key: str :param fallback: fallback returned if key is not present :type fallback: str :returns: config value with type as specified in the spec-file
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (default_parameter (identifier_db_session) identifier_db_session (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_db_session) identifier_db_session (call (identifier_get_db_session) identifier_get_db_session (argument_list (identifier_db_session) identifier_db_session (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_db_session) identifier_db_session (identifier_delete) identifier_delete )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement )block )function_definition )module
Deletes the object via session, this will permanently delete the object from storage on commit :param db_session: :return:
(module (function_definition (function_name__range_along_dimension) function_name__range_along_dimension (parameters (identifier_range_dim) identifier_range_dim (identifier_shape) identifier_shape )parameters (block (expression_statement (assignment (identifier_rank) identifier_rank (call (identifier_len) identifier_len (argument_list (identifier_shape) identifier_shape )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_range_dim) identifier_range_dim (identifier_rank) identifier_rank )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Cannot calculate range along non-existent index.") string_"Cannot calculate range along non-existent index." )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_indices) identifier_indices (call (attribute (identifier_tf) identifier_tf (identifier_range) identifier_range )attribute (argument_list (keyword_argument (identifier_start) identifier_start (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_limit) identifier_limit (subscript (identifier_shape) identifier_shape (identifier_range_dim) identifier_range_dim )subscript )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_indices) identifier_indices (call (attribute (identifier_tf) identifier_tf (identifier_reshape) identifier_reshape )attribute (argument_list (identifier_indices) identifier_indices (keyword_argument (identifier_shape) identifier_shape (list_comprehension (conditional_expression (integer_1) integer_1 (comparison_operator (identifier_i) identifier_i (identifier_range_dim) identifier_range_dim )comparison_operator (subscript (identifier_shape) identifier_shape (identifier_range_dim) identifier_range_dim )subscript )conditional_expression (for_in_clause (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_rank) identifier_rank )argument_list )call )for_in_clause )list_comprehension )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_tf) identifier_tf (identifier_tile) identifier_tile )attribute (argument_list (identifier_indices) identifier_indices (list_comprehension (conditional_expression (subscript (identifier_shape) identifier_shape (identifier_i) identifier_i )subscript (comparison_operator (identifier_i) identifier_i (identifier_range_dim) identifier_range_dim )comparison_operator (integer_1) integer_1 )conditional_expression (for_in_clause (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_rank) identifier_rank )argument_list )call )for_in_clause )list_comprehension )argument_list )call )return_statement )block )function_definition )module
Construct a Tensor whose values are the index along a dimension. Construct a Tensor that counts the distance along a single dimension. This is useful, for example, when constructing an identity matrix, >>> x = _range_along_dimension(0, [2, 2]).eval() >>> x array([[0, 0], [1, 1]], dtype=int32) >>> y = _range_along_dimension(1, [2, 2]).eval() >>> y array([[0, 1], [0, 1]], dtype=int32) >>> tf.cast(tf.equal(x, y), dtype=tf.int32).eval() array([[1, 0], [0, 1]], dtype=int32) Args: range_dim: int. Dimension to count indices on. shape: 1D Tensor of ints. Shape of Tensor to construct. Returns: A Tensor whose values are the same as the range along dimension range_dim. Raises: ValueError: If range_dim isn't a valid dimension.
(module (function_definition (function_name_toggle) function_name_toggle (parameters (identifier_path_or_id) identifier_path_or_id (identifier_badge_kind) identifier_badge_kind )parameters (block (if_statement (call (identifier_exists) identifier_exists (argument_list (identifier_path_or_id) identifier_path_or_id )argument_list )call (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_path_or_id) identifier_path_or_id )argument_list )call (as_pattern_target (identifier_open_file) identifier_open_file )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_id_or_slug) identifier_id_or_slug (call (attribute (identifier_open_file) identifier_open_file (identifier_readlines) identifier_readlines )attribute (argument_list )argument_list )call (block (expression_statement (call (identifier_toggle_badge) identifier_toggle_badge (argument_list (call (attribute (identifier_id_or_slug) identifier_id_or_slug (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (identifier_badge_kind) identifier_badge_kind )argument_list )call )expression_statement )block )for_statement )block )with_statement )block (else_clause (block (expression_statement (call (identifier_toggle_badge) identifier_toggle_badge (argument_list (identifier_path_or_id) identifier_path_or_id (identifier_badge_kind) identifier_badge_kind )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Toggle a `badge_kind` for a given `path_or_id` The `path_or_id` is either an id, a slug or a file containing a list of ids or slugs.
(module (function_definition (function_name_GetName) function_name_GetName (parameters (identifier_obj) identifier_obj )parameters (block (expression_statement (call (attribute (identifier_precondition) identifier_precondition (identifier_AssertType) identifier_AssertType )attribute (argument_list (identifier_obj) identifier_obj (tuple (identifier_type) identifier_type (attribute (identifier_types) identifier_types (identifier_FunctionType) identifier_FunctionType )attribute )tuple )argument_list )call )expression_statement (if_statement (identifier_PY2) identifier_PY2 (block (return_statement (call (attribute (attribute (identifier_obj) identifier_obj (identifier___name__) identifier___name__ )attribute (identifier_decode) identifier_decode )attribute (argument_list (string_"ascii") string_"ascii" )argument_list )call )return_statement )block (else_clause (block (return_statement (attribute (identifier_obj) identifier_obj (identifier___name__) identifier___name__ )attribute )return_statement )block )else_clause )if_statement )block )function_definition )module
A compatibility wrapper for getting object's name. In Python 2 class names are returned as `bytes` (since class names can contain only ASCII characters) whereas in Python 3 they are `unicode` (since class names can contain arbitrary unicode characters). This function makes this behaviour consistent and always returns class name as an unicode string. Once support for Python 2 is dropped all invocations of this call can be replaced with ordinary `__name__` access. Args: obj: A type or function object to get the name for. Returns: Name of the specified class as unicode string.
(module (function_definition (function_name_drop_namespaces) function_name_drop_namespaces (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_query) identifier_query )attribute (argument_list (identifier_NamespaceEntry) identifier_NamespaceEntry )argument_list )call (identifier_delete) identifier_delete )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_query) identifier_query )attribute (argument_list (identifier_Namespace) identifier_Namespace )argument_list )call (identifier_delete) identifier_delete )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_commit) identifier_commit )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Drop all namespaces.
(module (function_definition (function_name_load_file) function_name_load_file (parameters (identifier_self) identifier_self (identifier_file) identifier_file )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_foundations) identifier_foundations (identifier_common) identifier_common )attribute (identifier_path_exists) identifier_path_exists )attribute (argument_list (identifier_file) identifier_file )argument_list )call )not_operator (block (raise_statement (call (attribute (attribute (identifier_foundations) identifier_foundations (identifier_exceptions) identifier_exceptions )attribute (identifier_FileExistsError) identifier_FileExistsError )attribute (argument_list (call (attribute (string_"{0} | '{1}' file doesn't exists!") string_"{0} | '{1}' file doesn't exists!" (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute (identifier_file) identifier_file )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"> Loading '{0}' file.") string_"> Loading '{0}' file." (identifier_format) identifier_format )attribute (argument_list (identifier_file) identifier_file )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_reader) identifier_reader (call (attribute (attribute (identifier_foundations) identifier_foundations (identifier_io) identifier_io )attribute (identifier_File) identifier_File )attribute (argument_list (identifier_file) identifier_file )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setPlainText) identifier_setPlainText )attribute (argument_list (call (attribute (identifier_reader) identifier_reader (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_file) identifier_set_file )attribute (argument_list (identifier_file) identifier_file )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier___set_document_signals) identifier___set_document_signals )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_file_loaded) identifier_file_loaded )attribute (identifier_emit) identifier_emit )attribute (argument_list )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Reads and loads given file into the editor. :param File: File to load. :type File: unicode :return: Method success. :rtype: bool
(module (function_definition (function_name_deserialize) function_name_deserialize (parameters (identifier_self) identifier_self (identifier_data) identifier_data (identifier_status_code) identifier_status_code )parameters (block (if_statement (comparison_operator (identifier_status_code) identifier_status_code (integer_204) integer_204 )comparison_operator (block (return_statement (identifier_data) identifier_data )return_statement )block )if_statement (return_statement (subscript (call (attribute (call (attribute (identifier_serializer) identifier_serializer (identifier_Serializer) identifier_Serializer )attribute (argument_list )argument_list )call (identifier_deserialize) identifier_deserialize )attribute (argument_list (identifier_data) identifier_data )argument_list )call (string_'body') string_'body' )subscript )return_statement )block )function_definition )module
Deserializes a JSON string into a dictionary.
(module (function_definition (function_name__get_bmu) function_name__get_bmu (parameters (identifier_self) identifier_self (identifier_activations) identifier_activations )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_argfunc) identifier_argfunc )attribute (string_'argmax') string_'argmax' )comparison_operator (block (expression_statement (assignment (identifier_activations) identifier_activations (unary_operator (identifier_activations) identifier_activations )unary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_sort) identifier_sort (call (attribute (identifier_np) identifier_np (identifier_argsort) identifier_argsort )attribute (argument_list (identifier_activations) identifier_activations (integer_1) integer_1 )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_sort) identifier_sort (identifier_argsort) identifier_argsort )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Get indices of bmus, sorted by their distance from input.
(module (function_definition (function_name_imread) function_name_imread (parameters (identifier_path) identifier_path (default_parameter (identifier_grayscale) identifier_grayscale (False) False )default_parameter (default_parameter (identifier_size) identifier_size (None) None )default_parameter (default_parameter (identifier_interpolate) identifier_interpolate (string_"bilinear") string_"bilinear" )default_parameter (default_parameter (identifier_channel_first) identifier_channel_first (False) False )default_parameter (default_parameter (identifier_as_uint16) identifier_as_uint16 (False) False )default_parameter (default_parameter (identifier_num_channels) identifier_num_channels (unary_operator (integer_1) integer_1 )unary_operator )default_parameter )parameters (block (expression_statement (call (identifier__imread_before) identifier__imread_before (argument_list (identifier_grayscale) identifier_grayscale (identifier_num_channels) identifier_num_channels )argument_list )call )expression_statement (expression_statement (assignment (identifier_r_mode) identifier_r_mode (conditional_expression (attribute (identifier_cv2) identifier_cv2 (identifier_IMREAD_GRAYSCALE) identifier_IMREAD_GRAYSCALE )attribute (identifier_grayscale) identifier_grayscale (attribute (identifier_cv2) identifier_cv2 (identifier_IMREAD_UNCHANGED) identifier_IMREAD_UNCHANGED )attribute )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_img) identifier_img (call (identifier__imread_helper) identifier__imread_helper (argument_list (identifier_path) identifier_path (identifier_r_mode) identifier_r_mode )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_as_uint16) identifier_as_uint16 (comparison_operator (attribute (identifier_img) identifier_img (identifier_dtype) identifier_dtype )attribute (attribute (identifier_np) identifier_np (identifier_uint16) identifier_uint16 )attribute )comparison_operator )boolean_operator (block (if_statement (comparison_operator (attribute (identifier_img) identifier_img (identifier_dtype) identifier_dtype )attribute (attribute (identifier_np) identifier_np (identifier_uint8) identifier_uint8 )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (concatenated_string (string_"You want to read image as uint16, but the original bit-depth is 8 bit.") string_"You want to read image as uint16, but the original bit-depth is 8 bit." (string_"All pixel values are simply increased by 256 times.") string_"All pixel values are simply increased by 256 times." )concatenated_string )argument_list )call )expression_statement (expression_statement (assignment (identifier_img) identifier_img (binary_operator (call (attribute (identifier_img) identifier_img (identifier_astype) identifier_astype )attribute (argument_list (attribute (identifier_np) identifier_np (identifier_uint16) identifier_uint16 )attribute )argument_list )call (integer_256) integer_256 )binary_operator )assignment )expression_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"casting {} to uint16 is not safe.") string_"casting {} to uint16 is not safe." (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_img) identifier_img (identifier_dtype) identifier_dtype )attribute )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement )block )if_statement (expression_statement (assignment (identifier_img) identifier_img (call (identifier__cvtColor_helper) identifier__cvtColor_helper (argument_list (identifier_img) identifier_img (identifier_num_channels) identifier_num_channels )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_img) identifier_img (call (identifier__imread_after) identifier__imread_after (argument_list (identifier_img) identifier_img (identifier_size) identifier_size (identifier_interpolate) identifier_interpolate (identifier_channel_first) identifier_channel_first (identifier_imresize) identifier_imresize )argument_list )call )assignment )expression_statement (return_statement (identifier_img) identifier_img )return_statement )block )function_definition )module
Read image by cv2 module. Args: path (str or 'file object'): File path or object to read. grayscale (bool): size (tupple of int): (width, height). If None, output img shape depends on the files to read. channel_first (bool): This argument specifies the shape of img is whether (height, width, channel) or (channel, height, width). Default value is False, which means the img shape is (height, width, channel). interpolate (str): must be one of ["nearest", "box", "bilinear", "hamming", "bicubic", "lanczos"]. as_uint16 (bool): If True, this function reads image as uint16. num_channels (int): channel size of output array. Default is -1 which preserves raw image shape. Returns: numpy.ndarray
(module (function_definition (function_name_create_primary_zone_by_axfr) function_name_create_primary_zone_by_axfr (parameters (identifier_self) identifier_self (identifier_account_name) identifier_account_name (identifier_zone_name) identifier_zone_name (identifier_master) identifier_master (default_parameter (identifier_tsig_key) identifier_tsig_key (None) None )default_parameter (default_parameter (identifier_key_value) identifier_key_value (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_zone_properties) identifier_zone_properties (dictionary (pair (string_"name") string_"name" (identifier_zone_name) identifier_zone_name )pair (pair (string_"accountName") string_"accountName" (identifier_account_name) identifier_account_name )pair (pair (string_"type") string_"type" (string_"PRIMARY") string_"PRIMARY" )pair )dictionary )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_tsig_key) identifier_tsig_key (None) None )comparison_operator (comparison_operator (identifier_key_value) identifier_key_value (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_name_server_info) identifier_name_server_info (dictionary (pair (string_"ip") string_"ip" (identifier_master) identifier_master )pair (pair (string_"tsigKey") string_"tsigKey" (identifier_tsig_key) identifier_tsig_key )pair (pair (string_"tsigKeyValue") string_"tsigKeyValue" (identifier_key_value) identifier_key_value )pair )dictionary )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_name_server_info) identifier_name_server_info (dictionary (pair (string_"ip") string_"ip" (identifier_master) identifier_master )pair )dictionary )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_primary_zone_info) identifier_primary_zone_info (dictionary (pair (string_"forceImport") string_"forceImport" (True) True )pair (pair (string_"createType") string_"createType" (string_"TRANSFER") string_"TRANSFER" )pair (pair (string_"nameServer") string_"nameServer" (identifier_name_server_info) identifier_name_server_info )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_zone_data) identifier_zone_data (dictionary (pair (string_"properties") string_"properties" (identifier_zone_properties) identifier_zone_properties )pair (pair (string_"primaryCreateInfo") string_"primaryCreateInfo" (identifier_primary_zone_info) identifier_primary_zone_info )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_rest_api_connection) identifier_rest_api_connection )attribute (identifier_post) identifier_post )attribute (argument_list (string_"/v1/zones") string_"/v1/zones" (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_zone_data) identifier_zone_data )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Creates a new primary zone by zone transferring off a master. Arguments: account_name -- The name of the account that will contain this zone. zone_name -- The name of the zone. It must be unique. master -- Primary name server IP address. Keyword Arguments: tsig_key -- For TSIG-enabled zones: The transaction signature key. NOTE: Requires key_value. key_value -- TSIG key secret.
(module (function_definition (function_name_coinc) function_name_coinc (parameters (identifier_self) identifier_self (identifier_s0) identifier_s0 (identifier_s1) identifier_s1 (identifier_slide) identifier_slide (identifier_step) identifier_step )parameters (block (expression_statement (assignment (identifier_loglr) identifier_loglr (binary_operator (unary_operator (identifier_s0) identifier_s0 )unary_operator (identifier_s1) identifier_s1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_threshes) identifier_threshes (list_comprehension (subscript (subscript (attribute (identifier_self) identifier_self (identifier_fits_by_tid) identifier_fits_by_tid )attribute (identifier_i) identifier_i )subscript (string_'thresh') string_'thresh' )subscript (for_in_clause (identifier_i) identifier_i (attribute (identifier_self) identifier_self (identifier_ifos) identifier_ifos )attribute )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (augmented_assignment (identifier_loglr) identifier_loglr (call (identifier_sum) identifier_sum (argument_list (list_comprehension (binary_operator (binary_operator (identifier_t) identifier_t (float_2.) float_2. )binary_operator (float_2.) float_2. )binary_operator (for_in_clause (identifier_t) identifier_t (identifier_threshes) identifier_threshes )for_in_clause )list_comprehension )argument_list )call )augmented_assignment )expression_statement (return_statement (binary_operator (parenthesized_expression (binary_operator (float_2.) float_2. (identifier_loglr) identifier_loglr )binary_operator )parenthesized_expression (float_0.5) float_0.5 )binary_operator )return_statement )block )function_definition )module
Calculate the final coinc ranking statistic
(module (function_definition (function_name_expect) function_name_expect (parameters (identifier_instr) identifier_instr (identifier_expected) identifier_expected (identifier_context) identifier_context )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_instr) identifier_instr (identifier_expected) identifier_expected )argument_list )call )not_operator (block (raise_statement (call (identifier_DecompilationError) identifier_DecompilationError (argument_list (call (attribute (string_"Expected a {expected} instruction {context}. Got {instr}.") string_"Expected a {expected} instruction {context}. Got {instr}." (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_instr) identifier_instr (identifier_instr) identifier_instr )keyword_argument (keyword_argument (identifier_expected) identifier_expected (identifier_expected) identifier_expected )keyword_argument (keyword_argument (identifier_context) identifier_context (identifier_context) identifier_context )keyword_argument )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_instr) identifier_instr )return_statement )block )function_definition )module
Check that an instruction is of the expected type.
(module (function_definition (function_name_annotatedcore) function_name_annotatedcore (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (string_'Calculating annotated core') string_'Calculating annotated core' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_total_core) identifier_total_core )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier_sample) identifier_sample (attribute (identifier_self) identifier_self (identifier_metadata) identifier_metadata )attribute (block (if_statement (comparison_operator (attribute (attribute (identifier_sample) identifier_sample (identifier_general) identifier_general )attribute (identifier_bestassemblyfile) identifier_bestassemblyfile )attribute (string_'NA') string_'NA' )comparison_operator (block (expression_statement (assignment (attribute (subscript (identifier_sample) identifier_sample (attribute (identifier_self) identifier_self (identifier_analysistype) identifier_analysistype )attribute )subscript (identifier_coreset) identifier_coreset )attribute (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (attribute (identifier_sample) identifier_sample (identifier_general) identifier_general )attribute (identifier_referencegenus) identifier_referencegenus )attribute (string_'Escherichia') string_'Escherichia' )comparison_operator (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_runmetadata) identifier_runmetadata )attribute (identifier_samples) identifier_samples )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_sample) identifier_sample )argument_list )call )expression_statement (try_statement (block (expression_statement (assignment (identifier_report) identifier_report (attribute (subscript (identifier_sample) identifier_sample (attribute (identifier_self) identifier_self (identifier_analysistype) identifier_analysistype )attribute )subscript (identifier_report) identifier_report )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_blastparser) identifier_blastparser )attribute (argument_list (keyword_argument (identifier_report) identifier_report (identifier_report) identifier_report )keyword_argument (keyword_argument (identifier_sample) identifier_sample (identifier_sample) identifier_sample )keyword_argument (keyword_argument (identifier_fieldnames) identifier_fieldnames (attribute (identifier_self) identifier_self (identifier_fieldnames) identifier_fieldnames )attribute )keyword_argument )argument_list )call )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (attribute (subscript (identifier_sample) identifier_sample (attribute (identifier_self) identifier_self (identifier_analysistype) identifier_analysistype )attribute )subscript (identifier_coreset) identifier_coreset )attribute (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement )block )except_clause )try_statement )block )if_statement )block )if_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_reporter) identifier_reporter )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Calculates the core genome of organisms using custom databases
(module (function_definition (function_name_attach) function_name_attach (parameters (identifier_self) identifier_self (identifier_engine) identifier_engine (default_parameter (identifier_start) identifier_start (attribute (identifier_Events) identifier_Events (identifier_STARTED) identifier_STARTED )attribute )default_parameter (default_parameter (identifier_pause) identifier_pause (attribute (identifier_Events) identifier_Events (identifier_COMPLETED) identifier_COMPLETED )attribute )default_parameter (default_parameter (identifier_resume) identifier_resume (None) None )default_parameter (default_parameter (identifier_step) identifier_step (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_engine) identifier_engine (identifier_add_event_handler) identifier_add_event_handler )attribute (argument_list (identifier_start) identifier_start (attribute (identifier_self) identifier_self (identifier_reset) identifier_reset )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_engine) identifier_engine (identifier_add_event_handler) identifier_add_event_handler )attribute (argument_list (identifier_pause) identifier_pause (attribute (identifier_self) identifier_self (identifier_pause) identifier_pause )attribute )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_resume) identifier_resume (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_engine) identifier_engine (identifier_add_event_handler) identifier_add_event_handler )attribute (argument_list (identifier_resume) identifier_resume (attribute (identifier_self) identifier_self (identifier_resume) identifier_resume )attribute )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_step) identifier_step (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_engine) identifier_engine (identifier_add_event_handler) identifier_add_event_handler )attribute (argument_list (identifier_step) identifier_step (attribute (identifier_self) identifier_self (identifier_step) identifier_step )attribute )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Register callbacks to control the timer. Args: engine (Engine): Engine that this timer will be attached to. start (Events): Event which should start (reset) the timer. pause (Events): Event which should pause the timer. resume (Events, optional): Event which should resume the timer. step (Events, optional): Event which should call the `step` method of the counter. Returns: self (Timer)
(module (function_definition (function_name_reactivate) function_name_reactivate (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__protocol) identifier__protocol )attribute (identifier_connectionLost) identifier_connectionLost )attribute (argument_list (None) None )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__protocol) identifier__protocol )attribute (None) None )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_terminal) identifier_terminal )attribute (identifier_reset) identifier_reset )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__window) identifier__window )attribute (identifier_filthy) identifier_filthy )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__window) identifier__window )attribute (identifier_repaint) identifier_repaint )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Called when a sub-protocol is finished. This disconnects the sub-protocol and redraws the main menu UI.
(module (function_definition (function_name_generate_sigv4_auth_request) function_name_generate_sigv4_auth_request (parameters (default_parameter (identifier_header_value) identifier_header_value (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_request) identifier_request (call (attribute (identifier_requests) identifier_requests (identifier_Request) identifier_Request )attribute (argument_list (keyword_argument (identifier_method) identifier_method (string_'POST') string_'POST' )keyword_argument (keyword_argument (identifier_url) identifier_url (string_'https://sts.amazonaws.com/') string_'https://sts.amazonaws.com/' )keyword_argument (keyword_argument (identifier_headers) identifier_headers (dictionary (pair (string_'Content-Type') string_'Content-Type' (string_'application/x-www-form-urlencoded; charset=utf-8') string_'application/x-www-form-urlencoded; charset=utf-8' )pair (pair (string_'Host') string_'Host' (string_'sts.amazonaws.com') string_'sts.amazonaws.com' )pair )dictionary )keyword_argument (keyword_argument (identifier_data) identifier_data (string_'Action=GetCallerIdentity&Version=2011-06-15') string_'Action=GetCallerIdentity&Version=2011-06-15' )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_header_value) identifier_header_value (block (expression_statement (assignment (subscript (attribute (identifier_request) identifier_request (identifier_headers) identifier_headers )attribute (string_'X-Vault-AWS-IAM-Server-ID') string_'X-Vault-AWS-IAM-Server-ID' )subscript (identifier_header_value) identifier_header_value )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_prepared_request) identifier_prepared_request (call (attribute (identifier_request) identifier_request (identifier_prepare) identifier_prepare )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (identifier_prepared_request) identifier_prepared_request )return_statement )block )function_definition )module
Helper function to prepare a AWS API request to subsequently generate a "AWS Signature Version 4" header. :param header_value: Vault allows you to require an additional header, X-Vault-AWS-IAM-Server-ID, to be present to mitigate against different types of replay attacks. Depending on the configuration of the AWS auth backend, providing a argument to this optional parameter may be required. :type header_value: str :return: A PreparedRequest instance, optionally containing the provided header value under a 'X-Vault-AWS-IAM-Server-ID' header name pointed to AWS's simple token service with action "GetCallerIdentity" :rtype: requests.PreparedRequest
(module (function_definition (function_name_get_descriptions) function_name_get_descriptions (parameters (identifier_self) identifier_self (identifier_description_type) identifier_description_type )parameters (block (expression_statement (assignment (tuple_pattern (identifier_desc_type) identifier_desc_type (identifier_max_units) identifier_max_units )tuple_pattern (identifier_description_type) identifier_description_type )assignment )expression_statement (expression_statement (assignment (identifier_results) identifier_results (binary_operator (list (None) None )list (identifier_max_units) identifier_max_units )binary_operator )assignment )expression_statement (expression_statement (assignment (subscript (attribute (attribute (identifier_self) identifier_self (identifier_elk) identifier_elk )attribute (identifier__descriptions_in_progress) identifier__descriptions_in_progress )attribute (identifier_desc_type) identifier_desc_type )subscript (tuple (identifier_max_units) identifier_max_units (identifier_results) identifier_results (attribute (identifier_self) identifier_self (identifier__got_desc) identifier__got_desc )attribute )tuple )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_elk) identifier_elk )attribute (identifier_send) identifier_send )attribute (argument_list (call (identifier_sd_encode) identifier_sd_encode (argument_list (keyword_argument (identifier_desc_type) identifier_desc_type (identifier_desc_type) identifier_desc_type )keyword_argument (keyword_argument (identifier_unit) identifier_unit (integer_0) integer_0 )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Gets the descriptions for specified type. When complete the callback is called with a list of descriptions
(module (function_definition (function_name_enter_room) function_name_enter_room (parameters (identifier_self) identifier_self (identifier_sid) identifier_sid (identifier_namespace) identifier_namespace (identifier_room) identifier_room )parameters (block (if_statement (comparison_operator (identifier_namespace) identifier_namespace (attribute (identifier_self) identifier_self (identifier_rooms) identifier_rooms )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_rooms) identifier_rooms )attribute (identifier_namespace) identifier_namespace )subscript (dictionary )dictionary )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_room) identifier_room (subscript (attribute (identifier_self) identifier_self (identifier_rooms) identifier_rooms )attribute (identifier_namespace) identifier_namespace )subscript )comparison_operator (block (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier_rooms) identifier_rooms )attribute (identifier_namespace) identifier_namespace )subscript (identifier_room) identifier_room )subscript (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier_rooms) identifier_rooms )attribute (identifier_namespace) identifier_namespace )subscript (identifier_room) identifier_room )subscript (identifier_sid) identifier_sid )subscript (True) True )assignment )expression_statement )block )function_definition )module
Add a client to a room.
(module (function_definition (function_name_hangup) function_name_hangup (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_active) identifier_active )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__gsmModem) identifier__gsmModem )attribute (identifier_write) identifier_write )attribute (argument_list (string_'ATH') string_'ATH' )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_answered) identifier_answered )attribute (False) False )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_active) identifier_active )attribute (False) False )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute (attribute (attribute (identifier_self) identifier_self (identifier__gsmModem) identifier__gsmModem )attribute (identifier_activeCalls) identifier_activeCalls )attribute )comparison_operator (block (delete_statement (subscript (attribute (attribute (identifier_self) identifier_self (identifier__gsmModem) identifier__gsmModem )attribute (identifier_activeCalls) identifier_activeCalls )attribute (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )subscript )delete_statement )block )if_statement )block )function_definition )module
End the phone call. Does nothing if the call is already inactive.
(module (function_definition (function_name_check) function_name_check (parameters (identifier_self) identifier_self (identifier_feature) identifier_feature )parameters (block (expression_statement (assignment (identifier_found) identifier_found (False) False )assignment )expression_statement (for_statement (identifier_handler) identifier_handler (attribute (identifier_self) identifier_self (identifier_handlers) identifier_handlers )attribute (block (try_statement (block (if_statement (call (identifier_handler) identifier_handler (argument_list (identifier_feature) identifier_feature )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement )block (except_clause (identifier_StopCheckingFeatureFlags) identifier_StopCheckingFeatureFlags (block (return_statement (False) False )return_statement )block )except_clause (except_clause (identifier_NoFeatureFlagFound) identifier_NoFeatureFlagFound (block (pass_statement )pass_statement )block )except_clause (else_clause (block (expression_statement (assignment (identifier_found) identifier_found (True) True )assignment )expression_statement )block )else_clause )try_statement )block )for_statement (if_statement (not_operator (identifier_found) identifier_found )not_operator (block (expression_statement (assignment (identifier_message) identifier_message (call (attribute (string_u"No feature flag defined for {feature}") string_u"No feature flag defined for {feature}" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_feature) identifier_feature (identifier_feature) identifier_feature )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (attribute (identifier_current_app) identifier_current_app (identifier_debug) identifier_debug )attribute (call (attribute (attribute (identifier_current_app) identifier_current_app (identifier_config) identifier_config )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_RAISE_ERROR_ON_MISSING_FEATURES) identifier_RAISE_ERROR_ON_MISSING_FEATURES (False) False )argument_list )call )boolean_operator (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (identifier_message) identifier_message )argument_list )call )raise_statement )block (else_clause (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (identifier_message) identifier_message )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_missing_feature) identifier_missing_feature (identifier_send) identifier_send )attribute (argument_list (identifier_self) identifier_self (keyword_argument (identifier_feature) identifier_feature (identifier_feature) identifier_feature )keyword_argument )argument_list )call )expression_statement )block )else_clause )if_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Loop through all our feature flag checkers and return true if any of them are true. The order of handlers matters - we will immediately return True if any handler returns true. If you want to a handler to return False and stop the chain, raise the StopCheckingFeatureFlags exception.
(module (function_definition (function_name_ordered) function_name_ordered (parameters (identifier_self) identifier_self (default_parameter (identifier_ord) identifier_ord (string_'desc') string_'desc' )default_parameter )parameters (block (if_statement (comparison_operator (identifier_ord) identifier_ord (tuple (string_'asc') string_'asc' (string_'desc') string_'desc' )tuple )comparison_operator (block (raise_statement )raise_statement )block )if_statement (expression_statement (assignment (identifier_ord_f) identifier_ord_f (call (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_PIDRelation) identifier_PIDRelation (identifier_index) identifier_index )attribute (identifier_ord) identifier_ord )argument_list )call (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_order_by) identifier_order_by )attribute (argument_list (identifier_ord_f) identifier_ord_f )argument_list )call )return_statement )block )function_definition )module
Order the query result on the relations' indexes.
(module (function_definition (function_name_get_settings) function_name_get_settings (parameters (identifier_config_file) identifier_config_file )parameters (block (expression_statement (assignment (identifier_default_settings) identifier_default_settings (dictionary (pair (string_'general') string_'general' (dictionary (pair (string_'endpoint') string_'endpoint' (string_'http://guacamole.antojitos.io/files/') string_'http://guacamole.antojitos.io/files/' )pair (pair (string_'shortener') string_'shortener' (string_'http://t.antojitos.io/api/v1/urls') string_'http://t.antojitos.io/api/v1/urls' )pair )dictionary )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_settings) identifier_settings (call (attribute (identifier_configparser) identifier_configparser (identifier_ConfigParser) identifier_ConfigParser )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_settings) identifier_settings (identifier_read_dict) identifier_read_dict )attribute (argument_list (identifier_default_settings) identifier_default_settings )argument_list )call )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (for_statement (pattern_list (identifier_section) identifier_section (identifier_options) identifier_options )pattern_list (call (attribute (identifier_default_settings) identifier_default_settings (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_settings) identifier_settings (identifier_add_section) identifier_add_section )attribute (argument_list (identifier_section) identifier_section )argument_list )call )expression_statement (for_statement (pattern_list (identifier_option) identifier_option (identifier_value) identifier_value )pattern_list (call (attribute (identifier_options) identifier_options (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_settings) identifier_settings (identifier_set) identifier_set )attribute (argument_list (identifier_section) identifier_section (identifier_option) identifier_option (identifier_value) identifier_value )argument_list )call )expression_statement )block )for_statement )block )for_statement )block )except_clause )try_statement (if_statement (boolean_operator (comparison_operator (identifier_config_file) identifier_config_file (None) None )comparison_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_config_file) identifier_config_file )argument_list )call )boolean_operator (block (expression_statement (call (attribute (identifier_settings) identifier_settings (identifier_read) identifier_read )attribute (argument_list (identifier_config_file) identifier_config_file )argument_list )call )expression_statement (return_statement (identifier_settings) identifier_settings )return_statement )block )if_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_CONFIG_FILE) identifier_CONFIG_FILE )argument_list )call (block (expression_statement (call (attribute (identifier_settings) identifier_settings (identifier_read) identifier_read )attribute (argument_list (identifier_CONFIG_FILE) identifier_CONFIG_FILE )argument_list )call )expression_statement (return_statement (identifier_settings) identifier_settings )return_statement )block )if_statement (return_statement (identifier_settings) identifier_settings )return_statement )block )function_definition )module
Search and load a configuration file.
(module (function_definition (function_name_get_colormap) function_name_get_colormap (parameters (identifier_name) identifier_name (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_name) identifier_name (identifier_BaseColormap) identifier_BaseColormap )argument_list )call (block (expression_statement (assignment (identifier_cmap) identifier_cmap (identifier_name) identifier_name )assignment )expression_statement )block (else_clause (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_name) identifier_name (identifier_string_types) identifier_string_types )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_'colormap must be a Colormap or string name') string_'colormap must be a Colormap or string name' )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_name) identifier_name (identifier__colormaps) identifier__colormaps )comparison_operator (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (binary_operator (string_'colormap name %s not found') string_'colormap name %s not found' (identifier_name) identifier_name )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_cmap) identifier_cmap (subscript (identifier__colormaps) identifier__colormaps (identifier_name) identifier_name )subscript )assignment )expression_statement (if_statement (call (attribute (identifier_inspect) identifier_inspect (identifier_isclass) identifier_isclass )attribute (argument_list (identifier_cmap) identifier_cmap )argument_list )call (block (expression_statement (assignment (identifier_cmap) identifier_cmap (call (identifier_cmap) identifier_cmap (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block )if_statement )block )else_clause )if_statement (return_statement (identifier_cmap) identifier_cmap )return_statement )block )function_definition )module
Obtain a colormap Some colormaps can have additional configuration parameters. Refer to their corresponding documentation for more information. Parameters ---------- name : str | Colormap Colormap name. Can also be a Colormap for pass-through. Examples -------- >>> get_colormap('autumn') >>> get_colormap('single_hue', hue=10)
(module (function_definition (function_name_rm) function_name_rm (parameters (identifier_pattern) identifier_pattern )parameters (block (expression_statement (assignment (identifier_paths) identifier_paths (call (attribute (identifier_glob) identifier_glob (identifier_glob) identifier_glob )attribute (argument_list (identifier_pattern) identifier_pattern )argument_list )call )assignment )expression_statement (for_statement (identifier_path) identifier_path (identifier_paths) identifier_paths (block (if_statement (call (attribute (identifier_path) identifier_path (identifier_startswith) identifier_startswith )attribute (argument_list (string_'.git/') string_'.git/' )argument_list )call (block (continue_statement )continue_statement )block )if_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_path) identifier_path )argument_list )call (block (function_definition (function_name_onerror) function_name_onerror (parameters (identifier_fun) identifier_fun (identifier_path) identifier_path (identifier_excinfo) identifier_excinfo )parameters (block (expression_statement (assignment (identifier_exc) identifier_exc (subscript (identifier_excinfo) identifier_excinfo (integer_1) integer_1 )subscript )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_exc) identifier_exc (identifier_errno) identifier_errno )attribute (attribute (identifier_errno) identifier_errno (identifier_ENOENT) identifier_ENOENT )attribute )comparison_operator (block (raise_statement )raise_statement )block )if_statement )block )function_definition (expression_statement (call (identifier_safe_print) identifier_safe_print (argument_list (binary_operator (string_"rmdir -f %s") string_"rmdir -f %s" (identifier_path) identifier_path )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_rmtree) identifier_rmtree )attribute (argument_list (identifier_path) identifier_path (keyword_argument (identifier_onerror) identifier_onerror (identifier_onerror) identifier_onerror )keyword_argument )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_safe_print) identifier_safe_print (argument_list (binary_operator (string_"rm %s") string_"rm %s" (identifier_path) identifier_path )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_path) identifier_path )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement )block )function_definition )module
Recursively remove a file or dir by pattern.
(module (function_definition (function_name_create_and_configure_wrapper) function_name_create_and_configure_wrapper (parameters (identifier_context_or_world) identifier_context_or_world )parameters (block (expression_statement (assignment (attribute (identifier_context_or_world) identifier_context_or_world (identifier_driver_wrapper) identifier_driver_wrapper )attribute (call (attribute (identifier_DriverWrappersPool) identifier_DriverWrappersPool (identifier_get_default_wrapper) identifier_get_default_wrapper )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_context_or_world) identifier_context_or_world (identifier_utils) identifier_utils )attribute (attribute (attribute (identifier_context_or_world) identifier_context_or_world (identifier_driver_wrapper) identifier_driver_wrapper )attribute (identifier_utils) identifier_utils )attribute )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_behave_properties) identifier_behave_properties (attribute (attribute (identifier_context_or_world) identifier_context_or_world (identifier_config) identifier_config )attribute (identifier_userdata) identifier_userdata )attribute )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (expression_statement (assignment (identifier_behave_properties) identifier_behave_properties (None) None )assignment )expression_statement )block )except_clause )try_statement (expression_statement (call (attribute (attribute (identifier_context_or_world) identifier_context_or_world (identifier_driver_wrapper) identifier_driver_wrapper )attribute (identifier_configure) identifier_configure )attribute (argument_list (attribute (identifier_context_or_world) identifier_context_or_world (identifier_config_files) identifier_config_files )attribute (keyword_argument (identifier_behave_properties) identifier_behave_properties (identifier_behave_properties) identifier_behave_properties )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_context_or_world) identifier_context_or_world (identifier_toolium_config) identifier_toolium_config )attribute (attribute (attribute (identifier_context_or_world) identifier_context_or_world (identifier_driver_wrapper) identifier_driver_wrapper )attribute (identifier_config) identifier_config )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_context_or_world) identifier_context_or_world (identifier_logger) identifier_logger )attribute (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (identifier___name__) identifier___name__ )argument_list )call )assignment )expression_statement )block )function_definition )module
Create and configure driver wrapper in behave or lettuce tests :param context_or_world: behave context or lettuce world
(module (function_definition (function_name_iter) function_name_iter (parameters (identifier_self) identifier_self (default_parameter (identifier_start) identifier_start (integer_0) integer_0 )default_parameter (default_parameter (identifier_end) identifier_end (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_end) identifier_end (None) None )comparison_operator (block (expression_statement (assignment (identifier_end) identifier_end (binary_operator (attribute (identifier_self) identifier_self (identifier__index) identifier__index )attribute (integer_1) integer_1 )binary_operator )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_end) identifier_end (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_StopIteration) identifier_StopIteration (argument_list )argument_list )call )raise_statement )block )elif_clause )if_statement (if_statement (comparison_operator (identifier_start) identifier_start (identifier_end) identifier_end )comparison_operator (block (raise_statement (call (identifier_StopIteration) identifier_StopIteration (argument_list )argument_list )call )raise_statement )block )if_statement (assert_statement (comparison_operator (integer_0) integer_0 (identifier_end) identifier_end (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__history) identifier__history )attribute )argument_list )call )comparison_operator )assert_statement (assert_statement (comparison_operator (integer_0) integer_0 (identifier_start) identifier_start (binary_operator (identifier_end) identifier_end (integer_1) integer_1 )binary_operator )comparison_operator )assert_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_start) identifier_start (identifier_end) identifier_end )argument_list )call (block (expression_statement (yield (subscript (attribute (identifier_self) identifier_self (identifier__history) identifier__history )attribute (identifier_i) identifier_i )subscript )yield )expression_statement )block )for_statement )block )function_definition )module
Iterate through successive history items. Parameters ---------- end : int Index of the last item to loop through + 1. start : int Initial index for the loop (0 by default).
(module (function_definition (function_name__write_to_datastore) function_name__write_to_datastore (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_roots_and_submissions) identifier_roots_and_submissions (call (identifier_zip) identifier_zip (argument_list (list (identifier_ATTACKS_ENTITY_KEY) identifier_ATTACKS_ENTITY_KEY (identifier_TARGET_ATTACKS_ENTITY_KEY) identifier_TARGET_ATTACKS_ENTITY_KEY (identifier_DEFENSES_ENTITY_KEY) identifier_DEFENSES_ENTITY_KEY )list (list (attribute (identifier_self) identifier_self (identifier__attacks) identifier__attacks )attribute (attribute (identifier_self) identifier_self (identifier__targeted_attacks) identifier__targeted_attacks )attribute (attribute (identifier_self) identifier_self (identifier__defenses) identifier__defenses )attribute )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_client) identifier_client (attribute (identifier_self) identifier_self (identifier__datastore_client) identifier__datastore_client )attribute )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_client) identifier_client (identifier_no_transact_batch) identifier_no_transact_batch )attribute (argument_list )argument_list )call (as_pattern_target (identifier_batch) identifier_batch )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (pattern_list (identifier_root_key) identifier_root_key (identifier_submissions) identifier_submissions )pattern_list (identifier_roots_and_submissions) identifier_roots_and_submissions (block (expression_statement (call (attribute (identifier_batch) identifier_batch (identifier_put) identifier_put )attribute (argument_list (call (attribute (identifier_client) identifier_client (identifier_entity) identifier_entity )attribute (argument_list (call (attribute (identifier_client) identifier_client (identifier_key) identifier_key )attribute (argument_list (list_splat (identifier_root_key) identifier_root_key )list_splat )argument_list )call )argument_list )call )argument_list )call )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (identifier_submissions) identifier_submissions )argument_list )call (block (expression_statement (assignment (identifier_entity) identifier_entity (call (attribute (identifier_client) identifier_client (identifier_entity) identifier_entity )attribute (argument_list (call (attribute (identifier_client) identifier_client (identifier_key) identifier_key )attribute (argument_list (list_splat (parenthesized_expression (binary_operator (identifier_root_key) identifier_root_key (list (identifier_KIND_SUBMISSION) identifier_KIND_SUBMISSION (identifier_k) identifier_k )list )binary_operator )parenthesized_expression )list_splat )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_entity) identifier_entity (string_'submission_path') string_'submission_path' )subscript (attribute (identifier_v) identifier_v (identifier_path) identifier_path )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_entity) identifier_entity (identifier_update) identifier_update )attribute (argument_list (call (identifier_participant_from_submission_path) identifier_participant_from_submission_path (argument_list (attribute (identifier_v) identifier_v (identifier_path) identifier_path )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_batch) identifier_batch (identifier_put) identifier_put )attribute (argument_list (identifier_entity) identifier_entity )argument_list )call )expression_statement )block )for_statement )block )for_statement )block )with_statement )block )function_definition )module
Writes all submissions to datastore.
(module (function_definition (function_name_list_to_bytes_list) function_name_list_to_bytes_list (parameters (identifier_strList) identifier_strList )parameters (block (expression_statement (assignment (identifier_pList) identifier_pList (binary_operator (identifier_c_char_p) identifier_c_char_p (call (identifier_len) identifier_len (argument_list (identifier_strList) identifier_strList )argument_list )call )binary_operator )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_strList) identifier_strList (tuple (identifier_pList) identifier_pList (call (identifier_type) identifier_type (argument_list (None) None )argument_list )call )tuple )argument_list )call (block (return_statement (identifier_strList) identifier_strList )return_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_strList) identifier_strList (tuple (identifier_list) identifier_list (identifier_set) identifier_set (identifier_tuple) identifier_tuple )tuple )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_"strList must be list, set or tuple, not ") string_"strList must be list, set or tuple, not " (call (identifier_str) identifier_str (argument_list (call (identifier_type) identifier_type (argument_list (identifier_strList) identifier_strList )argument_list )call )argument_list )call )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_pList) identifier_pList (call (identifier_pList) identifier_pList (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_elem) identifier_elem )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_strList) identifier_strList )argument_list )call (block (expression_statement (assignment (subscript (identifier_pList) identifier_pList (identifier_i) identifier_i )subscript (call (identifier_str_to_bytes) identifier_str_to_bytes (argument_list (identifier_elem) identifier_elem )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_pList) identifier_pList )return_statement )block )function_definition )module
This function turns an array of strings into a pointer array with pointers pointing to the encodings of those strings Possibly contained bytes are kept as they are. :param strList: List of strings that shall be converted :type strList: List of strings :returns: Pointer array with pointers pointing to bytes :raises: TypeError if strList is not list, set or tuple
(module (function_definition (function_name_pop_scope) function_name_pop_scope (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_child_scope) identifier_child_scope (call (attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_stack) identifier_stack )attribute (identifier_current) identifier_current )attribute (identifier_current) identifier_current )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_stack) identifier_stack )attribute (identifier_current) identifier_current )attribute (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_parent_scope) identifier_parent_scope (call (attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_stack) identifier_stack )attribute (identifier_current) identifier_current )attribute (identifier_current) identifier_current )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (attribute (identifier_self) identifier_self (identifier_stack) identifier_stack )attribute (identifier_current) identifier_current )attribute (identifier_current) identifier_current )attribute (dictionary_comprehension (pair (identifier_key) identifier_key (subscript (identifier_child_scope) identifier_child_scope (identifier_key) identifier_key )subscript )pair (for_in_clause (identifier_key) identifier_key (identifier_child_scope) identifier_child_scope )for_in_clause (if_clause (comparison_operator (identifier_key) identifier_key (identifier_parent_scope) identifier_parent_scope )comparison_operator )if_clause )dictionary_comprehension )assignment )expression_statement )block )function_definition )module
Delete the current scope in the current scope.
(module (function_definition (function_name_in_reply_to) function_name_in_reply_to (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_UnstructuredHeader) identifier_UnstructuredHeader )type )type_parameter )generic_type )type (block (try_statement (block (return_statement (call (identifier_cast) identifier_cast (argument_list (identifier_UnstructuredHeader) identifier_UnstructuredHeader (subscript (subscript (identifier_self) identifier_self (string_b'in-reply-to') string_b'in-reply-to' )subscript (integer_0) integer_0 )subscript )argument_list )call )return_statement )block (except_clause (tuple (identifier_KeyError) identifier_KeyError (identifier_IndexError) identifier_IndexError )tuple (block (return_statement (None) None )return_statement )block )except_clause )try_statement )block )function_definition )module
The ``In-Reply-To`` header.
(module (function_definition (function_name_is_console) function_name_is_console (parameters (identifier_self) identifier_self (identifier_users_text) identifier_users_text )parameters (block (if_statement (comparison_operator (identifier_users_text) identifier_users_text (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (argument_list (string_"Console information not collected") string_"Console information not collected" )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )if_statement (for_statement (identifier_line) identifier_line (call (attribute (identifier_users_text) identifier_users_text (identifier_split) identifier_split )attribute (argument_list (string_'\n') string_'\n' )argument_list )call (block (if_statement (comparison_operator (string_'*') string_'*' (identifier_line) identifier_line )comparison_operator (block (expression_statement (assignment (identifier_match) identifier_match (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_vty_re) identifier_vty_re )attribute (identifier_line) identifier_line )argument_list )call )assignment )expression_statement (if_statement (identifier_match) identifier_match (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (argument_list (string_"Detected connection to vty") string_"Detected connection to vty" )argument_list )call )expression_statement (return_statement (False) False )return_statement )block (else_clause (block (expression_statement (assignment (identifier_match) identifier_match (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_console_re) identifier_console_re )attribute (identifier_line) identifier_line )argument_list )call )assignment )expression_statement (if_statement (identifier_match) identifier_match (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (argument_list (string_"Detected connection to console") string_"Detected connection to console" )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )if_statement )block )else_clause )if_statement )block )if_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (argument_list (string_"Connection port unknown") string_"Connection port unknown" )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )function_definition )module
Return if device is connected over console.
(module (function_definition (function_name__format_volume_string) function_name__format_volume_string (parameters (identifier_self) identifier_self (identifier_volume_string) identifier_volume_string )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_actual_volume) identifier_actual_volume )attribute (call (identifier_int) identifier_int (argument_list (subscript (call (attribute (subscript (call (attribute (subscript (call (attribute (identifier_volume_string) identifier_volume_string (identifier_split) identifier_split )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_volume_string) identifier_volume_string )attribute )argument_list )call (integer_1) integer_1 )subscript (identifier_split) identifier_split )attribute (argument_list (string_',') string_',' )argument_list )call (integer_0) integer_0 )subscript (identifier_split) identifier_split )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (return_statement (call (attribute (string_'[Vol: {}%] ') string_'[Vol: {}%] ' (identifier_format) identifier_format )attribute (argument_list (call (identifier_int) identifier_int (argument_list (binary_operator (binary_operator (integer_100) integer_100 (attribute (identifier_self) identifier_self (identifier_actual_volume) identifier_actual_volume )attribute )binary_operator (attribute (identifier_self) identifier_self (identifier_max_volume) identifier_max_volume )attribute )binary_operator )argument_list )call )argument_list )call )return_statement )block )function_definition )module
format vlc's volume
(module (function_definition (function_name_vicinity) function_name_vicinity (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier__vicinity) identifier__vicinity )attribute (string_'') string_'' )comparison_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_details) identifier_details )attribute (None) None )comparison_operator )boolean_operator (comparison_operator (string_'vicinity') string_'vicinity' (attribute (identifier_self) identifier_self (identifier_details) identifier_details )attribute )comparison_operator )boolean_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__vicinity) identifier__vicinity )attribute (subscript (attribute (identifier_self) identifier_self (identifier_details) identifier_details )attribute (string_'vicinity') string_'vicinity' )subscript )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__vicinity) identifier__vicinity )attribute )return_statement )block )function_definition )module
Returns a feature name of a nearby location. Often this feature refers to a street or neighborhood within the given results.
(module (function_definition (function_name_get_messages) function_name_get_messages (parameters (identifier_self) identifier_self (default_parameter (identifier_page) identifier_page (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_endpoint) identifier_endpoint (string_'https://outlook.office.com/api/v2.0/me/messages') string_'https://outlook.office.com/api/v2.0/me/messages' )assignment )expression_statement (if_statement (comparison_operator (identifier_page) identifier_page (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_endpoint) identifier_endpoint (binary_operator (binary_operator (binary_operator (identifier_endpoint) identifier_endpoint (string_'/?%24skip=') string_'/?%24skip=' )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_page) identifier_page )argument_list )call )binary_operator (string_'0') string_'0' )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_'Getting messages from endpoint: {} with Headers: {}') string_'Getting messages from endpoint: {} with Headers: {}' (identifier_format) identifier_format )attribute (argument_list (identifier_endpoint) identifier_endpoint (attribute (identifier_self) identifier_self (identifier__headers) identifier__headers )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (identifier_endpoint) identifier_endpoint (keyword_argument (identifier_headers) identifier_headers (attribute (identifier_self) identifier_self (identifier__headers) identifier__headers )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_check_response) identifier_check_response (argument_list (identifier_r) identifier_r )argument_list )call )expression_statement (return_statement (call (attribute (identifier_Message) identifier_Message (identifier__json_to_messages) identifier__json_to_messages )attribute (argument_list (identifier_self) identifier_self (call (attribute (identifier_r) identifier_r (identifier_json) identifier_json )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Get first 10 messages in account, across all folders. Keyword Args: page (int): Integer representing the 'page' of results to fetch Returns: List[:class:`Message <pyOutlook.core.message.Message>`]
(module (function_definition (function_name_mobile_template) function_name_mobile_template (parameters (identifier_template) identifier_template )parameters (block (function_definition (function_name_decorator) function_name_decorator (parameters (identifier_f) identifier_f )parameters (block (decorated_definition (decorator (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_f) identifier_f )argument_list )call )decorator (function_definition (function_name_wrapper) function_name_wrapper (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_ctx) identifier_ctx (attribute (identifier_stack) identifier_stack (identifier_top) identifier_top )attribute )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_ctx) identifier_ctx (None) None )comparison_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_ctx) identifier_ctx (string_'request') string_'request' )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_request) identifier_request (attribute (identifier_ctx) identifier_ctx (identifier_request) identifier_request )attribute )assignment )expression_statement (expression_statement (assignment (identifier_is_mobile) identifier_is_mobile (call (identifier_getattr) identifier_getattr (argument_list (identifier_request) identifier_request (string_'MOBILE') string_'MOBILE' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'template') string_'template' )subscript (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_r'{(.+?)}') string_r'{(.+?)}' (conditional_expression (string_r'\1') string_r'\1' (identifier_is_mobile) identifier_is_mobile (string_'') string_'' )conditional_expression (identifier_template) identifier_template )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (identifier_f) identifier_f (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition (return_statement (identifier_decorator) identifier_decorator )return_statement )block )function_definition )module
Mark a function as mobile-ready and pass a mobile template if MOBILE. For example:: @mobile_template('a/{mobile/}b.html') def view(template=None): ... if ``request.MOBILE=True`` the template will be `a/mobile/b.html`. if ``request.MOBILE=False`` the template will be `a/b.html`. This function is useful if the mobile view uses the same context but a different template.
(module (function_definition (function_name_DisplayEstimate) function_name_DisplayEstimate (parameters (identifier_message) identifier_message (identifier_min_estimate) identifier_min_estimate (identifier_max_estimate) identifier_max_estimate )parameters (block (expression_statement (assignment (identifier_mean_avg_cpc) identifier_mean_avg_cpc (parenthesized_expression (conditional_expression (call (identifier__CalculateMean) identifier__CalculateMean (argument_list (subscript (subscript (identifier_min_estimate) identifier_min_estimate (string_'averageCpc') string_'averageCpc' )subscript (string_'microAmount') string_'microAmount' )subscript (subscript (subscript (identifier_max_estimate) identifier_max_estimate (string_'averageCpc') string_'averageCpc' )subscript (string_'microAmount') string_'microAmount' )subscript )argument_list )call (boolean_operator (comparison_operator (string_'averageCpc') string_'averageCpc' (identifier_min_estimate) identifier_min_estimate )comparison_operator (subscript (identifier_min_estimate) identifier_min_estimate (string_'averageCpc') string_'averageCpc' )subscript )boolean_operator (None) None )conditional_expression )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_mean_avg_pos) identifier_mean_avg_pos (parenthesized_expression (conditional_expression (call (identifier__CalculateMean) identifier__CalculateMean (argument_list (subscript (identifier_min_estimate) identifier_min_estimate (string_'averagePosition') string_'averagePosition' )subscript (subscript (identifier_max_estimate) identifier_max_estimate (string_'averagePosition') string_'averagePosition' )subscript )argument_list )call (boolean_operator (comparison_operator (string_'averagePosition') string_'averagePosition' (identifier_min_estimate) identifier_min_estimate )comparison_operator (subscript (identifier_min_estimate) identifier_min_estimate (string_'averagePosition') string_'averagePosition' )subscript )boolean_operator (None) None )conditional_expression )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_mean_clicks) identifier_mean_clicks (call (identifier__CalculateMean) identifier__CalculateMean (argument_list (subscript (identifier_min_estimate) identifier_min_estimate (string_'clicksPerDay') string_'clicksPerDay' )subscript (subscript (identifier_max_estimate) identifier_max_estimate (string_'clicksPerDay') string_'clicksPerDay' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mean_total_cost) identifier_mean_total_cost (call (identifier__CalculateMean) identifier__CalculateMean (argument_list (subscript (subscript (identifier_min_estimate) identifier_min_estimate (string_'totalCost') string_'totalCost' )subscript (string_'microAmount') string_'microAmount' )subscript (subscript (subscript (identifier_max_estimate) identifier_max_estimate (string_'totalCost') string_'totalCost' )subscript (string_'microAmount') string_'microAmount' )subscript )argument_list )call )assignment )expression_statement (print_statement (identifier_message) identifier_message )print_statement (print_statement (binary_operator (string_' Estimated average CPC: %s') string_' Estimated average CPC: %s' (call (identifier__FormatMean) identifier__FormatMean (argument_list (identifier_mean_avg_cpc) identifier_mean_avg_cpc )argument_list )call )binary_operator )print_statement (print_statement (binary_operator (string_' Estimated ad position: %s') string_' Estimated ad position: %s' (call (identifier__FormatMean) identifier__FormatMean (argument_list (identifier_mean_avg_pos) identifier_mean_avg_pos )argument_list )call )binary_operator )print_statement (print_statement (binary_operator (string_' Estimated daily clicks: %s') string_' Estimated daily clicks: %s' (call (identifier__FormatMean) identifier__FormatMean (argument_list (identifier_mean_clicks) identifier_mean_clicks )argument_list )call )binary_operator )print_statement (print_statement (binary_operator (string_' Estimated daily cost: %s') string_' Estimated daily cost: %s' (call (identifier__FormatMean) identifier__FormatMean (argument_list (identifier_mean_total_cost) identifier_mean_total_cost )argument_list )call )binary_operator )print_statement )block )function_definition )module
Displays mean average cpc, position, clicks, and total cost for estimate. Args: message: str message to display for the given estimate. min_estimate: sudsobject containing a minimum estimate from the TrafficEstimatorService response. max_estimate: sudsobject containing a maximum estimate from the TrafficEstimatorService response.
(module (function_definition (function_name_show_tooltip) function_name_show_tooltip (parameters (identifier_self) identifier_self (identifier_pos) identifier_pos (identifier_tooltip) identifier_tooltip (default_parameter (identifier__sender_deco) identifier__sender_deco (None) None )default_parameter )parameters (block (if_statement (boolean_operator (comparison_operator (identifier__sender_deco) identifier__sender_deco (None) None )comparison_operator (comparison_operator (identifier__sender_deco) identifier__sender_deco (attribute (identifier_self) identifier_self (identifier_decorations) identifier_decorations )attribute )comparison_operator )boolean_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_QtWidgets) identifier_QtWidgets (identifier_QToolTip) identifier_QToolTip )attribute (identifier_showText) identifier_showText )attribute (argument_list (identifier_pos) identifier_pos (subscript (identifier_tooltip) identifier_tooltip (slice (integer_0) integer_0 (colon) colon (integer_1024) integer_1024 )slice )subscript (identifier_self) identifier_self )argument_list )call )expression_statement )block )function_definition )module
Show a tool tip at the specified position :param pos: Tooltip position :param tooltip: Tooltip text :param _sender_deco: TextDecoration which is the sender of the show tooltip request. (for internal use only).
(module (function_definition (function_name_load_reader_options) function_name_load_reader_options (parameters )parameters (block (expression_statement (assignment (identifier_options) identifier_options (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (string_'PANDOC_READER_OPTIONS') string_'PANDOC_READER_OPTIONS' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_options) identifier_options (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_options) identifier_options (keyword_argument (identifier_object_pairs_hook) identifier_object_pairs_hook (identifier_OrderedDict) identifier_OrderedDict )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_options) identifier_options )return_statement )block )function_definition )module
Retrieve Pandoc Reader options from the environment
(module (function_definition (function_name__make_minimal) function_name__make_minimal (parameters (identifier_dictionary) identifier_dictionary )parameters (block (expression_statement (assignment (identifier_new_dict) identifier_new_dict (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_dictionary) identifier_dictionary (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_dict) identifier_dict )argument_list )call (block (expression_statement (assignment (identifier_new_value) identifier_new_value (call (identifier__make_minimal) identifier__make_minimal (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (if_statement (identifier_new_value) identifier_new_value (block (expression_statement (assignment (subscript (identifier_new_dict) identifier_new_dict (identifier_key) identifier_key )subscript (identifier_new_value) identifier_new_value )assignment )expression_statement )block )if_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_new_dict) identifier_new_dict (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )else_clause )if_statement )block )if_statement )block )for_statement (return_statement (identifier_new_dict) identifier_new_dict )return_statement )block )function_definition )module
This function removes all the keys whose value is either None or an empty dictionary.
(module (function_definition (function_name_is_valid_vpnv4_prefix) function_name_is_valid_vpnv4_prefix (parameters (identifier_prefix) identifier_prefix )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_prefix) identifier_prefix (identifier_str) identifier_str )argument_list )call )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_tokens) identifier_tokens (call (attribute (identifier_prefix) identifier_prefix (identifier_split) identifier_split )attribute (argument_list (string_':') string_':' (integer_2) integer_2 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_tokens) identifier_tokens )argument_list )call (integer_3) integer_3 )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (not_operator (call (identifier_is_valid_route_dist) identifier_is_valid_route_dist (argument_list (call (attribute (string_':') string_':' (identifier_join) identifier_join )attribute (argument_list (list (subscript (identifier_tokens) identifier_tokens (integer_0) integer_0 )subscript (subscript (identifier_tokens) identifier_tokens (integer_1) integer_1 )subscript )list )argument_list )call )argument_list )call )not_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (call (identifier_is_valid_ipv4_prefix) identifier_is_valid_ipv4_prefix (argument_list (subscript (identifier_tokens) identifier_tokens (integer_2) integer_2 )subscript )argument_list )call )return_statement )block )function_definition )module
Returns True if given prefix is a string represent vpnv4 prefix. Vpnv4 prefix is made up of RD:Ipv4, where RD is represents route distinguisher and Ipv4 represents valid dot-decimal ipv4 notation string.
(module (function_definition (function_name_start) function_name_start (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_self) identifier_self (identifier__done_event) identifier__done_event )attribute (identifier_is_set) identifier_is_set )attribute (argument_list )argument_list )call )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__done_event) identifier__done_event )attribute (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_nb_pending_tasks) identifier_nb_pending_tasks (call (attribute (attribute (identifier_self) identifier_self (identifier__queue) identifier__queue )attribute (identifier_qsize) identifier_qsize )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_nb_pending_tasks) identifier_nb_pending_tasks (attribute (identifier_self) identifier_self (identifier__max_threads) identifier__max_threads )attribute )comparison_operator (block (expression_statement (assignment (identifier_nb_threads) identifier_nb_threads (attribute (identifier_self) identifier_self (identifier__max_threads) identifier__max_threads )attribute )assignment )expression_statement (expression_statement (assignment (identifier_nb_pending_tasks) identifier_nb_pending_tasks (attribute (identifier_self) identifier_self (identifier__max_threads) identifier__max_threads )attribute )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_nb_pending_tasks) identifier_nb_pending_tasks (attribute (identifier_self) identifier_self (identifier__min_threads) identifier__min_threads )attribute )comparison_operator (block (expression_statement (assignment (identifier_nb_threads) identifier_nb_threads (attribute (identifier_self) identifier_self (identifier__min_threads) identifier__min_threads )attribute )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_nb_threads) identifier_nb_threads (identifier_nb_pending_tasks) identifier_nb_pending_tasks )assignment )expression_statement )block )else_clause )if_statement (for_statement (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (identifier_nb_pending_tasks) identifier_nb_pending_tasks )argument_list )call (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier___nb_pending_task) identifier___nb_pending_task )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier___start_thread) identifier___start_thread )attribute (argument_list )argument_list )call )expression_statement )block )for_statement (for_statement (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (binary_operator (identifier_nb_threads) identifier_nb_threads (identifier_nb_pending_tasks) identifier_nb_pending_tasks )binary_operator )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier___start_thread) identifier___start_thread )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Starts the thread pool. Does nothing if the pool is already started.
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self (identifier_file_or_path) identifier_file_or_path (default_parameter (identifier_append) identifier_append (False) False )default_parameter (default_parameter (identifier_timeout) identifier_timeout (integer_10) integer_10 )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_file_or_path) identifier_file_or_path (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call (block (if_statement (attribute (identifier_self) identifier_self (identifier_coverage) identifier_coverage )attribute (block (expression_statement (assignment (identifier_file_or_path) identifier_file_or_path (call (identifier_get_smother_filename) identifier_get_smother_filename (argument_list (identifier_file_or_path) identifier_file_or_path (attribute (attribute (attribute (identifier_self) identifier_self (identifier_coverage) identifier_coverage )attribute (identifier_config) identifier_config )attribute (identifier_parallel) identifier_parallel )attribute )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_outfile) identifier_outfile (call (identifier_Lock) identifier_Lock (argument_list (identifier_file_or_path) identifier_file_or_path (keyword_argument (identifier_mode) identifier_mode (string_'a+') string_'a+' )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument (keyword_argument (identifier_fail_when_locked) identifier_fail_when_locked (False) False )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_outfile) identifier_outfile (call (identifier_noclose) identifier_noclose (argument_list (identifier_file_or_path) identifier_file_or_path )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (with_statement (with_clause (with_item (as_pattern (identifier_outfile) identifier_outfile (as_pattern_target (identifier_fh) identifier_fh )as_pattern_target )as_pattern )with_item )with_clause (block (if_statement (identifier_append) identifier_append (block (expression_statement (call (attribute (identifier_fh) identifier_fh (identifier_seek) identifier_seek )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (try_statement (block (expression_statement (assignment (identifier_other) identifier_other (call (attribute (identifier_Smother) identifier_Smother (identifier_load) identifier_load )attribute (argument_list (identifier_fh) identifier_fh )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause (else_clause (block (expression_statement (augmented_assignment (identifier_self) identifier_self (identifier_other) identifier_other )augmented_assignment )expression_statement )block )else_clause )try_statement )block )if_statement (expression_statement (call (attribute (identifier_fh) identifier_fh (identifier_seek) identifier_seek )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_fh) identifier_fh (identifier_truncate) identifier_truncate )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_json) identifier_json (identifier_dump) identifier_dump )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_fh) identifier_fh )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Write Smother results to a file. Parameters ---------- fiile_or_path : str Path to write report to append : bool If True, read an existing smother report from `outpath` and combine it with this file before writing. timeout : int Time in seconds to wait to acquire a file lock, before raising an error. Note ---- Append mode is atomic when file_or_path is a path, and can be safely run in a multithreaded or multiprocess test environment. When using `parallel_mode`, file_or_path is given a unique suffix based on the machine name and process id.
(module (function_definition (function_name_error_log) function_name_error_log (parameters (identifier_self) identifier_self (default_parameter (identifier_msg) identifier_msg (string_'') string_'' )default_parameter (default_parameter (identifier_level) identifier_level (integer_20) integer_20 )default_parameter (default_parameter (identifier_traceback) identifier_traceback (False) False )default_parameter )parameters (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (binary_operator (identifier_msg) identifier_msg (string_'\n') string_'\n' )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )expression_statement (if_statement (identifier_traceback) identifier_traceback (block (expression_statement (assignment (identifier_tblines) identifier_tblines (call (attribute (identifier_traceback_) identifier_traceback_ (identifier_format_exc) identifier_format_exc )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (identifier_tblines) identifier_tblines )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Write error message to log. Args: msg (str): error message level (int): logging level traceback (bool): add traceback to output or not
(module (function_definition (function_name_handleOneClientMsg) function_name_handleOneClientMsg (parameters (identifier_self) identifier_self (identifier_wrappedMsg) identifier_wrappedMsg )parameters (block (try_statement (block (expression_statement (assignment (identifier_vmsg) identifier_vmsg (call (attribute (identifier_self) identifier_self (identifier_validateClientMsg) identifier_validateClientMsg )attribute (argument_list (identifier_wrappedMsg) identifier_wrappedMsg )argument_list )call )assignment )expression_statement (if_statement (identifier_vmsg) identifier_vmsg (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_unpackClientMsg) identifier_unpackClientMsg )attribute (argument_list (list_splat (identifier_vmsg) identifier_vmsg )list_splat )argument_list )call )expression_statement )block )if_statement )block (except_clause (identifier_BlowUp) identifier_BlowUp (block (raise_statement )raise_statement )block )except_clause (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (expression_statement (assignment (pattern_list (identifier_msg) identifier_msg (identifier_frm) identifier_frm )pattern_list (identifier_wrappedMsg) identifier_wrappedMsg )assignment )expression_statement (expression_statement (assignment (identifier_friendly) identifier_friendly (call (identifier_friendlyEx) identifier_friendlyEx (argument_list (identifier_ex) identifier_ex )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_ex) identifier_ex (identifier_SuspiciousClient) identifier_SuspiciousClient )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_reportSuspiciousClient) identifier_reportSuspiciousClient )attribute (argument_list (identifier_frm) identifier_frm (identifier_friendly) identifier_friendly )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_handleInvalidClientMsg) identifier_handleInvalidClientMsg )attribute (argument_list (identifier_ex) identifier_ex (identifier_wrappedMsg) identifier_wrappedMsg )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Validate and process a client message :param wrappedMsg: a message from a client
(module (function_definition (function_name_GetUserinfo) function_name_GetUserinfo (parameters (identifier_credentials) identifier_credentials (default_parameter (identifier_http) identifier_http (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_http) identifier_http (boolean_operator (identifier_http) identifier_http (call (attribute (identifier_httplib2) identifier_httplib2 (identifier_Http) identifier_Http )attribute (argument_list )argument_list )call )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (call (identifier__GetUserinfoUrl) identifier__GetUserinfoUrl (argument_list (identifier_credentials) identifier_credentials )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_response) identifier_response (identifier_content) identifier_content )pattern_list (call (attribute (identifier_http) identifier_http (identifier_request) identifier_request )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_status) identifier_status )attribute (attribute (identifier_http_client) identifier_http_client (identifier_BAD_REQUEST) identifier_BAD_REQUEST )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_credentials) identifier_credentials (identifier_refresh) identifier_refresh )attribute (argument_list (identifier_http) identifier_http )argument_list )call )expression_statement (expression_statement (assignment (identifier_url) identifier_url (call (identifier__GetUserinfoUrl) identifier__GetUserinfoUrl (argument_list (identifier_credentials) identifier_credentials )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_response) identifier_response (identifier_content) identifier_content )pattern_list (call (attribute (identifier_http) identifier_http (identifier_request) identifier_request )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (boolean_operator (identifier_content) identifier_content (string_'{}') string_'{}' )boolean_operator )argument_list )call )return_statement )block )function_definition )module
Get the userinfo associated with the given credentials. This is dependent on the token having either the userinfo.email or userinfo.profile scope for the given token. Args: credentials: (oauth2client.client.Credentials) incoming credentials http: (httplib2.Http, optional) http instance to use Returns: The email address for this token, or None if the required scopes aren't available.
(module (function_definition (function_name_compute_colors_for_labels) function_name_compute_colors_for_labels (parameters (identifier_self) identifier_self (identifier_labels) identifier_labels )parameters (block (expression_statement (assignment (identifier_colors) identifier_colors (binary_operator (subscript (identifier_labels) identifier_labels (slice (colon) colon )slice (None) None )subscript (attribute (identifier_self) identifier_self (identifier_palette) identifier_palette )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_colors) identifier_colors (call (attribute (call (attribute (parenthesized_expression (binary_operator (identifier_colors) identifier_colors (integer_255) integer_255 )binary_operator )parenthesized_expression (identifier_numpy) identifier_numpy )attribute (argument_list )argument_list )call (identifier_astype) identifier_astype )attribute (argument_list (string_"uint8") string_"uint8" )argument_list )call )assignment )expression_statement (return_statement (identifier_colors) identifier_colors )return_statement )block )function_definition )module
Simple function that adds fixed colors depending on the class
(module (function_definition (function_name__process_batch_write_response) function_name__process_batch_write_response (parameters (identifier_request) identifier_request (identifier_response) identifier_response (identifier_table_crypto_config) identifier_table_crypto_config )parameters (block (try_statement (block (expression_statement (assignment (identifier_unprocessed_items) identifier_unprocessed_items (subscript (identifier_response) identifier_response (string_"UnprocessedItems") string_"UnprocessedItems" )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (return_statement (identifier_response) identifier_response )return_statement )block )except_clause )try_statement (for_statement (pattern_list (identifier_table_name) identifier_table_name (identifier_unprocessed) identifier_unprocessed )pattern_list (call (attribute (identifier_unprocessed_items) identifier_unprocessed_items (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_original_items) identifier_original_items (subscript (identifier_request) identifier_request (identifier_table_name) identifier_table_name )subscript )assignment )expression_statement (expression_statement (assignment (identifier_crypto_config) identifier_crypto_config (subscript (identifier_table_crypto_config) identifier_table_crypto_config (identifier_table_name) identifier_table_name )subscript )assignment )expression_statement (if_statement (attribute (attribute (identifier_crypto_config) identifier_crypto_config (identifier_encryption_context) identifier_encryption_context )attribute (identifier_partition_key_name) identifier_partition_key_name )attribute (block (expression_statement (assignment (identifier_items_match) identifier_items_match (call (identifier_partial) identifier_partial (argument_list (identifier__item_keys_match) identifier__item_keys_match (identifier_crypto_config) identifier_crypto_config )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_items_match) identifier_items_match (call (identifier_partial) identifier_partial (argument_list (identifier__item_attributes_match) identifier__item_attributes_match (identifier_crypto_config) identifier_crypto_config )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (for_statement (pattern_list (identifier_pos) identifier_pos (identifier_operation) identifier_operation )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_unprocessed) identifier_unprocessed )argument_list )call (block (for_statement (pattern_list (identifier_request_type) identifier_request_type (identifier_item) identifier_item )pattern_list (call (attribute (identifier_operation) identifier_operation (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_request_type) identifier_request_type (string_"PutRequest") string_"PutRequest" )comparison_operator (block (continue_statement )continue_statement )block )if_statement (for_statement (identifier_plaintext_item) identifier_plaintext_item (identifier_original_items) identifier_original_items (block (if_statement (boolean_operator (call (attribute (identifier_plaintext_item) identifier_plaintext_item (identifier_get) identifier_get )attribute (argument_list (identifier_request_type) identifier_request_type )argument_list )call (call (identifier_items_match) identifier_items_match (argument_list (subscript (subscript (identifier_plaintext_item) identifier_plaintext_item (identifier_request_type) identifier_request_type )subscript (string_"Item") string_"Item" )subscript (subscript (identifier_item) identifier_item (string_"Item") string_"Item" )subscript )argument_list )call )boolean_operator (block (expression_statement (assignment (subscript (identifier_unprocessed) identifier_unprocessed (identifier_pos) identifier_pos )subscript (call (attribute (identifier_plaintext_item) identifier_plaintext_item (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement )block )for_statement )block )for_statement )block )for_statement (return_statement (identifier_response) identifier_response )return_statement )block )function_definition )module
Handle unprocessed items in the response from a transparently encrypted write. :param dict request: The DynamoDB plaintext request dictionary :param dict response: The DynamoDB response from the batch operation :param Dict[Text, CryptoConfig] table_crypto_config: table level CryptoConfig used in encrypting the request items :return: DynamoDB response, with any unprocessed items reverted back to the original plaintext values :rtype: dict
(module (function_definition (function_name_publish_server_heartbeat_succeeded) function_name_publish_server_heartbeat_succeeded (parameters (identifier_self) identifier_self (identifier_connection_id) identifier_connection_id (identifier_duration) identifier_duration (identifier_reply) identifier_reply )parameters (block (expression_statement (assignment (identifier_event) identifier_event (call (identifier_ServerHeartbeatSucceededEvent) identifier_ServerHeartbeatSucceededEvent (argument_list (identifier_duration) identifier_duration (identifier_reply) identifier_reply (identifier_connection_id) identifier_connection_id )argument_list )call )assignment )expression_statement (for_statement (identifier_subscriber) identifier_subscriber (attribute (identifier_self) identifier_self (identifier___server_heartbeat_listeners) identifier___server_heartbeat_listeners )attribute (block (try_statement (block (expression_statement (call (attribute (identifier_subscriber) identifier_subscriber (identifier_succeeded) identifier_succeeded )attribute (argument_list (identifier_event) identifier_event )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (call (identifier__handle_exception) identifier__handle_exception (argument_list )argument_list )call )expression_statement )block )except_clause )try_statement )block )for_statement )block )function_definition )module
Publish a ServerHeartbeatSucceededEvent to all server heartbeat listeners. :Parameters: - `connection_id`: The address (host/port pair) of the connection. - `duration`: The execution time of the event in the highest possible resolution for the platform. - `reply`: The command reply.
(module (function_definition (function_name_put) function_name_put (parameters (identifier_self) identifier_self (identifier_body) identifier_body (default_parameter (identifier_priority) identifier_priority (identifier_DEFAULT_PRIORITY) identifier_DEFAULT_PRIORITY )default_parameter (default_parameter (identifier_delay) identifier_delay (integer_0) integer_0 )default_parameter (default_parameter (identifier_ttr) identifier_ttr (identifier_DEFAULT_TTR) identifier_DEFAULT_TTR )default_parameter )parameters (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_body) identifier_body (identifier_str) identifier_str )argument_list )call (string_'Job body must be a str instance') string_'Job body must be a str instance' )assert_statement (expression_statement (assignment (identifier_jid) identifier_jid (call (attribute (identifier_self) identifier_self (identifier__interact_value) identifier__interact_value )attribute (argument_list (binary_operator (string_'put %d %d %d %d\r\n%s\r\n') string_'put %d %d %d %d\r\n%s\r\n' (tuple (identifier_priority) identifier_priority (identifier_delay) identifier_delay (identifier_ttr) identifier_ttr (call (identifier_len) identifier_len (argument_list (identifier_body) identifier_body )argument_list )call (identifier_body) identifier_body )tuple )binary_operator (list (string_'INSERTED') string_'INSERTED' )list (list (string_'JOB_TOO_BIG') string_'JOB_TOO_BIG' (string_'BURIED') string_'BURIED' (string_'DRAINING') string_'DRAINING' )list )argument_list )call )assignment )expression_statement (return_statement (call (identifier_int) identifier_int (argument_list (identifier_jid) identifier_jid )argument_list )call )return_statement )block )function_definition )module
Put a job into the current tube. Returns job id.
(module (function_definition (function_name__char_density) function_name__char_density (parameters (identifier_self) identifier_self (identifier_c) identifier_c (default_parameter (identifier_font) identifier_font (call (attribute (identifier_ImageFont) identifier_ImageFont (identifier_load_default) identifier_load_default )attribute (argument_list )argument_list )call )default_parameter )parameters (block (expression_statement (assignment (identifier_image) identifier_image (call (attribute (identifier_Image) identifier_Image (identifier_new) identifier_new )attribute (argument_list (string_'1') string_'1' (call (attribute (identifier_font) identifier_font (identifier_getsize) identifier_getsize )attribute (argument_list (identifier_c) identifier_c )argument_list )call (keyword_argument (identifier_color) identifier_color (integer_255) integer_255 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_draw) identifier_draw (call (attribute (identifier_ImageDraw) identifier_ImageDraw (identifier_Draw) identifier_Draw )attribute (argument_list (identifier_image) identifier_image )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_draw) identifier_draw (identifier_text) identifier_text )attribute (argument_list (tuple (integer_0) integer_0 (integer_0) integer_0 )tuple (identifier_c) identifier_c (keyword_argument (identifier_fill) identifier_fill (string_"white") string_"white" )keyword_argument (keyword_argument (identifier_font) identifier_font (identifier_font) identifier_font )keyword_argument )argument_list )call )expression_statement (return_statement (subscript (call (attribute (identifier_collections) identifier_collections (identifier_Counter) identifier_Counter )attribute (argument_list (call (attribute (identifier_image) identifier_image (identifier_getdata) identifier_getdata )attribute (argument_list )argument_list )call )argument_list )call (integer_0) integer_0 )subscript )return_statement )block )function_definition )module
Count the number of black pixels in a rendered character.
(module (function_definition (function_name__tile_ticks) function_name__tile_ticks (parameters (identifier_self) identifier_self (identifier_frac) identifier_frac (identifier_tickvec) identifier_tickvec )parameters (block (expression_statement (assignment (identifier_origins) identifier_origins (call (attribute (identifier_np) identifier_np (identifier_tile) identifier_tile )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_axis) identifier_axis )attribute (identifier__vec) identifier__vec )attribute (tuple (call (identifier_len) identifier_len (argument_list (identifier_frac) identifier_frac )argument_list )call (integer_1) integer_1 )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_origins) identifier_origins (binary_operator (attribute (subscript (attribute (attribute (identifier_self) identifier_self (identifier_axis) identifier_axis )attribute (identifier_pos) identifier_pos )attribute (integer_0) integer_0 )subscript (identifier_T) identifier_T )attribute (attribute (parenthesized_expression (binary_operator (attribute (identifier_origins) identifier_origins (identifier_T) identifier_T )attribute (identifier_frac) identifier_frac )binary_operator )parenthesized_expression (identifier_T) identifier_T )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_endpoints) identifier_endpoints (binary_operator (identifier_tickvec) identifier_tickvec (identifier_origins) identifier_origins )binary_operator )assignment )expression_statement (return_statement (expression_list (identifier_origins) identifier_origins (identifier_endpoints) identifier_endpoints )expression_list )return_statement )block )function_definition )module
Tiles tick marks along the axis.
(module (function_definition (function_name__peek_buffer) function_name__peek_buffer (parameters (identifier_self) identifier_self (default_parameter (identifier_i) identifier_i (integer_0) integer_0 )default_parameter )parameters (block (while_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__buffer) identifier__buffer )attribute )argument_list )call (identifier_i) identifier_i )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__buffer) identifier__buffer )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_next) identifier_next (argument_list (attribute (identifier_self) identifier_self (identifier__source) identifier__source )attribute )argument_list )call )argument_list )call )expression_statement )block )while_statement (return_statement (subscript (attribute (identifier_self) identifier_self (identifier__buffer) identifier__buffer )attribute (identifier_i) identifier_i )subscript )return_statement )block )function_definition )module
Get the next line without consuming it.
(module (function_definition (function_name_filing_history) function_name_filing_history (parameters (identifier_self) identifier_self (identifier_num) identifier_num (default_parameter (identifier_transaction) identifier_transaction (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_baseuri) identifier_baseuri (binary_operator (attribute (identifier_self) identifier_self (identifier__BASE_URI) identifier__BASE_URI )attribute (call (attribute (string_"company/{}/filing-history") string_"company/{}/filing-history" (identifier_format) identifier_format )attribute (argument_list (identifier_num) identifier_num )argument_list )call )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_transaction) identifier_transaction (None) None )comparison_operator (block (expression_statement (augmented_assignment (identifier_baseuri) identifier_baseuri (call (attribute (string_"/{}") string_"/{}" (identifier_format) identifier_format )attribute (argument_list (identifier_transaction) identifier_transaction )argument_list )call )augmented_assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_baseuri) identifier_baseuri (keyword_argument (identifier_params) identifier_params (identifier_kwargs) identifier_kwargs )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_handle_http_error) identifier_handle_http_error )attribute (argument_list (identifier_res) identifier_res )argument_list )call )expression_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Search for a company's filling history by company number. Args: num (str): Company number to search on. transaction (Optional[str]): Filing record number. kwargs (dict): additional keywords passed into requests.session.get params keyword.
(module (function_definition (function_name_validate_reaction) function_name_validate_reaction (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_reaction) identifier_reaction )attribute (attribute (identifier_self) identifier_self (identifier__reaction_valid_values) identifier__reaction_valid_values )attribute )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"reaction should be one of: {valid}") string_"reaction should be one of: {valid}" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_valid) identifier_valid (call (attribute (string_", ") string_", " (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__reaction_valid_values) identifier__reaction_valid_values )attribute )argument_list )call )keyword_argument )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Ensure reaction is of a certain type. Mainly for future expansion.
(module (function_definition (function_name_collection) function_name_collection (parameters (default_parameter (identifier_name) identifier_name (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (block (expression_statement (assignment (identifier_collection) identifier_collection (call (attribute (attribute (identifier_Collection) identifier_Collection (identifier_query) identifier_query )attribute (identifier_get_or_404) identifier_get_or_404 )attribute (argument_list (integer_1) integer_1 )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_collection) identifier_collection (call (attribute (call (attribute (attribute (identifier_Collection) identifier_Collection (identifier_query) identifier_query )attribute (identifier_filter) identifier_filter )attribute (argument_list (comparison_operator (attribute (identifier_Collection) identifier_Collection (identifier_name) identifier_name )attribute (identifier_name) identifier_name )comparison_operator )argument_list )call (identifier_first_or_404) identifier_first_or_404 )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_render_template) identifier_render_template (argument_list (list (call (attribute (string_'invenio_collections/collection_{0}.html') string_'invenio_collections/collection_{0}.html' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_collection) identifier_collection (identifier_id) identifier_id )attribute )argument_list )call (call (attribute (string_'invenio_collections/collection_{0}.html') string_'invenio_collections/collection_{0}.html' (identifier_format) identifier_format )attribute (argument_list (call (identifier_slugify) identifier_slugify (argument_list (identifier_name) identifier_name (string_'_') string_'_' )argument_list )call )argument_list )call (subscript (attribute (identifier_current_app) identifier_current_app (identifier_config) identifier_config )attribute (string_'COLLECTIONS_DEFAULT_TEMPLATE') string_'COLLECTIONS_DEFAULT_TEMPLATE' )subscript )list (keyword_argument (identifier_collection) identifier_collection (identifier_collection) identifier_collection )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Render the collection page. It renders it either with a collection specific template (aka collection_{collection_name}.html) or with the default collection template (collection.html).
(module (function_definition (function_name_merge) function_name_merge (parameters (identifier_cls) identifier_cls (list_splat_pattern (identifier_others) identifier_others )list_splat_pattern )parameters (block (for_statement (identifier_other) identifier_other (identifier_others) identifier_others (block (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (identifier_other) identifier_other (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_cls) identifier_cls (identifier_k) identifier_k (call (identifier_BoundValue) identifier_BoundValue (argument_list (identifier_cls) identifier_cls (identifier_k) identifier_k (attribute (identifier_v) identifier_v (identifier_value) identifier_value )attribute )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
Merge the `others` schema into this instance. The values will all be read from the provider of the original object.
(module (function_definition (function_name_extract_params) function_name_extract_params (parameters (identifier_params) identifier_params )parameters (block (expression_statement (assignment (identifier_values) identifier_values (list )list )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_params) identifier_params (identifier_dict) identifier_dict )argument_list )call (block (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_params) identifier_params (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_values) identifier_values (identifier_extend) identifier_extend )attribute (argument_list (call (identifier_extract_params) identifier_extract_params (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )expression_statement )block )for_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_params) identifier_params (identifier_list) identifier_list )argument_list )call (block (for_statement (identifier_value) identifier_value (identifier_params) identifier_params (block (expression_statement (call (attribute (identifier_values) identifier_values (identifier_extend) identifier_extend )attribute (argument_list (call (identifier_extract_params) identifier_extract_params (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )elif_clause (else_clause (block (expression_statement (call (attribute (identifier_values) identifier_values (identifier_append) identifier_append )attribute (argument_list (identifier_params) identifier_params )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (identifier_values) identifier_values )return_statement )block )function_definition )module
Extracts the values of a set of parameters, recursing into nested dictionaries.
(module (function_definition (function_name__check_list_minions) function_name__check_list_minions (parameters (identifier_self) identifier_self (identifier_expr) identifier_expr (identifier_greedy) identifier_greedy (default_parameter (identifier_ignore_missing) identifier_ignore_missing (False) False )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_expr) identifier_expr (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call (block (expression_statement (assignment (identifier_expr) identifier_expr (list_comprehension (identifier_m) identifier_m (for_in_clause (identifier_m) identifier_m (call (attribute (identifier_expr) identifier_expr (identifier_split) identifier_split )attribute (argument_list (string_',') string_',' )argument_list )call )for_in_clause (if_clause (identifier_m) identifier_m )if_clause )list_comprehension )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_minions) identifier_minions (call (attribute (identifier_self) identifier_self (identifier__pki_minions) identifier__pki_minions )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (dictionary (pair (string_'minions') string_'minions' (list_comprehension (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (identifier_expr) identifier_expr )for_in_clause (if_clause (comparison_operator (identifier_x) identifier_x (identifier_minions) identifier_minions )comparison_operator )if_clause )list_comprehension )pair (pair (string_'missing') string_'missing' (conditional_expression (list )list (identifier_ignore_missing) identifier_ignore_missing (list_comprehension (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (identifier_expr) identifier_expr )for_in_clause (if_clause (comparison_operator (identifier_x) identifier_x (identifier_minions) identifier_minions )comparison_operator )if_clause )list_comprehension )conditional_expression )pair )dictionary )return_statement )block )function_definition )module
Return the minions found by looking via a list
(module (function_definition (function_name_create_password_reset) function_name_create_password_reset (parameters (identifier_cls) identifier_cls (identifier_email) identifier_email (default_parameter (identifier_valid_for) identifier_valid_for (integer_3600) integer_3600 )default_parameter )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_user) identifier_user (call (attribute (identifier_cls) identifier_cls (identifier_where_email) identifier_where_email )attribute (argument_list (identifier_email) identifier_email )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_user) identifier_user (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (call (attribute (identifier_PasswordResetModel) identifier_PasswordResetModel (identifier_delete_where_user_id) identifier_delete_where_user_id )attribute (argument_list (attribute (identifier_user) identifier_user (identifier_id) identifier_id )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_token) identifier_token (call (attribute (call (identifier_JWT) identifier_JWT (argument_list )argument_list )call (identifier_create_token) identifier_create_token )attribute (argument_list (dictionary (pair (string_'code') string_'code' (call (attribute (identifier_Security) identifier_Security (identifier_random_string) identifier_random_string )attribute (argument_list (integer_5) integer_5 )argument_list )call )pair (pair (string_'user_id') string_'user_id' (attribute (identifier_user) identifier_user (identifier_id) identifier_id )attribute )pair )dictionary (keyword_argument (identifier_token_valid_for) identifier_token_valid_for (identifier_valid_for) identifier_valid_for )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_code) identifier_code (binary_operator (binary_operator (call (attribute (identifier_Security) identifier_Security (identifier_generate_uuid) identifier_generate_uuid )attribute (argument_list (integer_1) integer_1 )argument_list )call (string_"-") string_"-" )binary_operator (call (attribute (identifier_Security) identifier_Security (identifier_random_string) identifier_random_string )attribute (argument_list (integer_5) integer_5 )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_password_reset_model) identifier_password_reset_model (call (identifier_PasswordResetModel) identifier_PasswordResetModel (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_password_reset_model) identifier_password_reset_model (identifier_token) identifier_token )attribute (identifier_token) identifier_token )assignment )expression_statement (expression_statement (assignment (attribute (identifier_password_reset_model) identifier_password_reset_model (identifier_code) identifier_code )attribute (identifier_code) identifier_code )assignment )expression_statement (expression_statement (assignment (attribute (identifier_password_reset_model) identifier_password_reset_model (identifier_user_id) identifier_user_id )attribute (attribute (identifier_user) identifier_user (identifier_id) identifier_id )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_password_reset_model) identifier_password_reset_model (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_code) identifier_code )return_statement )block )function_definition )module
Create a password reset request in the user_password_resets database table. Hashed code gets stored in the database. Returns unhashed reset code
(module (function_definition (function_name_VerifyStructure) function_name_VerifyStructure (parameters (identifier_self) identifier_self (identifier_parser_mediator) identifier_parser_mediator (identifier_lines) identifier_lines )parameters (block (expression_statement (assignment (identifier_match_generator) identifier_match_generator (call (attribute (attribute (identifier_self) identifier_self (identifier__VERIFICATION_GRAMMAR) identifier__VERIFICATION_GRAMMAR )attribute (identifier_scanString) identifier_scanString )attribute (argument_list (identifier_lines) identifier_lines (keyword_argument (identifier_maxMatches) identifier_maxMatches (integer_1) integer_1 )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_bool) identifier_bool (argument_list (call (identifier_list) identifier_list (argument_list (identifier_match_generator) identifier_match_generator )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Verifies that this is a bash history file. Args: parser_mediator (ParserMediator): mediates interactions between parsers and other components, such as storage and dfvfs. lines (str): one or more lines from the text file. Returns: bool: True if this is the correct parser, False otherwise.
(module (function_definition (function_name_link_sources) function_name_link_sources (parameters (identifier_self) identifier_self )parameters (block (expression_statement (string_"Returns potential Link or Stream sources.") string_"Returns potential Link or Stream sources." )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_self) identifier_self (identifier_GenericOverlayPlot) identifier_GenericOverlayPlot )argument_list )call (block (expression_statement (assignment (identifier_zorders) identifier_zorders (list )list )assignment )expression_statement )block (elif_clause (attribute (identifier_self) identifier_self (identifier_batched) identifier_batched )attribute (block (expression_statement (assignment (identifier_zorders) identifier_zorders (call (identifier_list) identifier_list (argument_list (call (identifier_range) identifier_range (argument_list (attribute (identifier_self) identifier_self (identifier_zorder) identifier_zorder )attribute (binary_operator (attribute (identifier_self) identifier_self (identifier_zorder) identifier_zorder )attribute (call (identifier_len) identifier_len (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_hmap) identifier_hmap )attribute (identifier_last) identifier_last )attribute )argument_list )call )binary_operator )argument_list )call )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_zorders) identifier_zorders (list (attribute (identifier_self) identifier_self (identifier_zorder) identifier_zorder )attribute )list )assignment )expression_statement )block )else_clause )if_statement (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_self) identifier_self (identifier_GenericOverlayPlot) identifier_GenericOverlayPlot )argument_list )call (not_operator (attribute (identifier_self) identifier_self (identifier_batched) identifier_batched )attribute )not_operator )boolean_operator (block (expression_statement (assignment (identifier_sources) identifier_sources (list )list )assignment )expression_statement )block (elif_clause (boolean_operator (not_operator (attribute (identifier_self) identifier_self (identifier_static) identifier_static )attribute )not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_hmap) identifier_hmap )attribute (identifier_DynamicMap) identifier_DynamicMap )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_sources) identifier_sources (list_comprehension (identifier_o) identifier_o (for_in_clause (pattern_list (identifier_i) identifier_i (identifier_inputs) identifier_inputs )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_stream_sources) identifier_stream_sources )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (for_in_clause (identifier_o) identifier_o (identifier_inputs) identifier_inputs )for_in_clause (if_clause (comparison_operator (identifier_i) identifier_i (identifier_zorders) identifier_zorders )comparison_operator )if_clause )list_comprehension )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_sources) identifier_sources (list (attribute (attribute (identifier_self) identifier_self (identifier_hmap) identifier_hmap )attribute (identifier_last) identifier_last )attribute )list )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_sources) identifier_sources )return_statement )block )function_definition )module
Returns potential Link or Stream sources.
(module (function_definition (function_name_visit_Call) function_name_visit_Call (parameters (identifier_self) identifier_self (typed_parameter (identifier_node) identifier_node (type (identifier_AST) identifier_AST )type )typed_parameter (typed_default_parameter (identifier_dfltChaining) identifier_dfltChaining (type (identifier_bool) identifier_bool )type (True) True )typed_default_parameter )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_args) identifier_args (attribute (identifier_node) identifier_node (identifier_args) identifier_args )attribute )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_kwds) identifier_kwds (attribute (identifier_node) identifier_node (identifier_keywords) identifier_keywords )attribute )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (expression_statement (assignment (identifier_kwds) identifier_kwds (list )list )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_compact) identifier_compact )attribute (True) True )assignment )expression_statement (expression_statement (assignment (identifier_args_src) identifier_args_src (generator_expression (call (attribute (identifier_self) identifier_self (identifier_visit) identifier_visit )attribute (argument_list (identifier_arg) identifier_arg )argument_list )call (for_in_clause (identifier_arg) identifier_arg (identifier_args) identifier_args )for_in_clause )generator_expression )assignment )expression_statement (expression_statement (assignment (identifier_kwds_src) identifier_kwds_src (generator_expression (call (attribute (identifier_self) identifier_self (identifier_visit) identifier_visit )attribute (argument_list (identifier_kwd) identifier_kwd )argument_list )call (for_in_clause (identifier_kwd) identifier_kwd (identifier_kwds) identifier_kwds )for_in_clause )generator_expression )assignment )expression_statement (expression_statement (assignment (identifier_param_src) identifier_param_src (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (call (identifier_chain) identifier_chain (argument_list (identifier_args_src) identifier_args_src (identifier_kwds_src) identifier_kwds_src )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_src) identifier_src (string_f"{self.visit(node.func)}({param_src})") string_f"{self.visit(node.func)}({param_src})" )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_compact) identifier_compact )attribute (False) False )assignment )expression_statement (return_statement (identifier_src) identifier_src )return_statement )block )function_definition )module
Return `node`s representation as function call.
(module (function_definition (function_name_abundances) function_name_abundances (parameters (identifier_self) identifier_self (default_parameter (identifier_ids) identifier_ids (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_ids) identifier_ids (None) None )comparison_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_table) identifier_table )attribute (argument_list )argument_list )call )return_statement )block (else_clause (block (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_self) identifier_self (identifier_table) identifier_table )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (subscript (identifier_res) identifier_res (call (attribute (subscript (identifier_res) identifier_res (string_"tax_id") string_"tax_id" )subscript (identifier_isin) identifier_isin )attribute (argument_list (identifier_ids) identifier_ids )argument_list )call )subscript )return_statement )block )else_clause )if_statement )block )function_definition )module
Query the results table to get abundance data for all or some tax ids
(module (function_definition (function_name_add_external_reference_to_entity) function_name_add_external_reference_to_entity (parameters (identifier_self) identifier_self (identifier_entity_id) identifier_entity_id (identifier_external_ref) identifier_external_ref )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_entity_layer) identifier_entity_layer )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_entity_layer) identifier_entity_layer )attribute (identifier_add_external_reference_to_entity) identifier_add_external_reference_to_entity )attribute (argument_list (identifier_entity_id) identifier_entity_id (identifier_external_ref) identifier_external_ref )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Adds an external reference to the given entity identifier in the entity layer @type entity_id: string @param entity_id: the entity identifier @param external_ref: an external reference object @type external_ref: L{CexternalReference}
(module (function_definition (function_name_binOp) function_name_binOp (parameters (identifier_op) identifier_op (identifier_indx) identifier_indx (identifier_amap) identifier_amap (identifier_bmap) identifier_bmap (identifier_fill_vec) identifier_fill_vec )parameters (block (function_definition (function_name_op_or_missing) function_name_op_or_missing (parameters (identifier_id) identifier_id )parameters (block (expression_statement (assignment (identifier_va) identifier_va (call (attribute (identifier_amap) identifier_amap (identifier_get) identifier_get )attribute (argument_list (identifier_id) identifier_id (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_vb) identifier_vb (call (attribute (identifier_bmap) identifier_bmap (identifier_get) identifier_get )attribute (argument_list (identifier_id) identifier_id (None) None )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_va) identifier_va (None) None )comparison_operator (comparison_operator (identifier_vb) identifier_vb (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_result) identifier_result (identifier_fill_vec) identifier_fill_vec )assignment )expression_statement )block (else_clause (block (try_statement (block (expression_statement (assignment (identifier_result) identifier_result (call (identifier_op) identifier_op (argument_list (identifier_va) identifier_va (identifier_vb) identifier_vb )argument_list )call )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (assignment (identifier_result) identifier_result (None) None )assignment )expression_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_result) identifier_result (None) None )comparison_operator (block (expression_statement (assignment (identifier_result) identifier_result (identifier_fill_vec) identifier_fill_vec )assignment )expression_statement )block )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )else_clause )if_statement )block )function_definition (expression_statement (assignment (identifier_seq_arys) identifier_seq_arys (call (identifier_map) identifier_map (argument_list (identifier_op_or_missing) identifier_op_or_missing (identifier_indx) identifier_indx )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_np) identifier_np (identifier_vstack) identifier_vstack )attribute (argument_list (identifier_seq_arys) identifier_seq_arys )argument_list )call )assignment )expression_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Combines the values from two map objects using the indx values using the op operator. In situations where there is a missing value it will use the callable function handle_missing
(module (function_definition (function_name_update_allowed) function_name_update_allowed (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_update_action) identifier_update_action )attribute (identifier_allowed) identifier_allowed )attribute (argument_list (attribute (attribute (attribute (identifier_self) identifier_self (identifier_column) identifier_column )attribute (identifier_table) identifier_table )attribute (identifier_request) identifier_request )attribute (attribute (identifier_self) identifier_self (identifier_datum) identifier_datum )attribute (identifier_self) identifier_self )argument_list )call )return_statement )block )function_definition )module
Determines whether update of given cell is allowed. Calls allowed action of defined UpdateAction of the Column.
(module (function_definition (function_name_get_delete_branch_command) function_name_get_delete_branch_command (parameters (identifier_self) identifier_self (identifier_branch_name) identifier_branch_name (identifier_message) identifier_message (identifier_author) identifier_author )parameters (block (expression_statement (assignment (identifier_tokens) identifier_tokens (list (binary_operator (string_'hg update --rev=%s && hg commit') string_'hg update --rev=%s && hg commit' (call (identifier_quote) identifier_quote (argument_list (identifier_branch_name) identifier_branch_name )argument_list )call )binary_operator )list )assignment )expression_statement (if_statement (identifier_author) identifier_author (block (expression_statement (call (attribute (identifier_tokens) identifier_tokens (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_'--user=%s') string_'--user=%s' (call (identifier_quote) identifier_quote (argument_list (attribute (identifier_author) identifier_author (identifier_combined) identifier_combined )attribute )argument_list )call )binary_operator )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_tokens) identifier_tokens (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_'--message=%s') string_'--message=%s' (call (identifier_quote) identifier_quote (argument_list (identifier_message) identifier_message )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_tokens) identifier_tokens (identifier_append) identifier_append )attribute (argument_list (string_'--close-branch') string_'--close-branch' )argument_list )call )expression_statement (return_statement (list (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (identifier_tokens) identifier_tokens )argument_list )call )list )return_statement )block )function_definition )module
Get the command to delete or close a branch in the local repository.
(module (function_definition (function_name_insert) function_name_insert (parameters (identifier_self) identifier_self (identifier_index) identifier_index (identifier_value) identifier_value )parameters (block (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_Collection) identifier_Collection (identifier_self) identifier_self )argument_list )call (identifier_insert) identifier_insert )attribute (argument_list (identifier_index) identifier_index (call (attribute (identifier_self) identifier_self (identifier__ensure_value_is_valid) identifier__ensure_value_is_valid )attribute (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Insert an item at a given position.
(module (function_definition (function_name_cli) function_name_cli (parameters (identifier_obj) identifier_obj (identifier_ids) identifier_ids (identifier_query) identifier_query (identifier_filters) identifier_filters (identifier_tags) identifier_tags )parameters (block (expression_statement (assignment (identifier_client) identifier_client (subscript (identifier_obj) identifier_obj (string_'client') string_'client' )subscript )assignment )expression_statement (if_statement (identifier_ids) identifier_ids (block (expression_statement (assignment (identifier_total) identifier_total (call (identifier_len) identifier_len (argument_list (identifier_ids) identifier_ids )argument_list )call )assignment )expression_statement )block (else_clause (block (if_statement (identifier_query) identifier_query (block (expression_statement (assignment (identifier_query) identifier_query (list (tuple (string_'q') string_'q' (identifier_query) identifier_query )tuple )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_query) identifier_query (call (identifier_build_query) identifier_build_query (argument_list (identifier_filters) identifier_filters )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (pattern_list (identifier_total) identifier_total (identifier__) identifier__ (identifier__) identifier__ )pattern_list (call (attribute (identifier_client) identifier_client (identifier_get_count) identifier_get_count )attribute (argument_list (identifier_query) identifier_query )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ids) identifier_ids (list_comprehension (attribute (identifier_a) identifier_a (identifier_id) identifier_id )attribute (for_in_clause (identifier_a) identifier_a (call (attribute (identifier_client) identifier_client (identifier_get_alerts) identifier_get_alerts )attribute (argument_list (identifier_query) identifier_query )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement )block )else_clause )if_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_click) identifier_click (identifier_progressbar) identifier_progressbar )attribute (argument_list (identifier_ids) identifier_ids (keyword_argument (identifier_label) identifier_label (call (attribute (string_'Untagging {} alerts') string_'Untagging {} alerts' (identifier_format) identifier_format )attribute (argument_list (identifier_total) identifier_total )argument_list )call )keyword_argument )argument_list )call (as_pattern_target (identifier_bar) identifier_bar )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_id) identifier_id (identifier_bar) identifier_bar (block (expression_statement (call (attribute (identifier_client) identifier_client (identifier_untag_alert) identifier_untag_alert )attribute (argument_list (identifier_id) identifier_id (identifier_tags) identifier_tags )argument_list )call )expression_statement )block )for_statement )block )with_statement )block )function_definition )module
Remove tags from alerts.
(module (function_definition (function_name_clean) function_name_clean (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_event) identifier_event )attribute (call (attribute (identifier_HOOK_EVENTS) identifier_HOOK_EVENTS (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator (block (raise_statement (call (identifier_ValidationError) identifier_ValidationError (argument_list (call (attribute (string_"Invalid hook event {evt}.") string_"Invalid hook event {evt}." (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_evt) identifier_evt (attribute (identifier_self) identifier_self (identifier_event) identifier_event )attribute )keyword_argument )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Validation for events.
(module (function_definition (function_name_download_and_bootstrap) function_name_download_and_bootstrap (parameters (identifier_src) identifier_src (identifier_name) identifier_name (default_parameter (identifier_prereq) identifier_prereq (None) None )default_parameter )parameters (block (if_statement (identifier_prereq) identifier_prereq (block (expression_statement (assignment (identifier_prereq_cmd) identifier_prereq_cmd (call (attribute (string_'{0} -c "{1}"') string_'{0} -c "{1}"' (identifier_format) identifier_format )attribute (argument_list (identifier_PY_EXE) identifier_PY_EXE (identifier_prereq) identifier_prereq )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rv) identifier_rv (call (attribute (identifier_os) identifier_os (identifier_system) identifier_system )attribute (argument_list (identifier_prereq_cmd) identifier_prereq_cmd )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_rv) identifier_rv (integer_0) integer_0 )comparison_operator (block (return_statement )return_statement )block )if_statement )block )if_statement (expression_statement (assignment (identifier_ulp) identifier_ulp (call (attribute (identifier_urllib2) identifier_urllib2 (identifier_urlopen) identifier_urlopen )attribute (argument_list (identifier_src) identifier_src )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fp) identifier_fp (call (identifier_open) identifier_open (argument_list (identifier_name) identifier_name (string_"wb") string_"wb" )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_fp) identifier_fp (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_ulp) identifier_ulp (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_fp) identifier_fp (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_cmdline) identifier_cmdline (call (attribute (string_"{0} {1}") string_"{0} {1}" (identifier_format) identifier_format )attribute (argument_list (identifier_PY_EXE) identifier_PY_EXE (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rv) identifier_rv (call (attribute (identifier_os) identifier_os (identifier_system) identifier_system )attribute (argument_list (identifier_cmdline) identifier_cmdline )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (identifier_rv) identifier_rv (integer_0) integer_0 )comparison_operator )assert_statement )block )function_definition )module
Download and install something if 'prerequisite' fails
(module (function_definition (function_name_run) function_name_run (parameters (identifier_self) identifier_self (identifier_start_command_srv) identifier_start_command_srv )parameters (block (if_statement (identifier_start_command_srv) identifier_start_command_srv (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__command_server) identifier__command_server )attribute (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__drop_privs) identifier__drop_privs )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__task_runner) identifier__task_runner )attribute (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__reg_sighandlers) identifier__reg_sighandlers )attribute (argument_list )argument_list )call )expression_statement (while_statement (attribute (identifier_self) identifier_self (identifier_running) identifier_running )attribute (block (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__sleep_period) identifier__sleep_period )attribute )argument_list )call )expression_statement )block )while_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_shutdown) identifier_shutdown )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Setup daemon process, start child forks, and sleep until events are signalled. `start_command_srv` Set to ``True`` if command server should be started.
(module (function_definition (function_name__update_physical_disk_details) function_name__update_physical_disk_details (parameters (identifier_raid_config) identifier_raid_config (identifier_server) identifier_server )parameters (block (expression_statement (assignment (subscript (identifier_raid_config) identifier_raid_config (string_'physical_disks') string_'physical_disks' )subscript (list )list )assignment )expression_statement (expression_statement (assignment (identifier_physical_drives) identifier_physical_drives (call (attribute (identifier_server) identifier_server (identifier_get_physical_drives) identifier_get_physical_drives )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_physical_drive) identifier_physical_drive (identifier_physical_drives) identifier_physical_drives (block (expression_statement (assignment (identifier_physical_drive_dict) identifier_physical_drive_dict (call (attribute (identifier_physical_drive) identifier_physical_drive (identifier_get_physical_drive_dict) identifier_get_physical_drive_dict )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (subscript (identifier_raid_config) identifier_raid_config (string_'physical_disks') string_'physical_disks' )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_physical_drive_dict) identifier_physical_drive_dict )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Adds the physical disk details to the RAID configuration passed.
(module (function_definition (function_name__load) function_name__load (parameters (identifier_self) identifier_self (default_parameter (identifier_scale) identifier_scale (float_1.0) float_1.0 )default_parameter )parameters (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (string_"File: %s") string_"File: %s" (call (identifier_str) identifier_str (argument_list (attribute (identifier_self) identifier_self (identifier_requested_band_filename) identifier_requested_band_filename )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_ncf) identifier_ncf (call (identifier_Dataset) identifier_Dataset (argument_list (attribute (identifier_self) identifier_self (identifier_requested_band_filename) identifier_requested_band_filename )attribute (string_'r') string_'r' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_wvl) identifier_wvl (binary_operator (subscript (subscript (attribute (identifier_ncf) identifier_ncf (identifier_variables) identifier_variables )attribute (string_'wavelength') string_'wavelength' )subscript (slice (colon) colon )slice )subscript (identifier_scale) identifier_scale )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_resp) identifier_resp (subscript (subscript (attribute (identifier_ncf) identifier_ncf (identifier_variables) identifier_variables )attribute (string_'response') string_'response' )subscript (slice (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_rsr) identifier_rsr )attribute (dictionary (pair (string_'wavelength') string_'wavelength' (identifier_wvl) identifier_wvl )pair (pair (string_'response') string_'response' (identifier_resp) identifier_resp )pair )dictionary )assignment )expression_statement )block )function_definition )module
Load the SLSTR relative spectral responses
(module (function_definition (function_name_signRequest) function_name_signRequest (parameters (identifier_self) identifier_self (typed_parameter (identifier_req) identifier_req (type (identifier_Request) identifier_Request )type )typed_parameter (typed_default_parameter (identifier_identifier) identifier_identifier (type (identifier_Identifier) identifier_Identifier )type (None) None )typed_default_parameter )parameters (type (identifier_Request) identifier_Request )type (block (expression_statement (assignment (identifier_idr) identifier_idr (call (attribute (identifier_self) identifier_self (identifier_requiredIdr) identifier_requiredIdr )attribute (argument_list (keyword_argument (identifier_idr) identifier_idr (boolean_operator (identifier_identifier) identifier_identifier (attribute (identifier_req) identifier_req (identifier__identifier) identifier__identifier )attribute )boolean_operator )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_req) identifier_req (identifier__identifier) identifier__identifier )attribute (identifier_idr) identifier_idr )assignment )expression_statement (expression_statement (assignment (attribute (identifier_req) identifier_req (identifier_reqId) identifier_reqId )attribute (call (attribute (identifier_req) identifier_req (identifier_gen_req_id) identifier_gen_req_id )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_req) identifier_req (identifier_signature) identifier_signature )attribute (call (attribute (identifier_self) identifier_self (identifier_signMsg) identifier_signMsg )attribute (argument_list (keyword_argument (identifier_msg) identifier_msg (call (attribute (identifier_req) identifier_req (identifier_signingPayloadState) identifier_signingPayloadState )attribute (argument_list (keyword_argument (identifier_identifier) identifier_identifier (identifier_idr) identifier_idr )keyword_argument )argument_list )call )keyword_argument (keyword_argument (identifier_identifier) identifier_identifier (identifier_idr) identifier_idr )keyword_argument (keyword_argument (identifier_otherIdentifier) identifier_otherIdentifier (attribute (identifier_req) identifier_req (identifier_identifier) identifier_identifier )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_req) identifier_req )return_statement )block )function_definition )module
Signs request. Modifies reqId and signature. May modify identifier. :param req: request :param requestIdStore: request id generator :param identifier: signer identifier :return: signed request
(module (function_definition (function_name_matrixToMathTransform) function_name_matrixToMathTransform (parameters (identifier_matrix) identifier_matrix )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_matrix) identifier_matrix (identifier_ShallowTransform) identifier_ShallowTransform )argument_list )call (block (return_statement (identifier_matrix) identifier_matrix )return_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_off) identifier_off (identifier_scl) identifier_scl (identifier_rot) identifier_rot )pattern_list (call (attribute (call (identifier_MathTransform) identifier_MathTransform (argument_list (identifier_matrix) identifier_matrix )argument_list )call (identifier_decompose) identifier_decompose )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (identifier_ShallowTransform) identifier_ShallowTransform (argument_list (identifier_off) identifier_off (identifier_scl) identifier_scl (identifier_rot) identifier_rot )argument_list )call )return_statement )block )function_definition )module
Take a 6-tuple and return a ShallowTransform object.
(module (function_definition (function_name_run_and_print_log) function_name_run_and_print_log (parameters (identifier_workflow) identifier_workflow (default_parameter (identifier_highlight) identifier_highlight (None) None )default_parameter )parameters (block (import_from_statement (dotted_name (identifier_noodles) identifier_noodles (identifier_run) identifier_run (identifier_threading) identifier_threading (identifier_sqlite3) identifier_sqlite3 )dotted_name (dotted_name (identifier_run_parallel) identifier_run_parallel )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_noodles) identifier_noodles )dotted_name (dotted_name (identifier_serial) identifier_serial )dotted_name )import_from_statement (import_statement (dotted_name (identifier_io) identifier_io )dotted_name )import_statement (import_statement (dotted_name (identifier_logging) identifier_logging )dotted_name )import_statement (expression_statement (assignment (identifier_log) identifier_log (call (attribute (identifier_io) identifier_io (identifier_StringIO) identifier_StringIO )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_log_handler) identifier_log_handler (call (attribute (identifier_logging) identifier_logging (identifier_StreamHandler) identifier_StreamHandler )attribute (argument_list (identifier_log) identifier_log )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_formatter) identifier_formatter (call (attribute (identifier_logging) identifier_logging (identifier_Formatter) identifier_Formatter )attribute (argument_list (string_'%(asctime)s - %(message)s') string_'%(asctime)s - %(message)s' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_log_handler) identifier_log_handler (identifier_setFormatter) identifier_setFormatter )attribute (argument_list (identifier_formatter) identifier_formatter )argument_list )call )expression_statement (expression_statement (assignment (identifier_logger) identifier_logger (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (string_'noodles') string_'noodles' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_setLevel) identifier_setLevel )attribute (argument_list (attribute (identifier_logging) identifier_logging (identifier_INFO) identifier_INFO )attribute )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_logger) identifier_logger (identifier_handlers) identifier_handlers )attribute (list (identifier_log_handler) identifier_log_handler )list )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (identifier_run_parallel) identifier_run_parallel (argument_list (identifier_workflow) identifier_workflow (keyword_argument (identifier_n_threads) identifier_n_threads (integer_4) integer_4 )keyword_argument (keyword_argument (identifier_registry) identifier_registry (attribute (identifier_serial) identifier_serial (identifier_base) identifier_base )attribute )keyword_argument (keyword_argument (identifier_db_file) identifier_db_file (string_'tutorial.db') string_'tutorial.db' )keyword_argument (keyword_argument (identifier_always_cache) identifier_always_cache (True) True )keyword_argument (keyword_argument (identifier_echo_log) identifier_echo_log (False) False )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_display_text) identifier_display_text (argument_list (call (attribute (identifier_log) identifier_log (identifier_getvalue) identifier_getvalue )attribute (argument_list )argument_list )call (boolean_operator (identifier_highlight) identifier_highlight (list )list )boolean_operator (keyword_argument (identifier_split_at) identifier_split_at (integer_40) integer_40 )keyword_argument )argument_list )call )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Run workflow on multi-threaded worker cached with Sqlite3. :param workflow: workflow to evaluate. :param highlight: highlight these lines.
(module (function_definition (function_name_process_management_config_section) function_name_process_management_config_section (parameters (identifier_config) identifier_config (identifier_management_config) identifier_management_config )parameters (block (if_statement (comparison_operator (string_'commands') string_'commands' (identifier_management_config) identifier_management_config )comparison_operator (block (for_statement (identifier_command) identifier_command (subscript (identifier_management_config) identifier_management_config (string_'commands') string_'commands' )subscript (block (expression_statement (call (attribute (subscript (attribute (identifier_config) identifier_config (identifier_management) identifier_management )attribute (string_'commands') string_'commands' )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_command) identifier_command )argument_list )call )expression_statement )block )for_statement )block )if_statement )block )function_definition )module
Processes the management section from a configuration data dict. :param config: The config reference of the object that will hold the configuration data from the config_data. :param management_config: Management section from a config data dict.
(module (function_definition (function_name_tangent) function_name_tangent (parameters (identifier_obj) identifier_obj (identifier_params) identifier_params (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_normalize) identifier_normalize (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'normalize') string_'normalize' (True) True )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (attribute (identifier_abstract) identifier_abstract (identifier_Curve) identifier_Curve )attribute )argument_list )call (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_params) identifier_params (tuple (identifier_list) identifier_list (identifier_tuple) identifier_tuple )tuple )argument_list )call (block (return_statement (call (attribute (identifier_ops) identifier_ops (identifier_tangent_curve_single_list) identifier_tangent_curve_single_list )attribute (argument_list (identifier_obj) identifier_obj (identifier_params) identifier_params (identifier_normalize) identifier_normalize )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_ops) identifier_ops (identifier_tangent_curve_single) identifier_tangent_curve_single )attribute (argument_list (identifier_obj) identifier_obj (identifier_params) identifier_params (identifier_normalize) identifier_normalize )argument_list )call )return_statement )block )else_clause )if_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (attribute (identifier_abstract) identifier_abstract (identifier_Surface) identifier_Surface )attribute )argument_list )call (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_params) identifier_params (integer_0) integer_0 )subscript (identifier_float) identifier_float )argument_list )call (block (return_statement (call (attribute (identifier_ops) identifier_ops (identifier_tangent_surface_single) identifier_tangent_surface_single )attribute (argument_list (identifier_obj) identifier_obj (identifier_params) identifier_params (identifier_normalize) identifier_normalize )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_ops) identifier_ops (identifier_tangent_surface_single_list) identifier_tangent_surface_single_list )attribute (argument_list (identifier_obj) identifier_obj (identifier_params) identifier_params (identifier_normalize) identifier_normalize )argument_list )call )return_statement )block )else_clause )if_statement )block )if_statement )block )function_definition )module
Evaluates the tangent vector of the curves or surfaces at the input parameter values. This function is designed to evaluate tangent vectors of the B-Spline and NURBS shapes at single or multiple parameter positions. :param obj: input shape :type obj: abstract.Curve or abstract.Surface :param params: parameters :type params: float, list or tuple :return: a list containing "point" and "vector" pairs :rtype: tuple
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (expression_statement (assignment (identifier_res) identifier_res (call (attribute (attribute (identifier_self) identifier_self (identifier_connection) identifier_connection )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_res) identifier_res )argument_list )call )expression_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
get a set of keys from redis
(module (function_definition (function_name_to_timezone) function_name_to_timezone (parameters (identifier_dt) identifier_dt (default_parameter (identifier_tzinfo) identifier_tzinfo (None) None )default_parameter )parameters (block (if_statement (not_operator (identifier_dt) identifier_dt )not_operator (block (return_statement (identifier_dt) identifier_dt )return_statement )block )if_statement (expression_statement (assignment (identifier_tz) identifier_tz (call (identifier_pick_timezone) identifier_pick_timezone (argument_list (identifier_tzinfo) identifier_tzinfo (identifier___timezone__) identifier___timezone__ )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_tz) identifier_tz )not_operator (block (return_statement (identifier_dt) identifier_dt )return_statement )block )if_statement (expression_statement (assignment (identifier_dttz) identifier_dttz (call (identifier_getattr) identifier_getattr (argument_list (identifier_dt) identifier_dt (string_'tzinfo') string_'tzinfo' (None) None )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_dttz) identifier_dttz )not_operator (block (return_statement (call (attribute (identifier_dt) identifier_dt (identifier_replace) identifier_replace )attribute (argument_list (keyword_argument (identifier_tzinfo) identifier_tzinfo (identifier_tz) identifier_tz )keyword_argument )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_dt) identifier_dt (identifier_astimezone) identifier_astimezone )attribute (argument_list (identifier_tz) identifier_tz )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Convert a datetime to timezone
(module (function_definition (function_name_use) function_name_use (parameters (default_parameter (identifier_module) identifier_module (None) None )default_parameter (default_parameter (identifier_decode) identifier_decode (None) None )default_parameter (default_parameter (identifier_encode) identifier_encode (None) None )default_parameter )parameters (block (global_statement (identifier__decode) identifier__decode (identifier__encode) identifier__encode (identifier__initialized) identifier__initialized (identifier__using) identifier__using )global_statement (if_statement (comparison_operator (identifier_module) identifier_module (None) None )comparison_operator (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_module) identifier_module (identifier_basestring) identifier_basestring )argument_list )call )not_operator (block (expression_statement (assignment (identifier_module) identifier_module (attribute (identifier_module) identifier_module (identifier___name__) identifier___name__ )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_module) identifier_module (tuple (string_'cjson') string_'cjson' (string_'json') string_'json' (string_'simplejson') string_'simplejson' )tuple )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_'Unsupported JSON module %s') string_'Unsupported JSON module %s' (identifier_module) identifier_module )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier__using) identifier__using (identifier_module) identifier_module )assignment )expression_statement (expression_statement (assignment (identifier__initialized) identifier__initialized (False) False )assignment )expression_statement )block (else_clause (block (assert_statement (boolean_operator (comparison_operator (identifier_decode) identifier_decode (None) None )comparison_operator (comparison_operator (identifier_encode) identifier_encode (None) None )comparison_operator )boolean_operator )assert_statement (expression_statement (assignment (identifier__using) identifier__using (string_'custom') string_'custom' )assignment )expression_statement (expression_statement (assignment (identifier__decode) identifier__decode (identifier_decode) identifier_decode )assignment )expression_statement (expression_statement (assignment (identifier__encode) identifier__encode (identifier_encode) identifier_encode )assignment )expression_statement (expression_statement (assignment (identifier__initialized) identifier__initialized (True) True )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Set the JSON library that should be used, either by specifying a known module name, or by providing a decode and encode function. The modules "simplejson", "cjson", and "json" are currently supported for the ``module`` parameter. If provided, the ``decode`` parameter must be a callable that accepts a JSON string and returns a corresponding Python data structure. The ``encode`` callable must accept a Python data structure and return the corresponding JSON string. Exceptions raised by decoding and encoding should be propagated up unaltered. @param module: the name of the JSON library module to use, or the module object itself @type module: str or module @param decode: a function for decoding JSON strings @type decode: callable @param encode: a function for encoding objects as JSON strings @type encode: callable