sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_memoize) function_name_memoize (parameters (identifier_func) identifier_func )parameters (block (expression_statement (assignment (identifier_cache) identifier_cache (dictionary )dictionary )assignment )expression_statement (function_definition (function_name_memoizer) function_name_memoizer (parameters )parameters (block (if_statement (comparison_operator (integer_0) integer_0 (identifier_cache) identifier_cache )comparison_operator (block (expression_statement (assignment (subscript (identifier_cache) identifier_cache (integer_0) integer_0 )subscript (call (identifier_func) identifier_func (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (subscript (identifier_cache) identifier_cache (integer_0) integer_0 )subscript )return_statement )block )function_definition (return_statement (call (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_func) identifier_func )argument_list )call (argument_list (identifier_memoizer) identifier_memoizer )argument_list )call )return_statement )block )function_definition )module
Cache forever.
(module (function_definition (function_name__split_match_steps_into_match_traversals) function_name__split_match_steps_into_match_traversals (parameters (identifier_match_steps) identifier_match_steps )parameters (block (expression_statement (assignment (identifier_output) identifier_output (list )list )assignment )expression_statement (expression_statement (assignment (identifier_current_list) identifier_current_list (None) None )assignment )expression_statement (for_statement (identifier_step) identifier_step (identifier_match_steps) identifier_match_steps (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_step) identifier_step (identifier_root_block) identifier_root_block )attribute (identifier_QueryRoot) identifier_QueryRoot )argument_list )call (block (if_statement (comparison_operator (identifier_current_list) identifier_current_list (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_output) identifier_output (identifier_append) identifier_append )attribute (argument_list (identifier_current_list) identifier_current_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_current_list) identifier_current_list (list (identifier_step) identifier_step )list )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_current_list) identifier_current_list (identifier_append) identifier_append )attribute (argument_list (identifier_step) identifier_step )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (if_statement (comparison_operator (identifier_current_list) identifier_current_list (None) None )comparison_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (call (attribute (string_u'current_list was unexpectedly None: {}') string_u'current_list was unexpectedly None: {}' (identifier_format) identifier_format )attribute (argument_list (identifier_match_steps) identifier_match_steps )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_output) identifier_output (identifier_append) identifier_append )attribute (argument_list (identifier_current_list) identifier_current_list )argument_list )call )expression_statement (return_statement (identifier_output) identifier_output )return_statement )block )function_definition )module
Split a list of MatchSteps into multiple lists, each denoting a single MATCH traversal.
(module (function_definition (function_name_hmset) function_name_hmset (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_mapping) identifier_mapping )parameters (block (if_statement (not_operator (identifier_mapping) identifier_mapping )not_operator (block (raise_statement (call (identifier_DataError) identifier_DataError (argument_list (string_"'hmset' with 'mapping' of length 0") string_"'hmset' with 'mapping' of length 0" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_items) identifier_items (list )list )assignment )expression_statement (for_statement (identifier_pair) identifier_pair (call (identifier_iteritems) identifier_iteritems (argument_list (identifier_mapping) identifier_mapping )argument_list )call (block (expression_statement (call (attribute (identifier_items) identifier_items (identifier_extend) identifier_extend )attribute (argument_list (identifier_pair) identifier_pair )argument_list )call )expression_statement )block )for_statement (return_statement (await (call (attribute (identifier_self) identifier_self (identifier_execute_command) identifier_execute_command )attribute (argument_list (string_'HMSET') string_'HMSET' (identifier_name) identifier_name (list_splat (identifier_items) identifier_items )list_splat )argument_list )call )await )return_statement )block )function_definition )module
Set key to value within hash ``name`` for each corresponding key and value from the ``mapping`` dict.
(module (function_definition (function_name_get_access_token) function_name_get_access_token (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (parenthesized_expression (comparison_operator (attribute (identifier_self) identifier_self (identifier_token) identifier_token )attribute (None) None )comparison_operator )parenthesized_expression (parenthesized_expression (comparison_operator (call (attribute (identifier_datetime) identifier_datetime (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call (attribute (identifier_self) identifier_self (identifier_reuse_token_until) identifier_reuse_token_until )attribute )comparison_operator )parenthesized_expression )boolean_operator (block (expression_statement (assignment (identifier_headers) identifier_headers (dictionary (pair (string_'Ocp-Apim-Subscription-Key') string_'Ocp-Apim-Subscription-Key' (attribute (identifier_self) identifier_self (identifier_client_secret) identifier_client_secret )attribute )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_requests) identifier_requests (identifier_post) identifier_post )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_base_url) identifier_base_url )attribute (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_response) identifier_response (identifier_raise_for_status) identifier_raise_for_status )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_token) identifier_token )attribute (attribute (identifier_response) identifier_response (identifier_content) identifier_content )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_reuse_token_until) identifier_reuse_token_until )attribute (binary_operator (call (attribute (identifier_datetime) identifier_datetime (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_minutes) identifier_minutes (integer_5) integer_5 )keyword_argument )argument_list )call )binary_operator )assignment )expression_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_token) identifier_token )attribute (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )return_statement )block )function_definition )module
Returns an access token for the specified subscription. This method uses a cache to limit the number of requests to the token service. A fresh token can be re-used during its lifetime of 10 minutes. After a successful request to the token service, this method caches the access token. Subsequent invocations of the method return the cached token for the next 5 minutes. After 5 minutes, a new token is fetched from the token service and the cache is updated.
(module (function_definition (function_name_str) function_name_str (parameters (identifier_self) identifier_self (default_parameter (identifier_local) identifier_local (False) False )default_parameter (default_parameter (identifier_ifempty) identifier_ifempty (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_ts) identifier_ts (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (identifier_local) identifier_local )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_ts) identifier_ts )not_operator (block (return_statement (identifier_ifempty) identifier_ifempty )return_statement )block )if_statement (return_statement (call (attribute (identifier_ts) identifier_ts (identifier_strftime) identifier_strftime )attribute (argument_list (string_'%Y-%m-%d %H:%M:%S') string_'%Y-%m-%d %H:%M:%S' )argument_list )call )return_statement )block )function_definition )module
Returns the string representation of the datetime
(module (function_definition (function_name_single) function_name_single (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_nodes) identifier_nodes (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_OneOrMore) identifier_OneOrMore (identifier_self) identifier_self )argument_list )call (identifier_all) identifier_all )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_nodes) identifier_nodes (block (return_statement (subscript (identifier_nodes) identifier_nodes (integer_0) integer_0 )subscript )return_statement )block )if_statement (raise_statement (call (identifier_CardinalityViolation) identifier_CardinalityViolation (argument_list (identifier_self) identifier_self (string_'none') string_'none' )argument_list )call )raise_statement )block )function_definition )module
Fetch one of the related nodes :return: Node
(module (function_definition (function_name_getLogger) function_name_getLogger (parameters (default_parameter (identifier_name) identifier_name (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_adapter) identifier_adapter (call (attribute (identifier__LOGGERS) identifier__LOGGERS (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_adapter) identifier_adapter )not_operator (block (expression_statement (assignment (identifier_adapter) identifier_adapter (call (identifier_KeywordArgumentAdapter) identifier_KeywordArgumentAdapter (argument_list (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (identifier_name) identifier_name )argument_list )call (identifier_kwargs) identifier_kwargs )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier__LOGGERS) identifier__LOGGERS (identifier_name) identifier_name )subscript (identifier_adapter) identifier_adapter )assignment )expression_statement )block )if_statement (return_statement (identifier_adapter) identifier_adapter )return_statement )block )function_definition )module
Build a logger with the given name. :param name: The name for the logger. This is usually the module name, ``__name__``. :type name: string
(module (function_definition (function_name_check_notebooks_for_errors) function_name_check_notebooks_for_errors (parameters (identifier_notebooks_directory) identifier_notebooks_directory )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"Checking notebooks in directory {} for errors") string_"Checking notebooks in directory {} for errors" (identifier_format) identifier_format )attribute (argument_list (identifier_notebooks_directory) identifier_notebooks_directory )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_failed_notebooks_count) identifier_failed_notebooks_count (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_file) identifier_file (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (identifier_notebooks_directory) identifier_notebooks_directory )argument_list )call (block (if_statement (call (attribute (identifier_file) identifier_file (identifier_endswith) identifier_endswith )attribute (argument_list (string_".ipynb") string_".ipynb" )argument_list )call (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"Checking notebook ") string_"Checking notebook " (identifier_file) identifier_file )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_full_file_path) identifier_full_file_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_notebooks_directory) identifier_notebooks_directory (identifier_file) identifier_file )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_output) identifier_output (identifier_errors) identifier_errors )pattern_list (call (identifier_run_notebook) identifier_run_notebook (argument_list (identifier_full_file_path) identifier_full_file_path )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_errors) identifier_errors (None) None )comparison_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_errors) identifier_errors )argument_list )call (integer_0) integer_0 )comparison_operator )boolean_operator (block (expression_statement (augmented_assignment (identifier_failed_notebooks_count) identifier_failed_notebooks_count (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"Errors in notebook ") string_"Errors in notebook " (identifier_file) identifier_file )binary_operator )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_errors) identifier_errors )argument_list )call )expression_statement )block )if_statement )block )if_statement )block )for_statement (if_statement (comparison_operator (identifier_failed_notebooks_count) identifier_failed_notebooks_count (integer_0) integer_0 )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"No errors found in notebooks under ") string_"No errors found in notebooks under " (identifier_notebooks_directory) identifier_notebooks_directory )binary_operator )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Evaluates all notebooks in given directory and prints errors, if any
(module (function_definition (function_name_utc_datetime_and_leap_second) function_name_utc_datetime_and_leap_second (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_year) identifier_year (identifier_month) identifier_month (identifier_day) identifier_day (identifier_hour) identifier_hour (identifier_minute) identifier_minute (identifier_second) identifier_second )pattern_list (call (attribute (identifier_self) identifier_self (identifier__utc_tuple) identifier__utc_tuple )attribute (argument_list (identifier__half_millisecond) identifier__half_millisecond )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_second) identifier_second (identifier_fraction) identifier_fraction )pattern_list (call (identifier_divmod) identifier_divmod (argument_list (identifier_second) identifier_second (float_1.0) float_1.0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_second) identifier_second (call (attribute (identifier_second) identifier_second (identifier_astype) identifier_astype )attribute (argument_list (identifier_int) identifier_int )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_leap_second) identifier_leap_second (binary_operator (identifier_second) identifier_second (integer_60) integer_60 )binary_operator )assignment )expression_statement (expression_statement (augmented_assignment (identifier_second) identifier_second (identifier_leap_second) identifier_leap_second )augmented_assignment )expression_statement (expression_statement (assignment (identifier_milli) identifier_milli (binary_operator (call (attribute (parenthesized_expression (binary_operator (identifier_fraction) identifier_fraction (integer_1000) integer_1000 )binary_operator )parenthesized_expression (identifier_astype) identifier_astype )attribute (argument_list (identifier_int) identifier_int )argument_list )call (integer_1000) integer_1000 )binary_operator )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_shape) identifier_shape )attribute (block (expression_statement (assignment (identifier_utcs) identifier_utcs (binary_operator (list (identifier_utc) identifier_utc )list (subscript (attribute (identifier_self) identifier_self (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_argsets) identifier_argsets (call (identifier_zip) identifier_zip (argument_list (identifier_year) identifier_year (identifier_month) identifier_month (identifier_day) identifier_day (identifier_hour) identifier_hour (identifier_minute) identifier_minute (identifier_second) identifier_second (identifier_milli) identifier_milli (identifier_utcs) identifier_utcs )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dt) identifier_dt (call (identifier_array) identifier_array (argument_list (list_comprehension (call (identifier_datetime) identifier_datetime (argument_list (list_splat (identifier_args) identifier_args )list_splat )argument_list )call (for_in_clause (identifier_args) identifier_args (identifier_argsets) identifier_argsets )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_dt) identifier_dt (call (identifier_datetime) identifier_datetime (argument_list (identifier_year) identifier_year (identifier_month) identifier_month (identifier_day) identifier_day (identifier_hour) identifier_hour (identifier_minute) identifier_minute (identifier_second) identifier_second (identifier_milli) identifier_milli (identifier_utc) identifier_utc )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (expression_list (identifier_dt) identifier_dt (identifier_leap_second) identifier_leap_second )expression_list )return_statement )block )function_definition )module
Convert to a Python ``datetime`` in UTC, plus a leap second value. Convert this time to a `datetime`_ object and a leap second:: dt, leap_second = t.utc_datetime_and_leap_second() If the third-party `pytz`_ package is available, then its ``utc`` timezone will be used as the timezone of the return value. Otherwise, Skyfield uses its own ``utc`` timezone. The leap second value is provided because a Python ``datetime`` can only number seconds ``0`` through ``59``, but leap seconds have a designation of at least ``60``. The leap second return value will normally be ``0``, but will instead be ``1`` if the date and time are a UTC leap second. Add the leap second value to the ``second`` field of the ``datetime`` to learn the real name of the second. If this time is an array, then an array of ``datetime`` objects and an array of leap second integers is returned, instead of a single value each.
(module (function_definition (function_name_get_quoted_foreign_columns) function_name_get_quoted_foreign_columns (parameters (identifier_self) identifier_self (identifier_platform) identifier_platform )parameters (block (expression_statement (assignment (identifier_columns) identifier_columns (list )list )assignment )expression_statement (for_statement (identifier_column) identifier_column (call (attribute (attribute (identifier_self) identifier_self (identifier__foreign_column_names) identifier__foreign_column_names )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_columns) identifier_columns (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_column) identifier_column (identifier_get_quoted_name) identifier_get_quoted_name )attribute (argument_list (identifier_platform) identifier_platform )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_columns) identifier_columns )return_statement )block )function_definition )module
Returns the quoted representation of the referenced table column names the foreign key constraint is associated with. But only if they were defined with one or the referenced table column name is a keyword reserved by the platform. Otherwise the plain unquoted value as inserted is returned. :param platform: The platform to use for quotation. :type platform: Platform :rtype: list
(module (function_definition (function_name_dict_clip) function_name_dict_clip (parameters (identifier_a_dict) identifier_a_dict (default_parameter (identifier_inlude_keys_lst) identifier_inlude_keys_lst (list )list )default_parameter )parameters (block (return_statement (call (identifier_dict) identifier_dict (argument_list (list_comprehension (list (subscript (identifier_i) identifier_i (integer_0) integer_0 )subscript (subscript (identifier_i) identifier_i (integer_1) integer_1 )subscript )list (for_in_clause (identifier_i) identifier_i (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_a_dict) identifier_a_dict (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call )for_in_clause (if_clause (comparison_operator (subscript (identifier_i) identifier_i (integer_0) integer_0 )subscript (identifier_inlude_keys_lst) identifier_inlude_keys_lst )comparison_operator )if_clause )list_comprehension )argument_list )call )return_statement )block )function_definition )module
returns a new dict with keys not in included in inlude_keys_lst clipped off
(module (function_definition (function_name_apply_trend_constraint) function_name_apply_trend_constraint (parameters (identifier_self) identifier_self (identifier_limit) identifier_limit (identifier_dt) identifier_dt (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (string_'RV monitoring') string_'RV monitoring' (attribute (identifier_self) identifier_self (identifier_constraints) identifier_constraints )attribute )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_constraints) identifier_constraints )attribute (identifier_append) identifier_append )attribute (argument_list (string_'RV monitoring') string_'RV monitoring' )argument_list )call )expression_statement )block )if_statement (for_statement (identifier_pop) identifier_pop (attribute (identifier_self) identifier_self (identifier_poplist) identifier_poplist )attribute (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_pop) identifier_pop (string_'dRV') string_'dRV' )argument_list )call )not_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (attribute (identifier_pop) identifier_pop (identifier_apply_trend_constraint) identifier_apply_trend_constraint )attribute (argument_list (identifier_limit) identifier_limit (identifier_dt) identifier_dt (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_trend_limit) identifier_trend_limit )attribute (identifier_limit) identifier_limit )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_trend_dt) identifier_trend_dt )attribute (identifier_dt) identifier_dt )assignment )expression_statement )block )function_definition )module
Applies constraint corresponding to RV trend non-detection to each population See :func:`stars.StarPopulation.apply_trend_constraint`; all arguments passed to that function for each population.
(module (function_definition (function_name_warning) function_name_warning (parameters (identifier_cls) identifier_cls (identifier_name) identifier_name (identifier_message) identifier_message (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (call (attribute (call (attribute (identifier_cls) identifier_cls (identifier_getLogger) identifier_getLogger )attribute (argument_list (identifier_name) identifier_name )argument_list )call (identifier_warning) identifier_warning )attribute (argument_list (identifier_message) identifier_message (list_splat (identifier_args) identifier_args )list_splat )argument_list )call )expression_statement )block )function_definition )module
Convenience function to log a message at the WARNING level. :param name: The name of the logger instance in the VSG namespace (VSG.<name>) :param message: A message format string. :param args: The arguments that are are merged into msg using the string formatting operator. :..note: The native logger's `kwargs` are not used in this function.
(module (function_definition (function_name_register_event) function_name_register_event (parameters (identifier_self) identifier_self (identifier_event_name) identifier_event_name (identifier_event_level) identifier_event_level (identifier_message) identifier_message )parameters (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_events) identifier_events )attribute (identifier_event_name) identifier_event_name )subscript (tuple (identifier_event_level) identifier_event_level (identifier_message) identifier_message )tuple )assignment )expression_statement )block )function_definition )module
Registers an event so that it can be logged later.
(module (function_definition (function_name_assert_conditions) function_name_assert_conditions (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_assert_condition_md5) identifier_assert_condition_md5 )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_etag) identifier_etag (call (attribute (identifier_self) identifier_self (identifier_clean_etag) identifier_clean_etag )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_call_method) identifier_call_method )attribute (argument_list (string_'get_etag') string_'get_etag' )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_response) identifier_response )attribute (identifier_last_modified) identifier_last_modified )attribute (call (attribute (identifier_self) identifier_self (identifier_call_method) identifier_call_method )attribute (argument_list (string_'get_last_modified') string_'get_last_modified' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_assert_condition_etag) identifier_assert_condition_etag )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_assert_condition_last_modified) identifier_assert_condition_last_modified )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Handles various HTTP conditions and raises HTTP exceptions to abort the request. - Content-MD5 request header must match the MD5 hash of the full input (:func:`assert_condition_md5`). - If-Match and If-None-Match etags are checked against the ETag of this resource (:func:`assert_condition_etag`). - If-Modified-Since and If-Unmodified-Since are checked against the modification date of this resource (:func:`assert_condition_last_modified`). .. todo:: Return a 501 exception when any Content-* headers have been set in the request. (See :rfc:`2616`, section 9.6)
(module (function_definition (function_name_read) function_name_read (parameters (identifier_self) identifier_self (default_parameter (identifier_size) identifier_size (unary_operator (integer_1) integer_1 )unary_operator )default_parameter )parameters (block (if_statement (comparison_operator (identifier_size) identifier_size (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_'You shouldnt be doing this') string_'You shouldnt be doing this' )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_size) identifier_size (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (block (expression_statement (assignment (identifier_t) identifier_t (call (attribute (attribute (identifier_self) identifier_self (identifier_current_segment) identifier_current_segment )attribute (identifier_remaining_len) identifier_remaining_len )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_current_position) identifier_current_position )attribute )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_t) identifier_t )not_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_old_new_pos) identifier_old_new_pos (attribute (identifier_self) identifier_self (identifier_current_position) identifier_current_position )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_current_position) identifier_current_position )attribute (attribute (attribute (identifier_self) identifier_self (identifier_current_segment) identifier_current_segment )attribute (identifier_end_address) identifier_end_address )attribute )assignment )expression_statement (return_statement (subscript (attribute (attribute (identifier_self) identifier_self (identifier_current_segment) identifier_current_segment )attribute (identifier_data) identifier_data )attribute (slice (binary_operator (identifier_old_new_pos) identifier_old_new_pos (attribute (attribute (identifier_self) identifier_self (identifier_current_segment) identifier_current_segment )attribute (identifier_start_address) identifier_start_address )attribute )binary_operator (colon) colon )slice )subscript )return_statement )block )if_statement (expression_statement (assignment (identifier_t) identifier_t (binary_operator (attribute (identifier_self) identifier_self (identifier_current_position) identifier_current_position )attribute (identifier_size) identifier_size )binary_operator )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_current_segment) identifier_current_segment )attribute (identifier_inrange) identifier_inrange )attribute (argument_list (identifier_t) identifier_t )argument_list )call )not_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_'Would read over segment boundaries!') string_'Would read over segment boundaries!' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_old_new_pos) identifier_old_new_pos (attribute (identifier_self) identifier_self (identifier_current_position) identifier_current_position )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_current_position) identifier_current_position )attribute (identifier_t) identifier_t )assignment )expression_statement (return_statement (subscript (attribute (attribute (identifier_self) identifier_self (identifier_current_segment) identifier_current_segment )attribute (identifier_data) identifier_data )attribute (slice (binary_operator (identifier_old_new_pos) identifier_old_new_pos (attribute (attribute (identifier_self) identifier_self (identifier_current_segment) identifier_current_segment )attribute (identifier_start_address) identifier_start_address )attribute )binary_operator (colon) colon (binary_operator (identifier_t) identifier_t (attribute (attribute (identifier_self) identifier_self (identifier_current_segment) identifier_current_segment )attribute (identifier_start_address) identifier_start_address )attribute )binary_operator )slice )subscript )return_statement )block )function_definition )module
Returns data bytes of size size from the current segment. If size is -1 it returns all the remaining data bytes from memory segment
(module (function_definition (function_name__no_proxy) function_name__no_proxy (parameters (identifier_method) identifier_method )parameters (block (decorated_definition (decorator (call (identifier_wraps) identifier_wraps (argument_list (identifier_method) identifier_method )argument_list )call )decorator (function_definition (function_name_wrapper) function_name_wrapper (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_notproxied) identifier_notproxied (call (identifier__oga) identifier__oga (argument_list (identifier_self) identifier_self (string_"__notproxied__") string_"__notproxied__" )argument_list )call )assignment )expression_statement (expression_statement (call (identifier__osa) identifier__osa (argument_list (identifier_self) identifier_self (string_"__notproxied__") string_"__notproxied__" (True) True )argument_list )call )expression_statement (try_statement (block (return_statement (call (identifier_method) identifier_method (argument_list (identifier_self) identifier_self (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block (finally_clause (block (expression_statement (call (identifier__osa) identifier__osa (argument_list (identifier_self) identifier_self (string_"__notproxied__") string_"__notproxied__" (identifier_notproxied) identifier_notproxied )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
Returns a wrapped version of `method`, such that proxying is turned off during the method call.
(module (function_definition (function_name_calc_path_and_create_folders) function_name_calc_path_and_create_folders (parameters (identifier_folder) identifier_folder (identifier_import_path) identifier_import_path )parameters (block (expression_statement (assignment (identifier_file_path) identifier_file_path (call (identifier_abspath) identifier_abspath (argument_list (call (identifier_path_join) identifier_path_join (argument_list (identifier_folder) identifier_folder (binary_operator (call (attribute (subscript (identifier_import_path) identifier_import_path (slice (colon) colon (call (attribute (identifier_import_path) identifier_import_path (identifier_rfind) identifier_rfind )attribute (argument_list (string_".") string_"." )argument_list )call )slice )subscript (identifier_replace) identifier_replace )attribute (argument_list (string_".") string_"." (identifier_folder_seperator) identifier_folder_seperator )argument_list )call (string_".py") string_".py" )binary_operator )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_mkdir_p) identifier_mkdir_p (argument_list (call (identifier_dirname) identifier_dirname (argument_list (identifier_file_path) identifier_file_path )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_file_path) identifier_file_path )return_statement )block )function_definition )module
calculate the path and create the needed folders
(module (function_definition (function_name_get_model) function_name_get_model (parameters (default_parameter (identifier_is_netfree) identifier_is_netfree (False) False )default_parameter (default_parameter (identifier_without_reset) identifier_without_reset (False) False )default_parameter (default_parameter (identifier_seeds) identifier_seeds (None) None )default_parameter (default_parameter (identifier_effective) identifier_effective (False) False )default_parameter )parameters (block (try_statement (block (if_statement (boolean_operator (comparison_operator (identifier_seeds) identifier_seeds (None) None )comparison_operator (identifier_is_netfree) identifier_is_netfree )boolean_operator (block (expression_statement (assignment (identifier_m) identifier_m (call (attribute (attribute (identifier_ecell4_base) identifier_ecell4_base (identifier_core) identifier_core )attribute (identifier_NetfreeModel) identifier_NetfreeModel )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_m) identifier_m (call (attribute (attribute (identifier_ecell4_base) identifier_ecell4_base (identifier_core) identifier_core )attribute (identifier_NetworkModel) identifier_NetworkModel )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (for_statement (identifier_sp) identifier_sp (identifier_SPECIES_ATTRIBUTES) identifier_SPECIES_ATTRIBUTES (block (expression_statement (call (attribute (identifier_m) identifier_m (identifier_add_species_attribute) identifier_add_species_attribute )attribute (argument_list (identifier_sp) identifier_sp )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_rr) identifier_rr (identifier_REACTION_RULES) identifier_REACTION_RULES (block (expression_statement (call (attribute (identifier_m) identifier_m (identifier_add_reaction_rule) identifier_add_reaction_rule )attribute (argument_list (identifier_rr) identifier_rr )argument_list )call )expression_statement )block )for_statement (if_statement (not_operator (identifier_without_reset) identifier_without_reset )not_operator (block (expression_statement (call (identifier_reset_model) identifier_reset_model (argument_list )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_seeds) identifier_seeds (None) None )comparison_operator (block (return_statement (call (attribute (identifier_m) identifier_m (identifier_expand) identifier_expand )attribute (argument_list (identifier_seeds) identifier_seeds )argument_list )call )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_m) identifier_m (attribute (attribute (identifier_ecell4_base) identifier_ecell4_base (identifier_core) identifier_core )attribute (identifier_NetfreeModel) identifier_NetfreeModel )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_m) identifier_m (identifier_set_effective) identifier_set_effective )attribute (argument_list (identifier_effective) identifier_effective )argument_list )call )expression_statement )block )if_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (identifier_reset_model) identifier_reset_model (argument_list )argument_list )call )expression_statement (raise_statement (identifier_e) identifier_e )raise_statement )block )except_clause )try_statement (return_statement (identifier_m) identifier_m )return_statement )block )function_definition )module
Generate a model with parameters in the global scope, ``SPECIES_ATTRIBUTES`` and ``REACTIONRULES``. Parameters ---------- is_netfree : bool, optional Return ``NetfreeModel`` if True, and ``NetworkModel`` if else. Default is False. without_reset : bool, optional Do not reset the global variables after the generation if True. Default is False. seeds : list, optional A list of seed ``Species`` for expanding the model. If this is not None, generate a ``NetfreeModel`` once, and return a ``NetworkModel``, which is an expanded form of that with the given seeds. Default is None. effective : bool, optional See ``NetfreeModel.effective`` and ``Netfree.set_effective``. Only meaningfull with option ``is_netfree=True``. Default is False Returns ------- model : NetworkModel, NetfreeModel
(module (function_definition (function_name_from_list) function_name_from_list (parameters (identifier_cls) identifier_cls (identifier_database) identifier_database (identifier_key) identifier_key (identifier_data) identifier_data (default_parameter (identifier_clear) identifier_clear (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_arr) identifier_arr (call (identifier_cls) identifier_cls (argument_list (identifier_database) identifier_database (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (if_statement (identifier_clear) identifier_clear (block (expression_statement (call (attribute (identifier_arr) identifier_arr (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_arr) identifier_arr (identifier_extend) identifier_extend )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement (return_statement (identifier_arr) identifier_arr )return_statement )block )function_definition )module
Create and populate an Array object from a data dictionary.
(module (function_definition (function_name_read_datafiles) function_name_read_datafiles (parameters (identifier_files) identifier_files (identifier_dtype) identifier_dtype (identifier_column) identifier_column )parameters (block (expression_statement (assignment (identifier_pha) identifier_pha (list )list )assignment )expression_statement (expression_statement (assignment (identifier_pha_fpi) identifier_pha_fpi (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_filename) identifier_filename (identifier_filetype) identifier_filetype )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_files) identifier_files (identifier_dtype) identifier_dtype )argument_list )call (block (if_statement (comparison_operator (identifier_filetype) identifier_filetype (string_'cov') string_'cov' )comparison_operator (block (expression_statement (assignment (identifier_cov) identifier_cov (call (identifier_load_cov) identifier_load_cov (argument_list (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_filetype) identifier_filetype (string_'mag') string_'mag' )comparison_operator (block (expression_statement (assignment (identifier_mag) identifier_mag (call (identifier_load_rho) identifier_load_rho (argument_list (identifier_filename) identifier_filename (identifier_column) identifier_column )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_filetype) identifier_filetype (string_'pha') string_'pha' )comparison_operator (block (expression_statement (assignment (identifier_pha) identifier_pha (call (identifier_load_rho) identifier_load_rho (argument_list (identifier_filename) identifier_filename (integer_2) integer_2 )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_filetype) identifier_filetype (string_'pha_fpi') string_'pha_fpi' )comparison_operator (block (expression_statement (assignment (identifier_pha_fpi) identifier_pha_fpi (call (identifier_load_rho) identifier_load_rho (argument_list (identifier_filename) identifier_filename (integer_2) integer_2 )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement )block )for_statement (return_statement (expression_list (identifier_cov) identifier_cov (identifier_mag) identifier_mag (identifier_pha) identifier_pha (identifier_pha_fpi) identifier_pha_fpi )expression_list )return_statement )block )function_definition )module
Load the datafiles and return cov, mag, phase and fpi phase values.
(module (function_definition (function_name_report) function_name_report (parameters (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_work_dir) identifier_work_dir (call (attribute (identifier_dd) identifier_dd (identifier_get_work_dir) identifier_get_work_dir )attribute (argument_list (subscript (subscript (identifier_data) identifier_data (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_out_dir) identifier_out_dir (call (attribute (identifier_op) identifier_op (identifier_join) identifier_join )attribute (argument_list (identifier_work_dir) identifier_work_dir (string_"report") string_"report" )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_safe_makedir) identifier_safe_makedir (argument_list (identifier_out_dir) identifier_out_dir )argument_list )call )expression_statement (expression_statement (assignment (identifier_summary_file) identifier_summary_file (call (attribute (identifier_op) identifier_op (identifier_join) identifier_join )attribute (argument_list (identifier_out_dir) identifier_out_dir (string_"summary.csv") string_"summary.csv" )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_file_transaction) identifier_file_transaction (argument_list (identifier_summary_file) identifier_summary_file )argument_list )call (as_pattern_target (identifier_out_tx) identifier_out_tx )as_pattern_target )as_pattern )with_item )with_clause (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_out_tx) identifier_out_tx (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_out_handle) identifier_out_handle )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_out_handle) identifier_out_handle (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_"sample_id,%s\n") string_"sample_id,%s\n" (call (identifier__guess_header) identifier__guess_header (argument_list (subscript (subscript (identifier_data) identifier_data (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript )argument_list )call )binary_operator )argument_list )call )expression_statement (for_statement (identifier_sample) identifier_sample (identifier_data) identifier_data (block (expression_statement (assignment (identifier_info) identifier_info (subscript (identifier_sample) identifier_sample (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_group) identifier_group (call (identifier__guess_group) identifier__guess_group (argument_list (identifier_info) identifier_info )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_files) identifier_files (conditional_expression (subscript (identifier_info) identifier_info (string_"seqbuster") string_"seqbuster" )subscript (comparison_operator (string_"seqbuster") string_"seqbuster" (identifier_info) identifier_info )comparison_operator (string_"None") string_"None" )conditional_expression )assignment )expression_statement (expression_statement (call (attribute (identifier_out_handle) identifier_out_handle (identifier_write) identifier_write )attribute (argument_list (binary_operator (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (list (call (attribute (identifier_dd) identifier_dd (identifier_get_sample_name) identifier_get_sample_name )attribute (argument_list (identifier_info) identifier_info )argument_list )call (identifier_group) identifier_group )list )argument_list )call (string_"\n") string_"\n" )binary_operator )argument_list )call )expression_statement )block )for_statement )block )with_statement )block )with_statement (expression_statement (call (identifier__modify_report) identifier__modify_report (argument_list (identifier_work_dir) identifier_work_dir (identifier_out_dir) identifier_out_dir )argument_list )call )expression_statement (return_statement (identifier_summary_file) identifier_summary_file )return_statement )block )function_definition )module
Create a Rmd report for small RNAseq analysis
(module (function_definition (function_name_cancel_signature_request) function_name_cancel_signature_request (parameters (identifier_self) identifier_self (identifier_signature_request_id) identifier_signature_request_id )parameters (block (expression_statement (assignment (identifier_request) identifier_request (call (attribute (identifier_self) identifier_self (identifier__get_request) identifier__get_request )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_request) identifier_request (identifier_post) identifier_post )attribute (argument_list (keyword_argument (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier_SIGNATURE_REQUEST_CANCEL_URL) identifier_SIGNATURE_REQUEST_CANCEL_URL )attribute (identifier_signature_request_id) identifier_signature_request_id )binary_operator )keyword_argument (keyword_argument (identifier_get_json) identifier_get_json (False) False )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Cancels a SignatureRequest Cancels a SignatureRequest. After canceling, no one will be able to sign or access the SignatureRequest or its documents. Only the requester can cancel and only before everyone has signed. Args: signing_request_id (str): The id of the signature request to cancel Returns: None
(module (function_definition (function_name_do_move_to) function_name_do_move_to (parameters (identifier_self) identifier_self (identifier_element) identifier_element (identifier_decl) identifier_decl (identifier_pseudo) identifier_pseudo )parameters (block (expression_statement (assignment (identifier_target) identifier_target (call (attribute (call (identifier_serialize) identifier_serialize (argument_list (attribute (identifier_decl) identifier_decl (identifier_value) identifier_value )attribute )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_step) identifier_step (subscript (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute (subscript (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute (string_'current_step') string_'current_step' )subscript )subscript )assignment )expression_statement (expression_statement (assignment (identifier_elem) identifier_elem (attribute (call (attribute (identifier_self) identifier_self (identifier_current_target) identifier_current_target )attribute (argument_list )argument_list )call (identifier_tree) identifier_tree )attribute )assignment )expression_statement (expression_statement (assignment (identifier_actions) identifier_actions (subscript (identifier_step) identifier_step (string_'actions') string_'actions' )subscript )assignment )expression_statement (for_statement (pattern_list (identifier_pos) identifier_pos (identifier_action) identifier_action )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (call (identifier_reversed) identifier_reversed (argument_list (identifier_actions) identifier_actions )argument_list )call )argument_list )call (block (if_statement (boolean_operator (comparison_operator (subscript (identifier_action) identifier_action (integer_0) integer_0 )subscript (string_'move') string_'move' )comparison_operator (comparison_operator (subscript (identifier_action) identifier_action (integer_1) integer_1 )subscript (identifier_elem) identifier_elem )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_target_index) identifier_target_index (binary_operator (unary_operator (identifier_pos) identifier_pos )unary_operator (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (subscript (identifier_actions) identifier_actions (slice (identifier_target_index) identifier_target_index (colon) colon )slice )subscript (subscript (identifier_actions) identifier_actions (slice (binary_operator (identifier_target_index) identifier_target_index (integer_1) integer_1 )binary_operator (colon) colon )slice )subscript )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_valstep) identifier_valstep )pattern_list (call (attribute (identifier_self) identifier_self (identifier_lookup) identifier_lookup )attribute (argument_list (string_'pending') string_'pending' (identifier_target) identifier_target )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_valstep) identifier_valstep )not_operator (block (expression_statement (assignment (subscript (subscript (identifier_step) identifier_step (string_'pending') string_'pending' )subscript (identifier_target) identifier_target )subscript (list (tuple (string_'move') string_'move' (identifier_elem) identifier_elem )tuple )list )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute (identifier_valstep) identifier_valstep )subscript (string_'pending') string_'pending' )subscript (identifier_target) identifier_target )subscript (identifier_append) identifier_append )attribute (argument_list (tuple (string_'move') string_'move' (identifier_elem) identifier_elem )tuple )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Implement move-to declaration.
(module (function_definition (function_name_is_obtuse) function_name_is_obtuse (parameters (identifier_p1) identifier_p1 (identifier_v) identifier_v (identifier_p2) identifier_p2 )parameters (block (expression_statement (assignment (identifier_p1x) identifier_p1x (subscript (identifier_p1) identifier_p1 (slice (colon) colon )slice (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_p1y) identifier_p1y (subscript (identifier_p1) identifier_p1 (slice (colon) colon )slice (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_p2x) identifier_p2x (subscript (identifier_p2) identifier_p2 (slice (colon) colon )slice (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_p2y) identifier_p2y (subscript (identifier_p2) identifier_p2 (slice (colon) colon )slice (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_vx) identifier_vx (subscript (identifier_v) identifier_v (slice (colon) colon )slice (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_vy) identifier_vy (subscript (identifier_v) identifier_v (slice (colon) colon )slice (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_Dx) identifier_Dx (binary_operator (identifier_vx) identifier_vx (identifier_p2x) identifier_p2x )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_Dy) identifier_Dy (binary_operator (identifier_vy) identifier_vy (identifier_p2y) identifier_p2y )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_Dvp1x) identifier_Dvp1x (binary_operator (identifier_p1x) identifier_p1x (identifier_vx) identifier_vx )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_Dvp1y) identifier_Dvp1y (binary_operator (identifier_p1y) identifier_p1y (identifier_vy) identifier_vy )binary_operator )assignment )expression_statement (return_statement (comparison_operator (binary_operator (binary_operator (identifier_Dvp1x) identifier_Dvp1x (identifier_Dx) identifier_Dx )binary_operator (binary_operator (identifier_Dvp1y) identifier_Dvp1y (identifier_Dy) identifier_Dy )binary_operator )binary_operator (integer_0) integer_0 )comparison_operator )return_statement )block )function_definition )module
Determine whether the angle, p1 - v - p2 is obtuse p1 - N x 2 array of coordinates of first point on edge v - N x 2 array of vertex coordinates p2 - N x 2 array of coordinates of second point on edge returns vector of booleans
(module (function_definition (function_name_discover_handler_classes) function_name_discover_handler_classes (parameters (identifier_handlers_package) identifier_handlers_package )parameters (block (if_statement (comparison_operator (identifier_handlers_package) identifier_handlers_package (None) None )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_path) identifier_path )attribute (identifier_insert) identifier_insert )attribute (argument_list (integer_0) integer_0 (call (attribute (identifier_os) identifier_os (identifier_getcwd) identifier_getcwd )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_package) identifier_package (call (identifier_import_module) identifier_import_module (argument_list (identifier_handlers_package) identifier_handlers_package )argument_list )call )assignment )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_package) identifier_package (string_'__path__') string_'__path__' )argument_list )call (block (for_statement (pattern_list (identifier__) identifier__ (identifier_modname) identifier_modname (identifier__) identifier__ )pattern_list (call (attribute (identifier_pkgutil) identifier_pkgutil (identifier_iter_modules) identifier_iter_modules )attribute (argument_list (attribute (identifier_package) identifier_package (identifier___path__) identifier___path__ )attribute )argument_list )call (block (expression_statement (call (identifier_import_module) identifier_import_module (argument_list (call (attribute (string_'{package}.{module}') string_'{package}.{module}' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_package) identifier_package (attribute (identifier_package) identifier_package (identifier___name__) identifier___name__ )attribute )keyword_argument (keyword_argument (identifier_module) identifier_module (identifier_modname) identifier_modname )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_registered_handlers) identifier_registered_handlers )return_statement )block )function_definition )module
Looks for handler classes within handler path module. Currently it's not looking deep into nested module. :param handlers_package: module path to handlers :type handlers_package: string :return: list of handler classes
(module (function_definition (function_name_track_change) function_name_track_change (parameters (identifier_self) identifier_self (identifier_instance) identifier_instance (default_parameter (identifier_resolution_level) identifier_resolution_level (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_tobj) identifier_tobj (subscript (attribute (identifier_self) identifier_self (identifier_objects) identifier_objects )attribute (call (identifier_id) identifier_id (argument_list (identifier_instance) identifier_instance )argument_list )call )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_tobj) identifier_tobj (identifier_set_resolution_level) identifier_set_resolution_level )attribute (argument_list (identifier_resolution_level) identifier_resolution_level )argument_list )call )expression_statement )block )function_definition )module
Change tracking options for the already tracked object 'instance'. If instance is not tracked, a KeyError will be raised.
(module (function_definition (function_name_default_logging) function_name_default_logging (parameters (default_parameter (identifier_grab_log) identifier_grab_log (None) None )default_parameter (default_parameter (identifier_network_log) identifier_network_log (None) None )default_parameter (default_parameter (identifier_level) identifier_level (attribute (identifier_logging) identifier_logging (identifier_DEBUG) identifier_DEBUG )attribute )default_parameter (default_parameter (identifier_mode) identifier_mode (string_'a') string_'a' )default_parameter (default_parameter (identifier_propagate_network_logger) identifier_propagate_network_logger (False) False )default_parameter )parameters (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_basicConfig) identifier_basicConfig )attribute (argument_list (keyword_argument (identifier_level) identifier_level (identifier_level) identifier_level )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_network_logger) identifier_network_logger (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (string_'grab.network') string_'grab.network' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_network_logger) identifier_network_logger (identifier_propagate) identifier_propagate )attribute (identifier_propagate_network_logger) identifier_propagate_network_logger )assignment )expression_statement (if_statement (identifier_network_log) identifier_network_log (block (expression_statement (assignment (identifier_hdl) identifier_hdl (call (attribute (identifier_logging) identifier_logging (identifier_FileHandler) identifier_FileHandler )attribute (argument_list (identifier_network_log) identifier_network_log (identifier_mode) identifier_mode )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_network_logger) identifier_network_logger (identifier_addHandler) identifier_addHandler )attribute (argument_list (identifier_hdl) identifier_hdl )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_network_logger) identifier_network_logger (identifier_setLevel) identifier_setLevel )attribute (argument_list (identifier_level) identifier_level )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_grab_logger) identifier_grab_logger (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (string_'grab') string_'grab' )argument_list )call )assignment )expression_statement (if_statement (identifier_grab_log) identifier_grab_log (block (expression_statement (assignment (identifier_hdl) identifier_hdl (call (attribute (identifier_logging) identifier_logging (identifier_FileHandler) identifier_FileHandler )attribute (argument_list (identifier_grab_log) identifier_grab_log (identifier_mode) identifier_mode )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_grab_logger) identifier_grab_logger (identifier_addHandler) identifier_addHandler )attribute (argument_list (identifier_hdl) identifier_hdl )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_grab_logger) identifier_grab_logger (identifier_setLevel) identifier_setLevel )attribute (argument_list (identifier_level) identifier_level )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Customize logging output to display all log messages except grab network logs. Redirect grab network logs into file.
(module (function_definition (function_name_get_current_url) function_name_get_current_url (parameters (identifier_request) identifier_request (default_parameter (identifier_ignore_params) identifier_ignore_params (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_ignore_params) identifier_ignore_params (None) None )comparison_operator (block (expression_statement (assignment (identifier_ignore_params) identifier_ignore_params (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_protocol) identifier_protocol (conditional_expression (string_u'https') string_u'https' (call (attribute (identifier_request) identifier_request (identifier_is_secure) identifier_is_secure )attribute (argument_list )argument_list )call (string_u"http") string_u"http" )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_service_url) identifier_service_url (binary_operator (string_u"%s://%s%s") string_u"%s://%s%s" (tuple (identifier_protocol) identifier_protocol (call (attribute (identifier_request) identifier_request (identifier_get_host) identifier_get_host )attribute (argument_list )argument_list )call (attribute (identifier_request) identifier_request (identifier_path) identifier_path )attribute )tuple )binary_operator )assignment )expression_statement (if_statement (attribute (identifier_request) identifier_request (identifier_GET) identifier_GET )attribute (block (expression_statement (assignment (identifier_params) identifier_params (call (identifier_copy_params) identifier_copy_params (argument_list (attribute (identifier_request) identifier_request (identifier_GET) identifier_GET )attribute (identifier_ignore_params) identifier_ignore_params )argument_list )call )assignment )expression_statement (if_statement (identifier_params) identifier_params (block (expression_statement (augmented_assignment (identifier_service_url) identifier_service_url (binary_operator (string_u"?%s") string_u"?%s" (call (identifier_urlencode) identifier_urlencode (argument_list (identifier_params) identifier_params )argument_list )call )binary_operator )augmented_assignment )expression_statement )block )if_statement )block )if_statement (return_statement (identifier_service_url) identifier_service_url )return_statement )block )function_definition )module
Giving a django request, return the current http url, possibly ignoring some GET parameters :param django.http.HttpRequest request: The current request object. :param set ignore_params: An optional set of GET parameters to ignore :return: The URL of the current page, possibly omitting some parameters from ``ignore_params`` in the querystring. :rtype: unicode
(module (function_definition (function_name_shell_sqlalchemy) function_name_shell_sqlalchemy (parameters (typed_parameter (identifier_session) identifier_session (type (identifier_SqlalchemySession) identifier_SqlalchemySession )type )typed_parameter (typed_parameter (identifier_backend) identifier_backend (type (identifier_ShellBackend) identifier_ShellBackend )type )typed_parameter )parameters (block (expression_statement (assignment (identifier_namespace) identifier_namespace (dictionary (pair (string_'session') string_'session' (identifier_session) identifier_session )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (identifier_namespace) identifier_namespace (identifier_update) identifier_update )attribute (argument_list (call (attribute (identifier_backend) identifier_backend (identifier_get_namespace) identifier_get_namespace )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier_embed) identifier_embed (argument_list (keyword_argument (identifier_user_ns) identifier_user_ns (identifier_namespace) identifier_namespace )keyword_argument (keyword_argument (identifier_header) identifier_header (attribute (identifier_backend) identifier_backend (identifier_header) identifier_header )attribute )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
This command includes SQLAlchemy DB Session
(module (function_definition (function_name__FlushCache) function_name__FlushCache (parameters (identifier_cls) identifier_cls (identifier_format_categories) identifier_format_categories )parameters (block (if_statement (comparison_operator (attribute (identifier_definitions) identifier_definitions (identifier_FORMAT_CATEGORY_ARCHIVE) identifier_FORMAT_CATEGORY_ARCHIVE )attribute (identifier_format_categories) identifier_format_categories )comparison_operator (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__archive_remainder_list) identifier__archive_remainder_list )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__archive_scanner) identifier__archive_scanner )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__archive_store) identifier__archive_store )attribute (None) None )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_definitions) identifier_definitions (identifier_FORMAT_CATEGORY_COMPRESSED_STREAM) identifier_FORMAT_CATEGORY_COMPRESSED_STREAM )attribute (identifier_format_categories) identifier_format_categories )comparison_operator (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__compressed_stream_remainder_list) identifier__compressed_stream_remainder_list )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__compressed_stream_scanner) identifier__compressed_stream_scanner )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__compressed_stream_store) identifier__compressed_stream_store )attribute (None) None )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_definitions) identifier_definitions (identifier_FORMAT_CATEGORY_FILE_SYSTEM) identifier_FORMAT_CATEGORY_FILE_SYSTEM )attribute (identifier_format_categories) identifier_format_categories )comparison_operator (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__file_system_remainder_list) identifier__file_system_remainder_list )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__file_system_scanner) identifier__file_system_scanner )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__file_system_store) identifier__file_system_store )attribute (None) None )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_definitions) identifier_definitions (identifier_FORMAT_CATEGORY_STORAGE_MEDIA_IMAGE) identifier_FORMAT_CATEGORY_STORAGE_MEDIA_IMAGE )attribute (identifier_format_categories) identifier_format_categories )comparison_operator (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__storage_media_image_remainder_list) identifier__storage_media_image_remainder_list )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__storage_media_image_scanner) identifier__storage_media_image_scanner )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__storage_media_image_store) identifier__storage_media_image_store )attribute (None) None )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_definitions) identifier_definitions (identifier_FORMAT_CATEGORY_VOLUME_SYSTEM) identifier_FORMAT_CATEGORY_VOLUME_SYSTEM )attribute (identifier_format_categories) identifier_format_categories )comparison_operator (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__volume_system_remainder_list) identifier__volume_system_remainder_list )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__volume_system_scanner) identifier__volume_system_scanner )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__volume_system_store) identifier__volume_system_store )attribute (None) None )assignment )expression_statement )block )if_statement )block )function_definition )module
Flushes the cached objects for the specified format categories. Args: format_categories (set[str]): format categories.
(module (function_definition (function_name_capture) function_name_capture (parameters (identifier_self) identifier_self (identifier_event_type) identifier_event_type (default_parameter (identifier_data) identifier_data (None) None )default_parameter (default_parameter (identifier_date) identifier_date (None) None )default_parameter (default_parameter (identifier_time_spent) identifier_time_spent (None) None )default_parameter (default_parameter (identifier_extra) identifier_extra (None) None )default_parameter (default_parameter (identifier_stack) identifier_stack (None) None )default_parameter (default_parameter (identifier_tags) identifier_tags (None) None )default_parameter (default_parameter (identifier_sample_rate) identifier_sample_rate (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_is_enabled) identifier_is_enabled )attribute (argument_list )argument_list )call )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_exc_info) identifier_exc_info (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'exc_info') string_'exc_info' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_exc_info) identifier_exc_info (None) None )comparison_operator (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_skip_error_for_logging) identifier_skip_error_for_logging )attribute (argument_list (identifier_exc_info) identifier_exc_info )argument_list )call (block (return_statement )return_statement )block (elif_clause (not_operator (call (attribute (identifier_self) identifier_self (identifier_should_capture) identifier_should_capture )attribute (argument_list (identifier_exc_info) identifier_exc_info )argument_list )call )not_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_info) identifier_info )attribute (argument_list (string_'Not capturing exception due to filters: %s') string_'Not capturing exception due to filters: %s' (subscript (identifier_exc_info) identifier_exc_info (integer_0) integer_0 )subscript (keyword_argument (identifier_exc_info) identifier_exc_info (call (attribute (identifier_sys) identifier_sys (identifier_exc_info) identifier_exc_info )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )expression_statement (return_statement )return_statement )block )elif_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_record_exception_seen) identifier_record_exception_seen )attribute (argument_list (identifier_exc_info) identifier_exc_info )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_self) identifier_self (identifier_build_msg) identifier_build_msg )attribute (argument_list (identifier_event_type) identifier_event_type (identifier_data) identifier_data (identifier_date) identifier_date (identifier_time_spent) identifier_time_spent (identifier_extra) identifier_extra (identifier_stack) identifier_stack (keyword_argument (identifier_tags) identifier_tags (identifier_tags) identifier_tags )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_sample_rate) identifier_sample_rate (None) None )comparison_operator (block (expression_statement (assignment (identifier_sample_rate) identifier_sample_rate (attribute (identifier_self) identifier_self (identifier_sample_rate) identifier_sample_rate )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (call (attribute (attribute (identifier_self) identifier_self (identifier__random) identifier__random )attribute (identifier_random) identifier_random )attribute (argument_list )argument_list )call (identifier_sample_rate) identifier_sample_rate )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send) identifier_send )attribute (argument_list (dictionary_splat (identifier_data) identifier_data )dictionary_splat )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier__local_state) identifier__local_state )attribute (identifier_last_event_id) identifier_last_event_id )attribute (subscript (identifier_data) identifier_data (string_'event_id') string_'event_id' )subscript )assignment )expression_statement (return_statement (subscript (identifier_data) identifier_data (string_'event_id') string_'event_id' )subscript )return_statement )block )function_definition )module
Captures and processes an event and pipes it off to SentryClient.send. To use structured data (interfaces) with capture: >>> capture('raven.events.Message', message='foo', data={ >>> 'request': { >>> 'url': '...', >>> 'data': {}, >>> 'query_string': '...', >>> 'method': 'POST', >>> }, >>> 'logger': 'logger.name', >>> }, extra={ >>> 'key': 'value', >>> }) The finalized ``data`` structure contains the following (some optional) builtin values: >>> { >>> # the culprit and version information >>> 'culprit': 'full.module.name', # or /arbitrary/path >>> >>> # all detectable installed modules >>> 'modules': { >>> 'full.module.name': 'version string', >>> }, >>> >>> # arbitrary data provided by user >>> 'extra': { >>> 'key': 'value', >>> } >>> } :param event_type: the module path to the Event class. Builtins can use shorthand class notation and exclude the full module path. :param data: the data base, useful for specifying structured data interfaces. Any key which contains a '.' will be assumed to be a data interface. :param date: the datetime of this event :param time_spent: a integer value representing the duration of the event (in milliseconds) :param extra: a dictionary of additional standard metadata :param stack: a stacktrace for the event :param tags: dict of extra tags :param sample_rate: a float in the range [0, 1] to sample this message :return: a 32-length string identifying this event
(module (function_definition (function_name_prevmonday) function_name_prevmonday (parameters (identifier_num) identifier_num )parameters (block (expression_statement (assignment (identifier_today) identifier_today (call (identifier_get_today) identifier_get_today (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_lastmonday) identifier_lastmonday (binary_operator (identifier_today) identifier_today (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_days) identifier_days (call (attribute (identifier_today) identifier_today (identifier_weekday) identifier_weekday )attribute (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_weeks) identifier_weeks (identifier_num) identifier_num )keyword_argument )argument_list )call )binary_operator )assignment )expression_statement (return_statement (identifier_lastmonday) identifier_lastmonday )return_statement )block )function_definition )module
Return unix SECOND timestamp of "num" mondays ago
(module (function_definition (function_name__load_physical_network_mappings) function_name__load_physical_network_mappings (parameters (identifier_self) identifier_self (identifier_phys_net_vswitch_mappings) identifier_phys_net_vswitch_mappings )parameters (block (for_statement (identifier_mapping) identifier_mapping (identifier_phys_net_vswitch_mappings) identifier_phys_net_vswitch_mappings (block (expression_statement (assignment (identifier_parts) identifier_parts (call (attribute (identifier_mapping) identifier_mapping (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_2) integer_2 )comparison_operator (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (string_'Invalid physical network mapping: %s') string_'Invalid physical network mapping: %s' (identifier_mapping) identifier_mapping )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_pattern) identifier_pattern (call (attribute (call (attribute (identifier_re) identifier_re (identifier_escape) identifier_escape )attribute (argument_list (call (attribute (subscript (identifier_parts) identifier_parts (integer_0) integer_0 )subscript (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_'\\*') string_'\\*' (string_'.*') string_'.*' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pattern) identifier_pattern (binary_operator (identifier_pattern) identifier_pattern (string_'$') string_'$' )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_vswitch) identifier_vswitch (call (attribute (subscript (identifier_parts) identifier_parts (integer_1) integer_1 )subscript (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__physical_network_mappings) identifier__physical_network_mappings )attribute (identifier_pattern) identifier_pattern )subscript (identifier_vswitch) identifier_vswitch )assignment )expression_statement )block )else_clause )if_statement )block )for_statement )block )function_definition )module
Load all the information regarding the physical network.
(module (function_definition (function_name__add_current_quay_tag) function_name__add_current_quay_tag (parameters (identifier_repo) identifier_repo (identifier_container_tags) identifier_container_tags )parameters (block (if_statement (comparison_operator (string_':') string_':' (identifier_repo) identifier_repo )comparison_operator (block (return_statement (expression_list (identifier_repo) identifier_repo (identifier_container_tags) identifier_container_tags )expression_list )return_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_latest_tag) identifier_latest_tag (subscript (identifier_container_tags) identifier_container_tags (identifier_repo) identifier_repo )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_repo_id) identifier_repo_id (subscript (identifier_repo) identifier_repo (slice (binary_operator (call (attribute (identifier_repo) identifier_repo (identifier_find) identifier_find )attribute (argument_list (string_'/') string_'/' )argument_list )call (integer_1) integer_1 )binary_operator (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_tags) identifier_tags (subscript (call (attribute (call (attribute (identifier_requests) identifier_requests (identifier_request) identifier_request )attribute (argument_list (string_"GET") string_"GET" (binary_operator (string_"https://quay.io/api/v1/repository/") string_"https://quay.io/api/v1/repository/" (identifier_repo_id) identifier_repo_id )binary_operator )argument_list )call (identifier_json) identifier_json )attribute (argument_list )argument_list )call (string_"tags") string_"tags" )subscript )assignment )expression_statement (expression_statement (assignment (identifier_latest_tag) identifier_latest_tag (None) None )assignment )expression_statement (expression_statement (assignment (identifier_latest_modified) identifier_latest_modified (None) None )assignment )expression_statement (for_statement (pattern_list (identifier_tag) identifier_tag (identifier_info) identifier_info )pattern_list (call (attribute (identifier_tags) identifier_tags (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (identifier_latest_tag) identifier_latest_tag (block (if_statement (parenthesized_expression (boolean_operator (comparison_operator (call (attribute (attribute (identifier_dateutil) identifier_dateutil (identifier_parser) identifier_parser )attribute (identifier_parse) identifier_parse )attribute (argument_list (subscript (identifier_info) identifier_info (string_'last_modified') string_'last_modified' )subscript )argument_list )call (call (attribute (attribute (identifier_dateutil) identifier_dateutil (identifier_parser) identifier_parser )attribute (identifier_parse) identifier_parse )attribute (argument_list (identifier_latest_modified) identifier_latest_modified )argument_list )call )comparison_operator (comparison_operator (identifier_tag) identifier_tag (string_'latest') string_'latest' )comparison_operator )boolean_operator )parenthesized_expression (block (expression_statement (assignment (identifier_latest_modified) identifier_latest_modified (subscript (identifier_info) identifier_info (string_'last_modified') string_'last_modified' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_latest_tag) identifier_latest_tag (identifier_tag) identifier_tag )assignment )expression_statement )block )if_statement )block (else_clause (block (expression_statement (assignment (identifier_latest_modified) identifier_latest_modified (subscript (identifier_info) identifier_info (string_'last_modified') string_'last_modified' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_latest_tag) identifier_latest_tag (identifier_tag) identifier_tag )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (assignment (subscript (identifier_container_tags) identifier_container_tags (identifier_repo) identifier_repo )subscript (call (identifier_str) identifier_str (argument_list (identifier_latest_tag) identifier_latest_tag )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_latest_pull) identifier_latest_pull (binary_operator (binary_operator (identifier_repo) identifier_repo (string_':') string_':' )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_latest_tag) identifier_latest_tag )argument_list )call )binary_operator )assignment )expression_statement (return_statement (expression_list (identifier_latest_pull) identifier_latest_pull (identifier_container_tags) identifier_container_tags )expression_list )return_statement )block )function_definition )module
Lookup the current quay tag for the repository, adding to repo string. Enables generation of CWL explicitly tied to revisions.
(module (function_definition (function_name_monitor_deletion) function_name_monitor_deletion (parameters )parameters (block (expression_statement (assignment (identifier_monitors) identifier_monitors (dictionary )dictionary )assignment )expression_statement (function_definition (function_name_set_deleted) function_name_set_deleted (parameters (identifier_x) identifier_x )parameters (block (function_definition (function_name__) function_name__ (parameters (identifier_weakref) identifier_weakref )parameters (block (delete_statement (subscript (identifier_monitors) identifier_monitors (identifier_x) identifier_x )subscript )delete_statement )block )function_definition (return_statement (identifier__) identifier__ )return_statement )block )function_definition (function_definition (function_name_monitor) function_name_monitor (parameters (identifier_item) identifier_item (identifier_name) identifier_name )parameters (block (expression_statement (assignment (subscript (identifier_monitors) identifier_monitors (identifier_name) identifier_name )subscript (call (identifier_ref) identifier_ref (argument_list (identifier_item) identifier_item (call (identifier_set_deleted) identifier_set_deleted (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )assignment )expression_statement )block )function_definition (function_definition (function_name_is_alive) function_name_is_alive (parameters (identifier_name) identifier_name )parameters (block (return_statement (comparison_operator (call (attribute (identifier_monitors) identifier_monitors (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name (None) None )argument_list )call (None) None )comparison_operator )return_statement )block )function_definition (return_statement (expression_list (identifier_monitor) identifier_monitor (identifier_is_alive) identifier_is_alive )expression_list )return_statement )block )function_definition )module
Function for checking for correct deletion of weakref-able objects. Example usage:: monitor, is_alive = monitor_deletion() obj = set() monitor(obj, "obj") assert is_alive("obj") # True because there is a ref to `obj` is_alive del obj assert not is_alive("obj") # True because there `obj` is deleted
(module (function_definition (function_name_splitkeyurl) function_name_splitkeyurl (parameters (identifier_url) identifier_url )parameters (block (expression_statement (assignment (identifier_key) identifier_key (subscript (identifier_url) identifier_url (slice (unary_operator (integer_22) integer_22 )unary_operator (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_urlid) identifier_urlid (subscript (identifier_url) identifier_url (slice (unary_operator (integer_34) integer_34 )unary_operator (colon) colon (unary_operator (integer_24) integer_24 )unary_operator )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_service) identifier_service (subscript (identifier_url) identifier_url (slice (colon) colon (unary_operator (integer_43) integer_43 )unary_operator )slice )subscript )assignment )expression_statement (return_statement (expression_list (identifier_service) identifier_service (identifier_urlid) identifier_urlid (identifier_key) identifier_key )expression_list )return_statement )block )function_definition )module
Splits a Send url into key, urlid and 'prefix' for the Send server Should handle any hostname, but will brake on key & id length changes
(module (function_definition (function_name_guess_file_name_stream_type_header) function_name_guess_file_name_stream_type_header (parameters (identifier_args) identifier_args )parameters (block (expression_statement (assignment (identifier_ftype) identifier_ftype (None) None )assignment )expression_statement (expression_statement (assignment (identifier_fheader) identifier_fheader (None) None )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_args) identifier_args (tuple (identifier_tuple) identifier_tuple (identifier_list) identifier_list )tuple )argument_list )call (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (integer_2) integer_2 )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_fname) identifier_fname (identifier_fstream) identifier_fstream )pattern_list (identifier_args) identifier_args )assignment )expression_statement )block (elif_clause (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_args) identifier_args )argument_list )call (integer_3) integer_3 )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_fname) identifier_fname (identifier_fstream) identifier_fstream (identifier_ftype) identifier_ftype )pattern_list (identifier_args) identifier_args )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (pattern_list (identifier_fname) identifier_fname (identifier_fstream) identifier_fstream (identifier_ftype) identifier_ftype (identifier_fheader) identifier_fheader )pattern_list (identifier_args) identifier_args )assignment )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (pattern_list (identifier_fname) identifier_fname (identifier_fstream) identifier_fstream )pattern_list (call (identifier_guess_filename_stream) identifier_guess_filename_stream (argument_list (identifier_args) identifier_args )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ftype) identifier_ftype (call (identifier_guess_content_type) identifier_guess_content_type (argument_list (identifier_fname) identifier_fname )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_fstream) identifier_fstream (tuple (identifier_str) identifier_str (identifier_bytes) identifier_bytes (identifier_bytearray) identifier_bytearray )tuple )argument_list )call (block (expression_statement (assignment (identifier_fdata) identifier_fdata (identifier_fstream) identifier_fstream )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_fdata) identifier_fdata (call (attribute (identifier_fstream) identifier_fstream (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (expression_list (identifier_fname) identifier_fname (identifier_fdata) identifier_fdata (identifier_ftype) identifier_ftype (identifier_fheader) identifier_fheader )expression_list )return_statement )block )function_definition )module
Guess filename, file stream, file type, file header from args. :param args: may be string (filepath), 2-tuples (filename, fileobj), 3-tuples (filename, fileobj, contentype) or 4-tuples (filename, fileobj, contentype, custom_headers). :return: filename, file stream, file type, file header
(module (function_definition (function_name_sortJobs) function_name_sortJobs (parameters (identifier_jobTypes) identifier_jobTypes (identifier_options) identifier_options )parameters (block (expression_statement (assignment (identifier_longforms) identifier_longforms (dictionary (pair (string_"med") string_"med" (string_"median") string_"median" )pair (pair (string_"ave") string_"ave" (string_"average") string_"average" )pair (pair (string_"min") string_"min" (string_"min") string_"min" )pair (pair (string_"total") string_"total" (string_"total") string_"total" )pair (pair (string_"max") string_"max" (string_"max") string_"max" )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_sortField) identifier_sortField (subscript (identifier_longforms) identifier_longforms (attribute (identifier_options) identifier_options (identifier_sortField) identifier_sortField )attribute )subscript )assignment )expression_statement (if_statement (parenthesized_expression (boolean_operator (boolean_operator (boolean_operator (comparison_operator (attribute (identifier_options) identifier_options (identifier_sortCategory) identifier_sortCategory )attribute (string_"time") string_"time" )comparison_operator (comparison_operator (attribute (identifier_options) identifier_options (identifier_sortCategory) identifier_sortCategory )attribute (string_"clock") string_"clock" )comparison_operator )boolean_operator (comparison_operator (attribute (identifier_options) identifier_options (identifier_sortCategory) identifier_sortCategory )attribute (string_"wait") string_"wait" )comparison_operator )boolean_operator (comparison_operator (attribute (identifier_options) identifier_options (identifier_sortCategory) identifier_sortCategory )attribute (string_"memory") string_"memory" )comparison_operator )boolean_operator )parenthesized_expression (block (return_statement (call (identifier_sorted) identifier_sorted (argument_list (identifier_jobTypes) identifier_jobTypes (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_tag) identifier_tag )lambda_parameters (call (identifier_getattr) identifier_getattr (argument_list (identifier_tag) identifier_tag (binary_operator (string_"%s_%s") string_"%s_%s" (tuple (identifier_sortField) identifier_sortField (attribute (identifier_options) identifier_options (identifier_sortCategory) identifier_sortCategory )attribute )tuple )binary_operator )argument_list )call )lambda )keyword_argument (keyword_argument (identifier_reverse) identifier_reverse (attribute (identifier_options) identifier_options (identifier_sortReverse) identifier_sortReverse )attribute )keyword_argument )argument_list )call )return_statement )block (elif_clause (comparison_operator (attribute (identifier_options) identifier_options (identifier_sortCategory) identifier_sortCategory )attribute (string_"alpha") string_"alpha" )comparison_operator (block (return_statement (call (identifier_sorted) identifier_sorted (argument_list (identifier_jobTypes) identifier_jobTypes (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_tag) identifier_tag )lambda_parameters (attribute (identifier_tag) identifier_tag (identifier_name) identifier_name )attribute )lambda )keyword_argument (keyword_argument (identifier_reverse) identifier_reverse (attribute (identifier_options) identifier_options (identifier_sortReverse) identifier_sortReverse )attribute )keyword_argument )argument_list )call )return_statement )block )elif_clause (elif_clause (comparison_operator (attribute (identifier_options) identifier_options (identifier_sortCategory) identifier_sortCategory )attribute (string_"count") string_"count" )comparison_operator (block (return_statement (call (identifier_sorted) identifier_sorted (argument_list (identifier_jobTypes) identifier_jobTypes (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_tag) identifier_tag )lambda_parameters (attribute (identifier_tag) identifier_tag (identifier_total_number) identifier_total_number )attribute )lambda )keyword_argument (keyword_argument (identifier_reverse) identifier_reverse (attribute (identifier_options) identifier_options (identifier_sortReverse) identifier_sortReverse )attribute )keyword_argument )argument_list )call )return_statement )block )elif_clause )if_statement )block )function_definition )module
Return a jobTypes all sorted.
(module (function_definition (function_name_has_perm) function_name_has_perm (parameters (identifier_self) identifier_self (identifier_user_obj) identifier_user_obj (identifier_perm) identifier_perm (default_parameter (identifier_obj) identifier_obj (None) None )default_parameter )parameters (block (if_statement (not_operator (call (identifier_is_authenticated) identifier_is_authenticated (argument_list (identifier_user_obj) identifier_user_obj )argument_list )call )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_change_permission) identifier_change_permission (call (attribute (identifier_self) identifier_self (identifier_get_full_permission_string) identifier_get_full_permission_string )attribute (argument_list (string_'change') string_'change' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_delete_permission) identifier_delete_permission (call (attribute (identifier_self) identifier_self (identifier_get_full_permission_string) identifier_get_full_permission_string )attribute (argument_list (string_'delete') string_'delete' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_obj) identifier_obj (None) None )comparison_operator (block (if_statement (attribute (identifier_self) identifier_self (identifier_any_permission) identifier_any_permission )attribute (block (return_statement (True) True )return_statement )block )if_statement (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_change_permission) identifier_change_permission )attribute (comparison_operator (identifier_perm) identifier_perm (identifier_change_permission) identifier_change_permission )comparison_operator )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_delete_permission) identifier_delete_permission )attribute (comparison_operator (identifier_perm) identifier_perm (identifier_delete_permission) identifier_delete_permission )comparison_operator )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (return_statement (False) False )return_statement )block (elif_clause (attribute (identifier_user_obj) identifier_user_obj (identifier_is_active) identifier_is_active )attribute (block (if_statement (comparison_operator (identifier_obj) identifier_obj (identifier_user_obj) identifier_user_obj )comparison_operator (block (if_statement (attribute (identifier_self) identifier_self (identifier_any_permission) identifier_any_permission )attribute (block (return_statement (True) True )return_statement )block )if_statement (if_statement (parenthesized_expression (boolean_operator (attribute (identifier_self) identifier_self (identifier_change_permission) identifier_change_permission )attribute (comparison_operator (identifier_perm) identifier_perm (identifier_change_permission) identifier_change_permission )comparison_operator )boolean_operator )parenthesized_expression (block (return_statement (True) True )return_statement )block )if_statement (if_statement (parenthesized_expression (boolean_operator (attribute (identifier_self) identifier_self (identifier_delete_permission) identifier_delete_permission )attribute (comparison_operator (identifier_perm) identifier_perm (identifier_delete_permission) identifier_delete_permission )comparison_operator )boolean_operator )parenthesized_expression (block (return_statement (True) True )return_statement )block )if_statement )block )if_statement )block )elif_clause )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Check if user have permission of himself If the user_obj is not authenticated, it return ``False``. If no object is specified, it return ``True`` when the corresponding permission was specified to ``True`` (changed from v0.7.0). This behavior is based on the django system. https://code.djangoproject.com/wiki/RowLevelPermissions If an object is specified, it will return ``True`` if the object is the user. So users can change or delete themselves (you can change this behavior to set ``any_permission``, ``change_permissino`` or ``delete_permission`` attributes of this instance). Parameters ---------- user_obj : django user model instance A django user model instance which be checked perm : string `app_label.codename` formatted permission string obj : None or django model instance None or django model instance for object permission Returns ------- boolean Whether the specified user have specified permission (of specified object).
(module (function_definition (function_name_choose) function_name_choose (parameters (identifier_formatter) identifier_formatter (identifier_value) identifier_value (identifier_name) identifier_name (identifier_option) identifier_option (identifier_format) identifier_format )parameters (block (if_statement (not_operator (identifier_option) identifier_option )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_words) identifier_words (call (attribute (identifier_format) identifier_format (identifier_split) identifier_split )attribute (argument_list (string_'|') string_'|' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_num_words) identifier_num_words (call (identifier_len) identifier_len (argument_list (identifier_words) identifier_words )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_num_words) identifier_num_words (integer_2) integer_2 )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_choices) identifier_choices (call (attribute (identifier_option) identifier_option (identifier_split) identifier_split )attribute (argument_list (string_'|') string_'|' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_num_choices) identifier_num_choices (call (identifier_len) identifier_len (argument_list (identifier_choices) identifier_choices )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_num_words) identifier_num_words (tuple (identifier_num_choices) identifier_num_choices (binary_operator (identifier_num_choices) identifier_num_choices (integer_1) integer_1 )binary_operator )tuple )comparison_operator (block (expression_statement (assignment (identifier_n) identifier_n (identifier_num_choices) identifier_num_choices )assignment )expression_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_'specify %d or %d choices') string_'specify %d or %d choices' (tuple (identifier_n) identifier_n (binary_operator (identifier_n) identifier_n (integer_1) integer_1 )binary_operator )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_choice) identifier_choice (call (identifier_get_choice) identifier_get_choice (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_index) identifier_index (call (attribute (identifier_choices) identifier_choices (identifier_index) identifier_index )attribute (argument_list (identifier_choice) identifier_choice )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (if_statement (comparison_operator (identifier_num_words) identifier_num_words (identifier_num_choices) identifier_num_choices )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'no default choice supplied') string_'no default choice supplied' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_index) identifier_index (unary_operator (integer_1) integer_1 )unary_operator )assignment )expression_statement )block )except_clause )try_statement (return_statement (call (attribute (identifier_formatter) identifier_formatter (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_words) identifier_words (identifier_index) identifier_index )subscript (identifier_value) identifier_value )argument_list )call )return_statement )block )function_definition )module
Adds simple logic to format strings. Spec: `{:c[hoose](choice1|choice2|...):word1|word2|...[|default]}` Example:: >>> smart.format(u'{num:choose(1|2|3):one|two|three|other}, num=1) u'one' >>> smart.format(u'{num:choose(1|2|3):one|two|three|other}, num=4) u'other'
(module (function_definition (function_name_authorize) function_name_authorize (parameters (identifier_ctx) identifier_ctx (identifier_public_key) identifier_public_key (identifier_append) identifier_append )parameters (block (expression_statement (assignment (identifier_wva) identifier_wva (call (identifier_get_wva) identifier_get_wva (argument_list (identifier_ctx) identifier_ctx )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_http_client) identifier_http_client (call (attribute (identifier_wva) identifier_wva (identifier_get_http_client) identifier_get_http_client )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_authorized_keys_uri) identifier_authorized_keys_uri (string_"/files/userfs/WEB/python/.ssh/authorized_keys") string_"/files/userfs/WEB/python/.ssh/authorized_keys" )assignment )expression_statement (expression_statement (assignment (identifier_authorized_key_contents) identifier_authorized_key_contents (identifier_public_key) identifier_public_key )assignment )expression_statement (if_statement (identifier_append) identifier_append (block (try_statement (block (expression_statement (assignment (identifier_existing_contents) identifier_existing_contents (call (attribute (identifier_http_client) identifier_http_client (identifier_get) identifier_get )attribute (argument_list (identifier_authorized_keys_uri) identifier_authorized_keys_uri )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_authorized_key_contents) identifier_authorized_key_contents (call (attribute (string_"{}\n{}") string_"{}\n{}" (identifier_format) identifier_format )attribute (argument_list (identifier_existing_contents) identifier_existing_contents (identifier_public_key) identifier_public_key )argument_list )call )assignment )expression_statement )block (except_clause (identifier_WVAHttpNotFoundError) identifier_WVAHttpNotFoundError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement (expression_statement (call (attribute (identifier_http_client) identifier_http_client (identifier_put) identifier_put )attribute (argument_list (identifier_authorized_keys_uri) identifier_authorized_keys_uri (identifier_authorized_key_contents) identifier_authorized_key_contents )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Public key written to authorized_keys for python user.") string_"Public key written to authorized_keys for python user." )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"You should now be able to ssh to the device by doing the following:") string_"You should now be able to ssh to the device by doing the following:" )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"") string_"" )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_" $ ssh python@{}") string_" $ ssh python@{}" (identifier_format) identifier_format )attribute (argument_list (attribute (call (identifier_get_root_ctx) identifier_get_root_ctx (argument_list (identifier_ctx) identifier_ctx )argument_list )call (identifier_hostname) identifier_hostname )attribute )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Enable ssh login as the Python user for the current user This command will create an authorized_keys file on the target device containing the current users public key. This will allow ssh to the WVA from this machine.
(module (function_definition (function_name_output_snapshot_profile) function_name_output_snapshot_profile (parameters (identifier_gandi) identifier_gandi (identifier_profile) identifier_profile (identifier_output_keys) identifier_output_keys (default_parameter (identifier_justify) identifier_justify (integer_13) integer_13 )default_parameter )parameters (block (expression_statement (assignment (identifier_schedules) identifier_schedules (comparison_operator (string_'schedules') string_'schedules' (identifier_output_keys) identifier_output_keys )comparison_operator )assignment )expression_statement (if_statement (identifier_schedules) identifier_schedules (block (expression_statement (call (attribute (identifier_output_keys) identifier_output_keys (identifier_remove) identifier_remove )attribute (argument_list (string_'schedules') string_'schedules' )argument_list )call )expression_statement )block )if_statement (expression_statement (call (identifier_output_generic) identifier_output_generic (argument_list (identifier_gandi) identifier_gandi (identifier_profile) identifier_profile (identifier_output_keys) identifier_output_keys (identifier_justify) identifier_justify )argument_list )call )expression_statement (if_statement (identifier_schedules) identifier_schedules (block (expression_statement (assignment (identifier_schedule_keys) identifier_schedule_keys (list (string_'name') string_'name' (string_'kept_version') string_'kept_version' )list )assignment )expression_statement (for_statement (identifier_schedule) identifier_schedule (subscript (identifier_profile) identifier_profile (string_'schedules') string_'schedules' )subscript (block (expression_statement (call (attribute (identifier_gandi) identifier_gandi (identifier_separator_line) identifier_separator_line )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (identifier_output_generic) identifier_output_generic (argument_list (identifier_gandi) identifier_gandi (identifier_schedule) identifier_schedule (identifier_schedule_keys) identifier_schedule_keys (identifier_justify) identifier_justify )argument_list )call )expression_statement )block )for_statement )block )if_statement )block )function_definition )module
Helper to output a snapshot_profile.
(module (function_definition (function_name__check_key) function_name__check_key (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (if_statement (not_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_key) identifier_key )argument_list )call (integer_2) integer_2 )comparison_operator )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_'invalid key: %r') string_'invalid key: %r' (identifier_key) identifier_key )binary_operator )argument_list )call )raise_statement )block (elif_clause (comparison_operator (subscript (identifier_key) identifier_key (integer_1) integer_1 )subscript (identifier_TYPES) identifier_TYPES )comparison_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (binary_operator (string_'invalid datatype: %s') string_'invalid datatype: %s' (subscript (identifier_key) identifier_key (integer_1) integer_1 )subscript )binary_operator )argument_list )call )raise_statement )block )elif_clause )if_statement )block )function_definition )module
Ensures well-formedness of a key.
(module (function_definition (function_name_iter_events) function_name_iter_events (parameters (identifier_self) identifier_self (default_parameter (identifier_public) identifier_public (False) False )default_parameter (default_parameter (identifier_number) identifier_number (unary_operator (integer_1) integer_1 )unary_operator )default_parameter (default_parameter (identifier_etag) identifier_etag (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_path) identifier_path (list (string_'events') string_'events' )list )assignment )expression_statement (if_statement (identifier_public) identifier_public (block (expression_statement (call (attribute (identifier_path) identifier_path (identifier_append) identifier_append )attribute (argument_list (string_'public') string_'public' )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier__build_url) identifier__build_url )attribute (argument_list (list_splat (identifier_path) identifier_path )list_splat (keyword_argument (identifier_base_url) identifier_base_url (attribute (identifier_self) identifier_self (identifier__api) identifier__api )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__iter) identifier__iter )attribute (argument_list (call (identifier_int) identifier_int (argument_list (identifier_number) identifier_number )argument_list )call (identifier_url) identifier_url (identifier_Event) identifier_Event (keyword_argument (identifier_etag) identifier_etag (identifier_etag) identifier_etag )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Iterate over events performed by this user. :param bool public: (optional), only list public events for the authenticated user :param int number: (optional), number of events to return. Default: -1 returns all available events. :param str etag: (optional), ETag from a previous request to the same endpoint :returns: list of :class:`Event <github3.events.Event>`\ s
(module (function_definition (function_name_wait_until) function_name_wait_until (parameters (identifier_what) identifier_what (default_parameter (identifier_times) identifier_times (unary_operator (integer_1) integer_1 )unary_operator )default_parameter )parameters (block (while_statement (identifier_times) identifier_times (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_'Waiting times left %d') string_'Waiting times left %d' (identifier_times) identifier_times )argument_list )call )expression_statement (try_statement (block (if_statement (comparison_operator (call (identifier_what) identifier_what (argument_list )argument_list )call (True) True )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement )block (except_clause (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_exception) identifier_exception )attribute (argument_list (string_'Wait failed') string_'Wait failed' )argument_list )call )expression_statement )block )except_clause (else_clause (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (string_'Trial[%d] failed') string_'Trial[%d] failed' (identifier_times) identifier_times )argument_list )call )expression_statement )block )else_clause )try_statement (expression_statement (augmented_assignment (identifier_times) identifier_times (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )while_statement (return_statement (False) False )return_statement )block )function_definition )module
Wait until `what` return True Args: what (Callable[bool]): Call `wait()` again and again until it returns True times (int): Maximum times of trials before giving up Returns: True if success, False if times threshold reached
(module (function_definition (function_name_init) function_name_init (parameters (identifier_textCNN) identifier_textCNN (identifier_vocab) identifier_vocab (identifier_model_mode) identifier_model_mode (identifier_context) identifier_context (identifier_lr) identifier_lr )parameters (block (expression_statement (call (attribute (identifier_textCNN) identifier_textCNN (identifier_initialize) identifier_initialize )attribute (argument_list (call (attribute (attribute (identifier_mx) identifier_mx (identifier_init) identifier_init )attribute (identifier_Xavier) identifier_Xavier )attribute (argument_list )argument_list )call (keyword_argument (identifier_ctx) identifier_ctx (identifier_context) identifier_context )keyword_argument (keyword_argument (identifier_force_reinit) identifier_force_reinit (True) True )keyword_argument )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_model_mode) identifier_model_mode (string_'rand') string_'rand' )comparison_operator (block (expression_statement (call (attribute (attribute (attribute (identifier_textCNN) identifier_textCNN (identifier_embedding) identifier_embedding )attribute (identifier_weight) identifier_weight )attribute (identifier_set_data) identifier_set_data )attribute (argument_list (attribute (attribute (identifier_vocab) identifier_vocab (identifier_embedding) identifier_embedding )attribute (identifier_idx_to_vec) identifier_idx_to_vec )attribute )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_model_mode) identifier_model_mode (string_'multichannel') string_'multichannel' )comparison_operator (block (expression_statement (call (attribute (attribute (attribute (identifier_textCNN) identifier_textCNN (identifier_embedding_extend) identifier_embedding_extend )attribute (identifier_weight) identifier_weight )attribute (identifier_set_data) identifier_set_data )attribute (argument_list (attribute (attribute (identifier_vocab) identifier_vocab (identifier_embedding) identifier_embedding )attribute (identifier_idx_to_vec) identifier_idx_to_vec )attribute )argument_list )call )expression_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_model_mode) identifier_model_mode (string_'static') string_'static' )comparison_operator (comparison_operator (identifier_model_mode) identifier_model_mode (string_'multichannel') string_'multichannel' )comparison_operator )boolean_operator (block (expression_statement (call (attribute (call (attribute (attribute (identifier_textCNN) identifier_textCNN (identifier_embedding) identifier_embedding )attribute (identifier_collect_params) identifier_collect_params )attribute (argument_list )argument_list )call (identifier_setattr) identifier_setattr )attribute (argument_list (string_'grad_req') string_'grad_req' (string_'null') string_'null' )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_trainer) identifier_trainer (call (attribute (identifier_gluon) identifier_gluon (identifier_Trainer) identifier_Trainer )attribute (argument_list (call (attribute (identifier_textCNN) identifier_textCNN (identifier_collect_params) identifier_collect_params )attribute (argument_list )argument_list )call (string_'adam') string_'adam' (dictionary (pair (string_'learning_rate') string_'learning_rate' (identifier_lr) identifier_lr )pair )dictionary )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_textCNN) identifier_textCNN (identifier_trainer) identifier_trainer )expression_list )return_statement )block )function_definition )module
Initialize parameters.
(module (function_definition (function_name_item) function_name_item (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_url) identifier_url (attribute (identifier_self) identifier_self (identifier__contentURL) identifier__contentURL )attribute )assignment )expression_statement (return_statement (call (identifier_Item) identifier_Item (argument_list (keyword_argument (identifier_url) identifier_url (attribute (identifier_self) identifier_self (identifier__contentURL) identifier__contentURL )attribute )keyword_argument (keyword_argument (identifier_securityHandler) identifier_securityHandler (attribute (identifier_self) identifier_self (identifier__securityHandler) identifier__securityHandler )attribute )keyword_argument (keyword_argument (identifier_proxy_url) identifier_proxy_url (attribute (identifier_self) identifier_self (identifier__proxy_url) identifier__proxy_url )attribute )keyword_argument (keyword_argument (identifier_proxy_port) identifier_proxy_port (attribute (identifier_self) identifier_self (identifier__proxy_port) identifier__proxy_port )attribute )keyword_argument (keyword_argument (identifier_initalize) identifier_initalize (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition )module
returns the Item class of an Item
(module (function_definition (function_name_pending_assignment) function_name_pending_assignment (parameters (identifier_self) identifier_self )parameters (block (return_statement (dictionary_comprehension (pair (attribute (subscript (attribute (identifier_self) identifier_self (identifier_partitions) identifier_partitions )attribute (identifier_pid) identifier_pid )subscript (identifier_name) identifier_name )attribute (list_comprehension (attribute (subscript (attribute (identifier_self) identifier_self (identifier_brokers) identifier_brokers )attribute (identifier_bid) identifier_bid )subscript (identifier_id) identifier_id )attribute (for_in_clause (identifier_bid) identifier_bid (subscript (attribute (identifier_self) identifier_self (identifier_replicas) identifier_replicas )attribute (identifier_pid) identifier_pid )subscript )for_in_clause )list_comprehension )pair (for_in_clause (identifier_pid) identifier_pid (call (identifier_set) identifier_set (argument_list (attribute (identifier_self) identifier_self (identifier_pending_partitions) identifier_pending_partitions )attribute )argument_list )call )for_in_clause )dictionary_comprehension )return_statement )block )function_definition )module
Return the pending partition assignment that this state represents.
(module (function_definition (function_name_reset) function_name_reset (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_alive) identifier_alive )attribute (identifier_value) identifier_value )attribute (False) False )assignment )expression_statement (expression_statement (assignment (identifier_qsize) identifier_qsize (integer_0) integer_0 )assignment )expression_statement (try_statement (block (while_statement (True) True (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_queue) identifier_queue )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_timeout) identifier_timeout (float_0.1) float_0.1 )keyword_argument )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_qsize) identifier_qsize (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement )block (except_clause (identifier_QEmptyExcept) identifier_QEmptyExcept (block (pass_statement )pass_statement )block )except_clause )try_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"Queue size on reset: {}") string_"Queue size on reset: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_qsize) identifier_qsize )argument_list )call )argument_list )call )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_p) identifier_p )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_self) identifier_self (identifier_proc) identifier_proc )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_p) identifier_p (identifier_join) identifier_join )attribute (argument_list )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_proc) identifier_proc )attribute (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Resets the generator by stopping all processes
(module (function_definition (function_name__make_property_from_dict) function_name__make_property_from_dict (parameters (identifier_self) identifier_self (typed_parameter (identifier_property_def) identifier_property_def (type (identifier_Dict) identifier_Dict )type )typed_parameter )parameters (type (identifier_Property) identifier_Property )type (block (expression_statement (assignment (identifier_property_hash) identifier_property_hash (call (identifier_hash_dump) identifier_hash_dump (argument_list (identifier_property_def) identifier_property_def )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_edge_property_model) identifier_edge_property_model (call (attribute (attribute (identifier_self) identifier_self (identifier_object_cache_property) identifier_object_cache_property )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_property_hash) identifier_property_hash )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_edge_property_model) identifier_edge_property_model (None) None )comparison_operator (block (expression_statement (assignment (identifier_edge_property_model) identifier_edge_property_model (call (attribute (identifier_self) identifier_self (identifier_get_property_by_hash) identifier_get_property_by_hash )attribute (argument_list (identifier_property_hash) identifier_property_hash )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_edge_property_model) identifier_edge_property_model )not_operator (block (expression_statement (assignment (subscript (identifier_property_def) identifier_property_def (string_'sha512') string_'sha512' )subscript (identifier_property_hash) identifier_property_hash )assignment )expression_statement (expression_statement (assignment (identifier_edge_property_model) identifier_edge_property_model (call (identifier_Property) identifier_Property (argument_list (dictionary_splat (identifier_property_def) identifier_property_def )dictionary_splat )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_object_cache_property) identifier_object_cache_property )attribute (identifier_property_hash) identifier_property_hash )subscript (identifier_edge_property_model) identifier_edge_property_model )assignment )expression_statement )block )if_statement (return_statement (identifier_edge_property_model) identifier_edge_property_model )return_statement )block )function_definition )module
Build an edge property from a dictionary.
(module (function_definition (function_name_del_node) function_name_del_node (parameters (identifier_self) identifier_self (identifier_name) identifier_name (default_parameter (identifier_index) identifier_index (None) None )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_name) identifier_name (identifier_Node) identifier_Node )argument_list )call (block (expression_statement (assignment (identifier_name) identifier_name (call (attribute (identifier_name) identifier_name (identifier_get_name) identifier_get_name )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_name) identifier_name (subscript (attribute (identifier_self) identifier_self (identifier_obj_dict) identifier_obj_dict )attribute (string_'nodes') string_'nodes' )subscript )comparison_operator (block (if_statement (parenthesized_expression (boolean_operator (comparison_operator (identifier_index) identifier_index (None) None )comparison_operator (comparison_operator (identifier_index) identifier_index (call (identifier_len) identifier_len (argument_list (subscript (subscript (attribute (identifier_self) identifier_self (identifier_obj_dict) identifier_obj_dict )attribute (string_'nodes') string_'nodes' )subscript (identifier_name) identifier_name )subscript )argument_list )call )comparison_operator )boolean_operator )parenthesized_expression (block (delete_statement (subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier_obj_dict) identifier_obj_dict )attribute (string_'nodes') string_'nodes' )subscript (identifier_name) identifier_name )subscript (identifier_index) identifier_index )subscript )delete_statement (return_statement (True) True )return_statement )block (else_clause (block (delete_statement (subscript (subscript (attribute (identifier_self) identifier_self (identifier_obj_dict) identifier_obj_dict )attribute (string_'nodes') string_'nodes' )subscript (identifier_name) identifier_name )subscript )delete_statement (return_statement (True) True )return_statement )block )else_clause )if_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Delete a node from the graph. Given a node's name all node(s) with that same name will be deleted if 'index' is not specified or set to None. If there are several nodes with that same name and 'index' is given, only the node in that position will be deleted. 'index' should be an integer specifying the position of the node to delete. If index is larger than the number of nodes with that name, no action is taken. If nodes are deleted it returns True. If no action is taken it returns False.
(module (function_definition (function_name_server_args) function_name_server_args (parameters (identifier_self) identifier_self (identifier_parsed_args) identifier_parsed_args )parameters (block (expression_statement (assignment (identifier_args) identifier_args (dictionary_comprehension (pair (identifier_arg) identifier_arg (identifier_value) identifier_value )pair (for_in_clause (pattern_list (identifier_arg) identifier_arg (identifier_value) identifier_value )pattern_list (call (attribute (call (identifier_vars) identifier_vars (argument_list (identifier_parsed_args) identifier_parsed_args )argument_list )call (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (boolean_operator (not_operator (call (attribute (identifier_arg) identifier_arg (identifier_startswith) identifier_startswith )attribute (argument_list (string_'_') string_'_' )argument_list )call )not_operator (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator )boolean_operator )if_clause )dictionary_comprehension )assignment )expression_statement (expression_statement (call (attribute (identifier_args) identifier_args (identifier_update) identifier_update )attribute (argument_list (call (identifier_vars) identifier_vars (argument_list (identifier_self) identifier_self )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_args) identifier_args )return_statement )block )function_definition )module
Return keyword args for Server class.
(module (function_definition (function_name_monitor) function_name_monitor (parameters (identifier_self) identifier_self (identifier_message) identifier_message (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kws) identifier_kws )dictionary_splat_pattern )parameters (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_isEnabledFor) identifier_isEnabledFor )attribute (argument_list (identifier_MON) identifier_MON )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__log) identifier__log )attribute (argument_list (identifier_MON) identifier_MON (identifier_message) identifier_message (identifier_args) identifier_args (dictionary_splat (identifier_kws) identifier_kws )dictionary_splat )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Define a monitoring logger that will be added to Logger :param self: The logging object :param message: The logging message :param args: Positional arguments :param kws: Keyword arguments :return:
(module (function_definition (function_name_create_ecdsap256_key_pair) function_name_create_ecdsap256_key_pair (parameters )parameters (block (expression_statement (assignment (identifier_pub) identifier_pub (call (identifier_ECDSAP256PublicKey) identifier_ECDSAP256PublicKey (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_priv) identifier_priv (call (identifier_ECDSAP256PrivateKey) identifier_ECDSAP256PrivateKey (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rc) identifier_rc (call (attribute (identifier__lib) identifier__lib (identifier_xtt_crypto_create_ecdsap256_key_pair) identifier_xtt_crypto_create_ecdsap256_key_pair )attribute (argument_list (attribute (identifier_pub) identifier_pub (identifier_native) identifier_native )attribute (attribute (identifier_priv) identifier_priv (identifier_native) identifier_native )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_rc) identifier_rc (attribute (identifier_RC) identifier_RC (identifier_SUCCESS) identifier_SUCCESS )attribute )comparison_operator (block (return_statement (tuple (identifier_pub) identifier_pub (identifier_priv) identifier_priv )tuple )return_statement )block (else_clause (block (raise_statement (call (identifier_error_from_code) identifier_error_from_code (argument_list (identifier_rc) identifier_rc )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Create a new ECDSAP256 key pair. :returns: a tuple of the public and private keys
(module (function_definition (function_name__distance_squared) function_name__distance_squared (parameters (identifier_self) identifier_self (typed_parameter (identifier_p2) identifier_p2 (type (string_"Point2") string_"Point2" )type )typed_parameter )parameters (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_int) identifier_int )type (type (identifier_float) identifier_float )type )type_parameter )generic_type )type (block (return_statement (binary_operator (binary_operator (parenthesized_expression (binary_operator (subscript (identifier_self) identifier_self (integer_0) integer_0 )subscript (subscript (identifier_p2) identifier_p2 (integer_0) integer_0 )subscript )binary_operator )parenthesized_expression (integer_2) integer_2 )binary_operator (binary_operator (parenthesized_expression (binary_operator (subscript (identifier_self) identifier_self (integer_1) integer_1 )subscript (subscript (identifier_p2) identifier_p2 (integer_1) integer_1 )subscript )binary_operator )parenthesized_expression (integer_2) integer_2 )binary_operator )binary_operator )return_statement )block )function_definition )module
Function used to not take the square root as the distances will stay proportionally the same. This is to speed up the sorting process.
(module (function_definition (function_name_offsets) function_name_offsets (parameters (identifier_self) identifier_self (default_parameter (identifier_group) identifier_group (None) None )default_parameter )parameters (block (if_statement (not_operator (identifier_group) identifier_group )not_operator (block (return_statement (dictionary (pair (string_'fetch') string_'fetch' (call (attribute (identifier_self) identifier_self (identifier_offsets) identifier_offsets )attribute (argument_list (string_'fetch') string_'fetch' )argument_list )call )pair (pair (string_'commit') string_'commit' (call (attribute (identifier_self) identifier_self (identifier_offsets) identifier_offsets )attribute (argument_list (string_'commit') string_'commit' )argument_list )call )pair (pair (string_'task_done') string_'task_done' (call (attribute (identifier_self) identifier_self (identifier_offsets) identifier_offsets )attribute (argument_list (string_'task_done') string_'task_done' )argument_list )call )pair (pair (string_'highwater') string_'highwater' (call (attribute (identifier_self) identifier_self (identifier_offsets) identifier_offsets )attribute (argument_list (string_'highwater') string_'highwater' )argument_list )call )pair )dictionary )return_statement )block (else_clause (block (return_statement (call (identifier_dict) identifier_dict (argument_list (call (identifier_deepcopy) identifier_deepcopy (argument_list (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_self) identifier_self (identifier__offsets) identifier__offsets )attribute (identifier_group) identifier_group )argument_list )call )argument_list )call )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Get internal consumer offset values Keyword Arguments: group: Either "fetch", "commit", "task_done", or "highwater". If no group specified, returns all groups. Returns: A copy of internal offsets struct
(module (function_definition (function_name_ufo_create_background_layer_for_all_glyphs) function_name_ufo_create_background_layer_for_all_glyphs (parameters (identifier_ufo_font) identifier_ufo_font )parameters (block (if_statement (comparison_operator (string_"public.background") string_"public.background" (attribute (identifier_ufo_font) identifier_ufo_font (identifier_layers) identifier_layers )attribute )comparison_operator (block (expression_statement (assignment (identifier_background) identifier_background (subscript (attribute (identifier_ufo_font) identifier_ufo_font (identifier_layers) identifier_layers )attribute (string_"public.background") string_"public.background" )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_background) identifier_background (call (attribute (identifier_ufo_font) identifier_ufo_font (identifier_newLayer) identifier_newLayer )attribute (argument_list (string_"public.background") string_"public.background" )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (for_statement (identifier_glyph) identifier_glyph (identifier_ufo_font) identifier_ufo_font (block (if_statement (comparison_operator (attribute (identifier_glyph) identifier_glyph (identifier_name) identifier_name )attribute (identifier_background) identifier_background )comparison_operator (block (expression_statement (call (attribute (identifier_background) identifier_background (identifier_newGlyph) identifier_newGlyph )attribute (argument_list (attribute (identifier_glyph) identifier_glyph (identifier_name) identifier_name )attribute )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Create a background layer for all glyphs in ufo_font if not present to reduce roundtrip differences.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (identifier_key) identifier_key (identifier_filepath) identifier_filepath )parameters (block (if_statement (not_operator (identifier_filepath) identifier_filepath )not_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_"Configuration file not given") string_"Configuration file not given" )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier___check_config_key) identifier___check_config_key )attribute (argument_list (identifier_key) identifier_key )argument_list )call )not_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_"%s parameter does not exists") string_"%s parameter does not exists" (identifier_key) identifier_key )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call )not_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_"%s config file does not exist") string_"%s config file does not exist" (identifier_filepath) identifier_filepath )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_section) identifier_section (identifier_option) identifier_option )pattern_list (call (attribute (identifier_key) identifier_key (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_config) identifier_config (call (attribute (identifier_configparser) identifier_configparser (identifier_SafeConfigParser) identifier_SafeConfigParser )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_config) identifier_config (identifier_read) identifier_read )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call )expression_statement (try_statement (block (expression_statement (assignment (identifier_option) identifier_option (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (identifier_section) identifier_section (identifier_option) identifier_option )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_display) identifier_display )attribute (argument_list (string_'config.tmpl') string_'config.tmpl' (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_option) identifier_option (identifier_option) identifier_option )keyword_argument )argument_list )call )expression_statement )block (except_clause (tuple (attribute (identifier_configparser) identifier_configparser (identifier_NoSectionError) identifier_NoSectionError )attribute (attribute (identifier_configparser) identifier_configparser (identifier_NoOptionError) identifier_NoOptionError )attribute )tuple (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement (identifier_CMD_SUCCESS) identifier_CMD_SUCCESS )return_statement )block )function_definition )module
Get configuration parameter. Reads 'key' configuration parameter from the configuration file given in 'filepath'. Configuration parameter in 'key' must follow the schema <section>.<option> . :param key: key to get :param filepath: configuration file
(module (function_definition (function_name_compare) function_name_compare (parameters (identifier_ctx) identifier_ctx (identifier_commands) identifier_commands )parameters (block (expression_statement (assignment (identifier_mp_pool) identifier_mp_pool (call (attribute (identifier_multiprocessing) identifier_multiprocessing (identifier_Pool) identifier_Pool )attribute (argument_list (binary_operator (call (attribute (identifier_multiprocessing) identifier_multiprocessing (identifier_cpu_count) identifier_cpu_count )attribute (argument_list )argument_list )call (integer_2) integer_2 )binary_operator )argument_list )call )assignment )expression_statement (for_statement (identifier_ip) identifier_ip (subscript (attribute (identifier_ctx) identifier_ctx (identifier_obj) identifier_obj )attribute (string_'hosts') string_'hosts' )subscript (block (expression_statement (call (attribute (identifier_mp_pool) identifier_mp_pool (identifier_apply_async) identifier_apply_async )attribute (argument_list (attribute (identifier_wrap) identifier_wrap (identifier_open_connection) identifier_open_connection )attribute (keyword_argument (identifier_args) identifier_args (tuple (identifier_ip) identifier_ip (subscript (subscript (attribute (identifier_ctx) identifier_ctx (identifier_obj) identifier_obj )attribute (string_'conn') string_'conn' )subscript (string_'username') string_'username' )subscript (subscript (subscript (attribute (identifier_ctx) identifier_ctx (identifier_obj) identifier_obj )attribute (string_'conn') string_'conn' )subscript (string_'password') string_'password' )subscript (attribute (identifier_wrap) identifier_wrap (identifier_compare) identifier_compare )attribute (list (identifier_commands) identifier_commands )list (subscript (attribute (identifier_ctx) identifier_ctx (identifier_obj) identifier_obj )attribute (string_'out') string_'out' )subscript (subscript (subscript (attribute (identifier_ctx) identifier_ctx (identifier_obj) identifier_obj )attribute (string_'conn') string_'conn' )subscript (string_'connect_timeout') string_'connect_timeout' )subscript (subscript (subscript (attribute (identifier_ctx) identifier_ctx (identifier_obj) identifier_obj )attribute (string_'conn') string_'conn' )subscript (string_'session_timeout') string_'session_timeout' )subscript (subscript (subscript (attribute (identifier_ctx) identifier_ctx (identifier_obj) identifier_obj )attribute (string_'conn') string_'conn' )subscript (string_'port') string_'port' )subscript )tuple )keyword_argument (keyword_argument (identifier_callback) identifier_callback (identifier_write_out) identifier_write_out )keyword_argument )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_mp_pool) identifier_mp_pool (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_mp_pool) identifier_mp_pool (identifier_join) identifier_join )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Run 'show | compare' for set commands. @param ctx: The click context paramter, for receiving the object dictionary | being manipulated by other previous functions. Needed by any | function with the @click.pass_context decorator. @type ctx: click.Context @param commands: The Junos set commands that will be put into a candidate | configuration and used to create the 'show | compare' | against the running configuration. much like the commands | parameter for the commit() function, this can be one of | three things: a string containing a single command, a | string containing a comma separated list of commands, or | a string containing a filepath location for a file with | commands on each line. @type commands: str @returns: None. Functions part of click relating to the command group | 'main' do not return anything. Click handles passing context | between the functions and maintaing command order and chaining.
(module (function_definition (function_name_gill_king) function_name_gill_king (parameters (identifier_mat) identifier_mat (default_parameter (identifier_eps) identifier_eps (float_1e-16) float_1e-16 )default_parameter )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_scipy) identifier_scipy (identifier_sparse) identifier_sparse )attribute (identifier_issparse) identifier_issparse )attribute (argument_list (identifier_mat) identifier_mat )argument_list )call )not_operator (block (expression_statement (assignment (identifier_mat) identifier_mat (call (attribute (identifier_numpy) identifier_numpy (identifier_asfarray) identifier_asfarray )attribute (argument_list (identifier_mat) identifier_mat )argument_list )call )assignment )expression_statement )block )if_statement (assert_statement (call (attribute (identifier_numpy) identifier_numpy (identifier_allclose) identifier_allclose )attribute (argument_list (identifier_mat) identifier_mat (attribute (identifier_mat) identifier_mat (identifier_T) identifier_T )attribute )argument_list )call )assert_statement (expression_statement (assignment (identifier_size) identifier_size (subscript (attribute (identifier_mat) identifier_mat (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_mat_diag) identifier_mat_diag (call (attribute (identifier_mat) identifier_mat (identifier_diagonal) identifier_diagonal )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_gamma) identifier_gamma (call (attribute (call (identifier_abs) identifier_abs (argument_list (identifier_mat_diag) identifier_mat_diag )argument_list )call (identifier_max) identifier_max )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_off_diag) identifier_off_diag (call (attribute (call (identifier_abs) identifier_abs (argument_list (binary_operator (identifier_mat) identifier_mat (call (attribute (identifier_numpy) identifier_numpy (identifier_diag) identifier_diag )attribute (argument_list (identifier_mat_diag) identifier_mat_diag )argument_list )call )binary_operator )argument_list )call (identifier_max) identifier_max )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_delta) identifier_delta (binary_operator (identifier_eps) identifier_eps (call (identifier_max) identifier_max (argument_list (binary_operator (identifier_gamma) identifier_gamma (identifier_off_diag) identifier_off_diag )binary_operator (integer_1) integer_1 )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_beta) identifier_beta (call (attribute (identifier_numpy) identifier_numpy (identifier_sqrt) identifier_sqrt )attribute (argument_list (call (identifier_max) identifier_max (argument_list (identifier_gamma) identifier_gamma (binary_operator (identifier_off_diag) identifier_off_diag (identifier_size) identifier_size )binary_operator (identifier_eps) identifier_eps )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_lowtri) identifier_lowtri (call (identifier__gill_king) identifier__gill_king (argument_list (identifier_mat) identifier_mat (identifier_beta) identifier_beta (identifier_delta) identifier_delta )argument_list )call )assignment )expression_statement (return_statement (identifier_lowtri) identifier_lowtri )return_statement )block )function_definition )module
Gill-King algorithm for modified cholesky decomposition. Args: mat (numpy.ndarray): Must be a non-singular and symmetric matrix. If sparse, the result will also be sparse. eps (float): Error tolerance used in algorithm. Returns: (numpy.ndarray): Lower triangular Cholesky factor. Examples: >>> mat = [[4, 2, 1], [2, 6, 3], [1, 3, -.004]] >>> lowtri = gill_king(mat) >>> print(numpy.around(lowtri, 4)) [[2. 0. 0. ] [1. 2.2361 0. ] [0.5 1.118 1.2264]] >>> print(numpy.around(numpy.dot(lowtri, lowtri.T), 4)) [[4. 2. 1. ] [2. 6. 3. ] [1. 3. 3.004]]
(module (function_definition (function_name_info_section) function_name_info_section (parameters (typed_parameter (list_splat_pattern (identifier_tokens) identifier_tokens )list_splat_pattern (type (identifier_Token) identifier_Token )type )typed_parameter (typed_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern (type (identifier_Any) identifier_Any )type )typed_parameter )parameters (type (None) None )type (block (expression_statement (assignment (identifier_process_tokens_kwargs) identifier_process_tokens_kwargs (call (attribute (identifier_kwargs) identifier_kwargs (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_process_tokens_kwargs) identifier_process_tokens_kwargs (string_"color") string_"color" )subscript (False) False )assignment )expression_statement (expression_statement (assignment (identifier_no_color) identifier_no_color (call (identifier__process_tokens) identifier__process_tokens (argument_list (identifier_tokens) identifier_tokens (dictionary_splat (identifier_process_tokens_kwargs) identifier_process_tokens_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_info) identifier_info (argument_list (list_splat (identifier_tokens) identifier_tokens )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (call (identifier_info) identifier_info (argument_list (binary_operator (string_"-") string_"-" (call (identifier_len) identifier_len (argument_list (identifier_no_color) identifier_no_color )argument_list )call )binary_operator (keyword_argument (identifier_end) identifier_end (string_"\n\n") string_"\n\n" )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Print an underlined section name
(module (function_definition (function_name_generate_blob) function_name_generate_blob (parameters (identifier_self) identifier_self (identifier_container_name) identifier_container_name (identifier_blob_name) identifier_blob_name (default_parameter (identifier_permission) identifier_permission (None) None )default_parameter (default_parameter (identifier_expiry) identifier_expiry (None) None )default_parameter (default_parameter (identifier_start) identifier_start (None) None )default_parameter (default_parameter (identifier_id) identifier_id (None) None )default_parameter (default_parameter (identifier_ip) identifier_ip (None) None )default_parameter (default_parameter (identifier_protocol) identifier_protocol (None) None )default_parameter (default_parameter (identifier_cache_control) identifier_cache_control (None) None )default_parameter (default_parameter (identifier_content_disposition) identifier_content_disposition (None) None )default_parameter (default_parameter (identifier_content_encoding) identifier_content_encoding (None) None )default_parameter (default_parameter (identifier_content_language) identifier_content_language (None) None )default_parameter (default_parameter (identifier_content_type) identifier_content_type (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_resource_path) identifier_resource_path (binary_operator (binary_operator (identifier_container_name) identifier_container_name (string_'/') string_'/' )binary_operator (identifier_blob_name) identifier_blob_name )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_sas) identifier_sas (call (identifier__SharedAccessHelper) identifier__SharedAccessHelper (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_sas) identifier_sas (identifier_add_base) identifier_add_base )attribute (argument_list (identifier_permission) identifier_permission (identifier_expiry) identifier_expiry (identifier_start) identifier_start (identifier_ip) identifier_ip (identifier_protocol) identifier_protocol )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sas) identifier_sas (identifier_add_id) identifier_add_id )attribute (argument_list (identifier_id) identifier_id )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sas) identifier_sas (identifier_add_resource) identifier_add_resource )attribute (argument_list (string_'b') string_'b' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sas) identifier_sas (identifier_add_override_response_headers) identifier_add_override_response_headers )attribute (argument_list (identifier_cache_control) identifier_cache_control (identifier_content_disposition) identifier_content_disposition (identifier_content_encoding) identifier_content_encoding (identifier_content_language) identifier_content_language (identifier_content_type) identifier_content_type )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sas) identifier_sas (identifier_add_resource_signature) identifier_add_resource_signature )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_account_name) identifier_account_name )attribute (attribute (identifier_self) identifier_self (identifier_account_key) identifier_account_key )attribute (string_'blob') string_'blob' (identifier_resource_path) identifier_resource_path )argument_list )call )expression_statement (return_statement (call (attribute (identifier_sas) identifier_sas (identifier_get_token) identifier_get_token )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Generates a shared access signature for the blob. Use the returned signature with the sas_token parameter of any BlobService. :param str container_name: Name of container. :param str blob_name: Name of blob. :param BlobPermissions permission: The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. Permissions must be ordered read, write, delete, list. Required unless an id is given referencing a stored access policy which contains this field. This field must be omitted if it has been specified in an associated stored access policy. :param expiry: The time at which the shared access signature becomes invalid. Required unless an id is given referencing a stored access policy which contains this field. This field must be omitted if it has been specified in an associated stored access policy. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC. :type expiry: date or str :param start: The time at which the shared access signature becomes valid. If omitted, start time for this call is assumed to be the time when the storage service receives the request. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC. :type start: date or str :param str id: A unique value up to 64 characters in length that correlates to a stored access policy. To create a stored access policy, use set_blob_service_properties. :param str ip: Specifies an IP address or a range of IP addresses from which to accept requests. If the IP address from which the request originates does not match the IP address or address range specified on the SAS token, the request is not authenticated. For example, specifying sip=168.1.5.65 or sip=168.1.5.60-168.1.5.70 on the SAS restricts the request to those IP addresses. :param str protocol: Specifies the protocol permitted for a request made. The default value is https,http. See :class:`~azure.storage.models.Protocol` for possible values. :param str cache_control: Response header value for Cache-Control when resource is accessed using this shared access signature. :param str content_disposition: Response header value for Content-Disposition when resource is accessed using this shared access signature. :param str content_encoding: Response header value for Content-Encoding when resource is accessed using this shared access signature. :param str content_language: Response header value for Content-Language when resource is accessed using this shared access signature. :param str content_type: Response header value for Content-Type when resource is accessed using this shared access signature.
(module (function_definition (function_name__get_link) function_name__get_link (parameters (typed_parameter (identifier_element) identifier_element (type (identifier_Element) identifier_Element )type )typed_parameter )parameters (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_link) identifier_link (call (identifier_get_text) identifier_get_text (argument_list (identifier_element) identifier_element (string_'link') string_'link' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_link) identifier_link (None) None )comparison_operator (block (return_statement (identifier_link) identifier_link )return_statement )block )if_statement (expression_statement (assignment (identifier_guid) identifier_guid (call (identifier_get_child) identifier_get_child (argument_list (identifier_element) identifier_element (string_'guid') string_'guid' )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_guid) identifier_guid (None) None )comparison_operator (comparison_operator (call (attribute (attribute (identifier_guid) identifier_guid (identifier_attrib) identifier_attrib )attribute (identifier_get) identifier_get )attribute (argument_list (string_'isPermaLink') string_'isPermaLink' )argument_list )call (string_'true') string_'true' )comparison_operator )boolean_operator (block (return_statement (call (identifier_get_text) identifier_get_text (argument_list (identifier_element) identifier_element (string_'guid') string_'guid' )argument_list )call )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Attempt to retrieve item link. Use the GUID as a fallback if it is a permalink.
(module (function_definition (function_name_modify_cache_parameter_group) function_name_modify_cache_parameter_group (parameters (identifier_name) identifier_name (default_parameter (identifier_region) identifier_region (None) None )default_parameter (default_parameter (identifier_key) identifier_key (None) None )default_parameter (default_parameter (identifier_keyid) identifier_keyid (None) None )default_parameter (default_parameter (identifier_profile) identifier_profile (None) None )default_parameter (dictionary_splat_pattern (identifier_args) identifier_args )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_args) identifier_args (call (identifier_dict) identifier_dict (argument_list (list_comprehension (tuple (identifier_k) identifier_k (identifier_v) identifier_v )tuple (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_args) identifier_args (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (not_operator (call (attribute (identifier_k) identifier_k (identifier_startswith) identifier_startswith )attribute (argument_list (string_'_') string_'_' )argument_list )call )not_operator )if_clause )list_comprehension )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_Params) identifier_Params (subscript (identifier_args) identifier_args (string_'ParameterNameValues') string_'ParameterNameValues' )subscript )assignment )expression_statement )block (except_clause (as_pattern (identifier_ValueError) identifier_ValueError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_SaltInvocationError) identifier_SaltInvocationError (argument_list (string_'Invalid `ParameterNameValues` structure passed.') string_'Invalid `ParameterNameValues` structure passed.' )argument_list )call )raise_statement )block )except_clause )try_statement (while_statement (identifier_Params) identifier_Params (block (expression_statement (call (attribute (identifier_args) identifier_args (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'ParameterNameValues') string_'ParameterNameValues' (subscript (identifier_Params) identifier_Params (slice (colon) colon (integer_20) integer_20 )slice )subscript )pair )dictionary )argument_list )call )expression_statement (expression_statement (assignment (identifier_Params) identifier_Params (subscript (identifier_Params) identifier_Params (slice (integer_20) integer_20 (colon) colon )slice )subscript )assignment )expression_statement (if_statement (not_operator (call (identifier__modify_resource) identifier__modify_resource (argument_list (identifier_name) identifier_name (keyword_argument (identifier_name_param) identifier_name_param (string_'CacheParameterGroupName') string_'CacheParameterGroupName' )keyword_argument (keyword_argument (identifier_desc) identifier_desc (string_'cache parameter group') string_'cache parameter group' )keyword_argument (keyword_argument (identifier_res_type) identifier_res_type (string_'cache_parameter_group') string_'cache_parameter_group' )keyword_argument (keyword_argument (identifier_region) identifier_region (identifier_region) identifier_region )keyword_argument (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_keyid) identifier_keyid (identifier_keyid) identifier_keyid )keyword_argument (keyword_argument (identifier_profile) identifier_profile (identifier_profile) identifier_profile )keyword_argument (dictionary_splat (identifier_args) identifier_args )dictionary_splat )argument_list )call )not_operator (block (return_statement (False) False )return_statement )block )if_statement )block )while_statement (return_statement (True) True )return_statement )block )function_definition )module
Update a cache parameter group in place. Note that due to a design limitation in AWS, this function is not atomic -- a maximum of 20 params may be modified in one underlying boto call. This means that if more than 20 params need to be changed, the update is performed in blocks of 20, which in turns means that if a later sub-call fails after an earlier one has succeeded, the overall update will be left partially applied. CacheParameterGroupName The name of the cache parameter group to modify. ParameterNameValues A [list] of {dicts}, each composed of a parameter name and a value, for the parameter update. At least one parameter/value pair is required. .. code-block:: yaml ParameterNameValues: - ParameterName: timeout # Amazon requires ALL VALUES to be strings... ParameterValue: "30" - ParameterName: appendonly # The YAML parser will turn a bare `yes` into a bool, which Amazon will then throw on... ParameterValue: "yes" Example: .. code-block:: bash salt myminion boto3_elasticache.modify_cache_parameter_group \ CacheParameterGroupName=myParamGroup \ ParameterNameValues='[ { ParameterName: timeout, ParameterValue: "30" }, { ParameterName: appendonly, ParameterValue: "yes" } ]'
(module (function_definition (function_name__assert_transition) function_name__assert_transition (parameters (identifier_self) identifier_self (identifier_event) identifier_event )parameters (block (expression_statement (assignment (identifier_state) identifier_state (subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_domain) identifier_domain )attribute (identifier_state) identifier_state )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_event) identifier_event (subscript (identifier_STATES_MAP) identifier_STATES_MAP (identifier_state) identifier_state )subscript )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_"State transition %s not allowed") string_"State transition %s not allowed" (identifier_event) identifier_event )binary_operator )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Asserts the state transition validity.
(module (function_definition (function_name__unpack_bitmap) function_name__unpack_bitmap (parameters (identifier_bitmap) identifier_bitmap (identifier_xenum) identifier_xenum )parameters (block (expression_statement (assignment (identifier_unpacked) identifier_unpacked (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_enval) identifier_enval (identifier_xenum) identifier_xenum (block (if_statement (comparison_operator (binary_operator (attribute (identifier_enval) identifier_enval (identifier_value) identifier_value )attribute (identifier_bitmap) identifier_bitmap )binary_operator (attribute (identifier_enval) identifier_enval (identifier_value) identifier_value )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_unpacked) identifier_unpacked (identifier_add) identifier_add )attribute (argument_list (identifier_enval) identifier_enval )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_unpacked) identifier_unpacked )return_statement )block )function_definition )module
Given an integer bitmap and an enumerated type, build a set that includes zero or more enumerated type values corresponding to the bitmap.
(module (function_definition (function_name_equivalent_vertices) function_name_equivalent_vertices (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_level1) identifier_level1 (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_row) identifier_row )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_self) identifier_self (identifier_vertex_fingerprints) identifier_vertex_fingerprints )attribute )argument_list )call (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (identifier_row) identifier_row (identifier_tobytes) identifier_tobytes )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_l) identifier_l (call (attribute (identifier_level1) identifier_level1 (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_l) identifier_l (None) None )comparison_operator (block (expression_statement (assignment (identifier_l) identifier_l (call (identifier_set) identifier_set (argument_list (list (identifier_i) identifier_i )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_level1) identifier_level1 (identifier_key) identifier_key )subscript (identifier_l) identifier_l )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_l) identifier_l (identifier_add) identifier_add )attribute (argument_list (identifier_i) identifier_i )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (assignment (identifier_level2) identifier_level2 (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_vertices) identifier_vertices )pattern_list (call (attribute (identifier_level1) identifier_level1 (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (for_statement (identifier_vertex) identifier_vertex (identifier_vertices) identifier_vertices (block (expression_statement (assignment (subscript (identifier_level2) identifier_level2 (identifier_vertex) identifier_vertex )subscript (identifier_vertices) identifier_vertices )assignment )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_level2) identifier_level2 )return_statement )block )function_definition )module
A dictionary with symmetrically equivalent vertices.
(module (function_definition (function_name__repr_html_) function_name__repr_html_ (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__parent) identifier__parent )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_to) identifier_add_to )attribute (argument_list (call (identifier_Figure) identifier_Figure (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_out) identifier_out (call (attribute (attribute (identifier_self) identifier_self (identifier__parent) identifier__parent )attribute (identifier__repr_html_) identifier__repr_html_ )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__parent) identifier__parent )attribute (None) None )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_out) identifier_out (call (attribute (attribute (identifier_self) identifier_self (identifier__parent) identifier__parent )attribute (identifier__repr_html_) identifier__repr_html_ )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Displays the HTML Map in a Jupyter notebook.
(module (function_definition (function_name_help) function_name_help (parameters (identifier_self) identifier_self (default_parameter (identifier_print_output) identifier_print_output (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_help_text) identifier_help_text (call (attribute (identifier_self) identifier_self (identifier__rpc) identifier__rpc )attribute (argument_list (string_'help') string_'help' )argument_list )call )assignment )expression_statement (if_statement (identifier_print_output) identifier_print_output (block (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_help_text) identifier_help_text )argument_list )call )expression_statement )block (else_clause (block (return_statement (identifier_help_text) identifier_help_text )return_statement )block )else_clause )if_statement )block )function_definition )module
Calls the help RPC, which returns the list of RPC calls available. This RPC should normally be used in an interactive console environment where the output should be printed instead of returned. Otherwise, newlines will be escaped, which will make the output difficult to read. Args: print_output: A bool for whether the output should be printed. Returns: A str containing the help output otherwise None if print_output wasn't set.
(module (function_definition (function_name_load_preset) function_name_load_preset (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (string_'preset') string_'preset' (attribute (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (identifier_preview) identifier_preview )attribute )comparison_operator (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier___file__) identifier___file__ )argument_list )call (string_'presets.yaml') string_'presets.yaml' )argument_list )call )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_presets) identifier_presets (call (attribute (identifier_yaml) identifier_yaml (identifier_load) identifier_load )attribute (argument_list (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )with_statement (if_statement (comparison_operator (subscript (attribute (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (identifier_preview) identifier_preview )attribute (string_'preset') string_'preset' )subscript (identifier_presets) identifier_presets )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_preset) identifier_preset )attribute (subscript (identifier_presets) identifier_presets (subscript (attribute (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (identifier_preview) identifier_preview )attribute (string_'preset') string_'preset' )subscript )subscript )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier_preset) identifier_preset )attribute )return_statement )block )if_statement )block )function_definition )module
Loads preset if it is specified in the .frigg.yml
(module (function_definition (function_name_acquire) function_name_acquire (parameters (identifier_self) identifier_self )parameters (block (while_statement (boolean_operator (comparison_operator (call (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute (argument_list )argument_list )call (integer_0) integer_0 )comparison_operator (comparison_operator (call (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute (argument_list )argument_list )call (attribute (identifier_self) identifier_self (identifier__minsize) identifier__minsize )attribute )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier__conn) identifier__conn (yield (call (attribute (identifier_self) identifier_self (identifier__create_new_conn) identifier__create_new_conn )attribute (argument_list )argument_list )call )yield )assignment )expression_statement (if_statement (comparison_operator (identifier__conn) identifier__conn (None) None )comparison_operator (block (break_statement )break_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__pool) identifier__pool )attribute (identifier_put_nowait) identifier_put_nowait )attribute (argument_list (identifier__conn) identifier__conn )argument_list )call )expression_statement )block )while_statement (expression_statement (assignment (identifier_conn) identifier_conn (None) None )assignment )expression_statement (while_statement (not_operator (identifier_conn) identifier_conn )not_operator (block (expression_statement (assignment (identifier__conn) identifier__conn (yield (call (attribute (attribute (identifier_self) identifier_self (identifier__pool) identifier__pool )attribute (identifier_get) identifier_get )attribute (argument_list )argument_list )call )yield )assignment )expression_statement (if_statement (boolean_operator (call (attribute (attribute (identifier__conn) identifier__conn (identifier_reader) identifier_reader )attribute (identifier_at_eof) identifier_at_eof )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier__conn) identifier__conn (identifier_reader) identifier_reader )attribute (identifier_exception) identifier_exception )attribute (argument_list )argument_list )call )boolean_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__do_close) identifier__do_close )attribute (argument_list (identifier__conn) identifier__conn )argument_list )call )expression_statement (expression_statement (assignment (identifier_conn) identifier_conn (yield (call (attribute (identifier_self) identifier_self (identifier__create_new_conn) identifier__create_new_conn )attribute (argument_list )argument_list )call )yield )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_conn) identifier_conn (identifier__conn) identifier__conn )assignment )expression_statement )block )else_clause )if_statement )block )while_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__in_use) identifier__in_use )attribute (identifier_add) identifier_add )attribute (argument_list (identifier_conn) identifier_conn )argument_list )call )expression_statement (return_statement (identifier_conn) identifier_conn )return_statement )block )function_definition )module
Acquire connection from the pool, or spawn new one if pool maxsize permits. :return: ``tuple`` (reader, writer)
(module (function_definition (function_name__gen_condition) function_name__gen_condition (parameters (identifier_cls) identifier_cls (identifier_initial) identifier_initial (identifier_new_public_keys) identifier_new_public_keys )parameters (block (try_statement (block (expression_statement (assignment (identifier_threshold) identifier_threshold (call (identifier_len) identifier_len (argument_list (identifier_new_public_keys) identifier_new_public_keys )argument_list )call )assignment )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (expression_statement (assignment (identifier_threshold) identifier_threshold (None) None )assignment )expression_statement )block )except_clause )try_statement (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_new_public_keys) identifier_new_public_keys (identifier_list) identifier_list )argument_list )call (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_new_public_keys) identifier_new_public_keys )argument_list )call (integer_1) integer_1 )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_ffill) identifier_ffill (call (identifier_ThresholdSha256) identifier_ThresholdSha256 (argument_list (keyword_argument (identifier_threshold) identifier_threshold (identifier_threshold) identifier_threshold )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_reduce) identifier_reduce (argument_list (attribute (identifier_cls) identifier_cls (identifier__gen_condition) identifier__gen_condition )attribute (identifier_new_public_keys) identifier_new_public_keys (identifier_ffill) identifier_ffill )argument_list )call )expression_statement )block (elif_clause (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_new_public_keys) identifier_new_public_keys (identifier_list) identifier_list )argument_list )call (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_new_public_keys) identifier_new_public_keys )argument_list )call (integer_1) integer_1 )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Sublist cannot contain single owner') string_'Sublist cannot contain single owner' )argument_list )call )raise_statement )block )elif_clause (else_clause (block (try_statement (block (expression_statement (assignment (identifier_new_public_keys) identifier_new_public_keys (call (attribute (identifier_new_public_keys) identifier_new_public_keys (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (pass_statement )pass_statement )block )except_clause )try_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_new_public_keys) identifier_new_public_keys (identifier_Fulfillment) identifier_Fulfillment )argument_list )call (block (expression_statement (assignment (identifier_ffill) identifier_ffill (identifier_new_public_keys) identifier_new_public_keys )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_ffill) identifier_ffill (call (identifier_Ed25519Sha256) identifier_Ed25519Sha256 (argument_list (keyword_argument (identifier_public_key) identifier_public_key (call (attribute (identifier_base58) identifier_base58 (identifier_b58decode) identifier_b58decode )attribute (argument_list (identifier_new_public_keys) identifier_new_public_keys )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_initial) identifier_initial (identifier_add_subfulfillment) identifier_add_subfulfillment )attribute (argument_list (identifier_ffill) identifier_ffill )argument_list )call )expression_statement (return_statement (identifier_initial) identifier_initial )return_statement )block )function_definition )module
Generates ThresholdSha256 conditions from a list of new owners. Note: This method is intended only to be used with a reduce function. For a description on how to use this method, see :meth:`~.Output.generate`. Args: initial (:class:`cryptoconditions.ThresholdSha256`): A Condition representing the overall root. new_public_keys (:obj:`list` of :obj:`str`|str): A list of new owners or a single new owner. Returns: :class:`cryptoconditions.ThresholdSha256`:
(module (function_definition (function_name_swarm_init) function_name_swarm_init (parameters (default_parameter (identifier_advertise_addr) identifier_advertise_addr (identifier_str) identifier_str )default_parameter (default_parameter (identifier_listen_addr) identifier_listen_addr (identifier_int) identifier_int )default_parameter (default_parameter (identifier_force_new_cluster) identifier_force_new_cluster (identifier_bool) identifier_bool )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_salt_return) identifier_salt_return (dictionary )dictionary )assignment )expression_statement (expression_statement (call (attribute (attribute (subscript (identifier___context__) identifier___context__ (string_'client') string_'client' )subscript (identifier_swarm) identifier_swarm )attribute (identifier_init) identifier_init )attribute (argument_list (identifier_advertise_addr) identifier_advertise_addr (identifier_listen_addr) identifier_listen_addr (identifier_force_new_cluster) identifier_force_new_cluster )argument_list )call )expression_statement (expression_statement (assignment (identifier_output) identifier_output (call (attribute (concatenated_string (string_'Docker swarm has been initialized on {0} ') string_'Docker swarm has been initialized on {0} ' (string_'and the worker/manager Join token is below') string_'and the worker/manager Join token is below' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (subscript (identifier___context__) identifier___context__ (string_'server_name') string_'server_name' )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_salt_return) identifier_salt_return (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'Comment') string_'Comment' (identifier_output) identifier_output )pair (pair (string_'Tokens') string_'Tokens' (call (identifier_swarm_tokens) identifier_swarm_tokens (argument_list )argument_list )call )pair )dictionary )argument_list )call )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (expression_statement (assignment (identifier_salt_return) identifier_salt_return (dictionary )dictionary )assignment )expression_statement (expression_statement (call (attribute (identifier_salt_return) identifier_salt_return (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'Error') string_'Error' (concatenated_string (string_'Please make sure you are passing advertise_addr, ') string_'Please make sure you are passing advertise_addr, ' (string_'listen_addr and force_new_cluster correctly.') string_'listen_addr and force_new_cluster correctly.' )concatenated_string )pair )dictionary )argument_list )call )expression_statement )block )except_clause )try_statement (return_statement (identifier_salt_return) identifier_salt_return )return_statement )block )function_definition )module
Initalize Docker on Minion as a Swarm Manager advertise_addr The ip of the manager listen_addr Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form 192.168.1.1:4567, or an interface followed by a port number, like eth0:4567 force_new_cluster Force a new cluster if True is passed CLI Example: .. code-block:: bash salt '*' swarm.swarm_init advertise_addr='192.168.50.10' listen_addr='0.0.0.0' force_new_cluster=False
(module (function_definition (function_name_aloha_to_etree) function_name_aloha_to_etree (parameters (identifier_html_source) identifier_html_source )parameters (block (expression_statement (assignment (identifier_xml) identifier_xml (call (identifier__tidy2xhtml5) identifier__tidy2xhtml5 (argument_list (identifier_html_source) identifier_html_source )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_transform) identifier_transform )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_ALOHA2HTML_TRANSFORM_PIPELINE) identifier_ALOHA2HTML_TRANSFORM_PIPELINE )argument_list )call (block (expression_statement (assignment (identifier_xml) identifier_xml (call (identifier_transform) identifier_transform (argument_list (identifier_xml) identifier_xml )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_xml) identifier_xml )return_statement )block )function_definition )module
Converts HTML5 from Aloha editor output to a lxml etree.
(module (function_definition (function_name_get_name) function_name_get_name (parameters (identifier_model_id) identifier_model_id )parameters (block (expression_statement (assignment (identifier_name) identifier_name (call (attribute (identifier__names) identifier__names (identifier_get) identifier_get )attribute (argument_list (identifier_model_id) identifier_model_id )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (block (expression_statement (assignment (identifier_name) identifier_name (binary_operator (string_'id = %s (no name)') string_'id = %s (no name)' (call (identifier_str) identifier_str (argument_list (identifier_model_id) identifier_model_id )argument_list )call )binary_operator )assignment )expression_statement )block )if_statement (return_statement (identifier_name) identifier_name )return_statement )block )function_definition )module
Get the name for a model. :returns str: The model's name. If the id has no associated name, then "id = {ID} (no name)" is returned.
(module (function_definition (function_name_splitpath) function_name_splitpath (parameters (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_c) identifier_c (list )list )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_head) identifier_head (identifier_tail) identifier_tail )pattern_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (while_statement (identifier_tail) identifier_tail (block (expression_statement (call (attribute (identifier_c) identifier_c (identifier_insert) identifier_insert )attribute (argument_list (integer_0) integer_0 (identifier_tail) identifier_tail )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_head) identifier_head (identifier_tail) identifier_tail )pattern_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (identifier_head) identifier_head )argument_list )call )assignment )expression_statement )block )while_statement (return_statement (identifier_c) identifier_c )return_statement )block )function_definition )module
Split a path in its components.
(module (function_definition (function_name_rel_path) function_name_rel_path (parameters (identifier_filename) identifier_filename )parameters (block (return_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (identifier_os) identifier_os (identifier_getcwd) identifier_getcwd )attribute (argument_list )argument_list )call (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier___file__) identifier___file__ )argument_list )call (identifier_filename) identifier_filename )argument_list )call )return_statement )block )function_definition )module
Function that gets relative path to the filename
(module (function_definition (function_name_collect) function_name_collect (parameters (identifier_self) identifier_self (identifier_order_ref) identifier_order_ref )parameters (block (try_statement (block (expression_statement (assignment (identifier_out) identifier_out (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_service) identifier_service )attribute (identifier_Collect) identifier_Collect )attribute (argument_list (identifier_order_ref) identifier_order_ref )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_Error) identifier_Error (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_get_error_class) identifier_get_error_class (argument_list (identifier_e) identifier_e (string_"Could not complete Collect call.") string_"Could not complete Collect call." )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__dictify) identifier__dictify )attribute (argument_list (identifier_out) identifier_out )argument_list )call )return_statement )block )function_definition )module
Collect the progress status of the order with the specified order reference. :param order_ref: The UUID string specifying which order to collect status from. :type order_ref: str :return: The CollectResponse parsed to a dictionary. :rtype: dict :raises BankIDError: raises a subclass of this error when error has been returned from server.
(module (function_definition (function_name__update_rr_ce_entry) function_name__update_rr_ce_entry (parameters (identifier_self) identifier_self (identifier_rec) identifier_rec )parameters (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_rec) identifier_rec (identifier_rock_ridge) identifier_rock_ridge )attribute (None) None )comparison_operator (comparison_operator (attribute (attribute (attribute (identifier_rec) identifier_rec (identifier_rock_ridge) identifier_rock_ridge )attribute (identifier_dr_entries) identifier_dr_entries )attribute (identifier_ce_record) identifier_ce_record )attribute (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_celen) identifier_celen (attribute (attribute (attribute (attribute (identifier_rec) identifier_rec (identifier_rock_ridge) identifier_rock_ridge )attribute (identifier_dr_entries) identifier_dr_entries )attribute (identifier_ce_record) identifier_ce_record )attribute (identifier_len_cont_area) identifier_len_cont_area )attribute )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_added_block) identifier_added_block (identifier_block) identifier_block (identifier_offset) identifier_offset )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_pvd) identifier_pvd )attribute (identifier_add_rr_ce_entry) identifier_add_rr_ce_entry )attribute (argument_list (identifier_celen) identifier_celen )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_rec) identifier_rec (identifier_rock_ridge) identifier_rock_ridge )attribute (identifier_update_ce_block) identifier_update_ce_block )attribute (argument_list (identifier_block) identifier_block )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (attribute (identifier_rec) identifier_rec (identifier_rock_ridge) identifier_rock_ridge )attribute (identifier_dr_entries) identifier_dr_entries )attribute (identifier_ce_record) identifier_ce_record )attribute (identifier_update_offset) identifier_update_offset )attribute (argument_list (identifier_offset) identifier_offset )argument_list )call )expression_statement (if_statement (identifier_added_block) identifier_added_block (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_pvd) identifier_pvd )attribute (identifier_logical_block_size) identifier_logical_block_size )attribute (argument_list )argument_list )call )return_statement )block )if_statement )block )if_statement (return_statement (integer_0) integer_0 )return_statement )block )function_definition )module
An internal method to update the Rock Ridge CE entry for the given record. Parameters: rec - The record to update the Rock Ridge CE entry for (if it exists). Returns: The number of additional bytes needed for this Rock Ridge CE entry.
(module (function_definition (function_name_pipeline) function_name_pipeline (parameters (identifier_steps) identifier_steps (default_parameter (identifier_initial) identifier_initial (None) None )default_parameter )parameters (block (function_definition (function_name_apply) function_name_apply (parameters (identifier_result) identifier_result (identifier_step) identifier_step )parameters (block (return_statement (call (identifier_step) identifier_step (argument_list (identifier_result) identifier_result )argument_list )call )return_statement )block )function_definition (return_statement (call (identifier_reduce) identifier_reduce (argument_list (identifier_apply) identifier_apply (identifier_steps) identifier_steps (identifier_initial) identifier_initial )argument_list )call )return_statement )block )function_definition )module
Chain results from a list of functions. Inverted reduce. :param (function) steps: List of function callbacks :param initial: Starting value for pipeline.
(module (function_definition (function_name_resume_instance) function_name_resume_instance (parameters (identifier_self) identifier_self (identifier_paused_info) identifier_paused_info )parameters (block (if_statement (not_operator (call (attribute (identifier_paused_info) identifier_paused_info (identifier_get) identifier_get )attribute (argument_list (string_"instance_id") string_"instance_id" )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_"Instance to stop has no instance id.") string_"Instance to stop has no instance id." )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_gce) identifier_gce (call (attribute (identifier_self) identifier_self (identifier__connect) identifier__connect )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_request) identifier_request (call (attribute (call (attribute (identifier_gce) identifier_gce (identifier_instances) identifier_instances )attribute (argument_list )argument_list )call (identifier_start) identifier_start )attribute (argument_list (keyword_argument (identifier_project) identifier_project (attribute (identifier_self) identifier_self (identifier__project_id) identifier__project_id )attribute )keyword_argument (keyword_argument (identifier_instance) identifier_instance (subscript (identifier_paused_info) identifier_paused_info (string_"instance_id") string_"instance_id" )subscript )keyword_argument (keyword_argument (identifier_zone) identifier_zone (attribute (identifier_self) identifier_self (identifier__zone) identifier__zone )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_operation) identifier_operation (call (attribute (identifier_self) identifier_self (identifier__execute_request) identifier__execute_request )attribute (argument_list (identifier_request) identifier_request )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier__wait_until_done) identifier__wait_until_done )attribute (argument_list (identifier_operation) identifier_operation )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__check_response) identifier__check_response )attribute (argument_list (identifier_response) identifier_response )argument_list )call )expression_statement (return_statement )return_statement )block (except_clause (as_pattern (identifier_HttpError) identifier_HttpError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (string_"Error restarting instance: `%s") string_"Error restarting instance: `%s" (identifier_e) identifier_e )argument_list )call )expression_statement (raise_statement (call (identifier_InstanceError) identifier_InstanceError (argument_list (string_"Error restarting instance `%s`") string_"Error restarting instance `%s`" (identifier_e) identifier_e )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Restarts a paused instance, retaining disk and config. :param str instance_id: instance identifier :raises: `InstanceError` if instance cannot be resumed. :return: dict - information needed to restart instance.
(module (function_definition (function_name_start_worker) function_name_start_worker (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_include_rq) identifier_include_rq )attribute )not_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_worker) identifier_worker (call (identifier_Worker) identifier_Worker (argument_list (keyword_argument (identifier_queues) identifier_queues (attribute (identifier_self) identifier_self (identifier_queues) identifier_queues )attribute )keyword_argument (keyword_argument (identifier_connection) identifier_connection (attribute (identifier_self) identifier_self (identifier_connection) identifier_connection )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_worker_pid_path) identifier_worker_pid_path (call (attribute (attribute (identifier_current_app) identifier_current_app (identifier_config) identifier_config )attribute (identifier_get) identifier_get )attribute (argument_list (call (attribute (string_"{}_WORKER_PID") string_"{}_WORKER_PID" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_config_prefix) identifier_config_prefix )attribute )argument_list )call (string_'rl_worker.pid') string_'rl_worker.pid' )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_worker_pid_file) identifier_worker_pid_file (call (identifier_open) identifier_open (argument_list (identifier_worker_pid_path) identifier_worker_pid_path (string_'r') string_'r' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_worker_pid) identifier_worker_pid (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_worker_pid_file) identifier_worker_pid_file (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"Worker already started with PID=%d") string_"Worker already started with PID=%d" (identifier_worker_pid) identifier_worker_pid )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_worker_pid_file) identifier_worker_pid_file (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_worker_pid) identifier_worker_pid )return_statement )block (except_clause (tuple (identifier_IOError) identifier_IOError (identifier_TypeError) identifier_TypeError )tuple (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_worker_process) identifier_worker_process )attribute (call (identifier_Process) identifier_Process (argument_list (keyword_argument (identifier_target) identifier_target (identifier_worker_wrapper) identifier_worker_wrapper )keyword_argument (keyword_argument (identifier_kwargs) identifier_kwargs (dictionary (pair (string_'worker_instance') string_'worker_instance' (identifier_worker) identifier_worker )pair (pair (string_'pid_path') string_'pid_path' (identifier_worker_pid_path) identifier_worker_pid_path )pair )dictionary )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_worker_process) identifier_worker_process )attribute (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_worker_pid_file) identifier_worker_pid_file (call (identifier_open) identifier_open (argument_list (identifier_worker_pid_path) identifier_worker_pid_path (string_'w') string_'w' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_worker_pid_file) identifier_worker_pid_file (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_"%d") string_"%d" (attribute (attribute (identifier_self) identifier_self (identifier_worker_process) identifier_worker_process )attribute (identifier_pid) identifier_pid )attribute )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_worker_pid_file) identifier_worker_pid_file (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"Start a worker process with PID=%d") string_"Start a worker process with PID=%d" (attribute (attribute (identifier_self) identifier_self (identifier_worker_process) identifier_worker_process )attribute (identifier_pid) identifier_pid )attribute )binary_operator )argument_list )call )expression_statement (return_statement (attribute (attribute (identifier_self) identifier_self (identifier_worker_process) identifier_worker_process )attribute (identifier_pid) identifier_pid )attribute )return_statement )block )except_clause )try_statement )block )function_definition )module
Trigger new process as a RQ worker.
(module (function_definition (function_name_push_pq) function_name_push_pq (parameters (identifier_self) identifier_self (identifier_tokens) identifier_tokens )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_"Pushing PQ data: %s") string_"Pushing PQ data: %s" (identifier_tokens) identifier_tokens )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_bus) identifier_bus (subscript (attribute (attribute (identifier_self) identifier_self (identifier_case) identifier_case )attribute (identifier_buses) identifier_buses )attribute (binary_operator (subscript (identifier_tokens) identifier_tokens (string_"bus_no") string_"bus_no" )subscript (integer_1) integer_1 )binary_operator )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_bus) identifier_bus (identifier_p_demand) identifier_p_demand )attribute (subscript (identifier_tokens) identifier_tokens (string_"p") string_"p" )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_bus) identifier_bus (identifier_q_demand) identifier_q_demand )attribute (subscript (identifier_tokens) identifier_tokens (string_"q") string_"q" )subscript )assignment )expression_statement )block )function_definition )module
Creates and Load object, populates it with data, finds its Bus and adds it.
(module (function_definition (function_name_generate) function_name_generate (parameters (identifier_self) identifier_self (identifier_x) identifier_x (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (assert_statement (call (attribute (identifier_self) identifier_self (identifier_parse_params) identifier_parse_params )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assert_statement (expression_statement (assignment (pattern_list (identifier_labels) identifier_labels (identifier__nb_classes) identifier__nb_classes )pattern_list (call (attribute (identifier_self) identifier_self (identifier_get_or_guess_labels) identifier_get_or_guess_labels )attribute (argument_list (identifier_x) identifier_x (identifier_kwargs) identifier_kwargs )argument_list )call )assignment )expression_statement (return_statement (call (identifier_fgm) identifier_fgm (argument_list (identifier_x) identifier_x (call (attribute (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (identifier_get_logits) identifier_get_logits )attribute (argument_list (identifier_x) identifier_x )argument_list )call (keyword_argument (identifier_y) identifier_y (identifier_labels) identifier_labels )keyword_argument (keyword_argument (identifier_eps) identifier_eps (attribute (identifier_self) identifier_self (identifier_eps) identifier_eps )attribute )keyword_argument (keyword_argument (identifier_ord) identifier_ord (attribute (identifier_self) identifier_self (identifier_ord) identifier_ord )attribute )keyword_argument (keyword_argument (identifier_clip_min) identifier_clip_min (attribute (identifier_self) identifier_self (identifier_clip_min) identifier_clip_min )attribute )keyword_argument (keyword_argument (identifier_clip_max) identifier_clip_max (attribute (identifier_self) identifier_self (identifier_clip_max) identifier_clip_max )attribute )keyword_argument (keyword_argument (identifier_targeted) identifier_targeted (parenthesized_expression (comparison_operator (attribute (identifier_self) identifier_self (identifier_y_target) identifier_y_target )attribute (None) None )comparison_operator )parenthesized_expression )keyword_argument (keyword_argument (identifier_sanity_checks) identifier_sanity_checks (attribute (identifier_self) identifier_self (identifier_sanity_checks) identifier_sanity_checks )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns the graph for Fast Gradient Method adversarial examples. :param x: The model's symbolic inputs. :param kwargs: See `parse_params`
(module (function_definition (function_name_dependencies) function_name_dependencies (parameters (identifier_self) identifier_self (identifier_deps_dict) identifier_deps_dict )parameters (block (try_statement (block (import_statement (aliased_import (dotted_name (identifier_pygraphviz) identifier_pygraphviz )dotted_name (identifier_pgv) identifier_pgv )aliased_import )import_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (expression_statement (assignment (pattern_list (identifier_graph_easy) identifier_graph_easy (identifier_comma) identifier_comma )pattern_list (expression_list (string_"") string_"" (string_"") string_"" )expression_list )assignment )expression_statement (if_statement (parenthesized_expression (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_image) identifier_image )attribute (string_"ascii") string_"ascii" )comparison_operator (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (string_"/usr/bin/graph-easy") string_"/usr/bin/graph-easy" )argument_list )call )not_operator )boolean_operator )parenthesized_expression (block (expression_statement (assignment (identifier_comma) identifier_comma (string_",") string_"," )assignment )expression_statement (expression_statement (assignment (identifier_graph_easy) identifier_graph_easy (string_" graph-easy") string_" graph-easy" )assignment )expression_statement )block )if_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (concatenated_string (string_"Require 'pygraphviz{0}{1}': Install with 'slpkg -s sbo ") string_"Require 'pygraphviz{0}{1}': Install with 'slpkg -s sbo " (string_"pygraphviz{1}'") string_"pygraphviz{1}'" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_comma) identifier_comma (identifier_graph_easy) identifier_graph_easy )argument_list )call )argument_list )call )expression_statement (raise_statement (call (identifier_SystemExit) identifier_SystemExit (argument_list )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_image) identifier_image )attribute (string_"ascii") string_"ascii" )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_check_file) identifier_check_file )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_G) identifier_G (call (attribute (identifier_pgv) identifier_pgv (identifier_AGraph) identifier_AGraph )attribute (argument_list (identifier_deps_dict) identifier_deps_dict )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_G) identifier_G (identifier_layout) identifier_layout )attribute (argument_list (keyword_argument (identifier_prog) identifier_prog (string_"fdp") string_"fdp" )keyword_argument )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_image) identifier_image )attribute (string_"ascii") string_"ascii" )comparison_operator (block (expression_statement (call (attribute (identifier_G) identifier_G (identifier_write) identifier_write )attribute (argument_list (call (attribute (string_"{0}.dot") string_"{0}.dot" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_image) identifier_image )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_graph_easy) identifier_graph_easy )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_G) identifier_G (identifier_draw) identifier_draw )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_image) identifier_image )attribute )argument_list )call )expression_statement )block (except_clause (identifier_IOError) identifier_IOError (block (raise_statement (call (identifier_SystemExit) identifier_SystemExit (argument_list )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_image) identifier_image )attribute )argument_list )call (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"Graph image file '{0}' created") string_"Graph image file '{0}' created" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_image) identifier_image )attribute )argument_list )call )argument_list )call )expression_statement )block )if_statement (raise_statement (call (identifier_SystemExit) identifier_SystemExit (argument_list )argument_list )call )raise_statement )block )function_definition )module
Generate graph file with depenndencies map tree
(module (function_definition (function_name_save_spectre_plot) function_name_save_spectre_plot (parameters (identifier_self) identifier_self (default_parameter (identifier_filename) identifier_filename (string_"spectre.pdf") string_"spectre.pdf" )default_parameter (default_parameter (identifier_img_format) identifier_img_format (string_"pdf") string_"pdf" )default_parameter (default_parameter (identifier_sigma) identifier_sigma (float_0.05) float_0.05 )default_parameter (default_parameter (identifier_step) identifier_step (float_0.01) float_0.01 )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_d) identifier_d (identifier_plt) identifier_plt )pattern_list (call (attribute (identifier_self) identifier_self (identifier_get_spectre_plot) identifier_get_spectre_plot )attribute (argument_list (identifier_sigma) identifier_sigma (identifier_step) identifier_step )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_savefig) identifier_savefig )attribute (argument_list (identifier_filename) identifier_filename (keyword_argument (identifier_format) identifier_format (identifier_img_format) identifier_img_format )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Save matplotlib plot of the spectre to a file. Args: filename: Filename to write to. img_format: Image format to use. Defaults to EPS. sigma: Full width at half maximum in eV for normal functions. step: bin interval in eV
(module (function_definition (function_name_download_results) function_name_download_results (parameters (identifier_self) identifier_self (default_parameter (identifier_savedir) identifier_savedir (None) None )default_parameter (default_parameter (identifier_raw) identifier_raw (True) True )default_parameter (default_parameter (identifier_calib) identifier_calib (False) False )default_parameter (default_parameter (identifier_index) identifier_index (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_obsids) identifier_obsids (conditional_expression (attribute (identifier_self) identifier_self (identifier_obsids) identifier_obsids )attribute (comparison_operator (identifier_index) identifier_index (None) None )comparison_operator (list (subscript (attribute (identifier_self) identifier_self (identifier_obsids) identifier_obsids )attribute (identifier_index) identifier_index )subscript )list )conditional_expression )assignment )expression_statement (for_statement (identifier_obsid) identifier_obsid (identifier_obsids) identifier_obsids (block (expression_statement (assignment (identifier_pm) identifier_pm (call (attribute (identifier_io) identifier_io (identifier_PathManager) identifier_PathManager )attribute (argument_list (attribute (identifier_obsid) identifier_obsid (identifier_img_id) identifier_img_id )attribute (keyword_argument (identifier_savedir) identifier_savedir (identifier_savedir) identifier_savedir )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_pm) identifier_pm (identifier_basepath) identifier_basepath )attribute (identifier_mkdir) identifier_mkdir )attribute (argument_list (keyword_argument (identifier_exist_ok) identifier_exist_ok (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_to_download) identifier_to_download (list )list )assignment )expression_statement (if_statement (comparison_operator (identifier_raw) identifier_raw (True) True )comparison_operator (block (expression_statement (call (attribute (identifier_to_download) identifier_to_download (identifier_extend) identifier_extend )attribute (argument_list (attribute (identifier_obsid) identifier_obsid (identifier_raw_urls) identifier_raw_urls )attribute )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_calib) identifier_calib (True) True )comparison_operator (block (expression_statement (call (attribute (identifier_to_download) identifier_to_download (identifier_extend) identifier_extend )attribute (argument_list (attribute (identifier_obsid) identifier_obsid (identifier_calib_urls) identifier_calib_urls )attribute )argument_list )call )expression_statement )block )if_statement (for_statement (identifier_url) identifier_url (identifier_to_download) identifier_to_download (block (expression_statement (assignment (identifier_basename) identifier_basename (attribute (call (identifier_Path) identifier_Path (argument_list (identifier_url) identifier_url )argument_list )call (identifier_name) identifier_name )attribute )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"Downloading") string_"Downloading" (identifier_basename) identifier_basename )argument_list )call )expression_statement (expression_statement (assignment (identifier_store_path) identifier_store_path (call (identifier_str) identifier_str (argument_list (binary_operator (attribute (identifier_pm) identifier_pm (identifier_basepath) identifier_basepath )attribute (identifier_basename) identifier_basename )binary_operator )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (identifier_urlretrieve) identifier_urlretrieve (argument_list (identifier_url) identifier_url (identifier_store_path) identifier_store_path )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (identifier_urlretrieve) identifier_urlretrieve (argument_list (call (attribute (identifier_url) identifier_url (identifier_replace) identifier_replace )attribute (argument_list (string_"https") string_"https" (string_"http") string_"http" )argument_list )call (identifier_store_path) identifier_store_path )argument_list )call )expression_statement )block )except_clause )try_statement )block )for_statement (return_statement (call (identifier_str) identifier_str (argument_list (attribute (identifier_pm) identifier_pm (identifier_basepath) identifier_basepath )attribute )argument_list )call )return_statement )block )for_statement )block )function_definition )module
Download the previously found and stored Opus obsids. Parameters ========== savedir: str or pathlib.Path, optional If the database root folder as defined by the config.ini should not be used, provide a different savedir here. It will be handed to PathManager.
(module (function_definition (function_name_update_floatingip) function_name_update_floatingip (parameters (identifier_floatingip_id) identifier_floatingip_id (default_parameter (identifier_port) identifier_port (None) None )default_parameter (default_parameter (identifier_profile) identifier_profile (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_conn) identifier_conn (call (identifier__auth) identifier__auth (argument_list (identifier_profile) identifier_profile )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_conn) identifier_conn (identifier_update_floatingip) identifier_update_floatingip )attribute (argument_list (identifier_floatingip_id) identifier_floatingip_id (identifier_port) identifier_port )argument_list )call )return_statement )block )function_definition )module
Updates a floatingIP CLI Example: .. code-block:: bash salt '*' neutron.update_floatingip network-name port-name :param floatingip_id: ID of floatingIP :param port: ID or name of port, to associate floatingip to `None` or do not specify to disassociate the floatingip (Optional) :param profile: Profile to build on (Optional) :return: Value of updated floating IP information
(module (function_definition (function_name_chdir) function_name_chdir (parameters (typed_parameter (identifier_path) identifier_path (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (generic_type (identifier_Iterator) identifier_Iterator (type_parameter (type (None) None )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_curdir) identifier_curdir (call (attribute (identifier_os) identifier_os (identifier_getcwd) identifier_getcwd )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chdir) identifier_chdir )attribute (argument_list (identifier_path) identifier_path )argument_list )call )expression_statement (try_statement (block (expression_statement (yield )yield )expression_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_chdir) identifier_chdir )attribute (argument_list (identifier_curdir) identifier_curdir )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Context manager for changing dir and restoring previous workdir after exit.
(module (function_definition (function_name_set_control_output) function_name_set_control_output (parameters (identifier_self) identifier_self (typed_parameter (identifier_name) identifier_name (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_value) identifier_value (type (identifier_float) identifier_float )type )typed_parameter (keyword_separator )keyword_separator (typed_default_parameter (identifier_options) identifier_options (type (identifier_dict) identifier_dict )type (None) None )typed_default_parameter )parameters (type (None) None )type (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier___instrument) identifier___instrument )attribute (identifier_set_control_output) identifier_set_control_output )attribute (argument_list (identifier_name) identifier_name (identifier_value) identifier_value (identifier_options) identifier_options )argument_list )call )expression_statement )block )function_definition )module
Set the value of a control asynchronously. :param name: The name of the control (string). :param value: The control value (float). :param options: A dict of custom options to pass to the instrument for setting the value. Options are: value_type: local, delta, output. output is default. confirm, confirm_tolerance_factor, confirm_timeout: confirm value gets set. inform: True to keep dependent control outputs constant by adjusting their internal values. False is default. Default value of confirm is False. Default confirm_tolerance_factor is 1.0. A value of 1.0 is the nominal tolerance for that control. Passing a higher tolerance factor (for example 1.5) will increase the permitted error margin and passing lower tolerance factor (for example 0.5) will decrease the permitted error margin and consequently make a timeout more likely. The tolerance factor value 0.0 is a special value which removes all checking and only waits for any change at all and then returns. Default confirm_timeout is 16.0 (seconds). Raises exception if control with name doesn't exist. Raises TimeoutException if confirm is True and timeout occurs. .. versionadded:: 1.0 Scriptable: Yes
(module (function_definition (function_name_calc_qma_v1) function_name_calc_qma_v1 (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_der) identifier_der (attribute (attribute (attribute (identifier_self) identifier_self (identifier_parameters) identifier_parameters )attribute (identifier_derived) identifier_derived )attribute (identifier_fastaccess) identifier_fastaccess )attribute )assignment )expression_statement (expression_statement (assignment (identifier_flu) identifier_flu (attribute (attribute (attribute (identifier_self) identifier_self (identifier_sequences) identifier_sequences )attribute (identifier_fluxes) identifier_fluxes )attribute (identifier_fastaccess) identifier_fastaccess )attribute )assignment )expression_statement (expression_statement (assignment (identifier_log) identifier_log (attribute (attribute (attribute (identifier_self) identifier_self (identifier_sequences) identifier_sequences )attribute (identifier_logs) identifier_logs )attribute (identifier_fastaccess) identifier_fastaccess )attribute )assignment )expression_statement (for_statement (identifier_idx) identifier_idx (call (identifier_range) identifier_range (argument_list (attribute (identifier_der) identifier_der (identifier_nmb) identifier_nmb )attribute )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_flu) identifier_flu (identifier_qma) identifier_qma )attribute (identifier_idx) identifier_idx )subscript (float_0.) float_0. )assignment )expression_statement (for_statement (identifier_jdx) identifier_jdx (call (identifier_range) identifier_range (argument_list (subscript (attribute (identifier_der) identifier_der (identifier_ma_order) identifier_ma_order )attribute (identifier_idx) identifier_idx )subscript )argument_list )call (block (expression_statement (augmented_assignment (subscript (attribute (identifier_flu) identifier_flu (identifier_qma) identifier_qma )attribute (identifier_idx) identifier_idx )subscript (binary_operator (subscript (attribute (identifier_der) identifier_der (identifier_ma_coefs) identifier_ma_coefs )attribute (identifier_idx) identifier_idx (identifier_jdx) identifier_jdx )subscript (subscript (attribute (identifier_log) identifier_log (identifier_login) identifier_login )attribute (identifier_idx) identifier_idx (identifier_jdx) identifier_jdx )subscript )binary_operator )augmented_assignment )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
Calculate the discharge responses of the different MA processes. Required derived parameters: |Nmb| |MA_Order| |MA_Coefs| Required log sequence: |LogIn| Calculated flux sequence: |QMA| Examples: Assume there are three response functions, involving one, two and three MA coefficients respectively: >>> from hydpy.models.arma import * >>> parameterstep() >>> derived.nmb(3) >>> derived.ma_order.shape = 3 >>> derived.ma_order = 1, 2, 3 >>> derived.ma_coefs.shape = (3, 3) >>> logs.login.shape = (3, 3) >>> fluxes.qma.shape = 3 The coefficients of the different MA processes are stored in separate rows of the 2-dimensional parameter `ma_coefs`: >>> derived.ma_coefs = ((1.0, nan, nan), ... (0.8, 0.2, nan), ... (0.5, 0.3, 0.2)) The "memory values" of the different MA processes are defined as follows (one row for each process). The current values are stored in first column, the values of the last time step in the second column, and so on: >>> logs.login = ((1.0, nan, nan), ... (2.0, 3.0, nan), ... (4.0, 5.0, 6.0)) Applying method |calc_qma_v1| is equivalent to calculating the inner product of the different rows of both matrices: >>> model.calc_qma_v1() >>> fluxes.qma qma(1.0, 2.2, 4.7)
(module (function_definition (function_name_pout) function_name_pout (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (call (identifier_should_msg) identifier_should_msg (argument_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_"groups") string_"groups" (list (string_"normal") string_"normal" )list )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_args) identifier_args (call (identifier_indent_text) identifier_indent_text (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (call (attribute (string_"") string_"" (identifier_join) identifier_join )attribute (argument_list (identifier_args) identifier_args )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (string_"\n") string_"\n" )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
print to stdout, maintaining indent level
(module (function_definition (function_name_email_report) function_name_email_report (parameters (identifier_job) identifier_job (identifier_univ_options) identifier_univ_options )parameters (block (expression_statement (assignment (identifier_fromadd) identifier_fromadd (string_"results@protect.cgl.genomics.ucsc.edu") string_"results@protect.cgl.genomics.ucsc.edu" )assignment )expression_statement (expression_statement (assignment (identifier_msg) identifier_msg (call (identifier_MIMEMultipart) identifier_MIMEMultipart (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_msg) identifier_msg (string_'From') string_'From' )subscript (identifier_fromadd) identifier_fromadd )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_univ_options) identifier_univ_options (string_'mail_to') string_'mail_to' )subscript (None) None )comparison_operator (block (return_statement )return_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_msg) identifier_msg (string_'To') string_'To' )subscript (subscript (identifier_univ_options) identifier_univ_options (string_'mail_to') string_'mail_to' )subscript )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (subscript (identifier_msg) identifier_msg (string_'Subject') string_'Subject' )subscript (binary_operator (string_"Protect run for sample %s completed successfully.") string_"Protect run for sample %s completed successfully." (subscript (identifier_univ_options) identifier_univ_options (string_'patient') string_'patient' )subscript )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_body) identifier_body (binary_operator (string_"Protect run for sample %s completed successfully.") string_"Protect run for sample %s completed successfully." (subscript (identifier_univ_options) identifier_univ_options (string_'patient') string_'patient' )subscript )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_msg) identifier_msg (identifier_attach) identifier_attach )attribute (argument_list (call (identifier_MIMEText) identifier_MIMEText (argument_list (identifier_body) identifier_body (string_'plain') string_'plain' )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_msg) identifier_msg (identifier_as_string) identifier_as_string )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_server) identifier_server (call (attribute (identifier_smtplib) identifier_smtplib (identifier_SMTP) identifier_SMTP )attribute (argument_list (string_'localhost') string_'localhost' )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (attribute (identifier_socket) identifier_socket (identifier_error) identifier_error )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (if_statement (comparison_operator (attribute (identifier_e) identifier_e (identifier_errno) identifier_errno )attribute (integer_111) integer_111 )comparison_operator (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'No mail utils on this maachine') string_'No mail utils on this maachine' )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Unexpected error while attempting to send an email.') string_'Unexpected error while attempting to send an email.' )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Could not send email report') string_'Could not send email report' )argument_list )call )expression_statement )block )except_clause (except_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Could not send email report') string_'Could not send email report' )argument_list )call )expression_statement )block )except_clause (else_clause (block (expression_statement (call (attribute (identifier_server) identifier_server (identifier_sendmail) identifier_sendmail )attribute (argument_list (identifier_fromadd) identifier_fromadd (subscript (identifier_msg) identifier_msg (string_'To') string_'To' )subscript (identifier_text) identifier_text )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_server) identifier_server (identifier_quit) identifier_quit )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )try_statement )block )function_definition )module
Send an email to the user when the run finishes. :param dict univ_options: Dict of universal options used by almost all tools
(module (function_definition (function_name_get_position_p) function_name_get_position_p (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_data) identifier_data (list )list )assignment )expression_statement (expression_statement (call (attribute (identifier_data) identifier_data (identifier_append) identifier_append )attribute (argument_list (integer_0x09) integer_0x09 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_data) identifier_data (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_servoid) identifier_servoid )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_data) identifier_data (identifier_append) identifier_append )attribute (argument_list (identifier_RAM_READ_REQ) identifier_RAM_READ_REQ )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_data) identifier_data (identifier_append) identifier_append )attribute (argument_list (identifier_POSITION_KP_RAM) identifier_POSITION_KP_RAM )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_data) identifier_data (identifier_append) identifier_append )attribute (argument_list (identifier_BYTE2) identifier_BYTE2 )argument_list )call )expression_statement (expression_statement (call (identifier_send_data) identifier_send_data (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement (expression_statement (assignment (identifier_rxdata) identifier_rxdata (list )list )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_rxdata) identifier_rxdata (call (attribute (identifier_SERPORT) identifier_SERPORT (identifier_read) identifier_read )attribute (argument_list (integer_13) integer_13 )argument_list )call )assignment )expression_statement (return_statement (binary_operator (parenthesized_expression (binary_operator (call (identifier_ord) identifier_ord (argument_list (subscript (identifier_rxdata) identifier_rxdata (integer_10) integer_10 )subscript )argument_list )call (integer_256) integer_256 )binary_operator )parenthesized_expression (parenthesized_expression (binary_operator (call (identifier_ord) identifier_ord (argument_list (subscript (identifier_rxdata) identifier_rxdata (integer_9) integer_9 )subscript )argument_list )call (integer_0xff) integer_0xff )binary_operator )parenthesized_expression )binary_operator )return_statement )block (except_clause (identifier_HerkulexError) identifier_HerkulexError (block (raise_statement (call (identifier_HerkulexError) identifier_HerkulexError (argument_list (string_"could not communicate with motors") string_"could not communicate with motors" )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Get the P value of the current PID for position
(module (function_definition (function_name__gamma_difference_hrf) function_name__gamma_difference_hrf (parameters (identifier_tr) identifier_tr (default_parameter (identifier_oversampling) identifier_oversampling (integer_50) integer_50 )default_parameter (default_parameter (identifier_time_length) identifier_time_length (float_32.) float_32. )default_parameter (default_parameter (identifier_onset) identifier_onset (float_0.) float_0. )default_parameter (default_parameter (identifier_delay) identifier_delay (integer_6) integer_6 )default_parameter (default_parameter (identifier_undershoot) identifier_undershoot (float_16.) float_16. )default_parameter (default_parameter (identifier_dispersion) identifier_dispersion (float_1.) float_1. )default_parameter (default_parameter (identifier_u_dispersion) identifier_u_dispersion (float_1.) float_1. )default_parameter (default_parameter (identifier_ratio) identifier_ratio (float_0.167) float_0.167 )default_parameter )parameters (block (import_from_statement (dotted_name (identifier_scipy) identifier_scipy (identifier_stats) identifier_stats )dotted_name (dotted_name (identifier_gamma) identifier_gamma )dotted_name )import_from_statement (expression_statement (assignment (identifier_dt) identifier_dt (binary_operator (identifier_tr) identifier_tr (identifier_oversampling) identifier_oversampling )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_time_stamps) identifier_time_stamps (call (attribute (identifier_np) identifier_np (identifier_linspace) identifier_linspace )attribute (argument_list (integer_0) integer_0 (identifier_time_length) identifier_time_length (call (attribute (call (attribute (identifier_np) identifier_np (identifier_rint) identifier_rint )attribute (argument_list (binary_operator (call (identifier_float) identifier_float (argument_list (identifier_time_length) identifier_time_length )argument_list )call (identifier_dt) identifier_dt )binary_operator )argument_list )call (identifier_astype) identifier_astype )attribute (argument_list (attribute (identifier_np) identifier_np (identifier_int) identifier_int )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_time_stamps) identifier_time_stamps (identifier_onset) identifier_onset )augmented_assignment )expression_statement (expression_statement (assignment (identifier_hrf) identifier_hrf (binary_operator (call (attribute (identifier_gamma) identifier_gamma (identifier_pdf) identifier_pdf )attribute (argument_list (identifier_time_stamps) identifier_time_stamps (binary_operator (identifier_delay) identifier_delay (identifier_dispersion) identifier_dispersion )binary_operator (binary_operator (identifier_dt) identifier_dt (identifier_dispersion) identifier_dispersion )binary_operator )argument_list )call (line_continuation_\) line_continuation_\ (binary_operator (identifier_ratio) identifier_ratio (call (attribute (identifier_gamma) identifier_gamma (identifier_pdf) identifier_pdf )attribute (argument_list (identifier_time_stamps) identifier_time_stamps (binary_operator (identifier_undershoot) identifier_undershoot (identifier_u_dispersion) identifier_u_dispersion )binary_operator (binary_operator (identifier_dt) identifier_dt (identifier_u_dispersion) identifier_u_dispersion )binary_operator )argument_list )call )binary_operator )binary_operator )assignment )expression_statement (expression_statement (augmented_assignment (identifier_hrf) identifier_hrf (call (attribute (identifier_hrf) identifier_hrf (identifier_sum) identifier_sum )attribute (argument_list )argument_list )call )augmented_assignment )expression_statement (return_statement (identifier_hrf) identifier_hrf )return_statement )block )function_definition )module
Compute an hrf as the difference of two gamma functions Parameters ---------- tr : float scan repeat time, in seconds oversampling : int, optional (default=16) temporal oversampling factor time_length : float, optional (default=32) hrf kernel length, in seconds onset: float onset time of the hrf delay: float, optional delay parameter of the hrf (in s.) undershoot: float, optional undershoot parameter of the hrf (in s.) dispersion : float, optional dispersion parameter for the first gamma function u_dispersion : float, optional dispersion parameter for the second gamma function ratio : float, optional ratio of the two gamma components Returns ------- hrf : array of shape(length / tr * oversampling, dtype=float) hrf sampling on the oversampled time grid
(module (function_definition (function_name_get_feedback) function_name_get_feedback (parameters (identifier_self) identifier_self (default_parameter (identifier_block) identifier_block (True) True )default_parameter (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__feedback_greenlet) identifier__feedback_greenlet )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__feedback_greenlet) identifier__feedback_greenlet )attribute (call (attribute (identifier_gevent) identifier_gevent (identifier_spawn) identifier_spawn )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__feedback_loop) identifier__feedback_loop )attribute )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__feedback_queue) identifier__feedback_queue )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_block) identifier_block (identifier_block) identifier_block )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Gets the next feedback message. Each feedback message is a 2-tuple of (timestamp, device_token).
(module (function_definition (function_name_delete_cookie) function_name_delete_cookie (parameters (identifier_self) identifier_self (default_parameter (identifier_cookie_name) identifier_cookie_name (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_cookie_name) identifier_cookie_name (None) None )comparison_operator (block (expression_statement (assignment (identifier_cookie_name) identifier_cookie_name (subscript (attribute (identifier_self) identifier_self (identifier_default_value) identifier_default_value )attribute (string_'name') string_'name' )subscript )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_create_cookie) identifier_create_cookie )attribute (argument_list (string_"") string_"" (string_"") string_"" (keyword_argument (identifier_cookie_name) identifier_cookie_name (identifier_cookie_name) identifier_cookie_name )keyword_argument (keyword_argument (identifier_kill) identifier_kill (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Create a cookie that will immediately expire when it hits the other side. :param cookie_name: Name of the cookie :return: A tuple to be added to headers
(module (function_definition (function_name_randomize) function_name_randomize (parameters (identifier_self) identifier_self (default_parameter (identifier_period) identifier_period (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_period) identifier_period (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_period) identifier_period )attribute (identifier_period) identifier_period )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_perm) identifier_perm (call (identifier_list) identifier_list (argument_list (call (identifier_range) identifier_range (argument_list (attribute (identifier_self) identifier_self (identifier_period) identifier_period )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_perm_right) identifier_perm_right (binary_operator (attribute (identifier_self) identifier_self (identifier_period) identifier_period )attribute (integer_1) integer_1 )binary_operator )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_list) identifier_list (argument_list (identifier_perm) identifier_perm )argument_list )call (block (expression_statement (assignment (identifier_j) identifier_j (call (attribute (identifier_self) identifier_self (identifier_randint_function) identifier_randint_function )attribute (argument_list (integer_0) integer_0 (identifier_perm_right) identifier_perm_right )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (subscript (identifier_perm) identifier_perm (identifier_i) identifier_i )subscript (subscript (identifier_perm) identifier_perm (identifier_j) identifier_j )subscript )pattern_list (expression_list (subscript (identifier_perm) identifier_perm (identifier_j) identifier_j )subscript (subscript (identifier_perm) identifier_perm (identifier_i) identifier_i )subscript )expression_list )assignment )expression_statement )block )for_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_permutation) identifier_permutation )attribute (binary_operator (call (identifier_tuple) identifier_tuple (argument_list (identifier_perm) identifier_perm )argument_list )call (integer_2) integer_2 )binary_operator )assignment )expression_statement )block )function_definition )module
Randomize the permutation table used by the noise functions. This makes them generate a different noise pattern for the same inputs.
(module (function_definition (function_name_rewrite_autodoc) function_name_rewrite_autodoc (parameters (identifier_app) identifier_app (identifier_what) identifier_what (identifier_name) identifier_name (identifier_obj) identifier_obj (identifier_options) identifier_options (identifier_lines) identifier_lines )parameters (block (try_statement (block (expression_statement (assignment (subscript (identifier_lines) identifier_lines (slice (colon) colon )slice )subscript (call (identifier_parse_cartouche_text) identifier_parse_cartouche_text (argument_list (identifier_lines) identifier_lines )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_CartoucheSyntaxError) identifier_CartoucheSyntaxError (as_pattern_target (identifier_syntax_error) identifier_syntax_error )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_args) identifier_args (attribute (identifier_syntax_error) identifier_syntax_error (identifier_args) identifier_args )attribute )assignment )expression_statement (expression_statement (assignment (identifier_arg0) identifier_arg0 (conditional_expression (subscript (identifier_args) identifier_args (integer_0) integer_0 )subscript (identifier_args) identifier_args (string_'') string_'' )conditional_expression )assignment )expression_statement (expression_statement (augmented_assignment (identifier_arg0) identifier_arg0 (call (attribute (string_" in docstring for {what} {name} :") string_" in docstring for {what} {name} :" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_what) identifier_what (identifier_what) identifier_what )keyword_argument (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_arg0) identifier_arg0 (call (attribute (string_"\n=== BEGIN DOCSTRING ===\n{lines}\n=== END DOCSTRING ===\n") string_"\n=== BEGIN DOCSTRING ===\n{lines}\n=== END DOCSTRING ===\n" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_lines) identifier_lines (call (attribute (string_'\n') string_'\n' (identifier_join) identifier_join )attribute (argument_list (identifier_lines) identifier_lines )argument_list )call )keyword_argument )argument_list )call )augmented_assignment )expression_statement (expression_statement (assignment (attribute (identifier_syntax_error) identifier_syntax_error (identifier_args) identifier_args )attribute (binary_operator (tuple (identifier_arg0) identifier_arg0 )tuple (subscript (identifier_args) identifier_args (slice (integer_1) integer_1 (colon) colon )slice )subscript )binary_operator )assignment )expression_statement (raise_statement )raise_statement )block )except_clause )try_statement )block )function_definition )module
Convert lines from Cartouche to Sphinx format. The function to be called by the Sphinx autodoc extension when autodoc has read and processed a docstring. This function modified its ``lines`` argument *in place* replacing Cartouche syntax input into Sphinx reStructuredText output. Args: apps: The Sphinx application object. what: The type of object which the docstring belongs to. One of 'module', 'class', 'exception', 'function', 'method', 'attribute' name: The fully qualified name of the object. obj: The object itself. options: The options given to the directive. An object with attributes ``inherited_members``, ``undoc_members``, ``show_inheritance`` and ``noindex`` that are ``True`` if the flag option of the same name was given to the auto directive. lines: The lines of the docstring. Will be modified *in place*. Raises: CartoucheSyntaxError: If the docstring is malformed.