sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name__on_process_error) function_name__on_process_error (parameters (identifier_self) identifier_self (identifier_error) identifier_error )parameters (block (if_statement (comparison_operator (identifier_self) identifier_self (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (if_statement (comparison_operator (identifier_error) identifier_error (identifier_PROCESS_ERROR_STRING) identifier_PROCESS_ERROR_STRING )comparison_operator (block (expression_statement (assignment (identifier_error) identifier_error (unary_operator (integer_1) integer_1 )unary_operator )assignment )expression_statement )block )if_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__prevent_logs) identifier__prevent_logs )attribute )not_operator (block (expression_statement (call (attribute (call (identifier__logger) identifier__logger (argument_list )argument_list )call (identifier_warning) identifier_warning )attribute (argument_list (subscript (identifier_PROCESS_ERROR_STRING) identifier_PROCESS_ERROR_STRING (identifier_error) identifier_error )subscript )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Logs process error
(module (function_definition (function_name__is_ipv4_like) function_name__is_ipv4_like (parameters (identifier_s) identifier_s )parameters (block (expression_statement (assignment (identifier_parts) identifier_parts (call (attribute (identifier_s) identifier_s (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_parts) identifier_parts )argument_list )call (integer_4) integer_4 )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (for_statement (identifier_part) identifier_part (identifier_parts) identifier_parts (block (try_statement (block (expression_statement (call (identifier_int) identifier_int (argument_list (identifier_part) identifier_part )argument_list )call )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (return_statement (False) False )return_statement )block )except_clause )try_statement )block )for_statement (return_statement (True) True )return_statement )block )function_definition )module
Find if a string superficially looks like an IPv4 address. AWS documentation plays it fast and loose with this; in other regions, it seems like even non-valid IPv4 addresses (in particular, ones that possess decimal numbers out of range for IPv4) are rejected.
(module (function_definition (function_name_has_object_permission) function_name_has_object_permission (parameters (identifier_self) identifier_self (identifier_request) identifier_request (identifier_view) identifier_view (identifier_obj) identifier_obj )parameters (block (expression_statement (assignment (identifier_user) identifier_user (attribute (identifier_request) identifier_request (identifier_user) identifier_user )attribute )assignment )expression_statement (if_statement (boolean_operator (not_operator (attribute (identifier_user) identifier_user (identifier_is_superuser) identifier_is_superuser )attribute )not_operator (not_operator (call (attribute (identifier_user) identifier_user (identifier_is_anonymous) identifier_is_anonymous )attribute (argument_list )argument_list )call )not_operator )boolean_operator (block (expression_statement (assignment (identifier_valid) identifier_valid (False) False )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_ct) identifier_ct (call (attribute (attribute (identifier_ContentType) identifier_ContentType (identifier_objects) identifier_objects )attribute (identifier_get_for_model) identifier_get_for_model )attribute (argument_list (identifier_obj) identifier_obj )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fpm) identifier_fpm (call (attribute (attribute (identifier_FilterPermissionModel) identifier_FilterPermissionModel (identifier_objects) identifier_objects )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument (keyword_argument (identifier_content_type) identifier_content_type (identifier_ct) identifier_ct )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_myq) identifier_myq (call (attribute (call (identifier_QSerializer) identifier_QSerializer (argument_list (keyword_argument (identifier_base64) identifier_base64 (True) True )keyword_argument )argument_list )call (identifier_loads) identifier_loads )attribute (argument_list (attribute (identifier_fpm) identifier_fpm (identifier_filter) identifier_filter )attribute )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_myobj) identifier_myobj (call (attribute (call (attribute (call (attribute (attribute (attribute (identifier_obj) identifier_obj (identifier___class__) identifier___class__ )attribute (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (identifier_myq) identifier_myq )argument_list )call (identifier_distinct) identifier_distinct )attribute (argument_list )argument_list )call (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_pk) identifier_pk (attribute (identifier_obj) identifier_obj (identifier_pk) identifier_pk )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_myobj) identifier_myobj (block (expression_statement (assignment (identifier_valid) identifier_valid (True) True )assignment )expression_statement )block )if_statement )block (except_clause (identifier_ObjectDoesNotExist) identifier_ObjectDoesNotExist (block (expression_statement (assignment (identifier_valid) identifier_valid (False) False )assignment )expression_statement )block )except_clause )try_statement )block (except_clause (identifier_ObjectDoesNotExist) identifier_ObjectDoesNotExist (block (expression_statement (assignment (identifier_valid) identifier_valid (True) True )assignment )expression_statement )block )except_clause (finally_clause (block (return_statement (identifier_valid) identifier_valid )return_statement )block )finally_clause )try_statement )block (else_clause (block (return_statement (True) True )return_statement )block )else_clause )if_statement )block )function_definition )module
check filter permissions
(module (function_definition (function_name_sort_untl) function_name_sort_untl (parameters (identifier_self) identifier_self (identifier_sort_structure) identifier_sort_structure )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_children) identifier_children )attribute (identifier_sort) identifier_sort )attribute (argument_list (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_obj) identifier_obj )lambda_parameters (call (attribute (identifier_sort_structure) identifier_sort_structure (identifier_index) identifier_index )attribute (argument_list (attribute (identifier_obj) identifier_obj (identifier_tag) identifier_tag )attribute )argument_list )call )lambda )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Sort the UNTL Python object by the index of a sort structure pre-ordered list.
(module (function_definition (function_name_normalise_rows) function_name_normalise_rows (parameters (identifier_matrix) identifier_matrix )parameters (block (expression_statement (assignment (identifier_lengths) identifier_lengths (call (attribute (identifier_np) identifier_np (identifier_apply_along_axis) identifier_apply_along_axis )attribute (argument_list (attribute (attribute (identifier_np) identifier_np (identifier_linalg) identifier_linalg )attribute (identifier_norm) identifier_norm )attribute (integer_1) integer_1 (identifier_matrix) identifier_matrix )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (parenthesized_expression (comparison_operator (identifier_lengths) identifier_lengths (integer_0) integer_0 )comparison_operator )parenthesized_expression (identifier_all) identifier_all )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (assignment (subscript (identifier_lengths) identifier_lengths (comparison_operator (identifier_lengths) identifier_lengths (integer_0) integer_0 )comparison_operator )subscript (integer_1) integer_1 )assignment )expression_statement )block )if_statement (return_statement (binary_operator (identifier_matrix) identifier_matrix (subscript (identifier_lengths) identifier_lengths (slice (colon) colon )slice (attribute (identifier_np) identifier_np (identifier_newaxis) identifier_newaxis )attribute )subscript )binary_operator )return_statement )block )function_definition )module
Scales all rows to length 1. Fails when row is 0-length, so it leaves these unchanged
(module (function_definition (function_name_upload) function_name_upload (parameters (identifier_self) identifier_self (identifier_src_file_path) identifier_src_file_path (default_parameter (identifier_dst_file_name) identifier_dst_file_name (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__check_session) identifier__check_session )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_status) identifier_status (identifier_data) identifier_data )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier__rest) identifier__rest )attribute (identifier_upload_file) identifier_upload_file )attribute (argument_list (string_'files') string_'files' (identifier_src_file_path) identifier_src_file_path (identifier_dst_file_name) identifier_dst_file_name )argument_list )call )assignment )expression_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Upload the specified file to the server.
(module (function_definition (function_name_get_dep) function_name_get_dep (parameters (identifier_self) identifier_self (typed_parameter (identifier_name) identifier_name (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_deps) identifier_deps (subscript (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (string_"dependencies") string_"dependencies" )subscript )assignment )expression_statement (for_statement (identifier_d) identifier_d (identifier_deps) identifier_deps (block (if_statement (comparison_operator (subscript (identifier_d) identifier_d (string_"model") string_"model" )subscript (identifier_name) identifier_name )comparison_operator (block (return_statement (identifier_d) identifier_d )return_statement )block )if_statement )block )for_statement (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (binary_operator (string_"%s not found in %s.") string_"%s not found in %s." (tuple (identifier_name) identifier_name (identifier_deps) identifier_deps )tuple )binary_operator )argument_list )call )raise_statement )block )function_definition )module
Return the uuid of the dependency identified with "name". :param name: :return: UUID
(module (function_definition (function_name_returnIndexList) function_name_returnIndexList (parameters (identifier_self) identifier_self (default_parameter (identifier_limit) identifier_limit (False) False )default_parameter )parameters (block (if_statement (comparison_operator (identifier_limit) identifier_limit (False) False )comparison_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier_index_track) identifier_index_track )attribute )return_statement )block )if_statement (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_limit) identifier_limit )argument_list )call (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_table) identifier_table )attribute )argument_list )call (identifier_i) identifier_i )comparison_operator (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_index_track) identifier_index_track )attribute (identifier_i) identifier_i )subscript )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Return a list of integers that are list-index references to the original list of dictionaries." Example of use: >>> test = [ ... {"name": "Jim", "age": 18, "income": 93000, "order": 2}, ... {"name": "Larry", "age": 18, "order": 3}, ... {"name": "Joe", "age": 20, "income": 15000, "order": 1}, ... {"name": "Bill", "age": 19, "income": 29000, "order": 4}, ... ] >>> print PLOD(test).returnIndexList() [0, 1, 2, 3] >>> print PLOD(test).sort("name").returnIndexList() [3, 0, 2, 1] :param limit: A number limiting the quantity of entries to return. Defaults to False, which means that the full list is returned. :return: A list of integers representing the original indices.
(module (function_definition (function_name_fetch_import_ref_restriction) function_name_fetch_import_ref_restriction (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_inter) identifier_inter (call (attribute (identifier_self) identifier_self (identifier_get_refobjinter) identifier_get_refobjinter )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_restricted) identifier_restricted (comparison_operator (call (attribute (identifier_self) identifier_self (identifier_status) identifier_status )attribute (argument_list )argument_list )call (tuple (attribute (identifier_self) identifier_self (identifier_LOADED) identifier_LOADED )attribute (attribute (identifier_self) identifier_self (identifier_UNLOADED) identifier_UNLOADED )attribute )tuple )comparison_operator )assignment )expression_statement (return_statement (boolean_operator (identifier_restricted) identifier_restricted (call (attribute (identifier_inter) identifier_inter (identifier_fetch_action_restriction) identifier_fetch_action_restriction )attribute (argument_list (identifier_self) identifier_self (string_'import_reference') string_'import_reference' )argument_list )call )boolean_operator )return_statement )block )function_definition )module
Fetch whether importing the reference is restricted :returns: True, if importing the reference is restricted :rtype: :class:`bool` :raises: None
(module (function_definition (function_name_reverse_timezone) function_name_reverse_timezone (parameters (identifier_self) identifier_self (identifier_query) identifier_query (default_parameter (identifier_timeout) identifier_timeout (identifier_DEFAULT_SENTINEL) identifier_DEFAULT_SENTINEL )default_parameter )parameters (block (expression_statement (call (identifier_ensure_pytz_is_installed) identifier_ensure_pytz_is_installed (argument_list )argument_list )call )expression_statement (try_statement (block (expression_statement (assignment (pattern_list (identifier_lat) identifier_lat (identifier_lng) identifier_lng )pattern_list (call (attribute (call (attribute (identifier_self) identifier_self (identifier__coerce_point_to_string) identifier__coerce_point_to_string )attribute (argument_list (identifier_query) identifier_query )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_',') string_',' )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Must be a coordinate pair or Point") string_"Must be a coordinate pair or Point" )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_"lat") string_"lat" (identifier_lat) identifier_lat )pair (pair (string_"lng") string_"lng" (identifier_lng) identifier_lng )pair (pair (string_"username") string_"username" (attribute (identifier_self) identifier_self (identifier_username) identifier_username )attribute )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (string_"?") string_"?" (identifier_join) identifier_join )attribute (argument_list (tuple (attribute (identifier_self) identifier_self (identifier_api_timezone) identifier_api_timezone )attribute (call (identifier_urlencode) identifier_urlencode (argument_list (identifier_params) identifier_params )argument_list )call )tuple )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"%s.reverse_timezone: %s") string_"%s.reverse_timezone: %s" (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute (identifier_url) identifier_url )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__parse_json_timezone) identifier__parse_json_timezone )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__call_geocoder) identifier__call_geocoder )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Find the timezone for a point in `query`. GeoNames always returns a timezone: if the point being queried doesn't have an assigned Olson timezone id, a ``pytz.FixedOffset`` timezone is used to produce the :class:`geopy.timezone.Timezone`. .. versionadded:: 1.18.0 :param query: The coordinates for which you want a timezone. :type query: :class:`geopy.point.Point`, list or tuple of (latitude, longitude), or string as "%(latitude)s, %(longitude)s" :param int timeout: Time, in seconds, to wait for the geocoding service to respond before raising a :class:`geopy.exc.GeocoderTimedOut` exception. Set this only if you wish to override, on this call only, the value set during the geocoder's initialization. :rtype: :class:`geopy.timezone.Timezone`
(module (function_definition (function_name__compute) function_name__compute (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_newstate) identifier_newstate (call (attribute (identifier_self) identifier_self (identifier__implicit_solver) identifier__implicit_solver )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_adjustment) identifier_adjustment (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_tendencies) identifier_tendencies (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_name) identifier_name (identifier_var) identifier_var )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_adjustment) identifier_adjustment (identifier_name) identifier_name )subscript (binary_operator (subscript (identifier_newstate) identifier_newstate (identifier_name) identifier_name )subscript (identifier_var) identifier_var )binary_operator )assignment )expression_statement (expression_statement (assignment (subscript (identifier_tendencies) identifier_tendencies (identifier_name) identifier_name )subscript (binary_operator (subscript (identifier_adjustment) identifier_adjustment (identifier_name) identifier_name )subscript (attribute (identifier_self) identifier_self (identifier_timestep) identifier_timestep )attribute )binary_operator )assignment )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_adjustment) identifier_adjustment )attribute (identifier_adjustment) identifier_adjustment )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__update_diagnostics) identifier__update_diagnostics )attribute (argument_list (identifier_newstate) identifier_newstate )argument_list )call )expression_statement (return_statement (identifier_tendencies) identifier_tendencies )return_statement )block )function_definition )module
Computes the state variable tendencies in time for implicit processes. To calculate the new state the :func:`_implicit_solver()` method is called for daughter classes. This however returns the new state of the variables, not just the tendencies. Therefore, the adjustment is calculated which is the difference between the new and the old state and stored in the object's attribute adjustment. Calculating the new model states through solving the matrix problem already includes the multiplication with the timestep. The derived adjustment is divided by the timestep to calculate the implicit subprocess tendencies, which can be handeled by the :func:`~climlab.process.time_dependent_process.TimeDependentProcess.compute` method of the parent :class:`~climlab.process.time_dependent_process.TimeDependentProcess` class. :ivar dict adjustment: holding all state variables' adjustments of the implicit process which are the differences between the new states (which have been solved through matrix inversion) and the old states.
(module (function_definition (function_name_decompose_nfkd) function_name_decompose_nfkd (parameters (identifier_text) identifier_text )parameters (block (if_statement (comparison_operator (identifier_text) identifier_text (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_decompose_nfkd) identifier_decompose_nfkd (string_'_tr') string_'_tr' )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_decompose_nfkd) identifier_decompose_nfkd (identifier__tr) identifier__tr )attribute (call (attribute (identifier_Transliterator) identifier_Transliterator (identifier_createInstance) identifier_createInstance )attribute (argument_list (string_'Any-NFKD') string_'Any-NFKD' )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_decompose_nfkd) identifier_decompose_nfkd (identifier__tr) identifier__tr )attribute (identifier_transliterate) identifier_transliterate )attribute (argument_list (identifier_text) identifier_text )argument_list )call )return_statement )block )function_definition )module
Perform unicode compatibility decomposition. This will replace some non-standard value representations in unicode and normalise them, while also separating characters and their diacritics into two separate codepoints.
(module (function_definition (function_name_scheduled) function_name_scheduled (parameters (default_parameter (identifier_wait) identifier_wait (False) False )default_parameter )parameters (block (expression_statement (call (attribute (identifier_manager) identifier_manager (identifier_run_scheduled) identifier_run_scheduled )attribute (argument_list )argument_list )call )expression_statement (while_statement (identifier_wait) identifier_wait (block (expression_statement (call (attribute (identifier_manager) identifier_manager (identifier_run_scheduled) identifier_run_scheduled )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (attribute (identifier_settings) identifier_settings (identifier_SCHEDULER_INTERVAL) identifier_SCHEDULER_INTERVAL )attribute )argument_list )call )expression_statement )block )while_statement )block )function_definition )module
Run crawlers that are due.
(module (function_definition (function_name_logp_partial_gradient) function_name_logp_partial_gradient (parameters (identifier_self) identifier_self (identifier_variable) identifier_variable (default_parameter (identifier_calculation_set) identifier_calculation_set (None) None )default_parameter )parameters (block (if_statement (boolean_operator (parenthesized_expression (comparison_operator (identifier_calculation_set) identifier_calculation_set (None) None )comparison_operator )parenthesized_expression (parenthesized_expression (comparison_operator (identifier_self) identifier_self (identifier_calculation_set) identifier_calculation_set )comparison_operator )parenthesized_expression )boolean_operator (block (if_statement (not_operator (call (attribute (identifier_datatypes) identifier_datatypes (identifier_is_continuous) identifier_is_continuous )attribute (argument_list (identifier_variable) identifier_variable )argument_list )call )not_operator (block (return_statement (call (identifier_zeros) identifier_zeros (argument_list (call (identifier_shape) identifier_shape (argument_list (attribute (identifier_variable) identifier_variable (identifier_value) identifier_value )attribute )argument_list )call )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (identifier_variable) identifier_variable (identifier_self) identifier_self )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_gradient_func) identifier_gradient_func (subscript (attribute (identifier_self) identifier_self (identifier__logp_partial_gradients) identifier__logp_partial_gradients )attribute (string_'value') string_'value' )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (raise_statement (call (identifier_NotImplementedError) identifier_NotImplementedError (argument_list (binary_operator (call (identifier_repr) identifier_repr (argument_list (identifier_self) identifier_self )argument_list )call (string_" has no gradient function for 'value'") string_" has no gradient function for 'value'" )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_gradient) identifier_gradient (call (attribute (identifier_np) identifier_np (identifier_reshape) identifier_reshape )attribute (argument_list (call (attribute (identifier_gradient_func) identifier_gradient_func (identifier_get) identifier_get )attribute (argument_list )argument_list )call (call (attribute (identifier_np) identifier_np (identifier_shape) identifier_shape )attribute (argument_list (attribute (identifier_variable) identifier_variable (identifier_value) identifier_value )attribute )argument_list )call )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_gradient) identifier_gradient (call (attribute (identifier_builtins) identifier_builtins (identifier_sum) identifier_sum )attribute (argument_list (list_comprehension (call (attribute (identifier_self) identifier_self (identifier__pgradient) identifier__pgradient )attribute (argument_list (identifier_variable) identifier_variable (identifier_parameter) identifier_parameter (identifier_value) identifier_value )argument_list )call (for_in_clause (pattern_list (identifier_parameter) identifier_parameter (identifier_value) identifier_value )pattern_list (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_parents) identifier_parents )attribute )argument_list )call )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_gradient) identifier_gradient )return_statement )block (else_clause (block (return_statement (integer_0) integer_0 )return_statement )block )else_clause )if_statement )block )function_definition )module
Calculates the partial gradient of the posterior of self with respect to variable. Returns zero if self is not in calculation_set.
(module (function_definition (function_name_pay) function_name_pay (parameters (identifier_self) identifier_self (identifier_predecessor) identifier_predecessor )parameters (block (assert_statement (boolean_operator (comparison_operator (identifier_predecessor) identifier_predecessor (None) None )comparison_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_predecessor) identifier_predecessor (identifier_MatchSet) identifier_MatchSet )argument_list )call )boolean_operator )assert_statement (if_statement (comparison_operator (identifier_predecessor) identifier_predecessor (None) None )comparison_operator (block (expression_statement (assignment (identifier_expectation) identifier_expectation (call (attribute (attribute (identifier_self) identifier_self (identifier__algorithm) identifier__algorithm )attribute (identifier_get_future_expectation) identifier_get_future_expectation )attribute (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_predecessor) identifier_predecessor (identifier_payoff) identifier_payoff )attribute (identifier_expectation) identifier_expectation )augmented_assignment )expression_statement )block )if_statement )block )function_definition )module
If the predecessor is not None, gives the appropriate amount of payoff to the predecessor in payment for its contribution to this match set's expected future payoff. The predecessor argument should be either None or a MatchSet instance whose selected action led directly to this match set's situation. Usage: match_set = model.match(situation) match_set.pay(previous_match_set) Arguments: predecessor: The MatchSet instance which was produced by the same classifier set in response to the immediately preceding situation, or None if this is the first situation in the scenario. Return: None
(module (function_definition (function_name_register_factory) function_name_register_factory (parameters (identifier_self) identifier_self (identifier_key) identifier_key (default_parameter (identifier_factory) identifier_factory (identifier__sentinel) identifier__sentinel )default_parameter (default_parameter (identifier_scope) identifier_scope (identifier_NoneScope) identifier_NoneScope )default_parameter (default_parameter (identifier_allow_overwrite) identifier_allow_overwrite (False) False )default_parameter )parameters (block (if_statement (comparison_operator (identifier_factory) identifier_factory (identifier__sentinel) identifier__sentinel )comparison_operator (block (return_statement (call (attribute (identifier_functools) identifier_functools (identifier_partial) identifier_partial )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_register_factory) identifier_register_factory )attribute (identifier_key) identifier_key (keyword_argument (identifier_scope) identifier_scope (identifier_scope) identifier_scope )keyword_argument (keyword_argument (identifier_allow_overwrite) identifier_allow_overwrite (identifier_allow_overwrite) identifier_allow_overwrite )keyword_argument )argument_list )call )return_statement )block )if_statement (if_statement (boolean_operator (not_operator (identifier_allow_overwrite) identifier_allow_overwrite )not_operator (comparison_operator (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier__providers) identifier__providers )attribute )comparison_operator )boolean_operator (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (binary_operator (string_"Key %s already exists") string_"Key %s already exists" (identifier_key) identifier_key )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_provider) identifier_provider (call (attribute (identifier_self) identifier_self (identifier_provider) identifier_provider )attribute (argument_list (identifier_factory) identifier_factory (identifier_scope) identifier_scope )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__providers) identifier__providers )attribute (identifier_key) identifier_key )subscript (identifier_provider) identifier_provider )assignment )expression_statement (return_statement (identifier_factory) identifier_factory )return_statement )block )function_definition )module
Creates and registers a provider using the given key, factory, and scope. Can also be used as a decorator. :param key: Provider key :type key: object :param factory: Factory callable :type factory: callable :param scope: Scope key, factory, or instance :type scope: object or callable :return: Factory (or None if we're creating a provider without a factory) :rtype: callable or None
(module (function_definition (function_name_source) function_name_source (parameters (identifier_self) identifier_self (default_parameter (identifier_fields) identifier_fields (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_self) identifier_self (identifier__clone) identifier__clone )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_fields) identifier_fields (identifier_kwargs) identifier_kwargs )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"You cannot specify fields and kwargs at the same time.") string_"You cannot specify fields and kwargs at the same time." )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_fields) identifier_fields (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_s) identifier_s (identifier__source) identifier__source )attribute (identifier_fields) identifier_fields )assignment )expression_statement (return_statement (identifier_s) identifier_s )return_statement )block )if_statement (if_statement (boolean_operator (identifier_kwargs) identifier_kwargs (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_s) identifier_s (identifier__source) identifier__source )attribute (identifier_dict) identifier_dict )argument_list )call )not_operator )boolean_operator (block (expression_statement (assignment (attribute (identifier_s) identifier_s (identifier__source) identifier__source )attribute (dictionary )dictionary )assignment )expression_statement )block )if_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (try_statement (block (delete_statement (subscript (attribute (identifier_s) identifier_s (identifier__source) identifier__source )attribute (identifier_key) identifier_key )subscript )delete_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement )block (else_clause (block (expression_statement (assignment (subscript (attribute (identifier_s) identifier_s (identifier__source) identifier__source )attribute (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_s) identifier_s )return_statement )block )function_definition )module
Selectively control how the _source field is returned. :arg fields: wildcard string, array of wildcards, or dictionary of includes and excludes If ``fields`` is None, the entire document will be returned for each hit. If fields is a dictionary with keys of 'include' and/or 'exclude' the fields will be either included or excluded appropriately. Calling this multiple times with the same named parameter will override the previous values with the new ones. Example:: s = Search() s = s.source(include=['obj1.*'], exclude=["*.description"]) s = Search() s = s.source(include=['obj1.*']).source(exclude=["*.description"])
(module (function_definition (function_name_getMemoryStats) function_name_getMemoryStats (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__statusxml) identifier__statusxml )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_initStats) identifier_initStats )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_node) identifier_node (call (attribute (attribute (identifier_self) identifier_self (identifier__statusxml) identifier__statusxml )attribute (identifier_find) identifier_find )attribute (argument_list (string_'jvm/memory') string_'jvm/memory' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_memstats) identifier_memstats (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_node) identifier_node (None) None )comparison_operator (block (for_statement (tuple_pattern (identifier_key) identifier_key (identifier_val) identifier_val )tuple_pattern (call (attribute (identifier_node) identifier_node (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_memstats) identifier_memstats (identifier_key) identifier_key )subscript (call (attribute (identifier_util) identifier_util (identifier_parse_value) identifier_parse_value )attribute (argument_list (identifier_val) identifier_val )argument_list )call )assignment )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_memstats) identifier_memstats )return_statement )block )function_definition )module
Return JVM Memory Stats for Apache Tomcat Server. @return: Dictionary of memory utilization stats.
(module (function_definition (function_name_generate_csv) function_name_generate_csv (parameters (identifier_src) identifier_src (identifier_out) identifier_out )parameters (block (expression_statement (assignment (identifier_writer) identifier_writer (call (identifier_UnicodeWriter) identifier_UnicodeWriter (argument_list (call (identifier_open) identifier_open (argument_list (identifier_out) identifier_out (string_'wb') string_'wb' )argument_list )call (keyword_argument (identifier_delimiter) identifier_delimiter (string_';') string_';' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_writer) identifier_writer (identifier_writerow) identifier_writerow )attribute (argument_list (tuple (string_'Reference ID') string_'Reference ID' (string_'Created') string_'Created' (string_'Origin') string_'Origin' (string_'Subject') string_'Subject' )tuple )argument_list )call )expression_statement (for_statement (identifier_cable) identifier_cable (call (identifier_cables_from_source) identifier_cables_from_source (argument_list (identifier_src) identifier_src (keyword_argument (identifier_predicate) identifier_predicate (call (attribute (identifier_pred) identifier_pred (identifier_origin_filter) identifier_origin_filter )attribute (argument_list (attribute (identifier_pred) identifier_pred (identifier_origin_germany) identifier_origin_germany )attribute )argument_list )call )keyword_argument )argument_list )call (block (expression_statement (call (attribute (identifier_writer) identifier_writer (identifier_writerow) identifier_writerow )attribute (argument_list (tuple (attribute (identifier_cable) identifier_cable (identifier_reference_id) identifier_reference_id )attribute (attribute (identifier_cable) identifier_cable (identifier_created) identifier_created )attribute (attribute (identifier_cable) identifier_cable (identifier_origin) identifier_origin )attribute (call (identifier_titlefy) identifier_titlefy (argument_list (attribute (identifier_cable) identifier_cable (identifier_subject) identifier_subject )attribute )argument_list )call )tuple )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
\ Walks through `src` and generates the CSV file `out`
(module (function_definition (function_name_before_request) function_name_before_request (parameters (identifier_request) identifier_request (default_parameter (identifier_tracer) identifier_tracer (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_tracer) identifier_tracer (None) None )comparison_operator (block (expression_statement (assignment (identifier_tracer) identifier_tracer (attribute (identifier_opentracing) identifier_opentracing (identifier_tracer) identifier_tracer )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_tags_dict) identifier_tags_dict (dictionary (pair (attribute (identifier_tags) identifier_tags (identifier_SPAN_KIND) identifier_SPAN_KIND )attribute (attribute (identifier_tags) identifier_tags (identifier_SPAN_KIND_RPC_SERVER) identifier_SPAN_KIND_RPC_SERVER )attribute )pair (pair (attribute (identifier_tags) identifier_tags (identifier_HTTP_URL) identifier_HTTP_URL )attribute (attribute (identifier_request) identifier_request (identifier_full_url) identifier_full_url )attribute )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_remote_ip) identifier_remote_ip (attribute (identifier_request) identifier_request (identifier_remote_ip) identifier_remote_ip )attribute )assignment )expression_statement (if_statement (identifier_remote_ip) identifier_remote_ip (block (expression_statement (assignment (subscript (identifier_tags_dict) identifier_tags_dict (attribute (identifier_tags) identifier_tags (identifier_PEER_HOST_IPV4) identifier_PEER_HOST_IPV4 )attribute )subscript (identifier_remote_ip) identifier_remote_ip )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_caller_name) identifier_caller_name (attribute (identifier_request) identifier_request (identifier_caller_name) identifier_caller_name )attribute )assignment )expression_statement (if_statement (identifier_caller_name) identifier_caller_name (block (expression_statement (assignment (subscript (identifier_tags_dict) identifier_tags_dict (attribute (identifier_tags) identifier_tags (identifier_PEER_SERVICE) identifier_PEER_SERVICE )attribute )subscript (identifier_caller_name) identifier_caller_name )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_remote_port) identifier_remote_port (attribute (identifier_request) identifier_request (identifier_remote_port) identifier_remote_port )attribute )assignment )expression_statement (if_statement (identifier_remote_port) identifier_remote_port (block (expression_statement (assignment (subscript (identifier_tags_dict) identifier_tags_dict (attribute (identifier_tags) identifier_tags (identifier_PEER_PORT) identifier_PEER_PORT )attribute )subscript (identifier_remote_port) identifier_remote_port )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_operation) identifier_operation (attribute (identifier_request) identifier_request (identifier_operation) identifier_operation )attribute )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_carrier) identifier_carrier (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (attribute (identifier_request) identifier_request (identifier_headers) identifier_headers )attribute )argument_list )call (block (expression_statement (assignment (subscript (identifier_carrier) identifier_carrier (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_parent_ctx) identifier_parent_ctx (call (attribute (identifier_tracer) identifier_tracer (identifier_extract) identifier_extract )attribute (argument_list (keyword_argument (identifier_format) identifier_format (attribute (identifier_Format) identifier_Format (identifier_HTTP_HEADERS) identifier_HTTP_HEADERS )attribute )keyword_argument (keyword_argument (identifier_carrier) identifier_carrier (identifier_carrier) identifier_carrier )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_exception) identifier_exception )attribute (argument_list (binary_operator (string_'trace extract failed: %s') string_'trace extract failed: %s' (identifier_e) identifier_e )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_parent_ctx) identifier_parent_ctx (None) None )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_span) identifier_span (call (attribute (identifier_tracer) identifier_tracer (identifier_start_span) identifier_start_span )attribute (argument_list (keyword_argument (identifier_operation_name) identifier_operation_name (identifier_operation) identifier_operation )keyword_argument (keyword_argument (identifier_child_of) identifier_child_of (identifier_parent_ctx) identifier_parent_ctx )keyword_argument (keyword_argument (identifier_tags) identifier_tags (identifier_tags_dict) identifier_tags_dict )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_span) identifier_span )return_statement )block )function_definition )module
Attempts to extract a tracing span from incoming request. If no tracing context is passed in the headers, or the data cannot be parsed, a new root span is started. :param request: HTTP request with `.headers` property exposed that satisfies a regular dictionary interface :param tracer: optional tracer instance to use. If not specified the global opentracing.tracer will be used. :return: returns a new, already started span.
(module (function_definition (function_name__sections_to_variance_sections) function_name__sections_to_variance_sections (parameters (identifier_self) identifier_self (identifier_sections_over_time) identifier_sections_over_time )parameters (block (expression_statement (assignment (identifier_variance_sections) identifier_variance_sections (list )list )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (subscript (identifier_sections_over_time) identifier_sections_over_time (integer_0) integer_0 )subscript )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_time_sections) identifier_time_sections (list_comprehension (subscript (identifier_sections) identifier_sections (identifier_i) identifier_i )subscript (for_in_clause (identifier_sections) identifier_sections (identifier_sections_over_time) identifier_sections_over_time )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_variance) identifier_variance (call (attribute (identifier_np) identifier_np (identifier_var) identifier_var )attribute (argument_list (identifier_time_sections) identifier_time_sections (keyword_argument (identifier_axis) identifier_axis (integer_0) integer_0 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_variance_sections) identifier_variance_sections (identifier_append) identifier_append )attribute (argument_list (identifier_variance) identifier_variance )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_variance_sections) identifier_variance_sections )return_statement )block )function_definition )module
Computes the variance of corresponding sections over time. Returns: a list of np arrays.
(module (function_definition (function_name_add_locations) function_name_add_locations (parameters (identifier_self) identifier_self (identifier_locations) identifier_locations )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_locations) identifier_locations (tuple (identifier_str) identifier_str (identifier_ustr) identifier_ustr )tuple )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_from_str) identifier__add_from_str )attribute (argument_list (identifier_locations) identifier_locations )argument_list )call )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_locations) identifier_locations (tuple (identifier_list) identifier_list (identifier_tuple) identifier_tuple )tuple )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_from_list) identifier__add_from_list )attribute (argument_list (identifier_locations) identifier_locations )argument_list )call )expression_statement )block )elif_clause )if_statement )block )function_definition )module
Add extra locations to AstralGeocoder. Extra locations can be * A single string containing one or more locations separated by a newline. * A list of strings * A list of lists/tuples that are passed to a :class:`Location` constructor
(module (function_definition (function_name_copy_node) function_name_copy_node (parameters (identifier_node) identifier_node )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_node) identifier_node (attribute (identifier_gast) identifier_gast (identifier_AST) identifier_AST )attribute )argument_list )call )not_operator (block (return_statement (list_comprehension (call (identifier_copy_node) identifier_copy_node (argument_list (identifier_n) identifier_n )argument_list )call (for_in_clause (identifier_n) identifier_n (identifier_node) identifier_node )for_in_clause )list_comprehension )return_statement )block )if_statement (expression_statement (assignment (identifier_new_node) identifier_new_node (call (attribute (identifier_copy) identifier_copy (identifier_deepcopy) identifier_deepcopy )attribute (argument_list (identifier_node) identifier_node )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_new_node) identifier_new_node (attribute (identifier_anno) identifier_anno (identifier_ANNOTATION_FIELD) identifier_ANNOTATION_FIELD )attribute (call (attribute (call (identifier_getattr) identifier_getattr (argument_list (identifier_node) identifier_node (attribute (identifier_anno) identifier_anno (identifier_ANNOTATION_FIELD) identifier_ANNOTATION_FIELD )attribute (dictionary )dictionary )argument_list )call (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_new_node) identifier_new_node )return_statement )block )function_definition )module
Copy a node but keep its annotations intact.
(module (function_definition (function_name_mutations_batcher) function_name_mutations_batcher (parameters (identifier_self) identifier_self (default_parameter (identifier_flush_count) identifier_flush_count (identifier_FLUSH_COUNT) identifier_FLUSH_COUNT )default_parameter (default_parameter (identifier_max_row_bytes) identifier_max_row_bytes (identifier_MAX_ROW_BYTES) identifier_MAX_ROW_BYTES )default_parameter )parameters (block (return_statement (call (identifier_MutationsBatcher) identifier_MutationsBatcher (argument_list (identifier_self) identifier_self (identifier_flush_count) identifier_flush_count (identifier_max_row_bytes) identifier_max_row_bytes )argument_list )call )return_statement )block )function_definition )module
Factory to create a mutation batcher associated with this instance. For example: .. literalinclude:: snippets_table.py :start-after: [START bigtable_mutations_batcher] :end-before: [END bigtable_mutations_batcher] :type table: class :param table: class:`~google.cloud.bigtable.table.Table`. :type flush_count: int :param flush_count: (Optional) Maximum number of rows per batch. If it reaches the max number of rows it calls finish_batch() to mutate the current row batch. Default is FLUSH_COUNT (1000 rows). :type max_row_bytes: int :param max_row_bytes: (Optional) Max number of row mutations size to flush. If it reaches the max number of row mutations size it calls finish_batch() to mutate the current row batch. Default is MAX_ROW_BYTES (5 MB).
(module (function_definition (function_name_create_node_rating_counts_settings) function_name_create_node_rating_counts_settings (parameters (identifier_sender) identifier_sender (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_created) identifier_created (subscript (identifier_kwargs) identifier_kwargs (string_'created') string_'created' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_node) identifier_node (subscript (identifier_kwargs) identifier_kwargs (string_'instance') string_'instance' )subscript )assignment )expression_statement (if_statement (identifier_created) identifier_created (block (expression_statement (call (attribute (identifier_create_related_object) identifier_create_related_object (identifier_delay) identifier_delay )attribute (argument_list (identifier_NodeRatingCount) identifier_NodeRatingCount (dictionary (pair (string_'node') string_'node' (identifier_node) identifier_node )pair )dictionary )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_create_related_object) identifier_create_related_object (identifier_delay) identifier_delay )attribute (argument_list (identifier_NodeParticipationSettings) identifier_NodeParticipationSettings (dictionary (pair (string_'node') string_'node' (identifier_node) identifier_node )pair )dictionary )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
create node rating count and settings
(module (function_definition (function_name_G) function_name_G (parameters (identifier_self) identifier_self (identifier_ID) identifier_ID (identifier_lat) identifier_lat (identifier_lon) identifier_lon )parameters (block (expression_statement (assignment (identifier_eqM) identifier_eqM (call (attribute (identifier_utils) identifier_utils (identifier_eqCoords) identifier_eqCoords )attribute (argument_list (identifier_lon) identifier_lon (identifier_lat) identifier_lat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_eqZ) identifier_eqZ (identifier_eqM) identifier_eqM )assignment )expression_statement (if_statement (comparison_operator (identifier_lat) identifier_lat (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_eqZ) identifier_eqZ (call (attribute (identifier_utils) identifier_utils (identifier_eqCoords) identifier_eqCoords )attribute (argument_list (identifier_lon) identifier_lon (integer_0) integer_0 )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (dictionary (pair (string_'id') string_'id' (identifier_ID) identifier_ID )pair (pair (string_'lat') string_'lat' (identifier_lat) identifier_lat )pair (pair (string_'lon') string_'lon' (identifier_lon) identifier_lon )pair (pair (string_'ra') string_'ra' (subscript (identifier_eqM) identifier_eqM (integer_0) integer_0 )subscript )pair (pair (string_'decl') string_'decl' (subscript (identifier_eqM) identifier_eqM (integer_1) integer_1 )subscript )pair (pair (string_'raZ') string_'raZ' (subscript (identifier_eqZ) identifier_eqZ (integer_0) integer_0 )subscript )pair (pair (string_'declZ') string_'declZ' (subscript (identifier_eqZ) identifier_eqZ (integer_1) integer_1 )subscript )pair )dictionary )return_statement )block )function_definition )module
Creates a generic entry for an object.
(module (function_definition (function_name__cb_inform_sensor_status) function_name__cb_inform_sensor_status (parameters (identifier_self) identifier_self (identifier_msg) identifier_msg )parameters (block (expression_statement (assignment (identifier_timestamp) identifier_timestamp (subscript (attribute (identifier_msg) identifier_msg (identifier_arguments) identifier_arguments )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_num_sensors) identifier_num_sensors (call (identifier_int) identifier_int (argument_list (subscript (attribute (identifier_msg) identifier_msg (identifier_arguments) identifier_arguments )attribute (integer_1) integer_1 )subscript )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_msg) identifier_msg (identifier_arguments) identifier_arguments )attribute )argument_list )call (binary_operator (integer_2) integer_2 (binary_operator (identifier_num_sensors) identifier_num_sensors (integer_3) integer_3 )binary_operator )binary_operator )comparison_operator )assert_statement (for_statement (identifier_n) identifier_n (call (identifier_xrange) identifier_xrange (argument_list (identifier_num_sensors) identifier_num_sensors )argument_list )call (block (expression_statement (assignment (identifier_name) identifier_name (subscript (attribute (identifier_msg) identifier_msg (identifier_arguments) identifier_arguments )attribute (binary_operator (integer_2) integer_2 (binary_operator (identifier_n) identifier_n (integer_3) integer_3 )binary_operator )binary_operator )subscript )assignment )expression_statement (expression_statement (assignment (identifier_status) identifier_status (subscript (attribute (identifier_msg) identifier_msg (identifier_arguments) identifier_arguments )attribute (binary_operator (integer_3) integer_3 (binary_operator (identifier_n) identifier_n (integer_3) integer_3 )binary_operator )binary_operator )subscript )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (subscript (attribute (identifier_msg) identifier_msg (identifier_arguments) identifier_arguments )attribute (binary_operator (integer_4) integer_4 (binary_operator (identifier_n) identifier_n (integer_3) integer_3 )binary_operator )binary_operator )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update_sensor) identifier_update_sensor )attribute (argument_list (identifier_name) identifier_name (identifier_timestamp) identifier_timestamp (identifier_status) identifier_status (identifier_value) identifier_value )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Update received for an sensor.
(module (function_definition (function_name_get_fd) function_name_get_fd (parameters (identifier_file_or_fd) identifier_file_or_fd (default_parameter (identifier_default) identifier_default (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_fd) identifier_fd (identifier_file_or_fd) identifier_file_or_fd )assignment )expression_statement (if_statement (comparison_operator (identifier_fd) identifier_fd (None) None )comparison_operator (block (expression_statement (assignment (identifier_fd) identifier_fd (identifier_default) identifier_default )assignment )expression_statement )block )if_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_fd) identifier_fd (string_"fileno") string_"fileno" )argument_list )call (block (expression_statement (assignment (identifier_fd) identifier_fd (call (attribute (identifier_fd) identifier_fd (identifier_fileno) identifier_fileno )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_fd) identifier_fd )return_statement )block )function_definition )module
Helper function for getting a file descriptor.
(module (function_definition (function_name_add_widget) function_name_add_widget (parameters (identifier_self) identifier_self (identifier_widget) identifier_widget (default_parameter (identifier_column) identifier_column (integer_0) integer_0 )default_parameter )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__frame) identifier__frame )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_"You must add the Layout to the Frame before you can add a Widget.") string_"You must add the Layout to the Frame before you can add a Widget." )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__columns) identifier__columns )attribute (identifier_column) identifier_column )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_widget) identifier_widget )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_widget) identifier_widget (identifier_register_frame) identifier_register_frame )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__frame) identifier__frame )attribute )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_widget) identifier_widget (identifier_name) identifier_name )attribute (attribute (attribute (identifier_self) identifier_self (identifier__frame) identifier__frame )attribute (identifier_data) identifier_data )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_widget) identifier_widget (identifier_value) identifier_value )attribute (subscript (attribute (attribute (identifier_self) identifier_self (identifier__frame) identifier__frame )attribute (identifier_data) identifier_data )attribute (attribute (identifier_widget) identifier_widget (identifier_name) identifier_name )attribute )subscript )assignment )expression_statement )block )if_statement )block )function_definition )module
Add a widget to this Layout. If you are adding this Widget to the Layout dynamically after starting to play the Scene, don't forget to ensure that the value is explicitly set before the next update. :param widget: The widget to be added. :param column: The column within the widget for this widget. Defaults to zero.
(module (function_definition (function_name_generate_source_image) function_name_generate_source_image (parameters (identifier_source_file) identifier_source_file (identifier_processor_options) identifier_processor_options (default_parameter (identifier_generators) identifier_generators (None) None )default_parameter (default_parameter (identifier_fail_silently) identifier_fail_silently (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_processor_options) identifier_processor_options (call (identifier_ThumbnailOptions) identifier_ThumbnailOptions (argument_list (identifier_processor_options) identifier_processor_options )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_was_closed) identifier_was_closed (call (identifier_getattr) identifier_getattr (argument_list (identifier_source_file) identifier_source_file (string_'closed') string_'closed' (False) False )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_generators) identifier_generators (None) None )comparison_operator (block (expression_statement (assignment (identifier_generators) identifier_generators (list_comprehension (call (attribute (identifier_utils) identifier_utils (identifier_dynamic_import) identifier_dynamic_import )attribute (argument_list (identifier_name) identifier_name )argument_list )call (for_in_clause (identifier_name) identifier_name (attribute (identifier_settings) identifier_settings (identifier_THUMBNAIL_SOURCE_GENERATORS) identifier_THUMBNAIL_SOURCE_GENERATORS )attribute )for_in_clause )list_comprehension )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_exceptions) identifier_exceptions (list )list )assignment )expression_statement (try_statement (block (for_statement (identifier_generator) identifier_generator (identifier_generators) identifier_generators (block (expression_statement (assignment (identifier_source) identifier_source (identifier_source_file) identifier_source_file )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_source) identifier_source (identifier_open) identifier_open )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (try_statement (block (expression_statement (call (attribute (identifier_source) identifier_source (identifier_seek) identifier_seek )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (assignment (identifier_source) identifier_source (None) None )assignment )expression_statement )block )except_clause )try_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (identifier_image) identifier_image (call (identifier_generator) identifier_generator (argument_list (identifier_source) identifier_source (dictionary_splat (identifier_processor_options) identifier_processor_options )dictionary_splat )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (if_statement (not_operator (identifier_fail_silently) identifier_fail_silently )not_operator (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_generators) identifier_generators )argument_list )call (integer_1) integer_1 )comparison_operator (block (raise_statement )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_append) identifier_append )attribute (argument_list (identifier_e) identifier_e )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_image) identifier_image (None) None )assignment )expression_statement )block )except_clause )try_statement (if_statement (identifier_image) identifier_image (block (return_statement (identifier_image) identifier_image )return_statement )block )if_statement )block )for_statement )block (finally_clause (block (if_statement (identifier_was_closed) identifier_was_closed (block (try_statement (block (expression_statement (call (attribute (identifier_source_file) identifier_source_file (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement )block )finally_clause )try_statement (if_statement (boolean_operator (identifier_exceptions) identifier_exceptions (not_operator (identifier_fail_silently) identifier_fail_silently )not_operator )boolean_operator (block (raise_statement (call (identifier_NoSourceGenerator) identifier_NoSourceGenerator (argument_list (list_splat (identifier_exceptions) identifier_exceptions )list_splat )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Processes a source ``File`` through a series of source generators, stopping once a generator returns an image. The return value is this image instance or ``None`` if no generators return an image. If the source file cannot be opened, it will be set to ``None`` and still passed to the generators.
(module (function_definition (function_name_set_element) function_name_set_element (parameters (identifier_self) identifier_self (identifier_row) identifier_row (identifier_col) identifier_col (identifier_value) identifier_value )parameters (block (expression_statement (call (attribute (identifier_javabridge) identifier_javabridge (identifier_call) identifier_call )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_jobject) identifier_jobject )attribute (string_"setElement") string_"setElement" (string_"(IID)V") string_"(IID)V" (identifier_row) identifier_row (identifier_col) identifier_col (identifier_value) identifier_value )argument_list )call )expression_statement )block )function_definition )module
Sets the float value at the specified location. :param row: the 0-based index of the row :type row: int :param col: the 0-based index of the column :type col: int :param value: the float value for that cell :type value: float
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'data') string_'data' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_data) identifier_data (None) None )comparison_operator (block (if_statement (parenthesized_expression (boolean_operator (boolean_operator (boolean_operator (attribute (identifier_util) identifier_util (identifier_pd) identifier_pd )attribute (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (attribute (attribute (identifier_util) identifier_util (identifier_pd) identifier_pd )attribute (identifier_DataFrame) identifier_DataFrame )attribute )argument_list )call )boolean_operator (comparison_operator (call (identifier_list) identifier_list (argument_list (attribute (identifier_data) identifier_data (identifier_columns) identifier_columns )attribute )argument_list )call (call (identifier_list) identifier_list (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_columns) identifier_columns )attribute )argument_list )call )comparison_operator )boolean_operator (attribute (identifier_self) identifier_self (identifier__index) identifier__index )attribute )boolean_operator )parenthesized_expression (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_data) identifier_data (identifier_reset_index) identifier_reset_index )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_verify) identifier_verify )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'data') string_'data' )subscript (call (attribute (identifier_self) identifier_self (identifier__concat) identifier__concat )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__count) identifier__count )attribute (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_Buffer) identifier_Buffer (identifier_self) identifier_self )argument_list )call (identifier_update) identifier_update )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Overrides update to concatenate streamed data up to defined length.
(module (function_definition (function_name__set_autocommit) function_name__set_autocommit (parameters (identifier_connection) identifier_connection )parameters (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (attribute (identifier_connection) identifier_connection (identifier_connection) identifier_connection )attribute (string_"autocommit") string_"autocommit" )argument_list )call (block (if_statement (call (identifier_callable) identifier_callable (argument_list (attribute (attribute (identifier_connection) identifier_connection (identifier_connection) identifier_connection )attribute (identifier_autocommit) identifier_autocommit )attribute )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_connection) identifier_connection (identifier_connection) identifier_connection )attribute (identifier_autocommit) identifier_autocommit )attribute (argument_list (True) True )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (attribute (identifier_connection) identifier_connection (identifier_connection) identifier_connection )attribute (identifier_autocommit) identifier_autocommit )attribute (True) True )assignment )expression_statement )block )else_clause )if_statement )block (elif_clause (call (identifier_hasattr) identifier_hasattr (argument_list (attribute (identifier_connection) identifier_connection (identifier_connection) identifier_connection )attribute (string_"set_isolation_level") string_"set_isolation_level" )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_connection) identifier_connection (identifier_connection) identifier_connection )attribute (identifier_set_isolation_level) identifier_set_isolation_level )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement )block )elif_clause )if_statement )block )function_definition )module
Make sure a connection is in autocommit mode.
(module (function_definition (function_name_string_to_datetime) function_name_string_to_datetime (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj )parameters (block (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_obj) identifier_obj )argument_list )call (integer_19) integer_19 )comparison_operator )boolean_operator (block (try_statement (block (return_statement (call (attribute (identifier_datetime) identifier_datetime (identifier_strptime) identifier_strptime )attribute (argument_list (identifier_obj) identifier_obj (string_"%Y-%m-%dT%H:%M:%S") string_"%Y-%m-%dT%H:%M:%S" )argument_list )call )return_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_obj) identifier_obj )argument_list )call (integer_19) integer_19 )comparison_operator )boolean_operator (block (try_statement (block (return_statement (call (attribute (identifier_datetime) identifier_datetime (identifier_strptime) identifier_strptime )attribute (argument_list (identifier_obj) identifier_obj (string_"%Y-%m-%dT%H:%M:%S.%f") string_"%Y-%m-%dT%H:%M:%S.%f" )argument_list )call )return_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_obj) identifier_obj )argument_list )call (integer_10) integer_10 )comparison_operator )boolean_operator (block (try_statement (block (return_statement (call (attribute (identifier_datetime) identifier_datetime (identifier_strptime) identifier_strptime )attribute (argument_list (identifier_obj) identifier_obj (string_"%Y-%m-%d") string_"%Y-%m-%d" )argument_list )call )return_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement (return_statement (identifier_obj) identifier_obj )return_statement )block )function_definition )module
Decode a datetime string to a datetime object
(module (function_definition (function_name_get_wallet_record) function_name_get_wallet_record (parameters (typed_parameter (identifier_wallet_handle) identifier_wallet_handle (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_type_) identifier_type_ (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_id) identifier_id (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_options_json) identifier_options_json (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_logger) identifier_logger (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (identifier___name__) identifier___name__ )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"get_wallet_record: >>> wallet_handle: %r, type_: %r, id: %r, options_json: %r") string_"get_wallet_record: >>> wallet_handle: %r, type_: %r, id: %r, options_json: %r" (identifier_wallet_handle) identifier_wallet_handle (identifier_type_) identifier_type_ (identifier_id) identifier_id (identifier_options_json) identifier_options_json )argument_list )call )expression_statement (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_get_wallet_record) identifier_get_wallet_record (string_"cb") string_"cb" )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"get_wallet_record: Creating callback") string_"get_wallet_record: Creating callback" )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_get_wallet_record) identifier_get_wallet_record (identifier_cb) identifier_cb )attribute (call (identifier_create_cb) identifier_create_cb (argument_list (call (identifier_CFUNCTYPE) identifier_CFUNCTYPE (argument_list (None) None (identifier_c_int32) identifier_c_int32 (identifier_c_int32) identifier_c_int32 (identifier_c_char_p) identifier_c_char_p )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_c_wallet_handle) identifier_c_wallet_handle (call (identifier_c_int32) identifier_c_int32 (argument_list (identifier_wallet_handle) identifier_wallet_handle )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c_type) identifier_c_type (call (identifier_c_char_p) identifier_c_char_p (argument_list (call (attribute (identifier_type_) identifier_type_ (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c_id) identifier_c_id (call (identifier_c_char_p) identifier_c_char_p (argument_list (call (attribute (identifier_id) identifier_id (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_c_options_json) identifier_c_options_json (call (identifier_c_char_p) identifier_c_char_p (argument_list (call (attribute (identifier_options_json) identifier_options_json (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_wallet_record) identifier_wallet_record (await (call (identifier_do_call) identifier_do_call (argument_list (string_'indy_get_wallet_record') string_'indy_get_wallet_record' (identifier_c_wallet_handle) identifier_c_wallet_handle (identifier_c_type) identifier_c_type (identifier_c_id) identifier_c_id (identifier_c_options_json) identifier_c_options_json (attribute (identifier_get_wallet_record) identifier_get_wallet_record (identifier_cb) identifier_cb )attribute )argument_list )call )await )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_wallet_record) identifier_wallet_record (identifier_decode) identifier_decode )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"get_wallet_record: <<< res: %r") string_"get_wallet_record: <<< res: %r" (identifier_res) identifier_res )argument_list )call )expression_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Get an wallet record by id :param wallet_handle: wallet handler (created by open_wallet). :param type_: allows to separate different record types collections :param id: the id of record :param options_json: //TODO: FIXME: Think about replacing by bitmask { retrieveType: (optional, false by default) Retrieve record type, retrieveValue: (optional, true by default) Retrieve record value, retrieveTags: (optional, true by default) Retrieve record tags } :return: wallet record json: { id: "Some id", type: "Some type", // present only if retrieveType set to true value: "Some value", // present only if retrieveValue set to true tags: <tags json>, // present only if retrieveTags set to true }
(module (function_definition (function_name__handle_exists) function_name__handle_exists (parameters (identifier_self) identifier_self (identifier_node) identifier_node (identifier_scope) identifier_scope (identifier_ctxt) identifier_ctxt (identifier_stream) identifier_stream )parameters (block (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_fields) identifier_fields (identifier_Int) identifier_Int )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__handle_node) identifier__handle_node )attribute (argument_list (attribute (identifier_node) identifier_node (identifier_expr) identifier_expr )attribute (identifier_scope) identifier_scope (identifier_ctxt) identifier_ctxt (identifier_stream) identifier_stream )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_res) identifier_res (identifier__pfp__set_value) identifier__pfp__set_value )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (expression_statement (call (attribute (identifier_res) identifier_res (identifier__pfp__set_value) identifier__pfp__set_value )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement )block )except_clause )try_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Handle the exists unary operator :node: TODO :scope: TODO :ctxt: TODO :stream: TODO :returns: TODO
(module (function_definition (function_name_query_echo) function_name_query_echo (parameters (identifier_cls) identifier_cls (identifier_request) identifier_request (typed_parameter (identifier_foo) identifier_foo (type (tuple (attribute (identifier_Ptypes) identifier_Ptypes (identifier_query) identifier_query )attribute (call (identifier_String) identifier_String (argument_list (string_'A query parameter') string_'A query parameter' )argument_list )call )tuple )type )typed_parameter )parameters (type (list (tuple (integer_200) integer_200 (string_'Ok') string_'Ok' (identifier_String) identifier_String )tuple )list )type (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_'Echoing query param, value is: {}') string_'Echoing query param, value is: {}' (identifier_format) identifier_format )attribute (argument_list (identifier_foo) identifier_foo )argument_list )call )argument_list )call )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_randint) identifier_randint (argument_list (integer_0) integer_0 (identifier_MAX_LOOP_DURATION) identifier_MAX_LOOP_DURATION )argument_list )call )argument_list )call (block (expression_statement (yield )yield )expression_statement )block )for_statement (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (string_'The value sent was: {}') string_'The value sent was: {}' (identifier_format) identifier_format )attribute (argument_list (identifier_foo) identifier_foo )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_Respond) identifier_Respond (argument_list (integer_200) integer_200 (identifier_msg) identifier_msg )argument_list )call )expression_statement )block )function_definition )module
Echo the query parameter.
(module (function_definition (function_name_validate_args) function_name_validate_args (parameters (identifier_args) identifier_args )parameters (block (if_statement (boolean_operator (not_operator (attribute (identifier_args) identifier_args (identifier_minutes) identifier_minutes )attribute )not_operator (not_operator (attribute (identifier_args) identifier_args (identifier_start_time) identifier_start_time )attribute )not_operator )boolean_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Error: missing --minutes or --start-time") string_"Error: missing --minutes or --start-time" )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement (if_statement (boolean_operator (attribute (identifier_args) identifier_args (identifier_minutes) identifier_minutes )attribute (attribute (identifier_args) identifier_args (identifier_start_time) identifier_start_time )attribute )boolean_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Error: --minutes shouldn't be specified if --start-time is used") string_"Error: --minutes shouldn't be specified if --start-time is used" )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement (if_statement (boolean_operator (attribute (identifier_args) identifier_args (identifier_end_time) identifier_end_time )attribute (not_operator (attribute (identifier_args) identifier_args (identifier_start_time) identifier_start_time )attribute )not_operator )boolean_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Error: --end-time can't be used without --start-time") string_"Error: --end-time can't be used without --start-time" )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement (if_statement (boolean_operator (attribute (identifier_args) identifier_args (identifier_minutes) identifier_minutes )attribute (comparison_operator (attribute (identifier_args) identifier_args (identifier_minutes) identifier_minutes )attribute (integer_0) integer_0 )comparison_operator )boolean_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Error: --minutes must be > 0") string_"Error: --minutes must be > 0" )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement (if_statement (boolean_operator (attribute (identifier_args) identifier_args (identifier_start_time) identifier_start_time )attribute (not_operator (call (attribute (identifier_TIME_FORMAT_REGEX) identifier_TIME_FORMAT_REGEX (identifier_match) identifier_match )attribute (argument_list (attribute (identifier_args) identifier_args (identifier_start_time) identifier_start_time )attribute )argument_list )call )not_operator )boolean_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Error: --start-time format is not valid") string_"Error: --start-time format is not valid" )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Example format: '2015-11-26 11:00:00'") string_"Example format: '2015-11-26 11:00:00'" )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement (if_statement (boolean_operator (attribute (identifier_args) identifier_args (identifier_end_time) identifier_end_time )attribute (not_operator (call (attribute (identifier_TIME_FORMAT_REGEX) identifier_TIME_FORMAT_REGEX (identifier_match) identifier_match )attribute (argument_list (attribute (identifier_args) identifier_args (identifier_end_time) identifier_end_time )attribute )argument_list )call )not_operator )boolean_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Error: --end-time format is not valid") string_"Error: --end-time format is not valid" )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Example format: '2015-11-26 11:00:00'") string_"Example format: '2015-11-26 11:00:00'" )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_args) identifier_args (identifier_batch_size) identifier_batch_size )attribute (integer_0) integer_0 )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Error: --batch-size must be > 0") string_"Error: --batch-size must be > 0" )argument_list )call )expression_statement (return_statement (False) False )return_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Basic option validation. Returns False if the options are not valid, True otherwise. :param args: the command line options :type args: map :param brokers_num: the number of brokers
(module (function_definition (function_name_use_comparative_composition_view) function_name_use_comparative_composition_view (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__object_views) identifier__object_views )attribute (string_'composition') string_'composition' )subscript (identifier_COMPARATIVE) identifier_COMPARATIVE )assignment )expression_statement (for_statement (identifier_session) identifier_session (call (attribute (identifier_self) identifier_self (identifier__get_provider_sessions) identifier__get_provider_sessions )attribute (argument_list )argument_list )call (block (try_statement (block (expression_statement (call (attribute (identifier_session) identifier_session (identifier_use_comparative_composition_view) identifier_use_comparative_composition_view )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement )block )function_definition )module
Pass through to provider CompositionLookupSession.use_comparative_composition_view
(module (function_definition (function_name_detect_terminal) function_name_detect_terminal (parameters (default_parameter (identifier__environ) identifier__environ (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute )default_parameter )parameters (block (if_statement (call (attribute (identifier__environ) identifier__environ (identifier_get) identifier_get )attribute (argument_list (string_'TMUX') string_'TMUX' )argument_list )call (block (return_statement (string_'tmux') string_'tmux' )return_statement )block (elif_clause (call (identifier_subdict_by_key_prefix) identifier_subdict_by_key_prefix (argument_list (identifier__environ) identifier__environ (string_'BYOBU') string_'BYOBU' )argument_list )call (block (return_statement (string_'byobu') string_'byobu' )return_statement )block )elif_clause (elif_clause (call (attribute (call (attribute (identifier__environ) identifier__environ (identifier_get) identifier_get )attribute (argument_list (string_'TERM') string_'TERM' )argument_list )call (identifier_startswith) identifier_startswith )attribute (argument_list (string_'screen') string_'screen' )argument_list )call (block (return_statement (subscript (identifier__environ) identifier__environ (string_'TERM') string_'TERM' )subscript )return_statement )block )elif_clause (elif_clause (call (attribute (identifier__environ) identifier__environ (identifier_get) identifier_get )attribute (argument_list (string_'COLORTERM') string_'COLORTERM' )argument_list )call (block (return_statement (subscript (identifier__environ) identifier__environ (string_'COLORTERM') string_'COLORTERM' )subscript )return_statement )block )elif_clause (else_clause (block (return_statement (call (attribute (identifier__environ) identifier__environ (identifier_get) identifier_get )attribute (argument_list (string_'TERM') string_'TERM' )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Detect "terminal" you are using. First, this function checks if you are in tmux, byobu, or screen. If not it uses $COLORTERM [#]_ if defined and fallbacks to $TERM. .. [#] So, if you are in Gnome Terminal you have "gnome-terminal" instead of "xterm-color"".
(module (function_definition (function_name_get_agent) function_name_get_agent (parameters (identifier_msg) identifier_msg )parameters (block (expression_statement (assignment (identifier_agent) identifier_agent (subscript (subscript (identifier_msg) identifier_msg (string_'msg') string_'msg' )subscript (string_'agent') string_'agent' )subscript )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_agent) identifier_agent (identifier_list) identifier_list )argument_list )call (block (expression_statement (assignment (identifier_agent) identifier_agent (subscript (identifier_agent) identifier_agent (integer_0) integer_0 )subscript )assignment )expression_statement )block )if_statement (return_statement (identifier_agent) identifier_agent )return_statement )block )function_definition )module
Handy hack to handle legacy messages where 'agent' was a list.
(module (function_definition (function_name_getManagedObjects) function_name_getManagedObjects (parameters (identifier_self) identifier_self (identifier_objectPath) identifier_objectPath )parameters (block (expression_statement (assignment (identifier_d) identifier_d (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_p) identifier_p (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_exports) identifier_exports )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call (block (if_statement (boolean_operator (not_operator (call (attribute (identifier_p) identifier_p (identifier_startswith) identifier_startswith )attribute (argument_list (identifier_objectPath) identifier_objectPath )argument_list )call )not_operator (comparison_operator (identifier_p) identifier_p (identifier_objectPath) identifier_objectPath )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_o) identifier_o (subscript (attribute (identifier_self) identifier_self (identifier_exports) identifier_exports )attribute (identifier_p) identifier_p )subscript )assignment )expression_statement (expression_statement (assignment (identifier_i) identifier_i (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_d) identifier_d (identifier_p) identifier_p )subscript (identifier_i) identifier_i )assignment )expression_statement (for_statement (identifier_iface) identifier_iface (call (attribute (identifier_o) identifier_o (identifier_getInterfaces) identifier_getInterfaces )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_i) identifier_i (attribute (identifier_iface) identifier_iface (identifier_name) identifier_name )attribute )subscript (call (attribute (identifier_o) identifier_o (identifier_getAllProperties) identifier_getAllProperties )attribute (argument_list (attribute (identifier_iface) identifier_iface (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
Returns a Python dictionary containing the reply content for org.freedesktop.DBus.ObjectManager.GetManagedObjects
(module (function_definition (function_name_get_docstring) function_name_get_docstring (parameters (identifier_obj) identifier_obj )parameters (block (expression_statement (assignment (identifier_docstring) identifier_docstring (call (identifier_getdoc) identifier_getdoc (argument_list (identifier_obj) identifier_obj (keyword_argument (identifier_allow_inherited) identifier_allow_inherited (True) True )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_docstring) identifier_docstring (None) None )comparison_operator (block (expression_statement (assignment (identifier_logger) identifier_logger (call (identifier_getLogger) identifier_getLogger (argument_list (identifier___name__) identifier___name__ )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (string_"Object %s doesn't have a docstring.") string_"Object %s doesn't have a docstring." (identifier_obj) identifier_obj )argument_list )call )expression_statement (expression_statement (assignment (identifier_docstring) identifier_docstring (string_'Undocumented') string_'Undocumented' )assignment )expression_statement )block )if_statement (return_statement (call (identifier_prepare_docstring) identifier_prepare_docstring (argument_list (identifier_docstring) identifier_docstring (keyword_argument (identifier_ignore) identifier_ignore (integer_1) integer_1 )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Extract the docstring from an object as individual lines. Parameters ---------- obj : object The Python object (class, function or method) to extract docstrings from. Returns ------- lines : `list` of `str` Individual docstring lines with common indentation removed, and newline characters stripped. Notes ----- If the object does not have a docstring, a docstring with the content ``"Undocumented."`` is created.
(module (function_definition (function_name__normalize_overlap) function_name__normalize_overlap (parameters (identifier_overlap) identifier_overlap (identifier_window) identifier_window (identifier_nfft) identifier_nfft (identifier_samp) identifier_samp (default_parameter (identifier_method) identifier_method (string_'welch') string_'welch' )default_parameter )parameters (block (if_statement (comparison_operator (identifier_method) identifier_method (string_'bartlett') string_'bartlett' )comparison_operator (block (return_statement (integer_0) integer_0 )return_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_overlap) identifier_overlap (None) None )comparison_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_window) identifier_window (identifier_string_types) identifier_string_types )argument_list )call )boolean_operator (block (return_statement (call (identifier_recommended_overlap) identifier_recommended_overlap (argument_list (identifier_window) identifier_window (identifier_nfft) identifier_nfft )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (identifier_overlap) identifier_overlap (None) None )comparison_operator (block (return_statement (integer_0) integer_0 )return_statement )block )if_statement (return_statement (call (identifier_seconds_to_samples) identifier_seconds_to_samples (argument_list (identifier_overlap) identifier_overlap (identifier_samp) identifier_samp )argument_list )call )return_statement )block )function_definition )module
Normalise an overlap in physical units to a number of samples Parameters ---------- overlap : `float`, `Quantity`, `None` the overlap in some physical unit (seconds) window : `str` the name of the window function that will be used, only used if `overlap=None` is given nfft : `int` the number of samples that will be used in the fast Fourier transform samp : `Quantity` the sampling rate (Hz) of the data that will be transformed method : `str` the name of the averaging method, default: `'welch'`, only used to return `0` for `'bartlett'` averaging Returns ------- noverlap : `int` the number of samples to be be used for the overlap
(module (function_definition (function_name_make_label) function_name_make_label (parameters (identifier_self) identifier_self (identifier_path) identifier_path )parameters (block (import_from_statement (dotted_name (identifier_datetime) identifier_datetime )dotted_name (dotted_name (identifier_datetime) identifier_datetime )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_StringIO) identifier_StringIO )dotted_name (dotted_name (identifier_StringIO) identifier_StringIO )dotted_name )import_from_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (identifier_path) identifier_path (identifier_lstrip) identifier_lstrip )attribute (argument_list (string_"/") string_"/" )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_bucket) identifier_bucket (identifier_label) identifier_label )pattern_list (call (attribute (identifier_path) identifier_path (identifier_split) identifier_split )attribute (argument_list (string_"/") string_"/" (integer_1) integer_1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bucket) identifier_bucket (call (attribute (attribute (identifier_self) identifier_self (identifier_ofs) identifier_ofs )attribute (identifier__require_bucket) identifier__require_bucket )attribute (argument_list (identifier_bucket) identifier_bucket )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_key) identifier_key (call (attribute (attribute (identifier_self) identifier_self (identifier_ofs) identifier_ofs )attribute (identifier__get_key) identifier__get_key )attribute (argument_list (identifier_bucket) identifier_bucket (identifier_label) identifier_label )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_key) identifier_key (None) None )comparison_operator (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (identifier_bucket) identifier_bucket (identifier_new_key) identifier_new_key )attribute (argument_list (identifier_label) identifier_label )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ofs) identifier_ofs )attribute (identifier__update_key_metadata) identifier__update_key_metadata )attribute (argument_list (identifier_key) identifier_key (dictionary (pair (string_'_creation_time') string_'_creation_time' (call (identifier_str) identifier_str (argument_list (call (attribute (identifier_datetime) identifier_datetime (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call )argument_list )call )pair )dictionary )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_key) identifier_key (identifier_set_contents_from_file) identifier_set_contents_from_file )attribute (argument_list (call (identifier_StringIO) identifier_StringIO (argument_list (string_'') string_'' )argument_list )call )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_key) identifier_key (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
this borrows too much from the internals of ofs maybe expose different parts of the api?
(module (function_definition (function_name_setup_arrow_buttons) function_name_setup_arrow_buttons (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_vsb) identifier_vsb (call (attribute (attribute (identifier_self) identifier_self (identifier_scrollarea) identifier_scrollarea )attribute (identifier_verticalScrollBar) identifier_verticalScrollBar )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_style) identifier_style (call (attribute (identifier_vsb) identifier_vsb (identifier_style) identifier_style )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_opt) identifier_opt (call (identifier_QStyleOptionSlider) identifier_QStyleOptionSlider (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_vsb) identifier_vsb (identifier_initStyleOption) identifier_initStyleOption )attribute (argument_list (identifier_opt) identifier_opt )argument_list )call )expression_statement (expression_statement (assignment (identifier_vsb_up_arrow) identifier_vsb_up_arrow (call (attribute (identifier_style) identifier_style (identifier_subControlRect) identifier_subControlRect )attribute (argument_list (attribute (identifier_QStyle) identifier_QStyle (identifier_CC_ScrollBar) identifier_CC_ScrollBar )attribute (identifier_opt) identifier_opt (attribute (identifier_QStyle) identifier_QStyle (identifier_SC_ScrollBarAddLine) identifier_SC_ScrollBarAddLine )attribute (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_up_btn) identifier_up_btn (assignment (identifier_up_btn) identifier_up_btn (call (identifier_QPushButton) identifier_QPushButton (argument_list (keyword_argument (identifier_icon) identifier_icon (call (attribute (identifier_ima) identifier_ima (identifier_icon) identifier_icon )attribute (argument_list (string_'last_edit_location') string_'last_edit_location' )argument_list )call )keyword_argument )argument_list )call )assignment )assignment )expression_statement (expression_statement (call (attribute (identifier_up_btn) identifier_up_btn (identifier_setFlat) identifier_setFlat )attribute (argument_list (True) True )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_up_btn) identifier_up_btn (identifier_setFixedHeight) identifier_setFixedHeight )attribute (argument_list (call (attribute (call (attribute (identifier_vsb_up_arrow) identifier_vsb_up_arrow (identifier_size) identifier_size )attribute (argument_list )argument_list )call (identifier_height) identifier_height )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_up_btn) identifier_up_btn (identifier_clicked) identifier_clicked )attribute (identifier_connect) identifier_connect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_go_up) identifier_go_up )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_down_btn) identifier_down_btn (call (identifier_QPushButton) identifier_QPushButton (argument_list (keyword_argument (identifier_icon) identifier_icon (call (attribute (identifier_ima) identifier_ima (identifier_icon) identifier_icon )attribute (argument_list (string_'folding.arrow_down_on') string_'folding.arrow_down_on' )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_down_btn) identifier_down_btn (identifier_setFlat) identifier_setFlat )attribute (argument_list (True) True )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_down_btn) identifier_down_btn (identifier_setFixedHeight) identifier_setFixedHeight )attribute (argument_list (call (attribute (call (attribute (identifier_vsb_up_arrow) identifier_vsb_up_arrow (identifier_size) identifier_size )attribute (argument_list )argument_list )call (identifier_height) identifier_height )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_down_btn) identifier_down_btn (identifier_clicked) identifier_clicked )attribute (identifier_connect) identifier_connect )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_go_down) identifier_go_down )attribute )argument_list )call )expression_statement (return_statement (expression_list (identifier_up_btn) identifier_up_btn (identifier_down_btn) identifier_down_btn )expression_list )return_statement )block )function_definition )module
Setup the up and down arrow buttons that are placed at the top and bottom of the scrollarea.
(module (function_definition (function_name_last_week_of_year) function_name_last_week_of_year (parameters (identifier_cls) identifier_cls (identifier_year) identifier_year )parameters (block (if_statement (comparison_operator (identifier_year) identifier_year (attribute (attribute (identifier_cls) identifier_cls (identifier_max) identifier_max )attribute (identifier_year) identifier_year )attribute )comparison_operator (block (return_statement (attribute (identifier_cls) identifier_cls (identifier_max) identifier_max )attribute )return_statement )block )if_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (binary_operator (identifier_year) identifier_year (integer_1) integer_1 )binary_operator (integer_0) integer_0 )argument_list )call )return_statement )block )function_definition )module
Return the last week of the given year. This week with either have week-number 52 or 53. This will be the same as Week(year+1, 0), but will even work for year 9999 where this expression would overflow. The first week of a given year is simply Week(year, 1), so there is no dedicated classmethod for that.
(module (function_definition (function_name_relative_humidity_from_dewpoint) function_name_relative_humidity_from_dewpoint (parameters (identifier_temperature) identifier_temperature (identifier_dewpt) identifier_dewpt )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_e) identifier_e (call (identifier_saturation_vapor_pressure) identifier_saturation_vapor_pressure (argument_list (identifier_dewpt) identifier_dewpt )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_e_s) identifier_e_s (call (identifier_saturation_vapor_pressure) identifier_saturation_vapor_pressure (argument_list (identifier_temperature) identifier_temperature )argument_list )call )assignment )expression_statement (return_statement (parenthesized_expression (binary_operator (identifier_e) identifier_e (identifier_e_s) identifier_e_s )binary_operator )parenthesized_expression )return_statement )block )function_definition )module
r"""Calculate the relative humidity. Uses temperature and dewpoint in celsius to calculate relative humidity using the ratio of vapor pressure to saturation vapor pressures. Parameters ---------- temperature : `pint.Quantity` The temperature dew point : `pint.Quantity` The dew point temperature Returns ------- `pint.Quantity` The relative humidity See Also -------- saturation_vapor_pressure
(module (function_definition (function_name_cleanup) function_name_cleanup (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_process) identifier_process )attribute (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (if_statement (comparison_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_process) identifier_process )attribute (identifier_poll) identifier_poll )attribute (argument_list )argument_list )call (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_"Sending TERM to %d") string_"Sending TERM to %d" (attribute (attribute (identifier_self) identifier_self (identifier_process) identifier_process )attribute (identifier_pid) identifier_pid )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_process) identifier_process )attribute (identifier_terminate) identifier_terminate )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_start) identifier_start (call (attribute (identifier_time) identifier_time (identifier_clock) identifier_clock )attribute (argument_list )argument_list )call )assignment )expression_statement (while_statement (comparison_operator (binary_operator (call (attribute (identifier_time) identifier_time (identifier_clock) identifier_clock )attribute (argument_list )argument_list )call (identifier_start) identifier_start )binary_operator (float_1.0) float_1.0 )comparison_operator (block (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (float_0.05) float_0.05 )argument_list )call )expression_statement (if_statement (comparison_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_process) identifier_process )attribute (identifier_poll) identifier_poll )attribute (argument_list )argument_list )call (None) None )comparison_operator (block (break_statement )break_statement )block )if_statement )block (else_clause (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_"Sending KILL to %d") string_"Sending KILL to %d" (attribute (attribute (identifier_self) identifier_self (identifier_process) identifier_process )attribute (identifier_pid) identifier_pid )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_process) identifier_process )attribute (identifier_kill) identifier_kill )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )while_statement )block )if_statement (assert_statement (comparison_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_process) identifier_process )attribute (identifier_poll) identifier_poll )attribute (argument_list )argument_list )call (None) None )comparison_operator )assert_statement )block )function_definition )module
Clean up, making sure the process is stopped before we pack up and go home.
(module (function_definition (function_name__stream_search) function_name__stream_search (parameters (identifier_self) identifier_self (identifier_query) identifier_query )parameters (block (for_statement (identifier_doc) identifier_doc (call (attribute (attribute (identifier_self) identifier_self (identifier_solr) identifier_solr )attribute (identifier_search) identifier_search )attribute (argument_list (identifier_query) identifier_query (keyword_argument (identifier_rows) identifier_rows (integer_100000000) integer_100000000 )keyword_argument )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_unique_key) identifier_unique_key )attribute (string_"_id") string_"_id" )comparison_operator (block (expression_statement (assignment (subscript (identifier_doc) identifier_doc (string_"_id") string_"_id" )subscript (call (attribute (identifier_doc) identifier_doc (identifier_pop) identifier_pop )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_unique_key) identifier_unique_key )attribute )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (yield (identifier_doc) identifier_doc )yield )expression_statement )block )for_statement )block )function_definition )module
Helper method for iterating over Solr search results.
(module (function_definition (function_name_qsize) function_name_qsize (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_connected) identifier_connected )attribute )not_operator (block (raise_statement (call (identifier_QueueNotConnectedError) identifier_QueueNotConnectedError (argument_list (string_"Queue is not Connected") string_"Queue is not Connected" )argument_list )call )raise_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_size) identifier_size (call (attribute (attribute (identifier_self) identifier_self (identifier___db) identifier___db )attribute (identifier_llen) identifier_llen )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__key) identifier__key )attribute )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (attribute (identifier_redis) identifier_redis (identifier_ConnectionError) identifier_ConnectionError )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (attribute (identifier_redis) identifier_redis (identifier_ConnectionError) identifier_ConnectionError )attribute (argument_list (call (identifier_repr) identifier_repr (argument_list (identifier_e) identifier_e )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (identifier_size) identifier_size )return_statement )block )function_definition )module
Returns the number of items currently in the queue :return: Integer containing size of the queue :exception: ConnectionError if queue is not connected
(module (function_definition (function_name_p) function_name_p (parameters (identifier_i) identifier_i (identifier_sample_size) identifier_sample_size (identifier_weights) identifier_weights )parameters (block (expression_statement (assignment (identifier_weight_i) identifier_weight_i (subscript (identifier_weights) identifier_weights (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (assignment (identifier_weights_sum) identifier_weights_sum (call (identifier_sum) identifier_sum (argument_list (identifier_weights) identifier_weights )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_other_weights) identifier_other_weights (call (identifier_list) identifier_list (argument_list (identifier_weights) identifier_weights )argument_list )call )assignment )expression_statement (delete_statement (subscript (identifier_other_weights) identifier_other_weights (identifier_i) identifier_i )subscript )delete_statement (expression_statement (assignment (identifier_probability_of_i) identifier_probability_of_i (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_picks) identifier_picks (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (identifier_sample_size) identifier_sample_size )argument_list )call (block (expression_statement (assignment (identifier_permutations) identifier_permutations (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_itertools) identifier_itertools (identifier_permutations) identifier_permutations )attribute (argument_list (identifier_other_weights) identifier_other_weights (identifier_picks) identifier_picks )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_permutation_probabilities) identifier_permutation_probabilities (list )list )assignment )expression_statement (for_statement (identifier_permutation) identifier_permutation (identifier_permutations) identifier_permutations (block (expression_statement (assignment (identifier_pick_probabilities) identifier_pick_probabilities (list )list )assignment )expression_statement (expression_statement (assignment (identifier_pick_weight_sum) identifier_pick_weight_sum (identifier_weights_sum) identifier_weights_sum )assignment )expression_statement (for_statement (identifier_pick) identifier_pick (identifier_permutation) identifier_permutation (block (expression_statement (call (attribute (identifier_pick_probabilities) identifier_pick_probabilities (identifier_append) identifier_append )attribute (argument_list (binary_operator (identifier_pick) identifier_pick (identifier_pick_weight_sum) identifier_pick_weight_sum )binary_operator )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_pick_weight_sum) identifier_pick_weight_sum (identifier_pick) identifier_pick )augmented_assignment )expression_statement )block )for_statement (expression_statement (augmented_assignment (identifier_pick_probabilities) identifier_pick_probabilities (list (binary_operator (identifier_weight_i) identifier_weight_i (identifier_pick_weight_sum) identifier_pick_weight_sum )binary_operator )list )augmented_assignment )expression_statement (expression_statement (assignment (identifier_permutation_probability) identifier_permutation_probability (call (identifier_reduce) identifier_reduce (argument_list (lambda (lambda_parameters (identifier_x) identifier_x (identifier_y) identifier_y )lambda_parameters (binary_operator (identifier_x) identifier_x (identifier_y) identifier_y )binary_operator )lambda (identifier_pick_probabilities) identifier_pick_probabilities )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_permutation_probabilities) identifier_permutation_probabilities (identifier_append) identifier_append )attribute (argument_list (identifier_permutation_probability) identifier_permutation_probability )argument_list )call )expression_statement )block )for_statement (expression_statement (augmented_assignment (identifier_probability_of_i) identifier_probability_of_i (call (identifier_sum) identifier_sum (argument_list (identifier_permutation_probabilities) identifier_permutation_probabilities )argument_list )call )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_probability_of_i) identifier_probability_of_i )return_statement )block )function_definition )module
Given a weighted set and sample size return the probabilty that the weight `i` will be present in the sample. Created to test the output of the `SomeOf` maker class. The math was provided by Andy Blackshaw - thank you dad :)
(module (function_definition (function_name__order_by_is_valid_or_none) function_name__order_by_is_valid_or_none (parameters (identifier_self) identifier_self (identifier_params) identifier_params )parameters (block (if_statement (boolean_operator (not_operator (comparison_operator (string_"order_by") string_"order_by" (identifier_params) identifier_params )comparison_operator )not_operator (not_operator (subscript (identifier_params) identifier_params (string_"order_by") string_"order_by" )subscript )not_operator )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (function_definition (function_name__order_by_dict_is_not_well_formed) function_name__order_by_dict_is_not_well_formed (parameters (identifier_d) identifier_d )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_d) identifier_d (identifier_dict) identifier_dict )argument_list )call )not_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (string_"property_name") string_"property_name" (identifier_d) identifier_d )comparison_operator (subscript (identifier_d) identifier_d (string_"property_name") string_"property_name" )subscript )boolean_operator (block (if_statement (boolean_operator (comparison_operator (string_"direction") string_"direction" (identifier_d) identifier_d )comparison_operator (not_operator (call (attribute (identifier_direction) identifier_direction (identifier_is_valid_direction) identifier_is_valid_direction )attribute (argument_list (subscript (identifier_d) identifier_d (string_"direction") string_"direction" )subscript )argument_list )call )not_operator )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (for_statement (identifier_k) identifier_k (identifier_d) identifier_d (block (if_statement (boolean_operator (comparison_operator (identifier_k) identifier_k (string_"property_name") string_"property_name" )comparison_operator (comparison_operator (identifier_k) identifier_k (string_"direction") string_"direction" )comparison_operator )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement (return_statement (False) False )return_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition (expression_statement (assignment (identifier_order_by_list) identifier_order_by_list (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (subscript (identifier_params) identifier_params (string_"order_by") string_"order_by" )subscript )argument_list )call )assignment )expression_statement (for_statement (identifier_order_by) identifier_order_by (identifier_order_by_list) identifier_order_by_list (block (if_statement (call (identifier__order_by_dict_is_not_well_formed) identifier__order_by_dict_is_not_well_formed (argument_list (identifier_order_by) identifier_order_by )argument_list )call (block (return_statement (False) False )return_statement )block )if_statement )block )for_statement (if_statement (boolean_operator (not_operator (comparison_operator (string_"group_by") string_"group_by" (identifier_params) identifier_params )comparison_operator )not_operator (not_operator (subscript (identifier_params) identifier_params (string_"group_by") string_"group_by" )subscript )not_operator )boolean_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Validates that a given order_by has proper syntax. :param params: Query params. :return: Returns True if either no order_by is present, or if the order_by is well-formed.
(module (function_definition (function_name_after_websocket) function_name_after_websocket (parameters (identifier_self) identifier_self (typed_parameter (identifier_func) identifier_func (type (identifier_Callable) identifier_Callable )type )typed_parameter (typed_default_parameter (identifier_name) identifier_name (type (identifier_AppOrBlueprintKey) identifier_AppOrBlueprintKey )type (None) None )typed_default_parameter )parameters (type (identifier_Callable) identifier_Callable )type (block (expression_statement (assignment (identifier_handler) identifier_handler (call (identifier_ensure_coroutine) identifier_ensure_coroutine (argument_list (identifier_func) identifier_func )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_after_websocket_funcs) identifier_after_websocket_funcs )attribute (identifier_name) identifier_name )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_handler) identifier_handler )argument_list )call )expression_statement (return_statement (identifier_func) identifier_func )return_statement )block )function_definition )module
Add an after websocket function. This is designed to be used as a decorator. An example usage, .. code-block:: python @app.after_websocket def func(response): return response Arguments: func: The after websocket function itself. name: Optional blueprint key name.
(module (function_definition (function_name_get_words) function_name_get_words (parameters (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_words) identifier_words (call (attribute (identifier_re) identifier_re (identifier_findall) identifier_findall )attribute (argument_list (string_r"\w+") string_r"\w+" (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"> Words: '{0}'") string_"> Words: '{0}'" (identifier_format) identifier_format )attribute (argument_list (call (attribute (string_", ") string_", " (identifier_join) identifier_join )attribute (argument_list (identifier_words) identifier_words )argument_list )call )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_words) identifier_words )return_statement )block )function_definition )module
Extracts the words from given string. Usage:: >>> get_words("Users are: John Doe, Jane Doe, Z6PO.") [u'Users', u'are', u'John', u'Doe', u'Jane', u'Doe', u'Z6PO'] :param data: Data to extract words from. :type data: unicode :return: Words. :rtype: list
(module (function_definition (function_name_cache_key_exist) function_name_cache_key_exist (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (expression_statement (assignment (identifier_key_exist) identifier_key_exist (conditional_expression (True) True (call (attribute (identifier_cache) identifier_cache (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key )argument_list )call (False) False )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_status) identifier_status (conditional_expression (integer_200) integer_200 (identifier_key_exist) identifier_key_exist (integer_404) integer_404 )conditional_expression )assignment )expression_statement (return_statement (call (identifier_json_success) identifier_json_success (argument_list (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (dictionary (pair (string_'key_exist') string_'key_exist' (identifier_key_exist) identifier_key_exist )pair )dictionary )argument_list )call (keyword_argument (identifier_status) identifier_status (identifier_status) identifier_status )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns if a key from cache exist
(module (function_definition (function_name_cached_read) function_name_cached_read (parameters (identifier_self) identifier_self (identifier_kind) identifier_kind )parameters (block (if_statement (not_operator (comparison_operator (identifier_kind) identifier_kind (attribute (identifier_self) identifier_self (identifier_cache) identifier_cache )attribute )comparison_operator )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_pull_stats) identifier_pull_stats )attribute (argument_list (identifier_kind) identifier_kind )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (binary_operator (call (attribute (identifier_self) identifier_self (identifier_epochnow) identifier_epochnow )attribute (argument_list )argument_list )call (subscript (subscript (attribute (identifier_self) identifier_self (identifier_cache) identifier_cache )attribute (identifier_kind) identifier_kind )subscript (string_'lastcall') string_'lastcall' )subscript )binary_operator (attribute (identifier_self) identifier_self (identifier_cache_timeout) identifier_cache_timeout )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_pull_stats) identifier_pull_stats )attribute (argument_list (identifier_kind) identifier_kind )argument_list )call )expression_statement )block )if_statement (return_statement (subscript (subscript (attribute (identifier_self) identifier_self (identifier_cache) identifier_cache )attribute (identifier_kind) identifier_kind )subscript (string_'lastvalue') string_'lastvalue' )subscript )return_statement )block )function_definition )module
Cache stats calls to prevent hammering the API
(module (function_definition (function_name_post) function_name_post (parameters (identifier_self) identifier_self (typed_parameter (identifier_url_path) identifier_url_path (type (identifier_str) identifier_str )type )typed_parameter (typed_default_parameter (identifier_params) identifier_params (type (identifier_dict) identifier_dict )type (None) None )typed_default_parameter (typed_default_parameter (identifier_rtype) identifier_rtype (type (identifier_str) identifier_str )type (identifier_RESPONSE_JSON) identifier_RESPONSE_JSON )typed_default_parameter (typed_default_parameter (identifier_schema) identifier_schema (type (identifier_dict) identifier_dict )type (None) None )typed_default_parameter )parameters (type (identifier_Any) identifier_Any )type (block (if_statement (comparison_operator (identifier_params) identifier_params (None) None )comparison_operator (block (expression_statement (assignment (identifier_params) identifier_params (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_client) identifier_client (call (identifier_API) identifier_API (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_endpoint) identifier_endpoint )attribute (identifier_conn_handler) identifier_conn_handler )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (attribute (identifier_self) identifier_self (identifier_proxy) identifier_proxy )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (await (call (attribute (identifier_client) identifier_client (identifier_requests_post) identifier_requests_post )attribute (argument_list (identifier_url_path) identifier_url_path (dictionary_splat (identifier_params) identifier_params )dictionary_splat )argument_list )call )await )assignment )expression_statement (if_statement (comparison_operator (identifier_schema) identifier_schema (None) None )comparison_operator (block (expression_statement (await (call (identifier_parse_response) identifier_parse_response (argument_list (identifier_response) identifier_response (identifier_schema) identifier_schema )argument_list )call )await )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_rtype) identifier_rtype (identifier_RESPONSE_AIOHTTP) identifier_RESPONSE_AIOHTTP )comparison_operator (block (return_statement (identifier_response) identifier_response )return_statement )block (elif_clause (comparison_operator (identifier_rtype) identifier_rtype (identifier_RESPONSE_TEXT) identifier_RESPONSE_TEXT )comparison_operator (block (return_statement (await (call (attribute (identifier_response) identifier_response (identifier_text) identifier_text )attribute (argument_list )argument_list )call )await )return_statement )block )elif_clause (elif_clause (comparison_operator (identifier_rtype) identifier_rtype (identifier_RESPONSE_JSON) identifier_RESPONSE_JSON )comparison_operator (block (return_statement (await (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call )await )return_statement )block )elif_clause )if_statement )block )function_definition )module
POST request on self.endpoint + url_path :param url_path: Url encoded path following the endpoint :param params: Url query string parameters dictionary :param rtype: Response type :param schema: Json Schema to validate response (optional, default None) :return:
(module (function_definition (function_name__prep_fields_param) function_name__prep_fields_param (parameters (identifier_fields) identifier_fields )parameters (block (expression_statement (assignment (identifier_store_samples) identifier_store_samples (False) False )assignment )expression_statement (if_statement (comparison_operator (identifier_fields) identifier_fields (None) None )comparison_operator (block (return_statement (expression_list (True) True (None) None )expression_list )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_fields) identifier_fields (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_fields) identifier_fields (list (identifier_fields) identifier_fields )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_fields) identifier_fields (call (identifier_list) identifier_list (argument_list (identifier_fields) identifier_fields )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (string_'samples') string_'samples' (identifier_fields) identifier_fields )comparison_operator (block (expression_statement (call (attribute (identifier_fields) identifier_fields (identifier_remove) identifier_remove )attribute (argument_list (string_'samples') string_'samples' )argument_list )call )expression_statement (expression_statement (assignment (identifier_store_samples) identifier_store_samples (True) True )assignment )expression_statement )block (elif_clause (comparison_operator (string_'*') string_'*' (identifier_fields) identifier_fields )comparison_operator (block (expression_statement (assignment (identifier_store_samples) identifier_store_samples (True) True )assignment )expression_statement )block )elif_clause )if_statement (return_statement (expression_list (identifier_store_samples) identifier_store_samples (identifier_fields) identifier_fields )expression_list )return_statement )block )function_definition )module
Prepare the `fields` parameter, and determine whether or not to store samples.
(module (function_definition (function_name_generous_parse_uri) function_name_generous_parse_uri (parameters (identifier_uri) identifier_uri )parameters (block (expression_statement (assignment (identifier_parse_result) identifier_parse_result (call (identifier_urlparse) identifier_urlparse (argument_list (identifier_uri) identifier_uri )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_parse_result) identifier_parse_result (identifier_scheme) identifier_scheme )attribute (string_'') string_'' )comparison_operator (block (expression_statement (assignment (identifier_abspath) identifier_abspath (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (attribute (identifier_parse_result) identifier_parse_result (identifier_path) identifier_path )attribute )argument_list )call )assignment )expression_statement (if_statement (identifier_IS_WINDOWS) identifier_IS_WINDOWS (block (expression_statement (assignment (identifier_abspath) identifier_abspath (call (identifier_windows_to_unix_path) identifier_windows_to_unix_path (argument_list (identifier_abspath) identifier_abspath )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_fixed_uri) identifier_fixed_uri (call (attribute (string_"file://{}") string_"file://{}" (identifier_format) identifier_format )attribute (argument_list (identifier_abspath) identifier_abspath )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_parse_result) identifier_parse_result (call (identifier_urlparse) identifier_urlparse (argument_list (identifier_fixed_uri) identifier_fixed_uri )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_parse_result) identifier_parse_result )return_statement )block )function_definition )module
Return a urlparse.ParseResult object with the results of parsing the given URI. This has the same properties as the result of parse_uri. When passed a relative path, it determines the absolute path, sets the scheme to file, the netloc to localhost and returns a parse of the result.
(module (function_definition (function_name_main) function_name_main (parameters (default_parameter (identifier_args) identifier_args (None) None )default_parameter )parameters (block (try_statement (block (import_from_statement (dotted_name (identifier_psyplot_gui) identifier_psyplot_gui )dotted_name (aliased_import (dotted_name (identifier_get_parser) identifier_get_parser )dotted_name (identifier__get_parser) identifier__get_parser )aliased_import )import_from_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_'Failed to import gui') string_'Failed to import gui' (keyword_argument (identifier_exc_info) identifier_exc_info (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_parser) identifier_parser (call (identifier_get_parser) identifier_get_parser (argument_list (keyword_argument (identifier_create) identifier_create (False) False )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_update_arg) identifier_update_arg )attribute (argument_list (string_'output') string_'output' (keyword_argument (identifier_required) identifier_required (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_create_arguments) identifier_create_arguments )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_parse2func) identifier_parse2func )attribute (argument_list (identifier_args) identifier_args )argument_list )call )expression_statement )block )except_clause (else_clause (block (expression_statement (assignment (identifier_parser) identifier_parser (call (identifier__get_parser) identifier__get_parser (argument_list (keyword_argument (identifier_create) identifier_create (False) False )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_create_arguments) identifier_create_arguments )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_parse_known2func) identifier_parse_known2func )attribute (argument_list (identifier_args) identifier_args )argument_list )call )expression_statement )block )else_clause )try_statement )block )function_definition )module
Main function for usage of psyplot from the command line This function creates a parser that parses command lines to the :func:`make_plot` functions or (if the ``psyplot_gui`` module is present, to the :func:`psyplot_gui.start_app` function) Returns ------- psyplot.parser.FuncArgParser The parser that has been used from the command line
(module (function_definition (function_name_remove_user) function_name_remove_user (parameters (identifier_self) identifier_self (identifier_group) identifier_group (identifier_username) identifier_username )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_lookup_id) identifier_lookup_id )attribute (argument_list (identifier_group) identifier_group )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (attribute (identifier_ldap_tools) identifier_ldap_tools (identifier_exceptions) identifier_exceptions )attribute (identifier_InvalidResult) identifier_InvalidResult )attribute (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (raise_statement (identifier_err) identifier_err (None) None )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_operation) identifier_operation (dictionary (pair (string_'memberUid') string_'memberUid' (list (tuple (attribute (identifier_ldap3) identifier_ldap3 (identifier_MODIFY_DELETE) identifier_MODIFY_DELETE )attribute (list (identifier_username) identifier_username )list )tuple )list )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_modify) identifier_modify )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier___distinguished_name) identifier___distinguished_name )attribute (argument_list (identifier_group) identifier_group )argument_list )call (identifier_operation) identifier_operation )argument_list )call )expression_statement )block )function_definition )module
Remove a user from the specified LDAP group. Args: group: Name of group to update username: Username of user to remove Raises: ldap_tools.exceptions.InvalidResult: Results of the query were invalid. The actual exception raised inherits from InvalidResult. See #lookup_id for more info.
(module (function_definition (function_name_create_new_values) function_name_create_new_values (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_model) identifier_model (attribute (attribute (identifier_self) identifier_self (identifier_queryset) identifier_queryset )attribute (identifier_model) identifier_model )attribute )assignment )expression_statement (expression_statement (assignment (identifier_pks) identifier_pks (list )list )assignment )expression_statement (expression_statement (assignment (identifier_extra_create_kwargs) identifier_extra_create_kwargs (call (attribute (identifier_self) identifier_self (identifier_extra_create_kwargs) identifier_extra_create_kwargs )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_value) identifier_value (attribute (identifier_self) identifier_self (identifier__new_values) identifier__new_values )attribute (block (expression_statement (assignment (identifier_create_kwargs) identifier_create_kwargs (dictionary (pair (attribute (identifier_self) identifier_self (identifier_create_field) identifier_create_field )attribute (identifier_value) identifier_value )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (identifier_create_kwargs) identifier_create_kwargs (identifier_update) identifier_update )attribute (argument_list (identifier_extra_create_kwargs) identifier_extra_create_kwargs )argument_list )call )expression_statement (expression_statement (assignment (identifier_new_item) identifier_new_item (call (attribute (identifier_self) identifier_self (identifier_create_item) identifier_create_item )attribute (argument_list (dictionary_splat (identifier_create_kwargs) identifier_create_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_pks) identifier_pks (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_new_item) identifier_new_item (identifier_pk) identifier_pk )attribute )argument_list )call )expression_statement )block )for_statement (return_statement (call (attribute (attribute (identifier_model) identifier_model (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_pk__in) identifier_pk__in (identifier_pks) identifier_pks )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Create values created by the user input. Return the model instances QS.
(module (function_definition (function_name_get_temperature_from_humidity) function_name_get_temperature_from_humidity (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__init_humidity) identifier__init_humidity )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_temp) identifier_temp (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (attribute (identifier_self) identifier_self (identifier__humidity) identifier__humidity )attribute (identifier_humidityRead) identifier_humidityRead )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (parenthesized_expression (subscript (identifier_data) identifier_data (integer_2) integer_2 )subscript )parenthesized_expression (block (expression_statement (assignment (identifier_temp) identifier_temp (subscript (identifier_data) identifier_data (integer_3) integer_3 )subscript )assignment )expression_statement )block )if_statement (return_statement (identifier_temp) identifier_temp )return_statement )block )function_definition )module
Returns the temperature in Celsius from the humidity sensor
(module (function_definition (function_name_count_base_units) function_name_count_base_units (parameters (identifier_units) identifier_units )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_unit) identifier_unit (identifier_units) identifier_units (block (expression_statement (assignment (pattern_list (identifier_factor) identifier_factor (identifier_base_unit) identifier_base_unit )pattern_list (call (identifier_get_conversion_factor) identifier_get_conversion_factor (argument_list (identifier_unit) identifier_unit )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_setdefault) identifier_setdefault )attribute (argument_list (identifier_base_unit) identifier_base_unit (integer_0) integer_0 )argument_list )call )expression_statement (expression_statement (augmented_assignment (subscript (identifier_ret) identifier_ret (identifier_base_unit) identifier_base_unit )subscript (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Returns a dict mapping names of base units to how many times they appear in the given iterable of units. Effectively this counts how many length units you have, how many time units, and so forth.
(module (function_definition (function_name_read) function_name_read (parameters (identifier_self) identifier_self (identifier_file_path) identifier_file_path )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call )not_operator (block (raise_statement (call (identifier_InvalidZoneinfoFile) identifier_InvalidZoneinfoFile (argument_list (string_"The tzinfo file does not exist") string_"The tzinfo file does not exist" )argument_list )call )raise_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_file_path) identifier_file_path (string_"rb") string_"rb" )argument_list )call (as_pattern_target (identifier_fd) identifier_fd )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__parse) identifier__parse )attribute (argument_list (identifier_fd) identifier_fd )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Read a zoneinfo structure from the given path. :param file_path: The path of a zoneinfo file.
(module (function_definition (function_name_install_hooks) function_name_install_hooks (parameters )parameters (block (if_statement (identifier_PY3) identifier_PY3 (block (return_statement )return_statement )block )if_statement (expression_statement (call (identifier_install_aliases) identifier_install_aliases (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_flog) identifier_flog (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_'sys.meta_path was: {0}') string_'sys.meta_path was: {0}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_sys) identifier_sys (identifier_meta_path) identifier_meta_path )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_flog) identifier_flog (identifier_debug) identifier_debug )attribute (argument_list (string_'Installing hooks ...') string_'Installing hooks ...' )argument_list )call )expression_statement (expression_statement (assignment (identifier_newhook) identifier_newhook (call (identifier_RenameImport) identifier_RenameImport (argument_list (identifier_RENAMES) identifier_RENAMES )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (identifier_detect_hooks) identifier_detect_hooks (argument_list )argument_list )call )not_operator (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_meta_path) identifier_meta_path )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_newhook) identifier_newhook )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_flog) identifier_flog (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_'sys.meta_path is now: {0}') string_'sys.meta_path is now: {0}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_sys) identifier_sys (identifier_meta_path) identifier_meta_path )attribute )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
This function installs the future.standard_library import hook into sys.meta_path.
(module (function_definition (function_name_generate) function_name_generate (parameters (identifier_self) identifier_self (identifier_output_dir) identifier_output_dir (identifier_work) identifier_work (identifier_ngrams) identifier_ngrams (identifier_labels) identifier_labels (identifier_minus_ngrams) identifier_minus_ngrams )parameters (block (expression_statement (assignment (identifier_template) identifier_template (call (attribute (identifier_self) identifier_self (identifier__get_template) identifier__get_template )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_colours) identifier_colours (call (identifier_generate_colours) identifier_generate_colours (argument_list (call (identifier_len) identifier_len (argument_list (identifier_ngrams) identifier_ngrams )argument_list )call )argument_list )call )assignment )expression_statement (for_statement (identifier_siglum) identifier_siglum (call (attribute (attribute (identifier_self) identifier_self (identifier__corpus) identifier__corpus )attribute (identifier_get_sigla) identifier_get_sigla )attribute (argument_list (identifier_work) identifier_work )argument_list )call (block (expression_statement (assignment (identifier_ngram_data) identifier_ngram_data (call (identifier_zip) identifier_zip (argument_list (identifier_labels) identifier_labels (identifier_ngrams) identifier_ngrams )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_content) identifier_content (call (attribute (identifier_self) identifier_self (identifier__generate_base) identifier__generate_base )attribute (argument_list (identifier_work) identifier_work (identifier_siglum) identifier_siglum )argument_list )call )assignment )expression_statement (for_statement (identifier_ngrams_group) identifier_ngrams_group (identifier_ngrams) identifier_ngrams (block (expression_statement (assignment (identifier_content) identifier_content (call (attribute (identifier_self) identifier_self (identifier__highlight) identifier__highlight )attribute (argument_list (identifier_content) identifier_content (identifier_ngrams_group) identifier_ngrams_group (True) True )argument_list )call )assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_content) identifier_content (call (attribute (identifier_self) identifier_self (identifier__highlight) identifier__highlight )attribute (argument_list (identifier_content) identifier_content (identifier_minus_ngrams) identifier_minus_ngrams (False) False )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__ngrams_count) identifier__ngrams_count )attribute (integer_1) integer_1 )assignment )expression_statement (expression_statement (assignment (identifier_content) identifier_content (call (attribute (identifier_self) identifier_self (identifier__format_content) identifier__format_content )attribute (argument_list (identifier_content) identifier_content )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_report_name) identifier_report_name (call (attribute (string_'{}-{}.html') string_'{}-{}.html' (identifier_format) identifier_format )attribute (argument_list (identifier_work) identifier_work (identifier_siglum) identifier_siglum )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__write) identifier__write )attribute (argument_list (identifier_work) identifier_work (identifier_siglum) identifier_siglum (identifier_content) identifier_content (identifier_output_dir) identifier_output_dir (identifier_report_name) identifier_report_name (identifier_template) identifier_template (keyword_argument (identifier_ngram_data) identifier_ngram_data (identifier_ngram_data) identifier_ngram_data )keyword_argument (keyword_argument (identifier_minus_ngrams) identifier_minus_ngrams (identifier_minus_ngrams) identifier_minus_ngrams )keyword_argument (keyword_argument (identifier_colours) identifier_colours (identifier_colours) identifier_colours )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Generates HTML reports for each witness to `work`, showing its text with the n-grams in `ngrams` highlighted. Any n-grams in `minus_ngrams` have any highlighting of them (or subsets of them) removed. :param output_dir: directory to write report to :type output_dir: `str` :param work: name of work to highlight :type work: `str` :param ngrams: groups of n-grams to highlight :type ngrams: `list` of `list` of `str` :param labels: labels for the groups of n-grams :type labels: `list` of `str` :param minus_ngrams: n-grams to remove highlighting from :type minus_ngrams: `list` of `str` :rtype: `str`
(module (function_definition (function_name_is_archlinux) function_name_is_archlinux (parameters )parameters (block (if_statement (comparison_operator (call (attribute (call (attribute (identifier_platform) identifier_platform (identifier_system) identifier_system )attribute (argument_list )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (string_'linux') string_'linux' )comparison_operator (block (if_statement (comparison_operator (call (attribute (identifier_platform) identifier_platform (identifier_linux_distribution) identifier_linux_distribution )attribute (argument_list )argument_list )call (tuple (string_'') string_'' (string_'') string_'' (string_'') string_'' )tuple )comparison_operator (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (string_'/etc/arch-release') string_'/etc/arch-release' )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement )block )if_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
return True if the current distribution is running on debian like OS.
(module (function_definition (function_name__less_or_close) function_name__less_or_close (parameters (identifier_a) identifier_a (identifier_value) identifier_value (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (return_statement (binary_operator (parenthesized_expression (comparison_operator (identifier_a) identifier_a (identifier_value) identifier_value )comparison_operator )parenthesized_expression (call (attribute (identifier_np) identifier_np (identifier_isclose) identifier_isclose )attribute (argument_list (identifier_a) identifier_a (identifier_value) identifier_value (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )binary_operator )return_statement )block )function_definition )module
r"""Compare values for less or close to boolean masks. Returns a boolean mask for values less than or equal to a target within a specified absolute or relative tolerance (as in :func:`numpy.isclose`). Parameters ---------- a : array-like Array of values to be compared value : float Comparison value Returns ------- array-like Boolean array where values are less than or nearly equal to value.
(module (function_definition (function_name_get_parameter_definitions) function_name_get_parameter_definitions (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_output) identifier_output (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_var_name) identifier_var_name (identifier_attrs) identifier_attrs )pattern_list (call (attribute (call (attribute (identifier_self) identifier_self (identifier_defined_variables) identifier_defined_variables )attribute (argument_list )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_var_type) identifier_var_type (call (attribute (identifier_attrs) identifier_attrs (identifier_get) identifier_get )attribute (argument_list (string_"type") string_"type" )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_var_type) identifier_var_type (identifier_CFNType) identifier_CFNType )argument_list )call (block (expression_statement (assignment (identifier_cfn_attrs) identifier_cfn_attrs (call (attribute (identifier_copy) identifier_copy (identifier_deepcopy) identifier_deepcopy )attribute (argument_list (identifier_attrs) identifier_attrs )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_cfn_attrs) identifier_cfn_attrs (string_"type") string_"type" )subscript (attribute (identifier_var_type) identifier_var_type (identifier_parameter_type) identifier_parameter_type )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_output) identifier_output (identifier_var_name) identifier_var_name )subscript (identifier_cfn_attrs) identifier_cfn_attrs )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_output) identifier_output )return_statement )block )function_definition )module
Get the parameter definitions to submit to CloudFormation. Any variable definition whose `type` is an instance of `CFNType` will be returned as a CloudFormation Parameter. Returns: dict: parameter definitions. Keys are parameter names, the values are dicts containing key/values for various parameter properties.
(module (function_definition (function_name_create_worker_build) function_name_create_worker_build (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_missing) identifier_missing (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_required) identifier_required (tuple (string_'platform') string_'platform' (string_'release') string_'release' (string_'arrangement_version') string_'arrangement_version' )tuple (block (if_statement (not_operator (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (identifier_required) identifier_required )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_missing) identifier_missing (identifier_add) identifier_add )attribute (argument_list (identifier_required) identifier_required )argument_list )call )expression_statement )block )if_statement )block )for_statement (if_statement (identifier_missing) identifier_missing (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Worker build missing required parameters: %s") string_"Worker build missing required parameters: %s" (identifier_missing) identifier_missing )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'platforms') string_'platforms' )argument_list )call (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Worker build called with unwanted platforms param") string_"Worker build called with unwanted platforms param" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_arrangement_version) identifier_arrangement_version (subscript (identifier_kwargs) identifier_kwargs (string_'arrangement_version') string_'arrangement_version' )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'inner_template') string_'inner_template' (call (attribute (identifier_WORKER_INNER_TEMPLATE) identifier_WORKER_INNER_TEMPLATE (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_arrangement_version) identifier_arrangement_version (identifier_arrangement_version) identifier_arrangement_version )keyword_argument )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'outer_template') string_'outer_template' (identifier_WORKER_OUTER_TEMPLATE) identifier_WORKER_OUTER_TEMPLATE )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'customize_conf') string_'customize_conf' (identifier_WORKER_CUSTOMIZE_CONF) identifier_WORKER_CUSTOMIZE_CONF )argument_list )call )expression_statement (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'build_type') string_'build_type' )subscript (identifier_BUILD_TYPE_WORKER) identifier_BUILD_TYPE_WORKER )assignment )expression_statement (try_statement (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__do_create_prod_build) identifier__do_create_prod_build )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_IOError) identifier_IOError (as_pattern_target (identifier_ex) identifier_ex )as_pattern_target )as_pattern (block (if_statement (comparison_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (attribute (identifier_ex) identifier_ex (identifier_filename) identifier_filename )attribute )argument_list )call (subscript (identifier_kwargs) identifier_kwargs (string_'inner_template') string_'inner_template' )subscript )comparison_operator (block (raise_statement (call (identifier_OsbsValidationException) identifier_OsbsValidationException (argument_list (binary_operator (string_"worker invalid arrangement_version %s") string_"worker invalid arrangement_version %s" (identifier_arrangement_version) identifier_arrangement_version )binary_operator )argument_list )call )raise_statement )block )if_statement (raise_statement )raise_statement )block )except_clause )try_statement )block )function_definition )module
Create a worker build Pass through method to create_prod_build with the following modifications: - platform param is required - release param is required - arrangement_version param is required, which is used to select which worker_inner:n.json template to use - inner template set to worker_inner:n.json if not set - outer template set to worker.json if not set - customize configuration set to worker_customize.json if not set :return: BuildResponse instance
(module (function_definition (function_name_calculate_md5) function_name_calculate_md5 (parameters (identifier_fileobject) identifier_fileobject (default_parameter (identifier_size) identifier_size (binary_operator (integer_2) integer_2 (integer_16) integer_16 )binary_operator )default_parameter )parameters (block (expression_statement (call (attribute (identifier_fileobject) identifier_fileobject (identifier_seek) identifier_seek )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (expression_statement (assignment (identifier_md5) identifier_md5 (call (attribute (identifier_hashlib) identifier_hashlib (identifier_md5) identifier_md5 )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_data) identifier_data (call (identifier_iter) identifier_iter (argument_list (lambda (call (attribute (identifier_fileobject) identifier_fileobject (identifier_read) identifier_read )attribute (argument_list (identifier_size) identifier_size )argument_list )call )lambda (string_b'') string_b'' )argument_list )call (block (if_statement (not_operator (identifier_data) identifier_data )not_operator (block (break_statement )break_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute )argument_list )call (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_data) identifier_data (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_md5) identifier_md5 (identifier_update) identifier_update )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_fileobject) identifier_fileobject (identifier_seek) identifier_seek )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (return_statement (call (attribute (identifier_md5) identifier_md5 (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Utility function to calculate md5 hashes while being light on memory usage. By reading the fileobject piece by piece, we are able to process content that is larger than available memory
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self (identifier_path) identifier_path )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_path) identifier_path (string_'wb') string_'wb' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_getXML) identifier_getXML )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Write RSS content to file.
(module (function_definition (function_name_namedb_get_all_namespace_ids) function_name_namedb_get_all_namespace_ids (parameters (identifier_cur) identifier_cur )parameters (block (expression_statement (assignment (identifier_query) identifier_query (string_"SELECT namespace_id FROM namespaces WHERE op = ?;") string_"SELECT namespace_id FROM namespaces WHERE op = ?;" )assignment )expression_statement (expression_statement (assignment (identifier_args) identifier_args (tuple (identifier_NAMESPACE_READY) identifier_NAMESPACE_READY )tuple )assignment )expression_statement (expression_statement (assignment (identifier_namespace_rows) identifier_namespace_rows (call (identifier_namedb_query_execute) identifier_namedb_query_execute (argument_list (identifier_cur) identifier_cur (identifier_query) identifier_query (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ret) identifier_ret (list )list )assignment )expression_statement (for_statement (identifier_namespace_row) identifier_namespace_row (identifier_namespace_rows) identifier_namespace_rows (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_namespace_row) identifier_namespace_row (string_'namespace_id') string_'namespace_id' )subscript )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Get a list of all READY namespace IDs.
(module (function_definition (function_name_equities_sids_for_country_code) function_name_equities_sids_for_country_code (parameters (identifier_self) identifier_self (identifier_country_code) identifier_country_code )parameters (block (expression_statement (assignment (identifier_sids) identifier_sids (attribute (call (attribute (identifier_self) identifier_self (identifier__compute_asset_lifetimes) identifier__compute_asset_lifetimes )attribute (argument_list (list (identifier_country_code) identifier_country_code )list )argument_list )call (identifier_sid) identifier_sid )attribute )assignment )expression_statement (return_statement (call (identifier_tuple) identifier_tuple (argument_list (call (attribute (identifier_sids) identifier_sids (identifier_tolist) identifier_tolist )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Return all of the sids for a given country. Parameters ---------- country_code : str An ISO 3166 alpha-2 country code. Returns ------- tuple[int] The sids whose exchanges are in this country.
(module (function_definition (function_name__iter_indented_subactions) function_name__iter_indented_subactions (parameters (identifier_self) identifier_self (identifier_action) identifier_action )parameters (block (try_statement (block (expression_statement (assignment (identifier_get_subactions) identifier_get_subactions (attribute (identifier_action) identifier_action (identifier__get_subactions) identifier__get_subactions )attribute )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (pass_statement )pass_statement )block )except_clause (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__indent) identifier__indent )attribute (argument_list )argument_list )call )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_action) identifier_action (attribute (identifier_argparse) identifier_argparse (identifier__SubParsersAction) identifier__SubParsersAction )attribute )argument_list )call (block (for_statement (identifier_subaction) identifier_subaction (call (identifier_sorted) identifier_sorted (argument_list (call (identifier_get_subactions) identifier_get_subactions (argument_list )argument_list )call (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (attribute (identifier_x) identifier_x (identifier_dest) identifier_dest )attribute )lambda )keyword_argument )argument_list )call (block (expression_statement (yield (identifier_subaction) identifier_subaction )yield )expression_statement )block )for_statement )block (else_clause (block (for_statement (identifier_subaction) identifier_subaction (call (identifier_get_subactions) identifier_get_subactions (argument_list )argument_list )call (block (expression_statement (yield (identifier_subaction) identifier_subaction )yield )expression_statement )block )for_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__dedent) identifier__dedent )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )try_statement )block )function_definition )module
Sort the subcommands alphabetically
(module (function_definition (function_name_prepare_decrypter) function_name_prepare_decrypter (parameters (identifier_client) identifier_client (identifier_cdn_client) identifier_cdn_client (identifier_cdn_redirect) identifier_cdn_redirect )parameters (block (expression_statement (assignment (identifier_cdn_aes) identifier_cdn_aes (call (identifier_AESModeCTR) identifier_AESModeCTR (argument_list (keyword_argument (identifier_key) identifier_key (attribute (identifier_cdn_redirect) identifier_cdn_redirect (identifier_encryption_key) identifier_encryption_key )attribute )keyword_argument (keyword_argument (identifier_iv) identifier_iv (binary_operator (subscript (attribute (identifier_cdn_redirect) identifier_cdn_redirect (identifier_encryption_iv) identifier_encryption_iv )attribute (slice (colon) colon (integer_12) integer_12 )slice )subscript (call (identifier_bytes) identifier_bytes (argument_list (integer_4) integer_4 )argument_list )call )binary_operator )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_decrypter) identifier_decrypter (call (identifier_CdnDecrypter) identifier_CdnDecrypter (argument_list (identifier_cdn_client) identifier_cdn_client (attribute (identifier_cdn_redirect) identifier_cdn_redirect (identifier_file_token) identifier_file_token )attribute (identifier_cdn_aes) identifier_cdn_aes (attribute (identifier_cdn_redirect) identifier_cdn_redirect (identifier_cdn_file_hashes) identifier_cdn_file_hashes )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cdn_file) identifier_cdn_file (await (call (identifier_cdn_client) identifier_cdn_client (argument_list (call (identifier_GetCdnFileRequest) identifier_GetCdnFileRequest (argument_list (keyword_argument (identifier_file_token) identifier_file_token (attribute (identifier_cdn_redirect) identifier_cdn_redirect (identifier_file_token) identifier_file_token )attribute )keyword_argument (keyword_argument (identifier_offset) identifier_offset (attribute (subscript (attribute (identifier_cdn_redirect) identifier_cdn_redirect (identifier_cdn_file_hashes) identifier_cdn_file_hashes )attribute (integer_0) integer_0 )subscript (identifier_offset) identifier_offset )attribute )keyword_argument (keyword_argument (identifier_limit) identifier_limit (attribute (subscript (attribute (identifier_cdn_redirect) identifier_cdn_redirect (identifier_cdn_file_hashes) identifier_cdn_file_hashes )attribute (integer_0) integer_0 )subscript (identifier_limit) identifier_limit )attribute )keyword_argument )argument_list )call )argument_list )call )await )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_cdn_file) identifier_cdn_file (identifier_CdnFileReuploadNeeded) identifier_CdnFileReuploadNeeded )argument_list )call (block (expression_statement (await (call (identifier_client) identifier_client (argument_list (call (identifier_ReuploadCdnFileRequest) identifier_ReuploadCdnFileRequest (argument_list (keyword_argument (identifier_file_token) identifier_file_token (attribute (identifier_cdn_redirect) identifier_cdn_redirect (identifier_file_token) identifier_file_token )attribute )keyword_argument (keyword_argument (identifier_request_token) identifier_request_token (attribute (identifier_cdn_file) identifier_cdn_file (identifier_request_token) identifier_request_token )attribute )keyword_argument )argument_list )call )argument_list )call )await )expression_statement (expression_statement (assignment (identifier_cdn_file) identifier_cdn_file (call (attribute (identifier_decrypter) identifier_decrypter (identifier_get_file) identifier_get_file )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_cdn_file) identifier_cdn_file (identifier_bytes) identifier_bytes )attribute (call (attribute (attribute (identifier_decrypter) identifier_decrypter (identifier_cdn_aes) identifier_cdn_aes )attribute (identifier_encrypt) identifier_encrypt )attribute (argument_list (attribute (identifier_cdn_file) identifier_cdn_file (identifier_bytes) identifier_bytes )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cdn_hash) identifier_cdn_hash (call (attribute (attribute (identifier_decrypter) identifier_decrypter (identifier_cdn_file_hashes) identifier_cdn_file_hashes )attribute (identifier_pop) identifier_pop )attribute (argument_list (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_decrypter) identifier_decrypter (identifier_check) identifier_check )attribute (argument_list (attribute (identifier_cdn_file) identifier_cdn_file (identifier_bytes) identifier_bytes )attribute (identifier_cdn_hash) identifier_cdn_hash )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (expression_list (identifier_decrypter) identifier_decrypter (identifier_cdn_file) identifier_cdn_file )expression_list )return_statement )block )function_definition )module
Prepares a new CDN decrypter. :param client: a TelegramClient connected to the main servers. :param cdn_client: a new client connected to the CDN. :param cdn_redirect: the redirect file object that caused this call. :return: (CdnDecrypter, first chunk file data)
(module (function_definition (function_name__get_cached_mounted_points) function_name__get_cached_mounted_points (parameters )parameters (block (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_mounted_devices_key) identifier_mounted_devices_key (call (attribute (identifier_winreg) identifier_winreg (identifier_OpenKey) identifier_OpenKey )attribute (argument_list (attribute (identifier_winreg) identifier_winreg (identifier_HKEY_LOCAL_MACHINE) identifier_HKEY_LOCAL_MACHINE )attribute (string_"SYSTEM\\MountedDevices") string_"SYSTEM\\MountedDevices" )argument_list )call )assignment )expression_statement (for_statement (identifier_v) identifier_v (call (identifier__iter_vals) identifier__iter_vals (argument_list (identifier_mounted_devices_key) identifier_mounted_devices_key )argument_list )call (block (if_statement (comparison_operator (string_"DosDevices") string_"DosDevices" (subscript (identifier_v) identifier_v (integer_0) integer_0 )subscript )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_volume_string) identifier_volume_string (call (attribute (subscript (identifier_v) identifier_v (integer_1) integer_1 )subscript (identifier_decode) identifier_decode )attribute (argument_list (string_"utf-16le") string_"utf-16le" (string_"ignore") string_"ignore" )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (identifier__is_mbed_volume) identifier__is_mbed_volume (argument_list (identifier_volume_string) identifier_volume_string )argument_list )call )not_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_mount_point_match) identifier_mount_point_match (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (string_".*\\\\(.:)$") string_".*\\\\(.:)$" (subscript (identifier_v) identifier_v (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_mount_point_match) identifier_mount_point_match )not_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Invalid disk pattern for entry %s, skipping") string_"Invalid disk pattern for entry %s, skipping" (subscript (identifier_v) identifier_v (integer_0) integer_0 )subscript )argument_list )call )expression_statement (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_mount_point) identifier_mount_point (call (attribute (identifier_mount_point_match) identifier_mount_point_match (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (dictionary (pair (string_"mount_point") string_"mount_point" (identifier_mount_point) identifier_mount_point )pair (pair (string_"volume_string") string_"volume_string" (identifier_volume_string) identifier_volume_string )pair )dictionary )argument_list )call )expression_statement )block )for_statement )block (except_clause (identifier_OSError) identifier_OSError (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (string_'Failed to open "MountedDevices" in registry') string_'Failed to open "MountedDevices" in registry' )argument_list )call )expression_statement )block )except_clause )try_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
! Get the volumes present on the system @return List of mount points and their associated target id Ex. [{ 'mount_point': 'D:', 'target_id_usb_id': 'xxxx'}, ...]
(module (function_definition (function_name_devices) function_name_devices (parameters (identifier_self) identifier_self )parameters (block (expression_statement (string_'return generator of configured devices') string_'return generator of configured devices' )expression_statement (return_statement (boolean_operator (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_fs) identifier_fs )attribute (None) None )comparison_operator (list_comprehension (call (identifier_JFSDevice) identifier_JFSDevice (argument_list (identifier_d) identifier_d (identifier_self) identifier_self (keyword_argument (identifier_parentpath) identifier_parentpath (attribute (identifier_self) identifier_self (identifier_rootpath) identifier_rootpath )attribute )keyword_argument )argument_list )call (for_in_clause (identifier_d) identifier_d (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_fs) identifier_fs )attribute (identifier_devices) identifier_devices )attribute (identifier_iterchildren) identifier_iterchildren )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )boolean_operator (list_comprehension (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (list )list )for_in_clause )list_comprehension )boolean_operator )return_statement )block )function_definition )module
return generator of configured devices
(module (function_definition (function_name_normalize_index) function_name_normalize_index (parameters (identifier_index) identifier_index )parameters (block (expression_statement (assignment (identifier_index) identifier_index (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (identifier_index) identifier_index )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_index) identifier_index )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement (call (attribute (identifier_index) identifier_index (identifier_astype) identifier_astype )attribute (argument_list (string_'int') string_'int' )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_index) identifier_index (identifier_dtype) identifier_dtype )attribute (string_'bool') string_'bool' )comparison_operator (block (expression_statement (assignment (identifier_index) identifier_index (subscript (call (attribute (identifier_index) identifier_index (identifier_nonzero) identifier_nonzero )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_index) identifier_index (identifier_dtype) identifier_dtype )attribute (string_'int') string_'int' )comparison_operator (block (pass_statement )pass_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Index should be either integer or bool') string_'Index should be either integer or bool' )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (identifier_index) identifier_index )return_statement )block )function_definition )module
normalize numpy index
(module (function_definition (function_name_user) function_name_user (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_users) identifier_users )attribute (identifier_get) identifier_get )attribute (argument_list (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_contexts) identifier_contexts )attribute (attribute (identifier_self) identifier_self (identifier_current_context) identifier_current_context )attribute )subscript (identifier_get) identifier_get )attribute (argument_list (string_"user") string_"user" (string_"") string_"" )argument_list )call (dictionary )dictionary )argument_list )call )return_statement )block )function_definition )module
Returns the current user set by current context
(module (function_definition (function_name_add_ip_address) function_name_add_ip_address (parameters (identifier_list_name) identifier_list_name (identifier_item_name) identifier_item_name )parameters (block (expression_statement (assignment (identifier_payload) identifier_payload (dictionary (pair (string_"jsonrpc") string_"jsonrpc" (string_"2.0") string_"2.0" )pair (pair (string_"id") string_"id" (string_"ID0") string_"ID0" )pair (pair (string_"method") string_"method" (string_"add_policy_ip_addresses") string_"add_policy_ip_addresses" )pair (pair (string_"params") string_"params" (list (identifier_list_name) identifier_list_name (dictionary (pair (string_"item_name") string_"item_name" (identifier_item_name) identifier_item_name )pair )dictionary )list )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (subscript (identifier___proxy__) identifier___proxy__ (string_'bluecoat_sslv.call') string_'bluecoat_sslv.call' )subscript (argument_list (identifier_payload) identifier_payload (True) True )argument_list )call )assignment )expression_statement (return_statement (call (identifier__validate_change_result) identifier__validate_change_result (argument_list (identifier_response) identifier_response )argument_list )call )return_statement )block )function_definition )module
Add an IP address to an IP address list. list_name(str): The name of the specific policy IP address list to append to. item_name(str): The IP address to append to the list. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_ip_address MyIPAddressList 10.0.0.0/24
(module (function_definition (function_name_list_tag) function_name_list_tag (parameters (identifier_self) identifier_self (default_parameter (identifier_limit) identifier_limit (integer_500) integer_500 )default_parameter (default_parameter (identifier_offset) identifier_offset (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_evt) identifier_evt (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier__request_entity_tag_list) identifier__request_entity_tag_list )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___lid) identifier___lid )attribute (keyword_argument (identifier_limit) identifier_limit (identifier_limit) identifier_limit )keyword_argument (keyword_argument (identifier_offset) identifier_offset (identifier_offset) identifier_offset )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier__wait_and_except_if_failed) identifier__wait_and_except_if_failed )attribute (argument_list (identifier_evt) identifier_evt )argument_list )call )expression_statement (return_statement (subscript (attribute (identifier_evt) identifier_evt (identifier_payload) identifier_payload )attribute (string_'tags') string_'tags' )subscript )return_statement )block )function_definition )module
List `all` the tags for this Thing Returns lists of tags, as below #!python [ "mytag1", "mytag2" "ein_name", "nochein_name" ] - OR... Raises [IOTException](./Exceptions.m.html#IoticAgent.IOT.Exceptions.IOTException) containing the error if the infrastructure detects a problem Raises [LinkException](../Core/AmqpLink.m.html#IoticAgent.Core.AmqpLink.LinkException) if there is a communications problem between you and the infrastructure `limit` (optional) (integer) Return at most this many tags `offset` (optional) (integer) Return tags starting at this offset
(module (function_definition (function_name_report) function_name_report (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_ok) identifier_ok (default_parameter (identifier_msg) identifier_msg (None) None )default_parameter (default_parameter (identifier_deltat) identifier_deltat (integer_20) integer_20 )default_parameter )parameters (block (expression_statement (assignment (identifier_r) identifier_r (subscript (attribute (identifier_self) identifier_self (identifier_reports) identifier_reports )attribute (identifier_name) identifier_name )subscript )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call (binary_operator (attribute (identifier_r) identifier_r (identifier_last_report) identifier_last_report )attribute (identifier_deltat) identifier_deltat )binary_operator )comparison_operator (block (expression_statement (assignment (attribute (identifier_r) identifier_r (identifier_ok) identifier_ok )attribute (identifier_ok) identifier_ok )assignment )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (attribute (identifier_r) identifier_r (identifier_last_report) identifier_last_report )attribute (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_ok) identifier_ok (not_operator (attribute (identifier_r) identifier_r (identifier_ok) identifier_ok )attribute )not_operator )boolean_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_say) identifier_say )attribute (argument_list (binary_operator (string_"%s OK") string_"%s OK" (identifier_name) identifier_name )binary_operator )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_r) identifier_r (identifier_ok) identifier_ok )attribute (identifier_ok) identifier_ok )assignment )expression_statement (if_statement (not_operator (attribute (identifier_r) identifier_r (identifier_ok) identifier_ok )attribute )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_say) identifier_say )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
report a sensor error
(module (function_definition (function_name_drop_index) function_name_drop_index (parameters (identifier_self) identifier_self (identifier_table) identifier_table (identifier_column) identifier_column )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_execute) identifier_execute )attribute (argument_list (call (attribute (string_'ALTER TABLE {0} DROP INDEX {1}') string_'ALTER TABLE {0} DROP INDEX {1}' (identifier_format) identifier_format )attribute (argument_list (call (identifier_wrap) identifier_wrap (argument_list (identifier_table) identifier_table )argument_list )call (identifier_column) identifier_column )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__printer) identifier__printer )attribute (argument_list (call (attribute (string_'\tDropped index from column {0}') string_'\tDropped index from column {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_column) identifier_column )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Drop an index from a table.
(module (function_definition (function_name_get_gene_id) function_name_get_gene_id (parameters (identifier_gene_name) identifier_gene_name )parameters (block (import_from_statement (dotted_name (identifier_intermine) identifier_intermine (identifier_webservice) identifier_webservice )dotted_name (dotted_name (identifier_Service) identifier_Service )dotted_name )import_from_statement (expression_statement (assignment (identifier_service) identifier_service (call (identifier_Service) identifier_Service (argument_list (string_'http://yeastmine.yeastgenome.org/yeastmine/service') string_'http://yeastmine.yeastgenome.org/yeastmine/service' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_query) identifier_query (call (attribute (identifier_service) identifier_service (identifier_new_query) identifier_new_query )attribute (argument_list (string_'Gene') string_'Gene' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_query) identifier_query (identifier_add_view) identifier_add_view )attribute (argument_list (string_'primaryIdentifier') string_'primaryIdentifier' (string_'secondaryIdentifier') string_'secondaryIdentifier' (string_'symbol') string_'symbol' (string_'name') string_'name' (string_'sgdAlias') string_'sgdAlias' (string_'crossReferences.identifier') string_'crossReferences.identifier' (string_'crossReferences.source.name') string_'crossReferences.source.name' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_query) identifier_query (identifier_add_constraint) identifier_add_constraint )attribute (argument_list (string_'organism.shortName') string_'organism.shortName' (string_'=') string_'=' (string_'S. cerevisiae') string_'S. cerevisiae' (keyword_argument (identifier_code) identifier_code (string_'B') string_'B' )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_query) identifier_query (identifier_add_constraint) identifier_add_constraint )attribute (argument_list (string_'Gene') string_'Gene' (string_'LOOKUP') string_'LOOKUP' (identifier_gene_name) identifier_gene_name (keyword_argument (identifier_code) identifier_code (string_'A') string_'A' )keyword_argument )argument_list )call )expression_statement (for_statement (identifier_row) identifier_row (call (attribute (identifier_query) identifier_query (identifier_rows) identifier_rows )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_gid) identifier_gid (subscript (identifier_row) identifier_row (string_'secondaryIdentifier') string_'secondaryIdentifier' )subscript )assignment )expression_statement )block )for_statement (return_statement (identifier_gid) identifier_gid )return_statement )block )function_definition )module
Retrieve systematic yeast gene name from the common name. :param gene_name: Common name for yeast gene (e.g. ADE2). :type gene_name: str :returns: Systematic name for yeast gene (e.g. YOR128C). :rtype: str
(module (function_definition (function_name__recode_for_categories) function_name__recode_for_categories (parameters (identifier_codes) identifier_codes (identifier_old_categories) identifier_old_categories (identifier_new_categories) identifier_new_categories )parameters (block (import_from_statement (dotted_name (identifier_pandas) identifier_pandas (identifier_core) identifier_core (identifier_algorithms) identifier_algorithms )dotted_name (dotted_name (identifier_take_1d) identifier_take_1d )dotted_name )import_from_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_old_categories) identifier_old_categories )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement (call (attribute (identifier_codes) identifier_codes (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )return_statement )block (elif_clause (call (attribute (identifier_new_categories) identifier_new_categories (identifier_equals) identifier_equals )attribute (argument_list (identifier_old_categories) identifier_old_categories )argument_list )call (block (return_statement (call (attribute (identifier_codes) identifier_codes (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )return_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_indexer) identifier_indexer (call (identifier_coerce_indexer_dtype) identifier_coerce_indexer_dtype (argument_list (call (attribute (identifier_new_categories) identifier_new_categories (identifier_get_indexer) identifier_get_indexer )attribute (argument_list (identifier_old_categories) identifier_old_categories )argument_list )call (identifier_new_categories) identifier_new_categories )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_new_codes) identifier_new_codes (call (identifier_take_1d) identifier_take_1d (argument_list (identifier_indexer) identifier_indexer (call (attribute (identifier_codes) identifier_codes (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call (keyword_argument (identifier_fill_value) identifier_fill_value (unary_operator (integer_1) integer_1 )unary_operator )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_new_codes) identifier_new_codes )return_statement )block )function_definition )module
Convert a set of codes for to a new set of categories Parameters ---------- codes : array old_categories, new_categories : Index Returns ------- new_codes : array Examples -------- >>> old_cat = pd.Index(['b', 'a', 'c']) >>> new_cat = pd.Index(['a', 'b']) >>> codes = np.array([0, 1, 1, 2]) >>> _recode_for_categories(codes, old_cat, new_cat) array([ 1, 0, 0, -1])
(module (function_definition (function_name_from_record) function_name_from_record (parameters (identifier_cls) identifier_cls (identifier_record) identifier_record (identifier_crs) identifier_crs (default_parameter (identifier_schema) identifier_schema (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_properties) identifier_properties (call (attribute (identifier_cls) identifier_cls (identifier__to_properties) identifier__to_properties )attribute (argument_list (identifier_record) identifier_record (identifier_schema) identifier_schema )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_vector) identifier_vector (call (identifier_GeoVector) identifier_GeoVector (argument_list (call (identifier_shape) identifier_shape (argument_list (subscript (identifier_record) identifier_record (string_'geometry') string_'geometry' )subscript )argument_list )call (identifier_crs) identifier_crs )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_record) identifier_record (identifier_get) identifier_get )attribute (argument_list (string_'raster') string_'raster' )argument_list )call (block (expression_statement (assignment (identifier_assets) identifier_assets (dictionary_comprehension (pair (identifier_k) identifier_k (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_type) identifier_type (identifier_RASTER_TYPE) identifier_RASTER_TYPE )keyword_argument (keyword_argument (identifier_product) identifier_product (string_'visual') string_'visual' )keyword_argument (dictionary_splat (identifier_v) identifier_v )dictionary_splat )argument_list )call )pair (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (call (attribute (identifier_record) identifier_record (identifier_get) identifier_get )attribute (argument_list (string_'raster') string_'raster' )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_assets) identifier_assets (call (attribute (identifier_record) identifier_record (identifier_get) identifier_get )attribute (argument_list (string_'assets') string_'assets' (dictionary )dictionary )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (identifier_vector) identifier_vector (identifier_properties) identifier_properties (identifier_assets) identifier_assets )argument_list )call )return_statement )block )function_definition )module
Create GeoFeature from a record.
(module (function_definition (function_name_list_files) function_name_list_files (parameters (default_parameter (identifier_tag) identifier_tag (None) None )default_parameter (default_parameter (identifier_sat_id) identifier_sat_id (None) None )default_parameter (default_parameter (identifier_data_path) identifier_data_path (None) None )default_parameter (default_parameter (identifier_format_str) identifier_format_str (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_index) identifier_index (call (attribute (identifier_pds) identifier_pds (identifier_date_range) identifier_date_range )attribute (argument_list (call (attribute (identifier_pysat) identifier_pysat (identifier_datetime) identifier_datetime )attribute (argument_list (integer_2017) integer_2017 (integer_12) integer_12 (integer_1) integer_1 )argument_list )call (call (attribute (identifier_pysat) identifier_pysat (identifier_datetime) identifier_datetime )attribute (argument_list (integer_2018) integer_2018 (integer_12) integer_12 (integer_1) integer_1 )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_names) identifier_names (list_comprehension (binary_operator (binary_operator (identifier_data_path) identifier_data_path (call (attribute (identifier_date) identifier_date (identifier_strftime) identifier_strftime )attribute (argument_list (string_'%Y-%m-%d') string_'%Y-%m-%d' )argument_list )call )binary_operator (string_'.nofile') string_'.nofile' )binary_operator (for_in_clause (identifier_date) identifier_date (identifier_index) identifier_index )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (call (attribute (identifier_pysat) identifier_pysat (identifier_Series) identifier_Series )attribute (argument_list (identifier_names) identifier_names (keyword_argument (identifier_index) identifier_index (identifier_index) identifier_index )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Produce a fake list of files spanning a year
(module (function_definition (function_name_upload) function_name_upload (parameters (identifier_self) identifier_self (identifier_sys_id) identifier_sys_id (identifier_file_path) identifier_file_path (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_multipart) identifier_multipart (False) False )default_parameter )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_multipart) identifier_multipart (identifier_bool) identifier_bool )argument_list )call )not_operator (block (raise_statement (call (identifier_InvalidUsage) identifier_InvalidUsage (argument_list (string_'Multipart must be of type bool') string_'Multipart must be of type bool' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_resource) identifier_resource (attribute (identifier_self) identifier_self (identifier_resource) identifier_resource )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (block (expression_statement (assignment (identifier_name) identifier_name (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_file_path) identifier_file_path )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_resource) identifier_resource (identifier_parameters) identifier_parameters )attribute (identifier_add_custom) identifier_add_custom )attribute (argument_list (dictionary (pair (string_'table_name') string_'table_name' (attribute (identifier_self) identifier_self (identifier_table_name) identifier_table_name )attribute )pair (pair (string_'table_sys_id') string_'table_sys_id' (identifier_sys_id) identifier_sys_id )pair (pair (string_'file_name') string_'file_name' (identifier_name) identifier_name )pair )dictionary )argument_list )call )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (call (identifier_open) identifier_open (argument_list (identifier_file_path) identifier_file_path (string_'rb') string_'rb' )argument_list )call (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_headers) identifier_headers (dictionary )dictionary )assignment )expression_statement (if_statement (identifier_multipart) identifier_multipart (block (expression_statement (assignment (subscript (identifier_headers) identifier_headers (string_"Content-Type") string_"Content-Type" )subscript (string_"multipart/form-data") string_"multipart/form-data" )assignment )expression_statement (expression_statement (assignment (identifier_path_append) identifier_path_append (string_'/upload') string_'/upload' )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_headers) identifier_headers (string_"Content-Type") string_"Content-Type" )subscript (string_"text/plain") string_"text/plain" )assignment )expression_statement (expression_statement (assignment (identifier_path_append) identifier_path_append (string_'/file') string_'/file' )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (attribute (identifier_resource) identifier_resource (identifier_request) identifier_request )attribute (argument_list (keyword_argument (identifier_method) identifier_method (string_'POST') string_'POST' )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument (keyword_argument (identifier_path_append) identifier_path_append (identifier_path_append) identifier_path_append )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Attaches a new file to the provided record :param sys_id: the sys_id of the record to attach the file to :param file_path: local absolute path of the file to upload :param name: custom name for the uploaded file (instead of basename) :param multipart: whether or not to use multipart :return: the inserted record
(module (function_definition (function_name_get_raw) function_name_get_raw (parameters (identifier_self) identifier_self )parameters (block (return_statement (list (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute (attribute (identifier_self) identifier_self (identifier_last_modified) identifier_last_modified )attribute (attribute (identifier_self) identifier_self (identifier_location) identifier_location )attribute )list )return_statement )block )function_definition )module
Get a list with information about the file. The returned list contains name, size, last_modified and location.
(module (function_definition (function_name_unregister_dependent_on) function_name_unregister_dependent_on (parameters (identifier_self) identifier_self (identifier_tree) identifier_tree )parameters (block (if_statement (comparison_operator (identifier_tree) identifier_tree (attribute (identifier_self) identifier_self (identifier_dependent_on) identifier_dependent_on )attribute )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_dependent_on) identifier_dependent_on )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_tree) identifier_tree )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
unregistering tree that we are dependent on
(module (function_definition (function_name__resolved_pid) function_name__resolved_pid (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_pid) identifier_pid )attribute (identifier_PersistentIdentifier) identifier_PersistentIdentifier )argument_list )call )not_operator (block (return_statement (call (identifier_resolve_pid) identifier_resolve_pid (argument_list (attribute (identifier_self) identifier_self (identifier_pid) identifier_pid )attribute )argument_list )call )return_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier_pid) identifier_pid )attribute )return_statement )block )function_definition )module
Resolve self.pid if it is a fetched pid.
(module (function_definition (function_name__fingerprint_dict_with_files) function_name__fingerprint_dict_with_files (parameters (identifier_self) identifier_self (identifier_option_val) identifier_option_val )parameters (block (return_statement (call (identifier_stable_option_fingerprint) identifier_stable_option_fingerprint (argument_list (dictionary_comprehension (pair (identifier_k) identifier_k (call (attribute (identifier_self) identifier_self (identifier__expand_possible_file_value) identifier__expand_possible_file_value )attribute (argument_list (identifier_v) identifier_v )argument_list )call )pair (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_option_val) identifier_option_val (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )argument_list )call )return_statement )block )function_definition )module
Returns a fingerprint of the given dictionary containing file paths. Any value which is a file path which exists on disk will be fingerprinted by that file's contents rather than by its path. This assumes the files are small enough to be read into memory. NB: The keys of the dict are assumed to be strings -- if they are not, the dict should be converted to encode its keys with `stable_option_fingerprint()`, as is done in the `fingerprint()` method.
(module (function_definition (function_name_unregister) function_name_unregister (parameters (identifier_self) identifier_self (default_parameter (identifier_plugin) identifier_plugin (None) None )default_parameter (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 (assert_statement (comparison_operator (identifier_plugin) identifier_plugin (None) None )comparison_operator (string_"one of name or plugin needs to be specified") string_"one of name or plugin needs to be specified" )assert_statement (expression_statement (assignment (identifier_name) identifier_name (call (attribute (identifier_self) identifier_self (identifier_get_name) identifier_get_name )attribute (argument_list (identifier_plugin) identifier_plugin )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_plugin) identifier_plugin (None) None )comparison_operator (block (expression_statement (assignment (identifier_plugin) identifier_plugin (call (attribute (identifier_self) identifier_self (identifier_get_plugin) identifier_get_plugin )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__name2plugin) identifier__name2plugin )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name )argument_list )call (block (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier__name2plugin) identifier__name2plugin )attribute (identifier_name) identifier_name )subscript )delete_statement )block )if_statement (for_statement (identifier_hookcaller) identifier_hookcaller (call (attribute (attribute (identifier_self) identifier_self (identifier__plugin2hookcallers) identifier__plugin2hookcallers )attribute (identifier_pop) identifier_pop )attribute (argument_list (identifier_plugin) identifier_plugin (list )list )argument_list )call (block (expression_statement (call (attribute (identifier_hookcaller) identifier_hookcaller (identifier__remove_plugin) identifier__remove_plugin )attribute (argument_list (identifier_plugin) identifier_plugin )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_plugin) identifier_plugin )return_statement )block )function_definition )module
unregister a plugin object and all its contained hook implementations from internal data structures.
(module (function_definition (function_name_device_message) function_name_device_message (parameters (identifier_device) identifier_device (identifier_code) identifier_code (default_parameter (identifier_ts) identifier_ts (None) None )default_parameter (default_parameter (identifier_origin) identifier_origin (None) None )default_parameter (default_parameter (identifier_type) identifier_type (None) None )default_parameter (default_parameter (identifier_severity) identifier_severity (None) None )default_parameter (default_parameter (identifier_title) identifier_title (None) None )default_parameter (default_parameter (identifier_description) identifier_description (None) None )default_parameter (default_parameter (identifier_hint) identifier_hint (None) None )default_parameter (dictionary_splat_pattern (identifier_metaData) identifier_metaData )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (identifier_ts) identifier_ts (None) None )comparison_operator (block (expression_statement (assignment (identifier_ts) identifier_ts (call (identifier_local_now) identifier_local_now (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_payload) identifier_payload (call (identifier_MessagePayload) identifier_MessagePayload (argument_list (keyword_argument (identifier_device) identifier_device (identifier_device) identifier_device )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_payload) identifier_payload (identifier_messages) identifier_messages )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_Message) identifier_Message (argument_list (keyword_argument (identifier_code) identifier_code (identifier_code) identifier_code )keyword_argument (keyword_argument (identifier_ts) identifier_ts (identifier_ts) identifier_ts )keyword_argument (keyword_argument (identifier_origin) identifier_origin (identifier_origin) identifier_origin )keyword_argument (keyword_argument (identifier_type) identifier_type (identifier_type) identifier_type )keyword_argument (keyword_argument (identifier_severity) identifier_severity (identifier_severity) identifier_severity )keyword_argument (keyword_argument (identifier_title) identifier_title (identifier_title) identifier_title )keyword_argument (keyword_argument (identifier_description) identifier_description (identifier_description) identifier_description )keyword_argument (keyword_argument (identifier_hint) identifier_hint (identifier_hint) identifier_hint )keyword_argument (dictionary_splat (identifier_metaData) identifier_metaData )dictionary_splat )argument_list )call )argument_list )call )expression_statement (return_statement (call (identifier_dumps) identifier_dumps (argument_list (identifier_payload) identifier_payload )argument_list )call )return_statement )block )function_definition )module
This quickly builds a time-stamped message. If `ts` is None, the current time is used.
(module (function_definition (function_name_CreateAFF4Object) function_name_CreateAFF4Object (parameters (identifier_stat_response) identifier_stat_response (identifier_client_id_urn) identifier_client_id_urn (identifier_mutation_pool) identifier_mutation_pool (default_parameter (identifier_token) identifier_token (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_urn) identifier_urn (call (attribute (attribute (identifier_stat_response) identifier_stat_response (identifier_pathspec) identifier_pathspec )attribute (identifier_AFF4Path) identifier_AFF4Path )attribute (argument_list (identifier_client_id_urn) identifier_client_id_urn )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_stat) identifier_stat (identifier_S_ISDIR) identifier_S_ISDIR )attribute (argument_list (attribute (identifier_stat_response) identifier_stat_response (identifier_st_mode) identifier_st_mode )attribute )argument_list )call (block (expression_statement (assignment (identifier_ftype) identifier_ftype (attribute (identifier_standard) identifier_standard (identifier_VFSDirectory) identifier_VFSDirectory )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_ftype) identifier_ftype (attribute (identifier_aff4_grr) identifier_aff4_grr (identifier_VFSFile) identifier_VFSFile )attribute )assignment )expression_statement )block )else_clause )if_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (attribute (identifier_aff4) identifier_aff4 (identifier_FACTORY) identifier_FACTORY )attribute (identifier_Create) identifier_Create )attribute (argument_list (identifier_urn) identifier_urn (identifier_ftype) identifier_ftype (keyword_argument (identifier_mode) identifier_mode (string_"w") string_"w" )keyword_argument (keyword_argument (identifier_mutation_pool) identifier_mutation_pool (identifier_mutation_pool) identifier_mutation_pool )keyword_argument (keyword_argument (identifier_token) identifier_token (identifier_token) identifier_token )keyword_argument )argument_list )call (as_pattern_target (identifier_fd) identifier_fd )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_fd) identifier_fd (identifier_Set) identifier_Set )attribute (argument_list (call (attribute (attribute (identifier_fd) identifier_fd (identifier_Schema) identifier_Schema )attribute (identifier_STAT) identifier_STAT )attribute (argument_list (identifier_stat_response) identifier_stat_response )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_fd) identifier_fd (identifier_Set) identifier_Set )attribute (argument_list (call (attribute (attribute (identifier_fd) identifier_fd (identifier_Schema) identifier_Schema )attribute (identifier_PATHSPEC) identifier_PATHSPEC )attribute (argument_list (attribute (identifier_stat_response) identifier_stat_response (identifier_pathspec) identifier_pathspec )attribute )argument_list )call )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
This creates a File or a Directory from a stat response.
(module (function_definition (function_name_addHeader) function_name_addHeader (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_value) identifier_value (default_parameter (identifier_must_understand) identifier_must_understand (False) False )default_parameter )parameters (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute (identifier_name) identifier_name )subscript (identifier_value) identifier_value )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_headers) identifier_headers )attribute (identifier_set_required) identifier_set_required )attribute (argument_list (identifier_name) identifier_name (identifier_must_understand) identifier_must_understand )argument_list )call )expression_statement )block )function_definition )module
Sets a persistent header to send with each request. @param name: Header name.
(module (function_definition (function_name_get_facet_serializer_class) function_name_get_facet_serializer_class (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_facet_serializer_class) identifier_facet_serializer_class )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_AttributeError) identifier_AttributeError (argument_list (binary_operator (concatenated_string (string_"%(cls)s should either include a `facet_serializer_class` attribute, ") string_"%(cls)s should either include a `facet_serializer_class` attribute, " (string_"or override %(cls)s.get_facet_serializer_class() method.") string_"or override %(cls)s.get_facet_serializer_class() method." )concatenated_string (dictionary (pair (string_"cls") string_"cls" (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )pair )dictionary )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier_facet_serializer_class) identifier_facet_serializer_class )attribute )return_statement )block )function_definition )module
Return the class to use for serializing facets. Defaults to using ``self.facet_serializer_class``.