sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_get_objects) function_name_get_objects (parameters (identifier_self) identifier_self (default_parameter (identifier_force) identifier_force (None) None )default_parameter (default_parameter (identifier_last_update) identifier_last_update (None) None )default_parameter (default_parameter (identifier_flush) identifier_flush (False) False )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__run_object_import) identifier__run_object_import )attribute (argument_list (keyword_argument (identifier_force) identifier_force (identifier_force) identifier_force )keyword_argument (keyword_argument (identifier_last_update) identifier_last_update (identifier_last_update) identifier_last_update )keyword_argument (keyword_argument (identifier_flush) identifier_flush (identifier_flush) identifier_flush )keyword_argument (keyword_argument (identifier_full_history) identifier_full_history (False) False )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Extract routine for SQL based cubes. :param force: for querying for all objects (True) or only those passed in as list :param last_update: manual override for 'changed since date'
(module (function_definition (function_name_unfold) function_name_unfold (parameters (identifier_tensor) identifier_tensor (identifier_mode) identifier_mode )parameters (block (return_statement (call (attribute (call (attribute (identifier_np) identifier_np (identifier_moveaxis) identifier_moveaxis )attribute (argument_list (identifier_tensor) identifier_tensor (identifier_mode) identifier_mode (integer_0) integer_0 )argument_list )call (identifier_reshape) identifier_reshape )attribute (argument_list (tuple (subscript (attribute (identifier_tensor) identifier_tensor (identifier_shape) identifier_shape )attribute (identifier_mode) identifier_mode )subscript (unary_operator (integer_1) integer_1 )unary_operator )tuple )argument_list )call )return_statement )block )function_definition )module
Returns the mode-`mode` unfolding of `tensor`. Parameters ---------- tensor : ndarray mode : int Returns ------- ndarray unfolded_tensor of shape ``(tensor.shape[mode], -1)`` Author ------ Jean Kossaifi <https://github.com/tensorly>
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_index_file) identifier_index_file (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )assignment )expression_statement (expression_statement (assignment (identifier_new_index_file) identifier_new_index_file (binary_operator (identifier_index_file) identifier_index_file (string_'.new') string_'.new' )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_bak_index_file) identifier_bak_index_file (binary_operator (identifier_index_file) identifier_index_file (string_'.bak') string_'.bak' )binary_operator )assignment )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__db) identifier__db )attribute )not_operator (block (return_statement )return_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_new_index_file) identifier_new_index_file (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_json) identifier_json (identifier_dump) identifier_dump )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__db) identifier__db )attribute (identifier_f) identifier_f (keyword_argument (identifier_indent) identifier_indent (integer_4) integer_4 )keyword_argument )argument_list )call )expression_statement )block )with_statement (if_statement (call (identifier_exists) identifier_exists (argument_list (identifier_index_file) identifier_index_file )argument_list )call (block (expression_statement (call (identifier_copy) identifier_copy (argument_list (identifier_index_file) identifier_index_file (identifier_bak_index_file) identifier_bak_index_file )argument_list )call )expression_statement )block )if_statement (expression_statement (call (identifier_rename) identifier_rename (argument_list (identifier_new_index_file) identifier_new_index_file (identifier_index_file) identifier_index_file )argument_list )call )expression_statement )block )function_definition )module
Safely write the index data to the index file
(module (function_definition (function_name_update_remote_archive) function_name_update_remote_archive (parameters (identifier_self) identifier_self (identifier_save_uri) identifier_save_uri (default_parameter (identifier_timeout) identifier_timeout (unary_operator (integer_1) integer_1 )unary_operator )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_update_with_zero_body) identifier_update_with_zero_body )attribute (argument_list (keyword_argument (identifier_uri) identifier_uri (identifier_save_uri) identifier_save_uri )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Saves a backup of the appliance to a previously-configured remote location. Args: save_uri (dict): The URI for saving the backup to a previously configured location. timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop waiting for its completion. Returns: dict: Backup details.
(module (function_definition (function_name_progress) function_name_progress (parameters (identifier_self) identifier_self (identifier_msg) identifier_msg (default_parameter (identifier_onerror) identifier_onerror (None) None )default_parameter (default_parameter (identifier_sep) identifier_sep (string_'...') string_'...' )default_parameter (default_parameter (identifier_end) identifier_end (string_'DONE') string_'DONE' )default_parameter (default_parameter (identifier_abrt) identifier_abrt (string_'FAIL') string_'FAIL' )default_parameter (default_parameter (identifier_prog) identifier_prog (string_'.') string_'.' )default_parameter (default_parameter (identifier_excs) identifier_excs (tuple (identifier_Exception) identifier_Exception )tuple )default_parameter (default_parameter (identifier_reraise) identifier_reraise (True) True )default_parameter )parameters (block (if_statement (not_operator (identifier_onerror) identifier_onerror )not_operator (block (expression_statement (assignment (identifier_onerror) identifier_onerror (call (attribute (identifier_self) identifier_self (identifier_error) identifier_error )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_onerror) identifier_onerror )argument_list )call (identifier_str) identifier_str )comparison_operator (block (expression_statement (assignment (identifier_onerror) identifier_onerror (call (attribute (identifier_self) identifier_self (identifier_error) identifier_error )attribute (argument_list (keyword_argument (identifier_msg) identifier_msg (identifier_onerror) identifier_onerror )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_pverb) identifier_pverb )attribute (argument_list (identifier_msg) identifier_msg (keyword_argument (identifier_end) identifier_end (identifier_sep) identifier_sep )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_prog) identifier_prog (call (attribute (identifier_progress) identifier_progress (identifier_Progress) identifier_Progress )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_pverb) identifier_pverb )attribute (keyword_argument (identifier_end) identifier_end (identifier_end) identifier_end )keyword_argument (keyword_argument (identifier_abrt) identifier_abrt (identifier_abrt) identifier_abrt )keyword_argument (keyword_argument (identifier_prog) identifier_prog (identifier_prog) identifier_prog )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (yield (identifier_prog) identifier_prog )yield )expression_statement (expression_statement (call (attribute (identifier_prog) identifier_prog (identifier_end) identifier_end )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (attribute (identifier_self) identifier_self (identifier_ProgressOK) identifier_ProgressOK )attribute (block (pass_statement )pass_statement )block )except_clause (except_clause (as_pattern (attribute (identifier_self) identifier_self (identifier_ProgressAbrt) identifier_ProgressAbrt )attribute (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (if_statement (identifier_reraise) identifier_reraise (block (raise_statement (identifier_err) identifier_err )raise_statement )block )if_statement )block )except_clause (except_clause (identifier_KeyboardInterrupt) identifier_KeyboardInterrupt (block (raise_statement )raise_statement )block )except_clause (except_clause (as_pattern (identifier_excs) identifier_excs (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_prog) identifier_prog (identifier_abrt) identifier_abrt )attribute (argument_list (keyword_argument (identifier_noraise) identifier_noraise (True) True )keyword_argument )argument_list )call )expression_statement (if_statement (identifier_onerror) identifier_onerror (block (expression_statement (call (identifier_onerror) identifier_onerror (argument_list (identifier_err) identifier_err )argument_list )call )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_debug) identifier_debug )attribute (block (expression_statement (call (attribute (identifier_traceback) identifier_traceback (identifier_print_exc) identifier_print_exc )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_reraise) identifier_reraise (block (raise_statement (call (attribute (identifier_self) identifier_self (identifier_ProgressAbrt) identifier_ProgressAbrt )attribute (argument_list )argument_list )call )raise_statement )block )if_statement )block )except_clause )try_statement )block )function_definition )module
Context manager for handling interactive prog indication This context manager streamlines presenting banners and prog indicators. To start the prog, pass ``msg`` argument as a start message. For example:: printer = Console(verbose=True) with printer.progress('Checking files') as prog: # Do some checks if errors: prog.abrt() prog.end() The context manager returns a ``Progress`` instance, which provides methods like ``abrt()`` (abort), ``end()`` (end), and ``prog()`` (print prog indicator). The prog methods like ``abrt()`` and ``end()`` will raise an exception that interrupts the prog. These exceptions are ``ProgressEnd`` exception subclasses and are ``ProgressAbrt`` and ``ProgressOK`` respectively. They are silenced and not handled in any way as they only serve the purpose of flow control. Other exceptions are trapped and ``abrt()`` is called. The exceptions that should be trapped can be customized using the ``excs`` argument, which should be a tuple of exception classes. If a handler function is passed using ``onerror`` argument, then this function takes the raised exception and handles it. By default, the ``error()`` factory is called with no arguments to generate the default error handler. If string is passed, then ``error()`` factory is called with that string. Finally, when prog is aborted either naturally or when exception is raised, it is possible to reraise the ``ProgressAbrt`` exception. This is done using the ``reraise`` flag. Default is to reraise.
(module (function_definition (function_name__decode_ctrl_packet) function_name__decode_ctrl_packet (parameters (identifier_self) identifier_self (identifier_version) identifier_version (identifier_packet) identifier_packet )parameters (block (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_5) integer_5 )argument_list )call (block (expression_statement (assignment (identifier_input_bit) identifier_input_bit (subscript (identifier_packet) identifier_packet (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__debug) identifier__debug )attribute (argument_list (identifier_PROP_LOGLEVEL_DEBUG) identifier_PROP_LOGLEVEL_DEBUG (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (string_"Byte ") string_"Byte " (call (identifier_str) identifier_str (argument_list (identifier_i) identifier_i )argument_list )call )binary_operator (string_": ") string_": " )binary_operator (call (identifier_str) identifier_str (argument_list (binary_operator (parenthesized_expression (binary_operator (identifier_input_bit) identifier_input_bit (integer_7) integer_7 )binary_operator )parenthesized_expression (integer_1) integer_1 )binary_operator )argument_list )call )binary_operator (call (identifier_str) identifier_str (argument_list (binary_operator (parenthesized_expression (binary_operator (identifier_input_bit) identifier_input_bit (integer_6) integer_6 )binary_operator )parenthesized_expression (integer_1) integer_1 )binary_operator )argument_list )call )binary_operator (call (identifier_str) identifier_str (argument_list (binary_operator (parenthesized_expression (binary_operator (identifier_input_bit) identifier_input_bit (integer_5) integer_5 )binary_operator )parenthesized_expression (integer_1) integer_1 )binary_operator )argument_list )call )binary_operator (call (identifier_str) identifier_str (argument_list (binary_operator (parenthesized_expression (binary_operator (identifier_input_bit) identifier_input_bit (integer_4) integer_4 )binary_operator )parenthesized_expression (integer_1) integer_1 )binary_operator )argument_list )call )binary_operator (call (identifier_str) identifier_str (argument_list (binary_operator (parenthesized_expression (binary_operator (identifier_input_bit) identifier_input_bit (integer_3) integer_3 )binary_operator )parenthesized_expression (integer_1) integer_1 )binary_operator )argument_list )call )binary_operator (call (identifier_str) identifier_str (argument_list (binary_operator (parenthesized_expression (binary_operator (identifier_input_bit) identifier_input_bit (integer_2) integer_2 )binary_operator )parenthesized_expression (integer_1) integer_1 )binary_operator )argument_list )call )binary_operator (call (identifier_str) identifier_str (argument_list (binary_operator (parenthesized_expression (binary_operator (identifier_input_bit) identifier_input_bit (integer_1) integer_1 )binary_operator )parenthesized_expression (integer_1) integer_1 )binary_operator )argument_list )call )binary_operator (call (identifier_str) identifier_str (argument_list (binary_operator (identifier_input_bit) identifier_input_bit (integer_1) integer_1 )binary_operator )argument_list )call )binary_operator )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_sensor) identifier_sensor (attribute (identifier_self) identifier_self (identifier__ctrl_sensor) identifier__ctrl_sensor )attribute (block (if_statement (parenthesized_expression (comparison_operator (attribute (identifier_sensor) identifier_sensor (identifier_sensor_type) identifier_sensor_type )attribute (identifier_PROP_SENSOR_FLAG) identifier_PROP_SENSOR_FLAG )comparison_operator )parenthesized_expression (block (expression_statement (assignment (attribute (identifier_sensor) identifier_sensor (identifier_value) identifier_value )attribute (binary_operator (parenthesized_expression (binary_operator (subscript (identifier_packet) identifier_packet (binary_operator (attribute (identifier_sensor) identifier_sensor (identifier_index) identifier_index )attribute (integer_8) integer_8 )binary_operator )subscript (parenthesized_expression (binary_operator (attribute (identifier_sensor) identifier_sensor (identifier_index) identifier_index )attribute (integer_8) integer_8 )binary_operator )parenthesized_expression )binary_operator )parenthesized_expression (integer_1) integer_1 )binary_operator )assignment )expression_statement )block (elif_clause (parenthesized_expression (comparison_operator (attribute (identifier_sensor) identifier_sensor (identifier_sensor_type) identifier_sensor_type )attribute (identifier_PROP_SENSOR_RAW) identifier_PROP_SENSOR_RAW )comparison_operator )parenthesized_expression (block (expression_statement (assignment (attribute (identifier_sensor) identifier_sensor (identifier_value) identifier_value )attribute (identifier_packet) identifier_packet )assignment )expression_statement )block )elif_clause )if_statement )block )for_statement )block )function_definition )module
Decode a control packet into the list of sensors.
(module (function_definition (function_name_dump_misspelling_list) function_name_dump_misspelling_list (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_results) identifier_results (list )list )assignment )expression_statement (for_statement (identifier_bad_word) identifier_bad_word (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__misspelling_dict) identifier__misspelling_dict )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call (block (for_statement (identifier_correction) identifier_correction (subscript (attribute (identifier_self) identifier_self (identifier__misspelling_dict) identifier__misspelling_dict )attribute (identifier_bad_word) identifier_bad_word )subscript (block (expression_statement (call (attribute (identifier_results) identifier_results (identifier_append) identifier_append )attribute (argument_list (list (identifier_bad_word) identifier_bad_word (identifier_correction) identifier_correction )list )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_results) identifier_results )return_statement )block )function_definition )module
Returns a list of misspelled words and corrections.
(module (function_definition (function_name_bwar_pitch) function_name_bwar_pitch (parameters (default_parameter (identifier_return_all) identifier_return_all (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (string_"http://www.baseball-reference.com/data/war_daily_pitch.txt") string_"http://www.baseball-reference.com/data/war_daily_pitch.txt" )assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (attribute (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url )argument_list )call (identifier_content) identifier_content )attribute )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (attribute (identifier_pd) identifier_pd (identifier_read_csv) identifier_read_csv )attribute (argument_list (call (attribute (identifier_io) identifier_io (identifier_StringIO) identifier_StringIO )attribute (argument_list (call (attribute (identifier_s) identifier_s (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (identifier_return_all) identifier_return_all (block (return_statement (identifier_c) identifier_c )return_statement )block (else_clause (block (expression_statement (assignment (identifier_cols_to_keep) identifier_cols_to_keep (list (string_'name_common') string_'name_common' (string_'mlb_ID') string_'mlb_ID' (string_'player_ID') string_'player_ID' (string_'year_ID') string_'year_ID' (string_'team_ID') string_'team_ID' (string_'stint_ID') string_'stint_ID' (string_'lg_ID') string_'lg_ID' (string_'G') string_'G' (string_'GS') string_'GS' (string_'RA') string_'RA' (string_'xRA') string_'xRA' (string_'BIP') string_'BIP' (string_'BIP_perc') string_'BIP_perc' (string_'salary') string_'salary' (string_'ERA_plus') string_'ERA_plus' (string_'WAR_rep') string_'WAR_rep' (string_'WAA') string_'WAA' (string_'WAA_adj') string_'WAA_adj' (string_'WAR') string_'WAR' )list )assignment )expression_statement (return_statement (subscript (identifier_c) identifier_c (identifier_cols_to_keep) identifier_cols_to_keep )subscript )return_statement )block )else_clause )if_statement )block )function_definition )module
Get data from war_daily_pitch table. Returns WAR, its components, and a few other useful stats. To get all fields from this table, supply argument return_all=True.
(module (function_definition (function_name_to_hierarchical) function_name_to_hierarchical (parameters (identifier_self) identifier_self (identifier_n_repeat) identifier_n_repeat (default_parameter (identifier_n_shuffle) identifier_n_shuffle (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_levels) identifier_levels (attribute (identifier_self) identifier_self (identifier_levels) identifier_levels )attribute )assignment )expression_statement (expression_statement (assignment (identifier_codes) identifier_codes (list_comprehension (call (attribute (identifier_np) identifier_np (identifier_repeat) identifier_repeat )attribute (argument_list (identifier_level_codes) identifier_level_codes (identifier_n_repeat) identifier_n_repeat )argument_list )call (for_in_clause (identifier_level_codes) identifier_level_codes (attribute (identifier_self) identifier_self (identifier_codes) identifier_codes )attribute )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_codes) identifier_codes (list_comprehension (call (attribute (call (attribute (identifier_x) identifier_x (identifier_reshape) identifier_reshape )attribute (argument_list (identifier_n_shuffle) identifier_n_shuffle (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call (identifier_ravel) identifier_ravel )attribute (argument_list (keyword_argument (identifier_order) identifier_order (string_'F') string_'F' )keyword_argument )argument_list )call (for_in_clause (identifier_x) identifier_x (identifier_codes) identifier_codes )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_names) identifier_names (attribute (identifier_self) identifier_self (identifier_names) identifier_names )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (concatenated_string (string_"Method .to_hierarchical is deprecated and will ") string_"Method .to_hierarchical is deprecated and will " (string_"be removed in a future version") string_"be removed in a future version" )concatenated_string (identifier_FutureWarning) identifier_FutureWarning (keyword_argument (identifier_stacklevel) identifier_stacklevel (integer_2) integer_2 )keyword_argument )argument_list )call )expression_statement (return_statement (call (identifier_MultiIndex) identifier_MultiIndex (argument_list (keyword_argument (identifier_levels) identifier_levels (identifier_levels) identifier_levels )keyword_argument (keyword_argument (identifier_codes) identifier_codes (identifier_codes) identifier_codes )keyword_argument (keyword_argument (identifier_names) identifier_names (identifier_names) identifier_names )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return a MultiIndex reshaped to conform to the shapes given by n_repeat and n_shuffle. .. deprecated:: 0.24.0 Useful to replicate and rearrange a MultiIndex for combination with another Index with n_repeat items. Parameters ---------- n_repeat : int Number of times to repeat the labels on self n_shuffle : int Controls the reordering of the labels. If the result is going to be an inner level in a MultiIndex, n_shuffle will need to be greater than one. The size of each label must divisible by n_shuffle. Returns ------- MultiIndex Examples -------- >>> idx = pd.MultiIndex.from_tuples([(1, 'one'), (1, 'two'), (2, 'one'), (2, 'two')]) >>> idx.to_hierarchical(3) MultiIndex(levels=[[1, 2], ['one', 'two']], codes=[[0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1]])
(module (function_definition (function_name_polynomial) function_name_polynomial (parameters (identifier_A) identifier_A (identifier_x) identifier_x (identifier_b) identifier_b (identifier_coefficients) identifier_coefficients (default_parameter (identifier_iterations) identifier_iterations (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_A) identifier_A (identifier_x) identifier_x (identifier_b) identifier_b )pattern_list (call (identifier_make_system) identifier_make_system (argument_list (identifier_A) identifier_A (identifier_x) identifier_x (identifier_b) identifier_b (keyword_argument (identifier_formats) identifier_formats (None) None )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_iterations) identifier_iterations )argument_list )call (block (import_from_statement (dotted_name (identifier_pyamg) identifier_pyamg (identifier_util) identifier_util (identifier_linalg) identifier_linalg )dotted_name (dotted_name (identifier_norm) identifier_norm )dotted_name )import_from_statement (if_statement (comparison_operator (call (identifier_norm) identifier_norm (argument_list (identifier_x) identifier_x )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_residual) identifier_residual (identifier_b) identifier_b )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_residual) identifier_residual (parenthesized_expression (binary_operator (identifier_b) identifier_b (binary_operator (identifier_A) identifier_A (identifier_x) identifier_x )binary_operator )binary_operator )parenthesized_expression )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_h) identifier_h (binary_operator (subscript (identifier_coefficients) identifier_coefficients (integer_0) integer_0 )subscript (identifier_residual) identifier_residual )binary_operator )assignment )expression_statement (for_statement (identifier_c) identifier_c (subscript (identifier_coefficients) identifier_coefficients (slice (integer_1) integer_1 (colon) colon )slice )subscript (block (expression_statement (assignment (identifier_h) identifier_h (binary_operator (binary_operator (identifier_c) identifier_c (identifier_residual) identifier_residual )binary_operator (binary_operator (identifier_A) identifier_A (identifier_h) identifier_h )binary_operator )binary_operator )assignment )expression_statement )block )for_statement (expression_statement (augmented_assignment (identifier_x) identifier_x (identifier_h) identifier_h )augmented_assignment )expression_statement )block )for_statement )block )function_definition )module
Apply a polynomial smoother to the system Ax=b. Parameters ---------- A : sparse matrix Sparse NxN matrix x : ndarray Approximate solution (length N) b : ndarray Right-hand side (length N) coefficients : array_like Coefficients of the polynomial. See Notes section for details. iterations : int Number of iterations to perform Returns ------- Nothing, x will be modified in place. Notes ----- The smoother has the form x[:] = x + p(A) (b - A*x) where p(A) is a polynomial in A whose scalar coefficients are specified (in descending order) by argument 'coefficients'. - Richardson iteration p(A) = c_0: polynomial_smoother(A, x, b, [c_0]) - Linear smoother p(A) = c_1*A + c_0: polynomial_smoother(A, x, b, [c_1, c_0]) - Quadratic smoother p(A) = c_2*A^2 + c_1*A + c_0: polynomial_smoother(A, x, b, [c_2, c_1, c_0]) Here, Horner's Rule is applied to avoid computing A^k directly. For efficience, the method detects the case x = 0 one matrix-vector product is avoided (since (b - A*x) is b). Examples -------- >>> # The polynomial smoother is not currently used directly >>> # in PyAMG. It is only used by the chebyshev smoothing option, >>> # which automatically calculates the correct coefficients. >>> from pyamg.gallery import poisson >>> from pyamg.util.linalg import norm >>> import numpy as np >>> from pyamg.aggregation import smoothed_aggregation_solver >>> A = poisson((10,10), format='csr') >>> b = np.ones((A.shape[0],1)) >>> sa = smoothed_aggregation_solver(A, B=np.ones((A.shape[0],1)), ... coarse_solver='pinv2', max_coarse=50, ... presmoother=('chebyshev', {'degree':3, 'iterations':1}), ... postsmoother=('chebyshev', {'degree':3, 'iterations':1})) >>> x0=np.zeros((A.shape[0],1)) >>> residuals=[] >>> x = sa.solve(b, x0=x0, tol=1e-8, residuals=residuals)
(module (function_definition (function_name_merge_with) function_name_merge_with (parameters (identifier_self) identifier_self (identifier_other) identifier_other )parameters (block (expression_statement (assignment (identifier_other) identifier_other (call (identifier_as_shape) identifier_as_shape (argument_list (identifier_other) identifier_other )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__dims) identifier__dims )attribute (None) None )comparison_operator (block (return_statement (identifier_other) identifier_other )return_statement )block (else_clause (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_assert_same_rank) identifier_assert_same_rank )attribute (argument_list (identifier_other) identifier_other )argument_list )call )expression_statement (expression_statement (assignment (identifier_new_dims) identifier_new_dims (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_dim) identifier_dim )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_self) identifier_self (identifier__dims) identifier__dims )attribute )argument_list )call (block (expression_statement (call (attribute (identifier_new_dims) identifier_new_dims (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_dim) identifier_dim (identifier_merge_with) identifier_merge_with )attribute (argument_list (subscript (identifier_other) identifier_other (identifier_i) identifier_i )subscript )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (call (identifier_TensorShape) identifier_TensorShape (argument_list (identifier_new_dims) identifier_new_dims )argument_list )call )return_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Shapes %s and %s are not convertible") string_"Shapes %s and %s are not convertible" (tuple (identifier_self) identifier_self (identifier_other) identifier_other )tuple )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement )block )else_clause )if_statement )block )function_definition )module
Returns a `TensorShape` combining the information in `self` and `other`. The dimensions in `self` and `other` are merged elementwise, according to the rules defined for `Dimension.merge_with()`. Args: other: Another `TensorShape`. Returns: A `TensorShape` containing the combined information of `self` and `other`. Raises: ValueError: If `self` and `other` are not convertible.
(module (function_definition (function_name_add_cookies_to_web_driver) function_name_add_cookies_to_web_driver (parameters (identifier_driver) identifier_driver (identifier_cookies) identifier_cookies )parameters (block (for_statement (identifier_cookie) identifier_cookie (identifier_cookies) identifier_cookies (block (expression_statement (call (attribute (identifier_driver) identifier_driver (identifier_add_cookie) identifier_add_cookie )attribute (argument_list (call (identifier_convert_cookie_to_dict) identifier_convert_cookie_to_dict (argument_list (identifier_cookie) identifier_cookie )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_driver) identifier_driver )return_statement )block )function_definition )module
Sets cookies in an existing WebDriver session.
(module (function_definition (function_name_overlay_config) function_name_overlay_config (parameters (identifier_base) identifier_base (identifier_overlay) identifier_overlay )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_base) identifier_base (attribute (identifier_collections) identifier_collections (identifier_Mapping) identifier_Mapping )attribute )argument_list )call )not_operator (block (return_statement (identifier_overlay) identifier_overlay )return_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_overlay) identifier_overlay (attribute (identifier_collections) identifier_collections (identifier_Mapping) identifier_Mapping )attribute )argument_list )call )not_operator (block (return_statement (identifier_overlay) identifier_overlay )return_statement )block )if_statement (expression_statement (assignment (identifier_result) identifier_result (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_k) identifier_k (call (identifier_iterkeys) identifier_iterkeys (argument_list (identifier_base) identifier_base )argument_list )call (block (if_statement (comparison_operator (identifier_k) identifier_k (identifier_overlay) identifier_overlay )comparison_operator (block (expression_statement (assignment (subscript (identifier_result) identifier_result (identifier_k) identifier_k )subscript (subscript (identifier_base) identifier_base (identifier_k) identifier_k )subscript )assignment )expression_statement )block )if_statement )block )for_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (identifier_overlay) identifier_overlay )argument_list )call (block (if_statement (boolean_operator (comparison_operator (identifier_v) identifier_v (None) None )comparison_operator (parenthesized_expression (boolean_operator (comparison_operator (identifier_k) identifier_k (identifier_base) identifier_base )comparison_operator (comparison_operator (subscript (identifier_base) identifier_base (identifier_k) identifier_k )subscript (None) None )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (block (if_statement (comparison_operator (identifier_k) identifier_k (identifier_base) identifier_base )comparison_operator (block (expression_statement (assignment (identifier_v) identifier_v (call (identifier_overlay_config) identifier_overlay_config (argument_list (subscript (identifier_base) identifier_base (identifier_k) identifier_k )subscript (identifier_v) identifier_v )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_result) identifier_result (identifier_k) identifier_k )subscript (identifier_v) identifier_v )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Overlay one configuration over another. This overlays `overlay` on top of `base` as follows: * If either isn't a dictionary, returns `overlay`. * Any key in `base` not present in `overlay` is present in the result with its original value. * Any key in `overlay` with value :const:`None` is not present in the result, unless it also is :const:`None` in `base`. * Any key in `overlay` not present in `base` and not :const:`None` is present in the result with its new value. * Any key in both `overlay` and `base` with a non-:const:`None` value is recursively overlaid. >>> overlay_config({'a': 'b'}, {'a': 'c'}) {'a': 'c'} >>> overlay_config({'a': 'b'}, {'c': 'd'}) {'a': 'b', 'c': 'd'} >>> overlay_config({'a': {'b': 'c'}}, ... {'a': {'b': 'd', 'e': 'f'}}) {'a': {'b': 'd', 'e': 'f'}} >>> overlay_config({'a': 'b', 'c': 'd'}, {'a': None}) {'c': 'd'} :param dict base: original configuration :param dict overlay: overlay configuration :return: new overlaid configuration :returntype dict:
(module (function_definition (function_name_fixed_timezone) function_name_fixed_timezone (parameters (identifier_offset) identifier_offset )parameters (block (if_statement (comparison_operator (identifier_offset) identifier_offset (identifier__tz_cache) identifier__tz_cache )comparison_operator (block (return_statement (subscript (identifier__tz_cache) identifier__tz_cache (identifier_offset) identifier_offset )subscript )return_statement )block )if_statement (expression_statement (assignment (identifier_tz) identifier_tz (call (identifier__FixedTimezone) identifier__FixedTimezone (argument_list (identifier_offset) identifier_offset )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier__tz_cache) identifier__tz_cache (identifier_offset) identifier_offset )subscript (identifier_tz) identifier_tz )assignment )expression_statement (return_statement (identifier_tz) identifier_tz )return_statement )block )function_definition )module
Return a Timezone instance given its offset in seconds.
(module (function_definition (function_name_outer_horizontal_border_bottom) function_name_outer_horizontal_border_bottom (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (string_u"{lm}{lv}{hz}{rv}") string_u"{lm}{lv}{hz}{rv}" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_lm) identifier_lm (binary_operator (string_' ') string_' ' (attribute (attribute (identifier_self) identifier_self (identifier_margins) identifier_margins )attribute (identifier_left) identifier_left )attribute )binary_operator )keyword_argument (keyword_argument (identifier_lv) identifier_lv (attribute (attribute (identifier_self) identifier_self (identifier_border_style) identifier_border_style )attribute (identifier_bottom_left_corner) identifier_bottom_left_corner )attribute )keyword_argument (keyword_argument (identifier_rv) identifier_rv (attribute (attribute (identifier_self) identifier_self (identifier_border_style) identifier_border_style )attribute (identifier_bottom_right_corner) identifier_bottom_right_corner )attribute )keyword_argument (keyword_argument (identifier_hz) identifier_hz (call (attribute (identifier_self) identifier_self (identifier_outer_horizontals) identifier_outer_horizontals )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
The complete outer bottom horizontal border section, including left and right margins. Returns: str: The bottom menu border.
(module (function_definition (function_name_fetch_deposits_since) function_name_fetch_deposits_since (parameters (identifier_self) identifier_self (typed_parameter (identifier_since) identifier_since (type (identifier_int) identifier_int )type )typed_parameter )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_Deposit) identifier_Deposit )type )type_parameter )generic_type )type (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__transactions_since) identifier__transactions_since )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__deposits_since) identifier__deposits_since )attribute (string_'deposits') string_'deposits' (identifier_since) identifier_since )argument_list )call )return_statement )block )function_definition )module
Fetch all deposits since the given timestamp.
(module (function_definition (function_name_read_line) function_name_read_line (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (identifier_line) identifier_line (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_inp) identifier_inp )attribute (identifier_readline) identifier_readline )attribute (argument_list )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (identifier_KeyboardInterrupt) identifier_KeyboardInterrupt (block (raise_statement (call (identifier_EOFError) identifier_EOFError (argument_list )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (not_operator (identifier_line) identifier_line )not_operator (block (raise_statement (call (identifier_EOFError) identifier_EOFError (argument_list )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_line) identifier_line )return_statement )block )function_definition )module
Interrupted respecting reader for stdin. Raises EOFError if the end of stream has been reached
(module (function_definition (function_name_flags) function_name_flags (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (identifier_set) identifier_set (argument_list (generator_expression (call (attribute (identifier_name) identifier_name (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (for_in_clause (identifier_name) identifier_name (call (identifier_sorted) identifier_sorted (argument_list (attribute (identifier_TIFF) identifier_TIFF (identifier_FILE_FLAGS) identifier_FILE_FLAGS )attribute )argument_list )call )for_in_clause (if_clause (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (binary_operator (string_'is_') string_'is_' (identifier_name) identifier_name )binary_operator )argument_list )call )if_clause )generator_expression )argument_list )call )return_statement )block )function_definition )module
Return set of flags.
(module (function_definition (function_name_system_exit) function_name_system_exit (parameters (identifier_object) identifier_object )parameters (block (decorated_definition (decorator (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_object) identifier_object )argument_list )call )decorator (function_definition (function_name_system_exit_wrapper) function_name_system_exit_wrapper (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (try_statement (block (if_statement (call (identifier_object) identifier_object (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_foundations) identifier_foundations (identifier_core) identifier_core )attribute (identifier_exit) identifier_exit )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement )block )if_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (call (attribute (string_"\n") string_"\n" (identifier_join) identifier_join )attribute (argument_list (call (attribute (attribute (identifier_foundations) identifier_foundations (identifier_exceptions) identifier_exceptions )attribute (identifier_format_exception) identifier_format_exception )attribute (argument_list (list_splat (call (attribute (identifier_sys) identifier_sys (identifier_exc_info) identifier_exc_info )attribute (argument_list )argument_list )call )list_splat )argument_list )call )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_foundations) identifier_foundations (identifier_core) identifier_core )attribute (identifier_exit) identifier_exit )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )decorated_definition (return_statement (identifier_system_exit_wrapper) identifier_system_exit_wrapper )return_statement )block )function_definition )module
Handles proper system exit in case of critical exception. :param object: Object to decorate. :type object: object :return: Object. :rtype: object
(module (function_definition (function_name_srcname) function_name_srcname (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_rpm_name) identifier_rpm_name )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (identifier_startswith) identifier_startswith )attribute (argument_list (tuple (string_'python-') string_'python-' (string_'Python-') string_'Python-' )tuple )argument_list )call )boolean_operator (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_name_convertor) identifier_name_convertor )attribute (identifier_base_name) identifier_base_name )attribute (argument_list (boolean_operator (attribute (identifier_self) identifier_self (identifier_rpm_name) identifier_rpm_name )attribute (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )boolean_operator )argument_list )call )return_statement )block )if_statement )block )function_definition )module
Return srcname for the macro if the pypi name should be changed. Those cases are: - name was provided with -r option - pypi name is like python-<name>
(module (function_definition (function_name_responses_of) function_name_responses_of (parameters (identifier_self) identifier_self (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_responses) identifier_responses (list_comprehension (identifier_response) identifier_response (for_in_clause (pattern_list (identifier_index) identifier_index (identifier_response) identifier_response )pattern_list (call (attribute (identifier_self) identifier_self (identifier__responses) identifier__responses )attribute (argument_list (identifier_request) identifier_request )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (if_statement (identifier_responses) identifier_responses (block (return_statement (identifier_responses) identifier_responses )return_statement )block )if_statement (raise_statement (call (identifier_UnhandledHTTPRequestError) identifier_UnhandledHTTPRequestError (argument_list (binary_operator (string_"The cassette (%r) doesn't contain the request (%r) asked for") string_"The cassette (%r) doesn't contain the request (%r) asked for" (tuple (attribute (identifier_self) identifier_self (identifier__path) identifier__path )attribute (identifier_request) identifier_request )tuple )binary_operator )argument_list )call )raise_statement )block )function_definition )module
Find the responses corresponding to a request. This function isn't actually used by VCR internally, but is provided as an external API.
(module (function_definition (function_name_purge_portlets) function_name_purge_portlets (parameters (identifier_portal) identifier_portal )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"Purging portlets ...") string_"Purging portlets ..." )argument_list )call )expression_statement (function_definition (function_name_remove_portlets) function_name_remove_portlets (parameters (identifier_context_portlet) identifier_context_portlet )parameters (block (expression_statement (assignment (identifier_mapping) identifier_mapping (call (attribute (identifier_portal) identifier_portal (identifier_restrictedTraverse) identifier_restrictedTraverse )attribute (argument_list (identifier_context_portlet) identifier_context_portlet )argument_list )call )assignment )expression_statement (for_statement (identifier_key) identifier_key (call (attribute (identifier_mapping) identifier_mapping (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_PORTLETS_TO_PURGE) identifier_PORTLETS_TO_PURGE )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_"Skipping portlet: '{}'") string_"Skipping portlet: '{}'" (identifier_format) identifier_format )attribute (argument_list (identifier_key) identifier_key )argument_list )call )argument_list )call )expression_statement (continue_statement )continue_statement )block )if_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_"Removing portlet: '{}'") string_"Removing portlet: '{}'" (identifier_format) identifier_format )attribute (argument_list (identifier_key) identifier_key )argument_list )call )argument_list )call )expression_statement (delete_statement (subscript (identifier_mapping) identifier_mapping (identifier_key) identifier_key )subscript )delete_statement )block )for_statement )block )function_definition (expression_statement (call (identifier_remove_portlets) identifier_remove_portlets (argument_list (string_"++contextportlets++plone.leftcolumn") string_"++contextportlets++plone.leftcolumn" )argument_list )call )expression_statement (expression_statement (call (identifier_remove_portlets) identifier_remove_portlets (argument_list (string_"++contextportlets++plone.rightcolumn") string_"++contextportlets++plone.rightcolumn" )argument_list )call )expression_statement (expression_statement (assignment (identifier_setup) identifier_setup (attribute (identifier_portal) identifier_portal (identifier_portal_setup) identifier_portal_setup )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_setup) identifier_setup (identifier_runImportStepFromProfile) identifier_runImportStepFromProfile )attribute (argument_list (identifier_profile) identifier_profile (string_'portlets') string_'portlets' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"Purging portlets [DONE]") string_"Purging portlets [DONE]" )argument_list )call )expression_statement )block )function_definition )module
Remove old portlets. Leave the Navigation portlet only
(module (function_definition (function_name_token_address) function_name_token_address (parameters (identifier_self) identifier_self )parameters (type (identifier_Address) identifier_Address )type (block (return_statement (call (identifier_to_canonical_address) identifier_to_canonical_address (argument_list (call (attribute (call (attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_proxy) identifier_proxy )attribute (identifier_contract) identifier_contract )attribute (identifier_functions) identifier_functions )attribute (identifier_token) identifier_token )attribute (argument_list )argument_list )call (identifier_call) identifier_call )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Return the token of this manager.
(module (function_definition (function_name_decrypt) function_name_decrypt (parameters (identifier_self) identifier_self (identifier_data) identifier_data (default_parameter (identifier_decode) identifier_decode (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (call (attribute (identifier_self) identifier_self (identifier_cipher) identifier_cipher )attribute (argument_list )argument_list )call (identifier_decrypt_block) identifier_decrypt_block )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_padding) identifier_padding (call (attribute (call (attribute (identifier_self) identifier_self (identifier_mode) identifier_mode )attribute (argument_list )argument_list )call (identifier_padding) identifier_padding )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_padding) identifier_padding (None) None )comparison_operator (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_padding) identifier_padding (identifier_reverse_pad) identifier_reverse_pad )attribute (argument_list (identifier_result) identifier_result (attribute (identifier_WAESMode) identifier_WAESMode (identifier___data_padding_length__) identifier___data_padding_length__ )attribute )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (conditional_expression (call (attribute (identifier_result) identifier_result (identifier_decode) identifier_decode )attribute (argument_list )argument_list )call (identifier_decode) identifier_decode (identifier_result) identifier_result )conditional_expression )return_statement )block )function_definition )module
Decrypt the given data with cipher that is got from AES.cipher call. :param data: data to decrypt :param decode: whether to decode bytes to str or not :return: bytes or str (depends on decode flag)
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self (identifier_target) identifier_target (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (identifier_io_registry) identifier_io_registry (identifier_write) identifier_write )attribute (argument_list (identifier_self) identifier_self (identifier_target) identifier_target (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Write this `SegmentList` to a file Arguments and keywords depend on the output format, see the online documentation for full details for each format. Parameters ---------- target : `str` output filename Notes -----
(module (function_definition (function_name_generate_sphinx_all) function_name_generate_sphinx_all (parameters )parameters (block (expression_statement (assignment (identifier_all_nicknames) identifier_all_nicknames (list )list )assignment )expression_statement (function_definition (function_name_add_nickname) function_name_add_nickname (parameters (identifier_gtype) identifier_gtype (identifier_a) identifier_a (identifier_b) identifier_b )parameters (block (expression_statement (assignment (identifier_nickname) identifier_nickname (call (identifier_nickname_find) identifier_nickname_find (argument_list (identifier_gtype) identifier_gtype )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_Operation) identifier_Operation (identifier_generate_sphinx) identifier_generate_sphinx )attribute (argument_list (identifier_nickname) identifier_nickname )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_all_nicknames) identifier_all_nicknames (identifier_append) identifier_append )attribute (argument_list (identifier_nickname) identifier_nickname )argument_list )call )expression_statement )block (except_clause (identifier_Error) identifier_Error (block (pass_statement )pass_statement )block )except_clause )try_statement (expression_statement (call (identifier_type_map) identifier_type_map (argument_list (identifier_gtype) identifier_gtype (identifier_add_nickname) identifier_add_nickname )argument_list )call )expression_statement (return_statement (attribute (identifier_ffi) identifier_ffi (identifier_NULL) identifier_NULL )attribute )return_statement )block )function_definition (expression_statement (call (identifier_type_map) identifier_type_map (argument_list (call (identifier_type_from_name) identifier_type_from_name (argument_list (string_'VipsOperation') string_'VipsOperation' )argument_list )call (identifier_add_nickname) identifier_add_nickname )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_all_nicknames) identifier_all_nicknames (identifier_sort) identifier_sort )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_exclude) identifier_exclude (list (string_'scale') string_'scale' (string_'ifthenelse') string_'ifthenelse' (string_'bandjoin') string_'bandjoin' (string_'bandrank') string_'bandrank' )list )assignment )expression_statement (expression_statement (assignment (identifier_all_nicknames) identifier_all_nicknames (list_comprehension (identifier_x) identifier_x (for_in_clause (identifier_x) identifier_x (identifier_all_nicknames) identifier_all_nicknames )for_in_clause (if_clause (comparison_operator (identifier_x) identifier_x (identifier_exclude) identifier_exclude )comparison_operator )if_clause )list_comprehension )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_'.. class:: pyvips.Image\n') string_'.. class:: pyvips.Image\n' )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_' .. rubric:: Methods\n') string_' .. rubric:: Methods\n' )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_' .. autosummary::') string_' .. autosummary::' )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_' :nosignatures:\n') string_' :nosignatures:\n' )argument_list )call )expression_statement (for_statement (identifier_nickname) identifier_nickname (identifier_all_nicknames) identifier_all_nicknames (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_' ~{0}') string_' ~{0}' (identifier_format) identifier_format )attribute (argument_list (identifier_nickname) identifier_nickname )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (call (identifier_print) identifier_print (argument_list )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list )argument_list )call )expression_statement (for_statement (identifier_nickname) identifier_nickname (identifier_all_nicknames) identifier_all_nicknames (block (expression_statement (assignment (identifier_docstr) identifier_docstr (call (attribute (identifier_Operation) identifier_Operation (identifier_generate_sphinx) identifier_generate_sphinx )attribute (argument_list (identifier_nickname) identifier_nickname )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_docstr) identifier_docstr (call (attribute (identifier_docstr) identifier_docstr (identifier_replace) identifier_replace )attribute (argument_list (string_'\n') string_'\n' (string_'\n ') string_'\n ' )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_' ') string_' ' (identifier_docstr) identifier_docstr )binary_operator )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Generate sphinx documentation. This generates a .rst file for all auto-generated image methods. Use it to regenerate the docs with something like:: $ python -c \ "import pyvips; pyvips.Operation.generate_sphinx_all()" > x And copy-paste the file contents into doc/vimage.rst in the appropriate place.
(module (function_definition (function_name_validate_overlap) function_name_validate_overlap (parameters (identifier_comp1) identifier_comp1 (identifier_comp2) identifier_comp2 (identifier_force) identifier_force )parameters (block (expression_statement (assignment (identifier_warnings) identifier_warnings (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_force) identifier_force (None) None )comparison_operator (block (expression_statement (assignment (identifier_stat) identifier_stat (call (attribute (identifier_comp2) identifier_comp2 (identifier_check_overlap) identifier_check_overlap )attribute (argument_list (identifier_comp1) identifier_comp1 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_stat) identifier_stat (string_'full') string_'full' )comparison_operator (block (pass_statement )pass_statement )block (elif_clause (comparison_operator (identifier_stat) identifier_stat (string_'partial') string_'partial' )comparison_operator (block (raise_statement (parenthesized_expression (call (attribute (identifier_exceptions) identifier_exceptions (identifier_PartialOverlap) identifier_PartialOverlap )attribute (argument_list (string_'Spectrum and bandpass do not fully overlap. You may use force=[extrap|taper] to force this Observation anyway.') string_'Spectrum and bandpass do not fully overlap. You may use force=[extrap|taper] to force this Observation anyway.' )argument_list )call )parenthesized_expression )raise_statement )block )elif_clause (elif_clause (comparison_operator (identifier_stat) identifier_stat (string_'none') string_'none' )comparison_operator (block (raise_statement (parenthesized_expression (call (attribute (identifier_exceptions) identifier_exceptions (identifier_DisjointError) identifier_DisjointError )attribute (argument_list (string_'Spectrum and bandpass are disjoint') string_'Spectrum and bandpass are disjoint' )argument_list )call )parenthesized_expression )raise_statement )block )elif_clause )if_statement )block (elif_clause (comparison_operator (call (attribute (identifier_force) identifier_force (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (string_'taper') string_'taper' )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_comp1) identifier_comp1 (call (attribute (identifier_comp1) identifier_comp1 (identifier_taper) identifier_taper )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (expression_statement (assignment (identifier_comp1) identifier_comp1 (call (attribute (call (attribute (identifier_comp1) identifier_comp1 (identifier_tabulate) identifier_tabulate )attribute (argument_list )argument_list )call (identifier_taper) identifier_taper )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_warnings) identifier_warnings (string_'PartialOverlap') string_'PartialOverlap' )subscript (identifier_force) identifier_force )assignment )expression_statement )block )except_clause )try_statement )block )elif_clause (elif_clause (call (attribute (call (attribute (identifier_force) identifier_force (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_startswith) identifier_startswith )attribute (argument_list (string_'extrap') string_'extrap' )argument_list )call (block (expression_statement (assignment (identifier_stat) identifier_stat (call (attribute (identifier_comp2) identifier_comp2 (identifier_check_overlap) identifier_check_overlap )attribute (argument_list (identifier_comp1) identifier_comp1 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_stat) identifier_stat (string_'partial') string_'partial' )comparison_operator (block (expression_statement (assignment (subscript (identifier_warnings) identifier_warnings (string_'PartialOverlap') string_'PartialOverlap' )subscript (identifier_force) identifier_force )assignment )expression_statement )block )if_statement )block )elif_clause (else_clause (block (raise_statement (parenthesized_expression (call (identifier_KeyError) identifier_KeyError (argument_list (binary_operator (string_"Illegal value force=%s; legal values=('taper','extrap')") string_"Illegal value force=%s; legal values=('taper','extrap')" (identifier_force) identifier_force )binary_operator )argument_list )call )parenthesized_expression )raise_statement )block )else_clause )if_statement (return_statement (expression_list (identifier_comp1) identifier_comp1 (identifier_comp2) identifier_comp2 (identifier_warnings) identifier_warnings )expression_list )return_statement )block )function_definition )module
Validate the overlap between the wavelength sets of the two given components. Parameters ---------- comp1, comp2 : `~pysynphot.spectrum.SourceSpectrum` or `~pysynphot.spectrum.SpectralElement` Source spectrum and bandpass of an observation. force : {'extrap', 'taper', `None`} If not `None`, the components may be adjusted by extrapolation or tapering. Returns ------- comp1, comp2 Same as inputs. However, ``comp1`` might be tapered if that option is selected. warnings : dict Maps warning keyword to its description. Raises ------ KeyError Invalid ``force``. pysynphot.exceptions.DisjointError No overlap detected when ``force`` is `None`. pysynphot.exceptions.PartialOverlap Partial overlap detected when ``force`` is `None`.
(module (function_definition (function_name_smart_query_string) function_name_smart_query_string (parameters (identifier_parser) identifier_parser (identifier_token) identifier_token )parameters (block (expression_statement (assignment (identifier_args) identifier_args (call (attribute (identifier_token) identifier_token (identifier_split_contents) identifier_split_contents )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_additions) identifier_additions (subscript (identifier_args) identifier_args (slice (integer_1) integer_1 (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_addition_pairs) identifier_addition_pairs (list )list )assignment )expression_statement (while_statement (identifier_additions) identifier_additions (block (expression_statement (call (attribute (identifier_addition_pairs) identifier_addition_pairs (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_additions) identifier_additions (slice (integer_0) integer_0 (colon) colon (integer_2) integer_2 )slice )subscript )argument_list )call )expression_statement (expression_statement (assignment (identifier_additions) identifier_additions (subscript (identifier_additions) identifier_additions (slice (integer_2) integer_2 (colon) colon )slice )subscript )assignment )expression_statement )block )while_statement (return_statement (call (identifier_SmartQueryStringNode) identifier_SmartQueryStringNode (argument_list (identifier_addition_pairs) identifier_addition_pairs )argument_list )call )return_statement )block )function_definition )module
Outputs current GET query string with additions appended. Additions are provided in token pairs.
(module (function_definition (function_name_trace_dependencies) function_name_trace_dependencies (parameters (identifier_req) identifier_req (identifier_requirement_set) identifier_requirement_set (identifier_dependencies) identifier_dependencies (default_parameter (identifier__visited) identifier__visited (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier__visited) identifier__visited (boolean_operator (identifier__visited) identifier__visited (call (identifier_set) identifier_set (argument_list )argument_list )call )boolean_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_req) identifier_req (identifier__visited) identifier__visited )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (identifier__visited) identifier__visited (identifier_add) identifier_add )attribute (argument_list (identifier_req) identifier_req )argument_list )call )expression_statement (for_statement (identifier_reqName) identifier_reqName (call (attribute (identifier_req) identifier_req (identifier_requirements) identifier_requirements )attribute (argument_list )argument_list )call (block (try_statement (block (expression_statement (assignment (identifier_name) identifier_name (attribute (call (attribute (attribute (identifier_pkg_resources) identifier_pkg_resources (identifier_Requirement) identifier_Requirement )attribute (identifier_parse) identifier_parse )attribute (argument_list (identifier_reqName) identifier_reqName )argument_list )call (identifier_project_name) identifier_project_name )attribute )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (identifier_e) identifier_e (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_'Invalid requirement: %r (%s) in requirement %s') string_'Invalid requirement: %r (%s) in requirement %s' (tuple (identifier_reqName) identifier_reqName (identifier_e) identifier_e (identifier_req) identifier_req )tuple )binary_operator )argument_list )call )expression_statement (continue_statement )continue_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_subreq) identifier_subreq (call (attribute (identifier_requirement_set) identifier_requirement_set (identifier_get_requirement) identifier_get_requirement )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_dependencies) identifier_dependencies (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_req) identifier_req (identifier_subreq) identifier_subreq )tuple )argument_list )call )expression_statement (expression_statement (call (identifier_trace_dependencies) identifier_trace_dependencies (argument_list (identifier_subreq) identifier_subreq (identifier_requirement_set) identifier_requirement_set (identifier_dependencies) identifier_dependencies (identifier__visited) identifier__visited )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Trace all dependency relationship @param req: requirements to trace @param requirement_set: RequirementSet @param dependencies: list for storing dependencies relationships @param _visited: visited requirement set
(module (function_definition (function_name_pipeline_counter) function_name_pipeline_counter (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (string_'pipeline_counter') string_'pipeline_counter' (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute )comparison_operator (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_get) identifier_get )attribute (argument_list (string_'pipeline_counter') string_'pipeline_counter' )argument_list )call )return_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_pipeline) identifier_pipeline )attribute (None) None )comparison_operator (block (return_statement (attribute (attribute (attribute (identifier_self) identifier_self (identifier_pipeline) identifier_pipeline )attribute (identifier_data) identifier_data )attribute (identifier_counter) identifier_counter )attribute )return_statement )block )elif_clause )if_statement )block )function_definition )module
Get pipeline counter of current stage instance. Because instantiating stage instance could be performed in different ways and those return different results, we have to check where from to get counter of the pipeline. :return: pipeline counter.
(module (function_definition (function_name_ConnectionUpdate) function_name_ConnectionUpdate (parameters (identifier_self) identifier_self (identifier_settings) identifier_settings )parameters (block (expression_statement (assignment (identifier_connection_path) identifier_connection_path (attribute (identifier_self) identifier_self (identifier_connection_path) identifier_connection_path )attribute )assignment )expression_statement (expression_statement (assignment (identifier_NM) identifier_NM (call (attribute (identifier_dbusmock) identifier_dbusmock (identifier_get_object) identifier_get_object )attribute (argument_list (identifier_MANAGER_OBJ) identifier_MANAGER_OBJ )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_settings_obj) identifier_settings_obj (call (attribute (identifier_dbusmock) identifier_dbusmock (identifier_get_object) identifier_get_object )attribute (argument_list (identifier_SETTINGS_OBJ) identifier_SETTINGS_OBJ )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_main_connections) identifier_main_connections (call (attribute (identifier_settings_obj) identifier_settings_obj (identifier_ListConnections) identifier_ListConnections )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_connection_path) identifier_connection_path (identifier_main_connections) identifier_main_connections )comparison_operator (block (raise_statement (call (attribute (attribute (identifier_dbus) identifier_dbus (identifier_exceptions) identifier_exceptions )attribute (identifier_DBusException) identifier_DBusException )attribute (argument_list (binary_operator (string_'Connection %s does not exist') string_'Connection %s does not exist' (identifier_connection_path) identifier_connection_path )binary_operator (keyword_argument (identifier_name) identifier_name (binary_operator (identifier_MANAGER_IFACE) identifier_MANAGER_IFACE (string_'.DoesNotExist') string_'.DoesNotExist' )binary_operator )keyword_argument )argument_list )call )raise_statement )block )if_statement (for_statement (identifier_setting_name) identifier_setting_name (identifier_settings) identifier_settings (block (expression_statement (assignment (identifier_setting) identifier_setting (subscript (identifier_settings) identifier_settings (identifier_setting_name) identifier_setting_name )subscript )assignment )expression_statement (for_statement (identifier_k) identifier_k (identifier_setting) identifier_setting (block (if_statement (comparison_operator (identifier_setting_name) identifier_setting_name (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (identifier_setting_name) identifier_setting_name )subscript (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier_settings) identifier_settings )attribute (identifier_setting_name) identifier_setting_name )subscript (identifier_k) identifier_k )subscript (subscript (identifier_setting) identifier_setting (identifier_k) identifier_k )subscript )assignment )expression_statement )block )for_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_EmitSignal) identifier_EmitSignal )attribute (argument_list (identifier_CSETTINGS_IFACE) identifier_CSETTINGS_IFACE (string_'Updated') string_'Updated' (string_'') string_'' (list )list )argument_list )call )expression_statement (expression_statement (assignment (identifier_auto_connect) identifier_auto_connect (False) False )assignment )expression_statement (if_statement (comparison_operator (string_'autoconnect') string_'autoconnect' (subscript (identifier_settings) identifier_settings (string_'connection') string_'connection' )subscript )comparison_operator (block (expression_statement (assignment (identifier_auto_connect) identifier_auto_connect (subscript (subscript (identifier_settings) identifier_settings (string_'connection') string_'connection' )subscript (string_'autoconnect') string_'autoconnect' )subscript )assignment )expression_statement )block )if_statement (if_statement (identifier_auto_connect) identifier_auto_connect (block (expression_statement (assignment (identifier_dev) identifier_dev (None) None )assignment )expression_statement (expression_statement (assignment (identifier_devices) identifier_devices (call (attribute (identifier_NM) identifier_NM (identifier_GetDevices) identifier_GetDevices )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_devices) identifier_devices )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_dev) identifier_dev (subscript (identifier_devices) identifier_devices (integer_0) integer_0 )subscript )assignment )expression_statement )block )if_statement (if_statement (identifier_dev) identifier_dev (block (expression_statement (call (identifier_activate_connection) identifier_activate_connection (argument_list (identifier_NM) identifier_NM (identifier_connection_path) identifier_connection_path (identifier_dev) identifier_dev (identifier_connection_path) identifier_connection_path )argument_list )call )expression_statement )block )if_statement )block )if_statement (return_statement (identifier_connection_path) identifier_connection_path )return_statement )block )function_definition )module
Update settings on a connection. settings is a String String Variant Map Map. See https://developer.gnome.org/NetworkManager/0.9/spec.html #type-String_String_Variant_Map_Map
(module (function_definition (function_name_eval_ast) function_name_eval_ast (parameters (identifier_self) identifier_self (identifier_ast) identifier_ast )parameters (block (expression_statement (assignment (identifier_new_ast) identifier_new_ast (call (attribute (identifier_ast) identifier_ast (identifier_replace_dict) identifier_replace_dict )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_replacements) identifier_replacements )attribute (keyword_argument (identifier_leaf_operation) identifier_leaf_operation (attribute (identifier_self) identifier_self (identifier__leaf_op) identifier__leaf_op )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (subscript (call (attribute (attribute (identifier_backends) identifier_backends (identifier_concrete) identifier_concrete )attribute (identifier_eval) identifier_eval )attribute (argument_list (identifier_new_ast) identifier_new_ast (integer_1) integer_1 )argument_list )call (integer_0) integer_0 )subscript )return_statement )block )function_definition )module
Eval the ast, replacing symbols by their last value in the model.
(module (function_definition (function_name__create_sample_list) function_name__create_sample_list (parameters (identifier_in_bams) identifier_in_bams (identifier_vcf_file) identifier_vcf_file )parameters (block (expression_statement (assignment (identifier_out_file) identifier_out_file (binary_operator (string_"%s-sample_list.txt") string_"%s-sample_list.txt" (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (identifier_vcf_file) identifier_vcf_file )argument_list )call (integer_0) integer_0 )subscript )binary_operator )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_out_file) identifier_out_file (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 (for_statement (identifier_in_bam) identifier_in_bam (identifier_in_bams) identifier_in_bams (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_pysam) identifier_pysam (identifier_Samfile) identifier_Samfile )attribute (argument_list (identifier_in_bam) identifier_in_bam (string_"rb") string_"rb" )argument_list )call (as_pattern_target (identifier_work_bam) identifier_work_bam )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_rg) identifier_rg (call (attribute (attribute (identifier_work_bam) identifier_work_bam (identifier_header) identifier_header )attribute (identifier_get) identifier_get )attribute (argument_list (string_"RG") string_"RG" (list )list )argument_list )call (block (expression_statement (call (attribute (identifier_out_handle) identifier_out_handle (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_"%s\n") string_"%s\n" (subscript (identifier_rg) identifier_rg (string_"SM") string_"SM" )subscript )binary_operator )argument_list )call )expression_statement )block )for_statement )block )with_statement )block )for_statement )block )with_statement (return_statement (identifier_out_file) identifier_out_file )return_statement )block )function_definition )module
Pull sample names from input BAMs and create input sample list.
(module (function_definition (function_name_foreign) function_name_foreign (parameters (identifier_self) identifier_self (identifier_value) identifier_value (default_parameter (identifier_context) identifier_context (None) None )default_parameter )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_separator) identifier_separator )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_separator) identifier_separator (string_' ') string_' ' )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_separator) identifier_separator (conditional_expression (call (attribute (attribute (identifier_self) identifier_self (identifier_separator) identifier_separator )attribute (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (boolean_operator (attribute (identifier_self) identifier_self (identifier_strip) identifier_strip )attribute (call (identifier_hasattr) identifier_hasattr (argument_list (attribute (identifier_self) identifier_self (identifier_separator) identifier_separator )attribute (string_'strip') string_'strip' )argument_list )call )boolean_operator (attribute (identifier_self) identifier_self (identifier_separator) identifier_separator )attribute )conditional_expression )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_self) identifier_self (identifier__clean) identifier__clean )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_separator) identifier_separator (identifier_join) identifier_join )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_Concern) identifier_Concern (argument_list (string_"{0} caught, failed to convert to string: {1}") string_"{0} caught, failed to convert to string: {1}" (attribute (attribute (identifier_e) identifier_e (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list )argument_list )call (identifier_foreign) identifier_foreign )attribute (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block )function_definition )module
Construct a string-like representation for an iterable of string-like objects.
(module (function_definition (function_name_setup_logging) function_name_setup_logging (parameters (identifier_verbosity) identifier_verbosity (default_parameter (identifier_filename) identifier_filename (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_levels) identifier_levels (list (attribute (identifier_logging) identifier_logging (identifier_WARNING) identifier_WARNING )attribute (attribute (identifier_logging) identifier_logging (identifier_INFO) identifier_INFO )attribute (attribute (identifier_logging) identifier_logging (identifier_DEBUG) identifier_DEBUG )attribute )list )assignment )expression_statement (expression_statement (assignment (identifier_level) identifier_level (subscript (identifier_levels) identifier_levels (call (identifier_min) identifier_min (argument_list (identifier_verbosity) identifier_verbosity (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_levels) identifier_levels )argument_list )call (integer_1) integer_1 )binary_operator )argument_list )call )subscript )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_logging) identifier_logging (identifier_root) identifier_root )attribute (identifier_setLevel) identifier_setLevel )attribute (argument_list (identifier_level) identifier_level )argument_list )call )expression_statement (expression_statement (assignment (identifier_fmt) identifier_fmt (call (attribute (identifier_logging) identifier_logging (identifier_Formatter) identifier_Formatter )attribute (argument_list (concatenated_string (string_'%(asctime)s %(levelname)-12s %(message)-100s ') string_'%(asctime)s %(levelname)-12s %(message)-100s ' (string_'[%(filename)s:%(lineno)d]') string_'[%(filename)s:%(lineno)d]' )concatenated_string )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_hdlr) identifier_hdlr (call (attribute (identifier_logging) identifier_logging (identifier_StreamHandler) identifier_StreamHandler )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_hdlr) identifier_hdlr (identifier_setFormatter) identifier_setFormatter )attribute (argument_list (identifier_fmt) identifier_fmt )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_logging) identifier_logging (identifier_root) identifier_root )attribute (identifier_addHandler) identifier_addHandler )attribute (argument_list (identifier_hdlr) identifier_hdlr )argument_list )call )expression_statement (if_statement (identifier_filename) identifier_filename (block (expression_statement (assignment (identifier_hdlr) identifier_hdlr (call (attribute (identifier_logging) identifier_logging (identifier_FileHandler) identifier_FileHandler )attribute (argument_list (identifier_filename) identifier_filename (string_'a') string_'a' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_hdlr) identifier_hdlr (identifier_setFormatter) identifier_setFormatter )attribute (argument_list (identifier_fmt) identifier_fmt )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_logging) identifier_logging (identifier_root) identifier_root )attribute (identifier_addHandler) identifier_addHandler )attribute (argument_list (identifier_hdlr) identifier_hdlr )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Configure logging for this tool.
(module (function_definition (function_name_p) function_name_p (parameters (default_parameter (identifier_name) identifier_name (string_"") string_"" )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_Reflect) identifier_Reflect (identifier_context) identifier_context )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (as_pattern_target (identifier_r) identifier_r )as_pattern_target )as_pattern )with_item )with_clause (block (if_statement (identifier_name) identifier_name (block (expression_statement (assignment (identifier_instance) identifier_instance (call (identifier_P_CLASS) identifier_P_CLASS (argument_list (identifier_r) identifier_r (identifier_stream) identifier_stream (identifier_name) identifier_name (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_instance) identifier_instance (call (attribute (identifier_P_CLASS) identifier_P_CLASS (identifier_pop) identifier_pop )attribute (argument_list (identifier_r) identifier_r )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_instance) identifier_instance (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement )block )with_statement (return_statement (identifier_instance) identifier_instance )return_statement )block )function_definition )module
really quick and dirty profiling you start a profile by passing in name, you stop the top profiling by not passing in a name. You can also call this method using a with statement This is for when you just want to get a really back of envelope view of how your fast your code is, super handy, not super accurate since -- 2013-5-9 example -- p("starting profile") time.sleep(1) p() # stop the "starting profile" session # you can go N levels deep p("one") p("two") time.sleep(0.5) p() # stop profiling of "two" time.sleep(0.5) p() # stop profiling of "one" with pout.p("three"): time.sleep(0.5) name -- string -- pass this in to start a profiling session return -- context manager
(module (function_definition (function_name__nonmatch_class_pos) function_name__nonmatch_class_pos (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (subscript (attribute (attribute (attribute (identifier_self) identifier_self (identifier_kernel) identifier_kernel )attribute (identifier_classes_) identifier_classes_ )attribute (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript (integer_2) integer_2 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Number of classes is {}, expected 2.") string_"Number of classes is {}, expected 2." (identifier_format) identifier_format )attribute (argument_list (subscript (attribute (attribute (attribute (identifier_self) identifier_self (identifier_kernel) identifier_kernel )attribute (identifier_classes_) identifier_classes_ )attribute (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (integer_0) integer_0 )return_statement )block )function_definition )module
Return the position of the non-match class.
(module (function_definition (function_name_run_transaction) function_name_run_transaction (parameters (identifier_self) identifier_self (identifier_command_list) identifier_command_list (default_parameter (identifier_do_commit) identifier_do_commit (True) True )default_parameter )parameters (block (pass_statement )pass_statement (for_statement (identifier_c) identifier_c (identifier_command_list) identifier_command_list (block (if_statement (boolean_operator (comparison_operator (call (attribute (identifier_c) identifier_c (identifier_find) identifier_find )attribute (argument_list (string_";") string_";" )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator (comparison_operator (call (attribute (identifier_c) identifier_c (identifier_find) identifier_find )attribute (argument_list (string_"\\G") string_"\\G" )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )comparison_operator )boolean_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (binary_operator (string_"The SQL command '%s' contains a semi-colon or \\G. This is a potential SQL injection.") string_"The SQL command '%s' contains a semi-colon or \\G. This is a potential SQL injection." (identifier_c) identifier_c )binary_operator )argument_list )call )raise_statement )block )if_statement )block )for_statement (if_statement (identifier_do_commit) identifier_do_commit (block (expression_statement (assignment (identifier_sql) identifier_sql (binary_operator (string_"START TRANSACTION;\n%s;\nCOMMIT") string_"START TRANSACTION;\n%s;\nCOMMIT" (call (attribute (string_"\n") string_"\n" (identifier_join) identifier_join )attribute (argument_list (identifier_command_list) identifier_command_list )argument_list )call )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_sql) identifier_sql (binary_operator (string_"START TRANSACTION;\n%s;") string_"START TRANSACTION;\n%s;" (call (attribute (string_"\n") string_"\n" (identifier_join) identifier_join )attribute (argument_list (identifier_command_list) identifier_command_list )argument_list )call )binary_operator )assignment )expression_statement )block )else_clause )if_statement (return_statement )return_statement )block )function_definition )module
This can be used to stage multiple commands and roll back the transaction if an error occurs. This is useful if you want to remove multiple records in multiple tables for one entity but do not want the deletion to occur if the entity is tied to table not specified in the list of commands. Performing this as a transaction avoids the situation where the records are partially removed. If do_commit is false, the entire transaction is cancelled.
(module (function_definition (function_name_SetupPrometheusEndpointOnPortRange) function_name_SetupPrometheusEndpointOnPortRange (parameters (identifier_port_range) identifier_port_range (default_parameter (identifier_addr) identifier_addr (string_'') string_'' )default_parameter )parameters (block (assert_statement (comparison_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_get) identifier_get )attribute (argument_list (string_'RUN_MAIN') string_'RUN_MAIN' )argument_list )call (string_'true') string_'true' )comparison_operator (parenthesized_expression (concatenated_string (string_'The thread-based exporter can\'t be safely used when django\'s ') string_'The thread-based exporter can\'t be safely used when django\'s ' (string_'autoreloader is active. Use the URL exporter, or start django ') string_'autoreloader is active. Use the URL exporter, or start django ' (string_'with --noreload. See documentation/exports.md.') string_'with --noreload. See documentation/exports.md.' )concatenated_string )parenthesized_expression )assert_statement (for_statement (identifier_port) identifier_port (identifier_port_range) identifier_port_range (block (try_statement (block (expression_statement (assignment (identifier_httpd) identifier_httpd (call (identifier_HTTPServer) identifier_HTTPServer (argument_list (tuple (identifier_addr) identifier_addr (identifier_port) identifier_port )tuple (attribute (identifier_prometheus_client) identifier_prometheus_client (identifier_MetricsHandler) identifier_MetricsHandler )attribute )argument_list )call )assignment )expression_statement )block (except_clause (tuple (identifier_OSError) identifier_OSError (attribute (identifier_socket) identifier_socket (identifier_error) identifier_error )attribute )tuple (block (continue_statement )continue_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_thread) identifier_thread (call (identifier_PrometheusEndpointServer) identifier_PrometheusEndpointServer (argument_list (identifier_httpd) identifier_httpd )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_thread) identifier_thread (identifier_daemon) identifier_daemon )attribute (True) True )assignment )expression_statement (expression_statement (call (attribute (identifier_thread) identifier_thread (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_'Exporting Prometheus /metrics/ on port %s') string_'Exporting Prometheus /metrics/ on port %s' (identifier_port) identifier_port )binary_operator )argument_list )call )expression_statement (return_statement )return_statement )block )for_statement )block )function_definition )module
Like SetupPrometheusEndpointOnPort, but tries several ports. This is useful when you're running Django as a WSGI application with multiple processes and you want Prometheus to discover all workers. Each worker will grab a port and you can use Prometheus to aggregate across workers. port_range may be any iterable object that contains a list of ports. Typically this would be an xrange of contiguous ports. As soon as one port is found that can serve, use this one and stop trying. The same caveats regarding autoreload apply. Do not use this when Django's autoreloader is active.
(module (function_definition (function_name__magickfy_topics) function_name__magickfy_topics (parameters (identifier_topics) identifier_topics )parameters (block (if_statement (comparison_operator (identifier_topics) identifier_topics (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_topics) identifier_topics (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call (block (expression_statement (assignment (identifier_topics) identifier_topics (list (identifier_topics) identifier_topics )list )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_ts_) identifier_ts_ (list )list )assignment )expression_statement (for_statement (identifier_t__) identifier_t__ (identifier_topics) identifier_topics (block (if_statement (not_operator (call (attribute (identifier_t__) identifier_t__ (identifier_startswith) identifier_startswith )attribute (argument_list (identifier__MAGICK) identifier__MAGICK )argument_list )call )not_operator (block (if_statement (boolean_operator (identifier_t__) identifier_t__ (comparison_operator (subscript (identifier_t__) identifier_t__ (integer_0) integer_0 )subscript (string_'/') string_'/' )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_t__) identifier_t__ (binary_operator (identifier__MAGICK) identifier__MAGICK (identifier_t__) identifier_t__ )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_t__) identifier_t__ (binary_operator (binary_operator (identifier__MAGICK) identifier__MAGICK (string_'/') string_'/' )binary_operator (identifier_t__) identifier_t__ )binary_operator )assignment )expression_statement )block )else_clause )if_statement )block )if_statement (expression_statement (call (attribute (identifier_ts_) identifier_ts_ (identifier_append) identifier_append )attribute (argument_list (identifier_t__) identifier_t__ )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_ts_) identifier_ts_ )return_statement )block )function_definition )module
Add the magick to the topics if missing.
(module (function_definition (function_name_validate) function_name_validate (parameters (identifier_cls) identifier_cls (identifier_data) identifier_data (identifier_name) identifier_name (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_required) identifier_required (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'required') string_'required' (False) False )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_required) identifier_required (comparison_operator (identifier_data) identifier_data (None) None )comparison_operator )boolean_operator (block (raise_statement (call (identifier_ValidationError) identifier_ValidationError (argument_list (string_"required") string_"required" (identifier_name) identifier_name (True) True )argument_list )call )raise_statement )block (elif_clause (comparison_operator (identifier_data) identifier_data (None) None )comparison_operator (block (return_statement )return_statement )block )elif_clause (elif_clause (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'readonly') string_'readonly' )argument_list )call (block (return_statement )return_statement )block )elif_clause )if_statement (try_statement (block (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_validator) identifier_validator (call (attribute (attribute (identifier_cls) identifier_cls (identifier_validation) identifier_validation )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key (lambda (lambda_parameters (identifier_x) identifier_x (identifier_y) identifier_y )lambda_parameters (False) False )lambda )argument_list )call )assignment )expression_statement (if_statement (call (identifier_validator) identifier_validator (argument_list (identifier_data) identifier_data (identifier_value) identifier_value )argument_list )call (block (raise_statement (call (identifier_ValidationError) identifier_ValidationError (argument_list (identifier_key) identifier_key (identifier_name) identifier_name (identifier_value) identifier_value )argument_list )call )raise_statement )block )if_statement )block )for_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (raise_statement (call (identifier_ValidationError) identifier_ValidationError (argument_list (string_"unknown") string_"unknown" (identifier_name) identifier_name (string_"unknown") string_"unknown" )argument_list )call )raise_statement )block )except_clause (else_clause (block (return_statement (identifier_data) identifier_data )return_statement )block )else_clause )try_statement )block )function_definition )module
Validate that a piece of data meets certain conditions
(module (function_definition (function_name_shuffle) function_name_shuffle (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_args) identifier_args (call (identifier_list) identifier_list (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_random) identifier_random (identifier_shuffle) identifier_shuffle )attribute (argument_list (identifier_args) identifier_args )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_DogeDeque) identifier_DogeDeque (identifier_self) identifier_self )argument_list )call (identifier___init__) identifier___init__ )attribute (argument_list (identifier_args) identifier_args )argument_list )call )expression_statement )block )function_definition )module
Shuffle the deque Deques themselves do not support this, so this will make all items into a list, shuffle that list, clear the deque, and then re-init the deque.
(module (function_definition (function_name_unimapping) function_name_unimapping (parameters (identifier_arg) identifier_arg (identifier_level) identifier_level )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_arg) identifier_arg (attribute (identifier_collections) identifier_collections (identifier_Mapping) identifier_Mapping )attribute )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (string_'expected collections.Mapping, {} received') string_'expected collections.Mapping, {} received' (identifier_format) identifier_format )attribute (argument_list (attribute (call (identifier_type) identifier_type (argument_list (identifier_arg) identifier_arg )argument_list )call (identifier___name__) identifier___name__ )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (attribute (identifier_arg) identifier_arg (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (binary_operator (call (identifier_pretty_spaces) identifier_pretty_spaces (argument_list (identifier_level) identifier_level )argument_list )call (call (attribute (string_u': ') string_u': ' (identifier_join) identifier_join )attribute (argument_list (call (identifier_map) identifier_map (argument_list (call (attribute (identifier_functools) identifier_functools (identifier_partial) identifier_partial )attribute (argument_list (identifier_convert) identifier_convert (keyword_argument (identifier_level) identifier_level (identifier_level) identifier_level )keyword_argument )argument_list )call (identifier_i) identifier_i )argument_list )call )argument_list )call )binary_operator )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_string) identifier_string (call (identifier_join_strings) identifier_join_strings (argument_list (identifier_result) identifier_result (identifier_level) identifier_level )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_level) identifier_level (None) None )comparison_operator (block (expression_statement (augmented_assignment (identifier_string) identifier_string (call (identifier_pretty_spaces) identifier_pretty_spaces (argument_list (binary_operator (identifier_level) identifier_level (integer_1) integer_1 )binary_operator )argument_list )call )augmented_assignment )expression_statement )block )if_statement (return_statement (call (attribute (string_u'{{{}}}') string_u'{{{}}}' (identifier_format) identifier_format )attribute (argument_list (identifier_string) identifier_string )argument_list )call )return_statement )block )function_definition )module
Mapping object to unicode string. :type arg: collections.Mapping :param arg: mapping object :type level: int :param level: deep level :rtype: unicode :return: mapping object as unicode string
(module (function_definition (function_name_metrics_api) function_name_metrics_api (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__metrics_api) identifier__metrics_api )attribute (None) None )comparison_operator (block (if_statement (attribute (identifier_self) identifier_self (identifier__use_grpc) identifier__use_grpc )attribute (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__metrics_api) identifier__metrics_api )attribute (call (attribute (identifier__gapic) identifier__gapic (identifier_make_metrics_api) identifier_make_metrics_api )attribute (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__metrics_api) identifier__metrics_api )attribute (call (identifier_JSONMetricsAPI) identifier_JSONMetricsAPI (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__metrics_api) identifier__metrics_api )attribute )return_statement )block )function_definition )module
Helper for log metric-related API calls. See https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics
(module (function_definition (function_name_add_request_ids_from_environment) function_name_add_request_ids_from_environment (parameters (identifier_logger) identifier_logger (identifier_name) identifier_name (identifier_event_dict) identifier_event_dict )parameters (block (if_statement (comparison_operator (identifier_ENV_APIG_REQUEST_ID) identifier_ENV_APIG_REQUEST_ID (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute )comparison_operator (block (expression_statement (assignment (subscript (identifier_event_dict) identifier_event_dict (string_'api_request_id') string_'api_request_id' )subscript (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_ENV_APIG_REQUEST_ID) identifier_ENV_APIG_REQUEST_ID )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_ENV_LAMBDA_REQUEST_ID) identifier_ENV_LAMBDA_REQUEST_ID (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute )comparison_operator (block (expression_statement (assignment (subscript (identifier_event_dict) identifier_event_dict (string_'lambda_request_id') string_'lambda_request_id' )subscript (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (identifier_ENV_LAMBDA_REQUEST_ID) identifier_ENV_LAMBDA_REQUEST_ID )subscript )assignment )expression_statement )block )if_statement (return_statement (identifier_event_dict) identifier_event_dict )return_statement )block )function_definition )module
Custom processor adding request IDs to the log event, if available.
(module (function_definition (function_name_parse) function_name_parse (parameters (identifier_source) identifier_source )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_source) identifier_source (identifier_str) identifier_str )argument_list )call (block (return_statement (call (identifier_parse_stream) identifier_parse_stream (argument_list (call (attribute (identifier_six) identifier_six (identifier_StringIO) identifier_StringIO )attribute (argument_list (identifier_source) identifier_source )argument_list )call )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_parse_stream) identifier_parse_stream (argument_list (identifier_source) identifier_source )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Parses source code returns an array of instructions suitable for optimization and execution by a Machine. Args: source: A string or stream containing source code.
(module (function_definition (function_name_get_view) function_name_get_view (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_d) identifier_d (attribute (identifier_self) identifier_self (identifier_declaration) identifier_declaration )attribute )assignment )expression_statement (if_statement (boolean_operator (attribute (identifier_d) identifier_d (identifier_cached) identifier_cached )attribute (attribute (identifier_self) identifier_self (identifier_widget) identifier_widget )attribute )boolean_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier_widget) identifier_widget )attribute )return_statement )block )if_statement (if_statement (attribute (identifier_d) identifier_d (identifier_defer_loading) identifier_defer_loading )attribute (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_widget) identifier_widget )attribute (call (identifier_FrameLayout) identifier_FrameLayout (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_context) identifier_get_context )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_app) identifier_app (call (attribute (identifier_self) identifier_self (identifier_get_context) identifier_get_context )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_app) identifier_app (identifier_deferred_call) identifier_deferred_call )attribute (argument_list (lambda (call (attribute (attribute (identifier_self) identifier_self (identifier_widget) identifier_widget )attribute (identifier_addView) identifier_addView )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_load_view) identifier_load_view )attribute (argument_list )argument_list )call (integer_0) integer_0 )argument_list )call )lambda )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_widget) identifier_widget )attribute (call (attribute (identifier_self) identifier_self (identifier_load_view) identifier_load_view )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier_widget) identifier_widget )attribute )return_statement )block )function_definition )module
Get the page to display. If a view has already been created and is cached, use that otherwise initialize the view and proxy. If defer loading is used, wrap the view in a FrameLayout and defer add view until later.
(module (function_definition (function_name__save) function_name__save (parameters (identifier_self) identifier_self (identifier_stateName) identifier_stateName (identifier_path) identifier_path )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'saving...') string_'saving...' )argument_list )call )expression_statement (expression_statement (assignment (identifier_state) identifier_state (dictionary (pair (string_'session') string_'session' (call (identifier_dict) identifier_dict (argument_list (attribute (identifier_self) identifier_self (identifier_opts) identifier_opts )attribute )argument_list )call )pair (pair (string_'dialogs') string_'dialogs' (call (attribute (attribute (identifier_self) identifier_self (identifier_dialogs) identifier_dialogs )attribute (identifier_saveState) identifier_saveState )attribute (argument_list )argument_list )call )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_sigSave) identifier_sigSave )attribute (identifier_emit) identifier_emit )attribute (argument_list (identifier_state) identifier_state )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_saveThread) identifier_saveThread )attribute (identifier_prepare) identifier_prepare )attribute (argument_list (identifier_stateName) identifier_stateName (identifier_path) identifier_path (attribute (identifier_self) identifier_self (identifier_tmp_dir_session) identifier_tmp_dir_session )attribute (identifier_state) identifier_state )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_saveThread) identifier_saveThread )attribute (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_current_session) identifier_current_session )attribute (identifier_stateName) identifier_stateName )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (subscript (attribute (identifier_self) identifier_self (identifier_opts) identifier_opts )attribute (string_'recent sessions') string_'recent sessions' )subscript )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_r) identifier_r (identifier_pop) identifier_pop )attribute (argument_list (call (attribute (identifier_r) identifier_r (identifier_index) identifier_index )attribute (argument_list (identifier_path) identifier_path )argument_list )call )argument_list )call )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (pass_statement )pass_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_r) identifier_r (identifier_insert) identifier_insert )attribute (argument_list (integer_0) integer_0 (identifier_path) identifier_path )argument_list )call )expression_statement )block )function_definition )module
save into 'stateName' to pyz-path
(module (function_definition (function_name_create_admin) function_name_create_admin (parameters (identifier_cls) identifier_cls (identifier_email) identifier_email (identifier_password) identifier_password (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_'email') string_'email' (identifier_email) identifier_email )pair (pair (string_'password') string_'password' (call (attribute (identifier_cls) identifier_cls (identifier_hash_password) identifier_hash_password )attribute (argument_list (identifier_password) identifier_password )argument_list )call )pair (pair (string_'has_agreed_to_terms') string_'has_agreed_to_terms' (True) True )pair (pair (string_'state') string_'state' (attribute (identifier_State) identifier_State (identifier_approved) identifier_approved )attribute )pair (pair (string_'role') string_'role' (attribute (attribute (attribute (identifier_cls) identifier_cls (identifier_roles) identifier_roles )attribute (identifier_administrator) identifier_administrator )attribute (identifier_value) identifier_value )attribute )pair (pair (string_'organisations') string_'organisations' (dictionary )dictionary )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (identifier_data) identifier_data (identifier_update) identifier_update )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (assignment (identifier_user) identifier_user (call (identifier_cls) identifier_cls (argument_list (dictionary_splat (identifier_data) identifier_data )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (yield (call (attribute (identifier_user) identifier_user (identifier__save) identifier__save )attribute (argument_list )argument_list )call )yield )expression_statement (raise_statement (call (identifier_Return) identifier_Return (argument_list (identifier_user) identifier_user )argument_list )call )raise_statement )block )function_definition )module
Create an approved 'global' administrator :param email: the user's email address :param password: the user's plain text password :returns: a User
(module (function_definition (function_name_jwt_proccessor) function_name_jwt_proccessor (parameters )parameters (block (function_definition (function_name_jwt) function_name_jwt (parameters )parameters (block (expression_statement (assignment (identifier_token) identifier_token (call (attribute (identifier_current_accounts) identifier_current_accounts (identifier_jwt_creation_factory) identifier_jwt_creation_factory )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (identifier_Markup) identifier_Markup (argument_list (call (identifier_render_template) identifier_render_template (argument_list (subscript (attribute (identifier_current_app) identifier_current_app (identifier_config) identifier_config )attribute (string_'ACCOUNTS_JWT_DOM_TOKEN_TEMPLATE') string_'ACCOUNTS_JWT_DOM_TOKEN_TEMPLATE' )subscript (keyword_argument (identifier_token) identifier_token (identifier_token) identifier_token )keyword_argument )argument_list )call )argument_list )call )return_statement )block )function_definition (function_definition (function_name_jwt_token) function_name_jwt_token (parameters )parameters (block (return_statement (call (attribute (identifier_current_accounts) identifier_current_accounts (identifier_jwt_creation_factory) identifier_jwt_creation_factory )attribute (argument_list )argument_list )call )return_statement )block )function_definition (return_statement (dictionary (pair (string_'jwt') string_'jwt' (identifier_jwt) identifier_jwt )pair (pair (string_'jwt_token') string_'jwt_token' (identifier_jwt_token) identifier_jwt_token )pair )dictionary )return_statement )block )function_definition )module
Context processor for jwt.
(module (function_definition (function_name_exists) function_name_exists (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (identifier_TimeSeries) identifier_TimeSeries (argument_list (keyword_argument (identifier_default) identifier_default (conditional_expression (False) False (comparison_operator (attribute (identifier_self) identifier_self (identifier_default) identifier_default )attribute (None) None )comparison_operator (True) True )conditional_expression )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_t) identifier_t (identifier_v) identifier_v )pattern_list (identifier_self) identifier_self (block (expression_statement (assignment (subscript (identifier_result) identifier_result (identifier_t) identifier_t )subscript (conditional_expression (False) False (comparison_operator (identifier_v) identifier_v (None) None )comparison_operator (True) True )conditional_expression )assignment )expression_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
returns False when the timeseries has a None value, True otherwise
(module (function_definition (function_name_save) function_name_save (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_translated_data) identifier_translated_data (call (attribute (identifier_self) identifier_self (identifier__pop_translated_data) identifier__pop_translated_data )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_instance) identifier_instance (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_TranslatableModelSerializer) identifier_TranslatableModelSerializer (identifier_self) identifier_self )argument_list )call (identifier_save) identifier_save )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_save_translations) identifier_save_translations )attribute (argument_list (identifier_instance) identifier_instance (identifier_translated_data) identifier_translated_data )argument_list )call )expression_statement (return_statement (identifier_instance) identifier_instance )return_statement )block )function_definition )module
Extract the translations and save them after main object save. By default all translations will be saved no matter if creating or updating an object. Users with more complex needs might define their own save and handle translation saving themselves.
(module (function_definition (function_name__create_broker) function_name__create_broker (parameters (identifier_self) identifier_self (identifier_broker_id) identifier_broker_id (default_parameter (identifier_metadata) identifier_metadata (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_broker) identifier_broker (call (identifier_Broker) identifier_Broker (argument_list (identifier_broker_id) identifier_broker_id (identifier_metadata) identifier_metadata )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_metadata) identifier_metadata )not_operator (block (expression_statement (call (attribute (identifier_broker) identifier_broker (identifier_mark_inactive) identifier_mark_inactive )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_rg_id) identifier_rg_id (call (attribute (identifier_self) identifier_self (identifier_extract_group) identifier_extract_group )attribute (argument_list (identifier_broker) identifier_broker )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_group) identifier_group (call (attribute (attribute (identifier_self) identifier_self (identifier_rgs) identifier_rgs )attribute (identifier_setdefault) identifier_setdefault )attribute (argument_list (identifier_rg_id) identifier_rg_id (call (identifier_ReplicationGroup) identifier_ReplicationGroup (argument_list (identifier_rg_id) identifier_rg_id )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_group) identifier_group (identifier_add_broker) identifier_add_broker )attribute (argument_list (identifier_broker) identifier_broker )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_broker) identifier_broker (identifier_replication_group) identifier_replication_group )attribute (identifier_group) identifier_group )assignment )expression_statement (return_statement (identifier_broker) identifier_broker )return_statement )block )function_definition )module
Create a broker object and assign to a replication group. A broker object with no metadata is considered inactive. An inactive broker may or may not belong to a group.
(module (function_definition (function_name_bind_collection_to_model_cls) function_name_bind_collection_to_model_cls (parameters (identifier_cls) identifier_cls )parameters (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier_Collection) identifier_Collection )attribute (call (identifier_type) identifier_type (argument_list (call (attribute (string_'{0}.Collection') string_'{0}.Collection' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_cls) identifier_cls (identifier___name__) identifier___name__ )attribute )argument_list )call (tuple (attribute (identifier_cls) identifier_cls (identifier_Collection) identifier_Collection )attribute )tuple (dictionary (pair (string_'value_type') string_'value_type' (identifier_cls) identifier_cls )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_cls) identifier_cls (identifier_Collection) identifier_Collection )attribute (identifier___module__) identifier___module__ )attribute (attribute (identifier_cls) identifier_cls (identifier___module__) identifier___module__ )attribute )assignment )expression_statement )block )function_definition )module
Bind collection to model's class. If collection was not specialized in process of model's declaration, subclass of collection will be created.
(module (function_definition (function_name_get_logout_uri) function_name_get_logout_uri (parameters (identifier_self) identifier_self (default_parameter (identifier_id_token_hint) identifier_id_token_hint (None) None )default_parameter (default_parameter (identifier_post_logout_redirect_uri) identifier_post_logout_redirect_uri (None) None )default_parameter (default_parameter (identifier_state) identifier_state (None) None )default_parameter (default_parameter (identifier_session_state) identifier_session_state (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_"oxd_id") string_"oxd_id" (attribute (identifier_self) identifier_self (identifier_oxd_id) identifier_oxd_id )attribute )pair )dictionary )assignment )expression_statement (if_statement (identifier_id_token_hint) identifier_id_token_hint (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_"id_token_hint") string_"id_token_hint" )subscript (identifier_id_token_hint) identifier_id_token_hint )assignment )expression_statement )block )if_statement (if_statement (identifier_post_logout_redirect_uri) identifier_post_logout_redirect_uri (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_"post_logout_redirect_uri") string_"post_logout_redirect_uri" )subscript (identifier_post_logout_redirect_uri) identifier_post_logout_redirect_uri )assignment )expression_statement )block )if_statement (if_statement (identifier_state) identifier_state (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_"state") string_"state" )subscript (identifier_state) identifier_state )assignment )expression_statement )block )if_statement (if_statement (identifier_session_state) identifier_session_state (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_"session_state") string_"session_state" )subscript (identifier_session_state) identifier_session_state )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Sending command `get_logout_uri` with params %s") string_"Sending command `get_logout_uri` with params %s" (identifier_params) identifier_params )argument_list )call )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier_msgr) identifier_msgr )attribute (identifier_request) identifier_request )attribute (argument_list (string_"get_logout_uri") string_"get_logout_uri" (dictionary_splat (identifier_params) identifier_params )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Received response: %s") string_"Received response: %s" (identifier_response) identifier_response )argument_list )call )expression_statement (if_statement (comparison_operator (subscript (identifier_response) identifier_response (string_'status') string_'status' )subscript (string_'error') string_'error' )comparison_operator (block (raise_statement (call (identifier_OxdServerError) identifier_OxdServerError (argument_list (subscript (identifier_response) identifier_response (string_'data') string_'data' )subscript )argument_list )call )raise_statement )block )if_statement (return_statement (subscript (subscript (identifier_response) identifier_response (string_'data') string_'data' )subscript (string_'uri') string_'uri' )subscript )return_statement )block )function_definition )module
Function to logout the user. Parameters: * **id_token_hint (string, optional):** oxd server will use last used ID Token, if not provided * **post_logout_redirect_uri (string, optional):** URI to redirect, this uri would override the value given in the site-config * **state (string, optional):** site state * **session_state (string, optional):** session state Returns: **string:** The URI to which the user must be directed in order to perform the logout
(module (function_definition (function_name_get_model_names) function_name_get_model_names (parameters (identifier_app_label) identifier_app_label (identifier_models) identifier_models )parameters (block (return_statement (call (identifier_dict) identifier_dict (generator_expression (tuple (identifier_model) identifier_model (call (identifier_get_model_name) identifier_get_model_name (argument_list (identifier_app_label) identifier_app_label (identifier_model) identifier_model )argument_list )call )tuple (for_in_clause (identifier_model) identifier_model (identifier_models) identifier_models )for_in_clause )generator_expression )call )return_statement )block )function_definition )module
Map model names to their swapped equivalents for the given app
(module (function_definition (function_name_insertDict) function_name_insertDict (parameters (identifier_self) identifier_self (identifier_tblname) identifier_tblname (identifier_d) identifier_d (default_parameter (identifier_fields) identifier_fields (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_fields) identifier_fields (None) None )comparison_operator (block (expression_statement (assignment (identifier_fields) identifier_fields (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (identifier_d) identifier_d (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_values) identifier_values (None) None )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_SQL) identifier_SQL (binary_operator (string_'INSERT INTO %s (%s) VALUES (%s)') string_'INSERT INTO %s (%s) VALUES (%s)' (tuple (identifier_tblname) identifier_tblname (call (identifier_join) identifier_join (argument_list (identifier_fields) identifier_fields (string_", ") string_", " )argument_list )call (call (identifier_join) identifier_join (argument_list (list_comprehension (string_'%s') string_'%s' (for_in_clause (identifier_x) identifier_x (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_fields) identifier_fields )argument_list )call )argument_list )call )for_in_clause )list_comprehension (string_',') string_',' )argument_list )call )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_values) identifier_values (call (identifier_tuple) identifier_tuple (argument_list (list_comprehension (subscript (identifier_d) identifier_d (identifier_k) identifier_k )subscript (for_in_clause (identifier_k) identifier_k (identifier_fields) identifier_fields )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_locked_execute) identifier_locked_execute )attribute (argument_list (identifier_SQL) identifier_SQL (keyword_argument (identifier_parameters) identifier_parameters (identifier_values) identifier_values )keyword_argument )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (identifier_e) identifier_e (block (if_statement (boolean_operator (identifier_SQL) identifier_SQL (identifier_values) identifier_values )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_"\nSQL execution error in query '%s' %% %s at %s:") string_"\nSQL execution error in query '%s' %% %s at %s:" (tuple (identifier_SQL) identifier_SQL (identifier_values) identifier_values (call (attribute (call (attribute (identifier_datetime) identifier_datetime (identifier_now) identifier_now )attribute (argument_list )argument_list )call (identifier_strftime) identifier_strftime )attribute (argument_list (string_"%Y-%m-%d %H:%M:%S") string_"%Y-%m-%d %H:%M:%S" )argument_list )call )tuple )binary_operator )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_"\nError: '%s'.\n") string_"\nError: '%s'.\n" (parenthesized_expression (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )parenthesized_expression )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )expression_statement (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (binary_operator (string_"Error occurred during database insertion: '%s'.") string_"Error occurred during database insertion: '%s'." (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Simple function for inserting a dictionary whose keys match the fieldnames of tblname.
(module (function_definition (function_name_resources) function_name_resources (parameters (identifier_self) identifier_self (default_parameter (identifier_start) identifier_start (integer_1) integer_1 )default_parameter (default_parameter (identifier_num) identifier_num (integer_10) integer_10 )default_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier__url) identifier__url )attribute (string_"/resources") string_"/resources" )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_"f") string_"f" (string_"json") string_"json" )pair (pair (string_"start") string_"start" (identifier_start) identifier_start )pair (pair (string_"num") string_"num" (identifier_num) identifier_num )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (keyword_argument (identifier_url) identifier_url (identifier_url) identifier_url )keyword_argument (keyword_argument (identifier_param_dict) identifier_param_dict (identifier_params) identifier_params )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 )argument_list )call )return_statement )block )function_definition )module
Resources lists all file resources for the organization. The start and num paging parameters are supported. Inputs: start - the number of the first entry in the result set response The index number is 1-based and the default is 1 num - the maximum number of results to be returned as a whole #
(module (function_definition (function_name__get_chemical_equation_piece) function_name__get_chemical_equation_piece (parameters (identifier_species_list) identifier_species_list (identifier_coefficients) identifier_coefficients )parameters (block (function_definition (function_name__get_token) function_name__get_token (parameters (identifier_species) identifier_species (identifier_coefficient) identifier_coefficient )parameters (block (if_statement (comparison_operator (identifier_coefficient) identifier_coefficient (integer_1) integer_1 )comparison_operator (block (return_statement (call (attribute (string_'{}') string_'{}' (identifier_format) identifier_format )attribute (argument_list (identifier_species) identifier_species )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (string_'{:g} {}') string_'{:g} {}' (identifier_format) identifier_format )attribute (argument_list (identifier_coefficient) identifier_coefficient (identifier_species) identifier_species )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition (expression_statement (assignment (identifier_bag) identifier_bag (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_species) identifier_species (identifier_coefficient) identifier_coefficient )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_species_list) identifier_species_list (identifier_coefficients) identifier_coefficients )argument_list )call (block (if_statement (comparison_operator (identifier_coefficient) identifier_coefficient (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_coefficient) identifier_coefficient (unary_operator (identifier_coefficient) identifier_coefficient )unary_operator )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_coefficient) identifier_coefficient (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_bag) identifier_bag (identifier_append) identifier_append )attribute (argument_list (call (identifier__get_token) identifier__get_token (argument_list (identifier_species) identifier_species (identifier_coefficient) identifier_coefficient )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (call (attribute (string_'{}') string_'{}' (identifier_format) identifier_format )attribute (argument_list (call (attribute (string_' + ') string_' + ' (identifier_join) identifier_join )attribute (argument_list (identifier_bag) identifier_bag )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Produce a string from chemical species and their coefficients. Parameters ---------- species_list : iterable of `str` Iterable of chemical species. coefficients : iterable of `float` Nonzero stoichiometric coefficients. The length of `species_list` and `coefficients` must be the same. Negative values are made positive and zeros are ignored along with their respective species. Examples -------- >>> from pyrrole.core import _get_chemical_equation_piece >>> _get_chemical_equation_piece(["AcOH"], [2]) '2 AcOH' >>> _get_chemical_equation_piece(["AcO-", "H+"], [-1, -1]) 'AcO- + H+' >>> _get_chemical_equation_piece("ABCD", [-2, -1, 0, -1]) '2 A + B + D'
(module (function_definition (function_name__put) function_name__put (parameters (identifier_self) identifier_self (identifier_uri) identifier_uri (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_headers) identifier_headers (call (attribute (identifier_self) identifier_self (identifier__get_headers) identifier__get_headers )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_"URI=") string_"URI=" (call (identifier_str) identifier_str (argument_list (identifier_uri) identifier_uri )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_"BODY=") string_"BODY=" (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_data) identifier_data )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_put) identifier_put )attribute (argument_list (identifier_uri) identifier_uri (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument (keyword_argument (identifier_data) identifier_data (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_data) identifier_data )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute (list (integer_201) integer_201 (integer_204) integer_204 )list )comparison_operator (block (return_statement (identifier_data) identifier_data )return_statement )block (else_clause (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_error) identifier_error )attribute (argument_list (attribute (identifier_response) identifier_response (identifier_content) identifier_content )attribute )argument_list )call )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 )block )else_clause )if_statement )block )function_definition )module
Simple PUT operation for a given path.
(module (function_definition (function_name_command_create_tables) function_name_command_create_tables (parameters (identifier_self) identifier_self (default_parameter (identifier_meta_name) identifier_meta_name (None) None )default_parameter (default_parameter (identifier_verbose) identifier_verbose (False) False )default_parameter )parameters (block (function_definition (function_name__create_metadata_tables) function_name__create_metadata_tables (parameters (identifier_metadata) identifier_metadata )parameters (block (for_statement (identifier_table) identifier_table (attribute (identifier_metadata) identifier_metadata (identifier_sorted_tables) identifier_sorted_tables )attribute (block (if_statement (identifier_verbose) identifier_verbose (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (identifier_self) identifier_self (identifier__schema) identifier__schema )attribute (argument_list (identifier_table) identifier_table )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_' ') string_' ' (attribute (identifier_table) identifier_table (identifier_name) identifier_name )attribute )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_engine) identifier_engine (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_get_bind) identifier_get_bind )attribute (argument_list (keyword_argument (identifier_clause) identifier_clause (identifier_table) identifier_table )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_metadata) identifier_metadata (identifier_create_all) identifier_create_all )attribute (argument_list (keyword_argument (identifier_bind) identifier_bind (identifier_engine) identifier_engine )keyword_argument (keyword_argument (identifier_tables) identifier_tables (list (identifier_table) identifier_table )list )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (identifier_self) identifier_self (identifier_metadata) identifier_metadata )attribute (identifier_MetaData) identifier_MetaData )argument_list )call (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Creating tables...') string_'Creating tables...' )argument_list )call )expression_statement (expression_statement (call (identifier__create_metadata_tables) identifier__create_metadata_tables (argument_list (attribute (identifier_self) identifier_self (identifier_metadata) identifier_metadata )attribute )argument_list )call )expression_statement )block (else_clause (block (for_statement (pattern_list (identifier_current_meta_name) identifier_current_meta_name (identifier_metadata) identifier_metadata )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_metadata) identifier_metadata )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_meta_name) identifier_meta_name (tuple (identifier_current_meta_name) identifier_current_meta_name (None) None )tuple )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'Creating tables for {}...') string_'Creating tables for {}...' (identifier_format) identifier_format )attribute (argument_list (identifier_current_meta_name) identifier_current_meta_name )argument_list )call )argument_list )call )expression_statement (expression_statement (call (identifier__create_metadata_tables) identifier__create_metadata_tables (argument_list (identifier_metadata) identifier_metadata )argument_list )call )expression_statement )block )for_statement )block )else_clause )if_statement )block )function_definition )module
Create tables according sqlalchemy data model. Is not a complex migration tool like alembic, just creates tables that does not exist:: ./manage.py sqla:create_tables [--verbose] [meta_name]
(module (function_definition (function_name_inventory_maps) function_name_inventory_maps (parameters (identifier_inv) identifier_inv )parameters (block (expression_statement (assignment (identifier_revinv) identifier_revinv (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_rolnam) identifier_rolnam (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_d) identifier_d (identifier_inv) identifier_inv (block (if_statement (boolean_operator (comparison_operator (subscript (identifier_d) identifier_d (slice (integer_0) integer_0 (colon) colon (integer_3) integer_3 )slice )subscript (string_'py:') string_'py:' )comparison_operator (comparison_operator (identifier_d) identifier_d (attribute (identifier_IntersphinxInventory) identifier_IntersphinxInventory (identifier_domainrole) identifier_domainrole )attribute )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_r) identifier_r (subscript (attribute (identifier_IntersphinxInventory) identifier_IntersphinxInventory (identifier_domainrole) identifier_domainrole )attribute (identifier_d) identifier_d )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_rolnam) identifier_rolnam (identifier_r) identifier_r )subscript (string_'') string_'' )assignment )expression_statement (for_statement (identifier_n) identifier_n (subscript (identifier_inv) identifier_inv (identifier_d) identifier_d )subscript (block (expression_statement (assignment (identifier_p) identifier_p (subscript (subscript (subscript (identifier_inv) identifier_inv (identifier_d) identifier_d )subscript (identifier_n) identifier_n )subscript (integer_2) integer_2 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_revinv) identifier_revinv (identifier_p) identifier_p )subscript (tuple (identifier_r) identifier_r (identifier_n) identifier_n )tuple )assignment )expression_statement (expression_statement (augmented_assignment (subscript (identifier_rolnam) identifier_rolnam (identifier_r) identifier_r )subscript (binary_operator (binary_operator (string_' ') string_' ' (identifier_n) identifier_n )binary_operator (string_',') string_',' )binary_operator )augmented_assignment )expression_statement )block )for_statement )block )if_statement )block )for_statement (return_statement (expression_list (identifier_revinv) identifier_revinv (identifier_rolnam) identifier_rolnam )expression_list )return_statement )block )function_definition )module
Construct dicts facilitating information lookup in an inventory dict. A reversed dict allows lookup of a tuple specifying the sphinx cross-reference role and the name of the referenced type from the intersphinx inventory url postfix string. A role-specific name lookup string allows the set of all names corresponding to a specific role to be searched via regex.
(module (function_definition (function_name_apply) function_name_apply (parameters (identifier_cls) identifier_cls (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 (for_statement (identifier_key) identifier_key (identifier_kwargs) identifier_kwargs (block (if_statement (comparison_operator (identifier_key) identifier_key (list_comprehension (attribute (identifier_x) identifier_x (identifier_name) identifier_name )attribute (for_in_clause (identifier_x) identifier_x (attribute (identifier_cls) identifier_cls (identifier_INPUTS) identifier_INPUTS )attribute )for_in_clause )list_comprehension )comparison_operator (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_key) identifier_key (subscript (identifier_kwargs) identifier_kwargs (identifier_key) identifier_key )subscript )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_key) identifier_key (list_comprehension (attribute (identifier_x) identifier_x (identifier_name) identifier_name )attribute (for_in_clause (identifier_x) identifier_x (attribute (identifier_cls) identifier_cls (identifier_OUTPUTS) identifier_OUTPUTS )attribute )for_in_clause )list_comprehension )comparison_operator (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_key) identifier_key (subscript (identifier_kwargs) identifier_kwargs (identifier_key) identifier_key )subscript )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_key) identifier_key (list_comprehension (attribute (identifier_x) identifier_x (identifier_name) identifier_name )attribute (for_in_clause (identifier_x) identifier_x (attribute (identifier_cls) identifier_cls (identifier_PARAMETERS) identifier_PARAMETERS )attribute )for_in_clause )list_comprehension )comparison_operator (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_key) identifier_key (subscript (identifier_kwargs) identifier_kwargs (identifier_key) identifier_key )subscript )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Applies kwargs arguments to the instance passed as the first argument to the call. For defined INPUTS, OUTPUTS and PARAMETERS the method extracts a corresponding value from kwargs and sets it as an instance attribute. For example, if the processor has a 'foo' parameter declared and 'foo = something' is passed to apply(), self.foo will become 'something'.
(module (function_definition (function_name__generate_signature) function_name__generate_signature (parameters (identifier_url_path) identifier_url_path (identifier_secret_key) identifier_secret_key (identifier_query_args) identifier_query_args (default_parameter (identifier_digest) identifier_digest (None) None )default_parameter (default_parameter (identifier_encoder) identifier_encoder (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_digest) identifier_digest (boolean_operator (identifier_digest) identifier_digest (identifier_DEFAULT_DIGEST) identifier_DEFAULT_DIGEST )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_encoder) identifier_encoder (boolean_operator (identifier_encoder) identifier_encoder (identifier_DEFAULT_ENCODER) identifier_DEFAULT_ENCODER )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_msg) identifier_msg (binary_operator (string_"%s?%s") string_"%s?%s" (tuple (identifier_url_path) identifier_url_path (call (attribute (string_'&') string_'&' (identifier_join) identifier_join )attribute (generator_expression (binary_operator (string_'%s=%s') string_'%s=%s' (identifier_i) identifier_i )binary_operator (for_in_clause (identifier_i) identifier_i (call (attribute (identifier_query_args) identifier_query_args (identifier_sorteditems) identifier_sorteditems )attribute (argument_list (keyword_argument (identifier_multi) identifier_multi (True) True )keyword_argument )argument_list )call )for_in_clause )generator_expression )call )tuple )binary_operator )assignment )expression_statement (if_statement (attribute (identifier__compat) identifier__compat (identifier_text_type) identifier_text_type )attribute (block (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (identifier_msg) identifier_msg (identifier_encode) identifier_encode )attribute (argument_list (string_'UTF8') string_'UTF8' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_signature) identifier_signature (call (attribute (call (attribute (identifier_hmac) identifier_hmac (identifier_new) identifier_new )attribute (argument_list (identifier_secret_key) identifier_secret_key (identifier_msg) identifier_msg (keyword_argument (identifier_digestmod) identifier_digestmod (identifier_digest) identifier_digest )keyword_argument )argument_list )call (identifier_digest) identifier_digest )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier__compat) identifier__compat (identifier_PY2) identifier_PY2 )attribute (block (return_statement (call (attribute (call (identifier_encoder) identifier_encoder (argument_list (identifier_signature) identifier_signature )argument_list )call (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_'=') string_'=' )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (call (attribute (call (identifier_encoder) identifier_encoder (argument_list (identifier_signature) identifier_signature )argument_list )call (identifier_decode) identifier_decode )attribute (argument_list )argument_list )call (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_'=') string_'=' )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Generate signature from pre-parsed URL.
(module (function_definition (function_name_omit_loglevel) function_name_omit_loglevel (parameters (identifier_self) identifier_self (identifier_msg) identifier_msg )parameters (type (identifier_bool) identifier_bool )type (block (return_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_loglevels) identifier_loglevels )attribute (parenthesized_expression (comparison_operator (subscript (attribute (identifier_self) identifier_self (identifier_loglevels) identifier_loglevels )attribute (integer_0) integer_0 )subscript (call (attribute (attribute (identifier_fontbakery) identifier_fontbakery (identifier_checkrunner) identifier_checkrunner )attribute (identifier_Status) identifier_Status )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call )comparison_operator )parenthesized_expression )boolean_operator )return_statement )block )function_definition )module
Determine if message is below log level.
(module (function_definition (function_name_is_capable) function_name_is_capable (parameters (identifier_cls) identifier_cls (identifier_requested_capability) identifier_requested_capability )parameters (block (for_statement (identifier_c) identifier_c (identifier_requested_capability) identifier_requested_capability (block (if_statement (not_operator (comparison_operator (identifier_c) identifier_c (attribute (identifier_cls) identifier_cls (identifier_capability) identifier_capability )attribute )comparison_operator )not_operator (block (return_statement (False) False )return_statement )block )if_statement )block )for_statement (return_statement (True) True )return_statement )block )function_definition )module
Returns true if the requested capability is supported by this plugin
(module (function_definition (function_name_initialize) function_name_initialize (parameters (identifier_plugins) identifier_plugins (default_parameter (identifier_exclude_files_regex) identifier_exclude_files_regex (None) None )default_parameter (default_parameter (identifier_exclude_lines_regex) identifier_exclude_lines_regex (None) None )default_parameter (default_parameter (identifier_path) identifier_path (string_'.') string_'.' )default_parameter (default_parameter (identifier_scan_all_files) identifier_scan_all_files (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_output) identifier_output (call (identifier_SecretsCollection) identifier_SecretsCollection (argument_list (identifier_plugins) identifier_plugins (keyword_argument (identifier_exclude_files) identifier_exclude_files (identifier_exclude_files_regex) identifier_exclude_files_regex )keyword_argument (keyword_argument (identifier_exclude_lines) identifier_exclude_lines (identifier_exclude_lines_regex) identifier_exclude_lines_regex )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_path) identifier_path )argument_list )call (block (expression_statement (assignment (identifier_files_to_scan) identifier_files_to_scan (list (identifier_path) identifier_path )list )assignment )expression_statement )block (elif_clause (identifier_scan_all_files) identifier_scan_all_files (block (expression_statement (assignment (identifier_files_to_scan) identifier_files_to_scan (call (identifier__get_files_recursively) identifier__get_files_recursively (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_files_to_scan) identifier_files_to_scan (call (identifier__get_git_tracked_files) identifier__get_git_tracked_files (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (not_operator (identifier_files_to_scan) identifier_files_to_scan )not_operator (block (return_statement (identifier_output) identifier_output )return_statement )block )if_statement (if_statement (identifier_exclude_files_regex) identifier_exclude_files_regex (block (expression_statement (assignment (identifier_exclude_files_regex) identifier_exclude_files_regex (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (identifier_exclude_files_regex) identifier_exclude_files_regex (attribute (identifier_re) identifier_re (identifier_IGNORECASE) identifier_IGNORECASE )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_files_to_scan) identifier_files_to_scan (call (identifier_filter) identifier_filter (argument_list (lambda (lambda_parameters (identifier_file) identifier_file )lambda_parameters (parenthesized_expression (not_operator (call (attribute (identifier_exclude_files_regex) identifier_exclude_files_regex (identifier_search) identifier_search )attribute (argument_list (identifier_file) identifier_file )argument_list )call )not_operator )parenthesized_expression )lambda (identifier_files_to_scan) identifier_files_to_scan )argument_list )call )assignment )expression_statement )block )if_statement (for_statement (identifier_file) identifier_file (identifier_files_to_scan) identifier_files_to_scan (block (expression_statement (call (attribute (identifier_output) identifier_output (identifier_scan_file) identifier_scan_file )attribute (argument_list (identifier_file) identifier_file )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_output) identifier_output )return_statement )block )function_definition )module
Scans the entire codebase for secrets, and returns a SecretsCollection object. :type plugins: tuple of detect_secrets.plugins.base.BasePlugin :param plugins: rules to initialize the SecretsCollection with. :type exclude_files_regex: str|None :type exclude_lines_regex: str|None :type path: str :type scan_all_files: bool :rtype: SecretsCollection
(module (function_definition (function_name_from_seedhex_file) function_name_from_seedhex_file (parameters (typed_parameter (identifier_path) identifier_path (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_SigningKeyType) identifier_SigningKeyType )type (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_path) identifier_path (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_fh) identifier_fh )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_seedhex) identifier_seedhex (call (attribute (identifier_fh) identifier_fh (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement )block )with_statement (return_statement (call (attribute (identifier_SigningKey) identifier_SigningKey (identifier_from_seedhex) identifier_from_seedhex )attribute (argument_list (identifier_seedhex) identifier_seedhex )argument_list )call )return_statement )block )function_definition )module
Return SigningKey instance from Seedhex file :param str path: Hexadecimal seed file path
(module (function_definition (function_name_get_repo_relpath) function_name_get_repo_relpath (parameters (identifier_repo) identifier_repo (identifier_relpath) identifier_relpath )parameters (block (import_from_statement (dotted_name (identifier_os) identifier_os )dotted_name (dotted_name (identifier_path) identifier_path )dotted_name )import_from_statement (if_statement (comparison_operator (subscript (identifier_relpath) identifier_relpath (slice (integer_0) integer_0 (colon) colon (integer_2) integer_2 )slice )subscript (string_"./") string_"./" )comparison_operator (block (return_statement (call (attribute (identifier_path) identifier_path (identifier_join) identifier_join )attribute (argument_list (identifier_repo) identifier_repo (subscript (identifier_relpath) identifier_relpath (slice (integer_2) integer_2 (colon) colon (colon) colon )slice )subscript )argument_list )call )return_statement )block (else_clause (block (import_from_statement (dotted_name (identifier_os) identifier_os )dotted_name (dotted_name (identifier_chdir) identifier_chdir )dotted_name (dotted_name (identifier_getcwd) identifier_getcwd )dotted_name )import_from_statement (expression_statement (assignment (identifier_cd) identifier_cd (call (identifier_getcwd) identifier_getcwd (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_chdir) identifier_chdir (argument_list (call (attribute (identifier_path) identifier_path (identifier_expanduser) identifier_expanduser )attribute (argument_list (identifier_repo) identifier_repo )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_path) identifier_path (identifier_abspath) identifier_abspath )attribute (argument_list (identifier_relpath) identifier_relpath )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_chdir) identifier_chdir (argument_list (identifier_cd) identifier_cd )argument_list )call )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )else_clause )if_statement )block )function_definition )module
Returns the absolute path to the 'relpath' taken relative to the base directory of the repository.
(module (function_definition (function_name_create_and_trunk_vlan) function_name_create_and_trunk_vlan (parameters (identifier_self) identifier_self (identifier_nexus_host) identifier_nexus_host (identifier_vlan_id) identifier_vlan_id (identifier_intf_type) identifier_intf_type (identifier_nexus_port) identifier_nexus_port (identifier_vni) identifier_vni (identifier_is_native) identifier_is_native )parameters (block (expression_statement (assignment (identifier_starttime) identifier_starttime (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_create_vlan) identifier_create_vlan )attribute (argument_list (identifier_nexus_host) identifier_nexus_host (identifier_vlan_id) identifier_vlan_id (identifier_vni) identifier_vni )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (string_"NexusDriver created VLAN: %s") string_"NexusDriver created VLAN: %s" (identifier_vlan_id) identifier_vlan_id )argument_list )call )expression_statement (if_statement (identifier_nexus_port) identifier_nexus_port (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send_enable_vlan_on_trunk_int) identifier_send_enable_vlan_on_trunk_int )attribute (argument_list (identifier_nexus_host) identifier_nexus_host (identifier_vlan_id) identifier_vlan_id (identifier_intf_type) identifier_intf_type (identifier_nexus_port) identifier_nexus_port (identifier_is_native) identifier_is_native )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_capture_and_print_timeshot) identifier_capture_and_print_timeshot )attribute (argument_list (identifier_starttime) identifier_starttime (string_"create_all") string_"create_all" (keyword_argument (identifier_switch) identifier_switch (identifier_nexus_host) identifier_nexus_host )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Create VLAN and trunk it on the specified ports.
(module (function_definition (function_name_accounts) function_name_accounts (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (identifier_account) identifier_account (identifier_HPEAccountCollection) identifier_HPEAccountCollection )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__conn) identifier__conn )attribute (call (attribute (identifier_utils) identifier_utils (identifier_get_subresource_path_by) identifier_get_subresource_path_by )attribute (argument_list (identifier_self) identifier_self (string_'Accounts') string_'Accounts' )argument_list )call (keyword_argument (identifier_redfish_version) identifier_redfish_version (attribute (identifier_self) identifier_self (identifier_redfish_version) identifier_redfish_version )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Property to provide instance of HPEAccountCollection
(module (function_definition (function_name_push) function_name_push (parameters (identifier_self) identifier_self (default_parameter (identifier_metric_name) identifier_metric_name (None) None )default_parameter (default_parameter (identifier_metric_value) identifier_metric_value (None) None )default_parameter (default_parameter (identifier_volume) identifier_volume (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_graphite_path) identifier_graphite_path (attribute (identifier_self) identifier_self (identifier_path_prefix) identifier_path_prefix )attribute )assignment )expression_statement (expression_statement (augmented_assignment (identifier_graphite_path) identifier_graphite_path (binary_operator (binary_operator (binary_operator (string_'.') string_'.' (attribute (identifier_self) identifier_self (identifier_device) identifier_device )attribute )binary_operator (string_'.') string_'.' )binary_operator (string_'volume') string_'volume' )binary_operator )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_graphite_path) identifier_graphite_path (binary_operator (binary_operator (binary_operator (string_'.') string_'.' (identifier_volume) identifier_volume )binary_operator (string_'.') string_'.' )binary_operator (identifier_metric_name) identifier_metric_name )binary_operator )augmented_assignment )expression_statement (expression_statement (assignment (identifier_metric) identifier_metric (call (identifier_Metric) identifier_Metric (argument_list (identifier_graphite_path) identifier_graphite_path (identifier_metric_value) identifier_metric_value (keyword_argument (identifier_precision) identifier_precision (integer_4) integer_4 )keyword_argument (keyword_argument (identifier_host) identifier_host (attribute (identifier_self) identifier_self (identifier_device) identifier_device )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_publish_metric) identifier_publish_metric )attribute (argument_list (identifier_metric) identifier_metric )argument_list )call )expression_statement )block )function_definition )module
Ship that shit off to graphite broski
(module (function_definition (function_name_pgettext) function_name_pgettext (parameters (identifier_msgctxt) identifier_msgctxt (identifier_message) identifier_message )parameters (block (expression_statement (assignment (identifier_key) identifier_key (binary_operator (binary_operator (identifier_msgctxt) identifier_msgctxt (string_'\x04') string_'\x04' )binary_operator (identifier_message) identifier_message )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_translation) identifier_translation (call (attribute (call (identifier_get_translation) identifier_get_translation (argument_list )argument_list )call (identifier_gettext) identifier_gettext )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (identifier_message) identifier_message (comparison_operator (identifier_translation) identifier_translation (identifier_key) identifier_key )comparison_operator (identifier_translation) identifier_translation )conditional_expression )return_statement )block )function_definition )module
Particular gettext' function. It works with 'msgctxt' .po modifiers and allow duplicate keys with different translations. Python 2 don't have support for this GNU gettext function, so we reimplement it. It works by joining msgctx and msgid by '4' byte.
(module (function_definition (function_name__ar_matrix) function_name__ar_matrix (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_X) identifier_X (call (attribute (identifier_np) identifier_np (identifier_ones) identifier_ones )attribute (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_data_length) identifier_data_length )attribute (attribute (identifier_self) identifier_self (identifier_max_lag) identifier_max_lag )attribute )binary_operator )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_ar) identifier_ar )attribute (integer_0) integer_0 )comparison_operator (block (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_0) integer_0 (attribute (identifier_self) identifier_self (identifier_ar) identifier_ar )attribute )argument_list )call (block (expression_statement (assignment (identifier_X) identifier_X (call (attribute (identifier_np) identifier_np (identifier_vstack) identifier_vstack )attribute (argument_list (tuple (identifier_X) identifier_X (subscript (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (slice (parenthesized_expression (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_max_lag) identifier_max_lag )attribute (identifier_i) identifier_i )binary_operator (integer_1) integer_1 )binary_operator )parenthesized_expression (colon) colon (binary_operator (unary_operator (identifier_i) identifier_i )unary_operator (integer_1) integer_1 )binary_operator )slice )subscript )tuple )argument_list )call )assignment )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_X) identifier_X )return_statement )block )function_definition )module
Creates the Autoregressive matrix for the model Returns ---------- X : np.ndarray Autoregressive Matrix
(module (function_definition (function_name_form_validation_response) function_name_form_validation_response (parameters (identifier_self) identifier_self (identifier_e) identifier_e )parameters (block (expression_statement (assignment (identifier_resp) identifier_resp (attribute (identifier_rc) identifier_rc (identifier_BAD_REQUEST) identifier_BAD_REQUEST )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_resp) identifier_resp (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_' ') string_' ' (call (identifier_str) identifier_str (argument_list (attribute (attribute (identifier_e) identifier_e (identifier_form) identifier_form )attribute (identifier_errors) identifier_errors )attribute )argument_list )call )binary_operator )argument_list )call )expression_statement (return_statement (identifier_resp) identifier_resp )return_statement )block )function_definition )module
Method to return form validation error information. You will probably want to override this in your own `Resource` subclass.
(module (function_definition (function_name__protobuf_value_type) function_name__protobuf_value_type (parameters (identifier_value) identifier_value )parameters (block (if_statement (call (attribute (identifier_value) identifier_value (identifier_HasField) identifier_HasField )attribute (argument_list (string_"number_value") string_"number_value" )argument_list )call (block (return_statement (attribute (identifier_api_pb2) identifier_api_pb2 (identifier_DATA_TYPE_FLOAT64) identifier_DATA_TYPE_FLOAT64 )attribute )return_statement )block )if_statement (if_statement (call (attribute (identifier_value) identifier_value (identifier_HasField) identifier_HasField )attribute (argument_list (string_"string_value") string_"string_value" )argument_list )call (block (return_statement (attribute (identifier_api_pb2) identifier_api_pb2 (identifier_DATA_TYPE_STRING) identifier_DATA_TYPE_STRING )attribute )return_statement )block )if_statement (if_statement (call (attribute (identifier_value) identifier_value (identifier_HasField) identifier_HasField )attribute (argument_list (string_"bool_value") string_"bool_value" )argument_list )call (block (return_statement (attribute (identifier_api_pb2) identifier_api_pb2 (identifier_DATA_TYPE_BOOL) identifier_DATA_TYPE_BOOL )attribute )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Returns the type of the google.protobuf.Value message as an api.DataType. Returns None if the type of 'value' is not one of the types supported in api_pb2.DataType. Args: value: google.protobuf.Value message.
(module (function_definition (function_name_change_logger_levels) function_name_change_logger_levels (parameters (default_parameter (identifier_logger) identifier_logger (None) None )default_parameter (default_parameter (identifier_level) identifier_level (attribute (identifier_logging) identifier_logging (identifier_DEBUG) identifier_DEBUG )attribute )default_parameter )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_logger) identifier_logger (attribute (identifier_logging) identifier_logging (identifier_Logger) identifier_Logger )attribute )argument_list )call )not_operator (block (expression_statement (assignment (identifier_logger) identifier_logger (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (identifier_logger) identifier_logger )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_setLevel) identifier_setLevel )attribute (argument_list (identifier_level) identifier_level )argument_list )call )expression_statement (for_statement (identifier_handler) identifier_handler (attribute (identifier_logger) identifier_logger (identifier_handlers) identifier_handlers )attribute (block (expression_statement (assignment (attribute (identifier_handler) identifier_handler (identifier_level) identifier_level )attribute (identifier_level) identifier_level )assignment )expression_statement )block )for_statement )block )function_definition )module
Go through the logger and handlers and update their levels to the one specified. :param logger: logging name or object to modify, defaults to root logger :param level: logging level to set at (10=Debug, 20=Info, 30=Warn, 40=Error)
(module (function_definition (function_name_cache_instruments) function_name_cache_instruments (parameters (identifier_self) identifier_self (typed_default_parameter (identifier_require) identifier_require (type (generic_type (identifier_Dict) identifier_Dict (type_parameter (type (attribute (identifier_top_types) identifier_top_types (identifier_Mount) identifier_Mount )attribute )type (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (None) None )typed_default_parameter )parameters (block (expression_statement (assignment (identifier_checked_require) identifier_checked_require (boolean_operator (identifier_require) identifier_require (dictionary )dictionary )boolean_operator )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__log) identifier__log )attribute (identifier_info) identifier_info )attribute (argument_list (string_"Updating instrument model cache") string_"Updating instrument model cache" )argument_list )call )expression_statement (expression_statement (assignment (identifier_found) identifier_found (call (attribute (attribute (identifier_self) identifier_self (identifier__backend) identifier__backend )attribute (identifier_get_attached_instruments) identifier_get_attached_instruments )attribute (argument_list (identifier_checked_require) identifier_checked_require )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_mount) identifier_mount (identifier_instrument_data) identifier_instrument_data )pattern_list (call (attribute (identifier_found) identifier_found (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_model) identifier_model (call (attribute (identifier_instrument_data) identifier_instrument_data (identifier_get) identifier_get )attribute (argument_list (string_'model') string_'model' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_model) identifier_model (None) None )comparison_operator (block (expression_statement (assignment (identifier_p) identifier_p (call (identifier_Pipette) identifier_Pipette (argument_list (identifier_model) identifier_model (subscript (attribute (attribute (identifier_self) identifier_self (identifier__config) identifier__config )attribute (identifier_instrument_offset) identifier_instrument_offset )attribute (call (attribute (attribute (identifier_mount) identifier_mount (identifier_name) identifier_name )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )subscript (subscript (identifier_instrument_data) identifier_instrument_data (string_'id') string_'id' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__attached_instruments) identifier__attached_instruments )attribute (identifier_mount) identifier_mount )subscript (identifier_p) identifier_p )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__attached_instruments) identifier__attached_instruments )attribute (identifier_mount) identifier_mount )subscript (None) None )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (call (attribute (identifier_mod_log) identifier_mod_log (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_"Instruments found: {}") string_"Instruments found: {}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__attached_instruments) identifier__attached_instruments )attribute )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
- Get the attached instrument on each mount and - Cache their pipette configs from pipette-config.json If specified, the require element should be a dict of mounts to instrument models describing the instruments expected to be present. This can save a subsequent of :py:attr:`attached_instruments` and also serves as the hook for the hardware simulator to decide what is attached.
(module (function_definition (function_name_cut) function_name_cut (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_self) identifier_self (identifier_selectedText) identifier_selectedText )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_editor) identifier_editor (call (attribute (identifier_self) identifier_self (identifier_editors) identifier_editors )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_editor) identifier_editor (identifier_cut) identifier_cut )attribute (argument_list )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (call (attribute (attribute (identifier_QtGui) identifier_QtGui (identifier_QApplication) identifier_QApplication )attribute (identifier_clipboard) identifier_clipboard )attribute (argument_list )argument_list )call (identifier_setText) identifier_setText )attribute (argument_list (identifier_text) identifier_text )argument_list )call )expression_statement )block )function_definition )module
Cuts the text from the serial to the clipboard.
(module (function_definition (function_name_parse_oxi_states) function_name_parse_oxi_states (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (try_statement (block (expression_statement (assignment (identifier_oxi_states) identifier_oxi_states (dictionary_comprehension (pair (subscript (subscript (identifier_data) identifier_data (string_"_atom_type_symbol") string_"_atom_type_symbol" )subscript (identifier_i) identifier_i )subscript (call (identifier_str2float) identifier_str2float (argument_list (subscript (subscript (identifier_data) identifier_data (string_"_atom_type_oxidation_number") string_"_atom_type_oxidation_number" )subscript (identifier_i) identifier_i )subscript )argument_list )call )pair (for_in_clause (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (subscript (identifier_data) identifier_data (string_"_atom_type_symbol") string_"_atom_type_symbol" )subscript )argument_list )call )argument_list )call )for_in_clause )dictionary_comprehension )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_symbol) identifier_symbol )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (subscript (identifier_data) identifier_data (string_"_atom_type_symbol") string_"_atom_type_symbol" )subscript )argument_list )call (block (expression_statement (assignment (subscript (identifier_oxi_states) identifier_oxi_states (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_r"\d?[\+,\-]?$") string_r"\d?[\+,\-]?$" (string_"") string_"" (identifier_symbol) identifier_symbol )argument_list )call )subscript (line_continuation_\) line_continuation_\ (call (identifier_str2float) identifier_str2float (argument_list (subscript (subscript (identifier_data) identifier_data (string_"_atom_type_oxidation_number") string_"_atom_type_oxidation_number" )subscript (identifier_i) identifier_i )subscript )argument_list )call )assignment )expression_statement )block )for_statement )block (except_clause (tuple (identifier_ValueError) identifier_ValueError (identifier_KeyError) identifier_KeyError )tuple (block (expression_statement (assignment (identifier_oxi_states) identifier_oxi_states (None) None )assignment )expression_statement )block )except_clause )try_statement (return_statement (identifier_oxi_states) identifier_oxi_states )return_statement )block )function_definition )module
Parse oxidation states from data dictionary
(module (function_definition (function_name_query) function_name_query (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_tree) identifier_tree (call (attribute (identifier_pypeg2) identifier_pypeg2 (identifier_parse) identifier_parse )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__query) identifier__query )attribute (call (identifier_parser) identifier_parser (argument_list )argument_list )call (keyword_argument (identifier_whitespace) identifier_whitespace (string_"") string_"" )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_walker) identifier_walker (call (identifier_query_walkers) identifier_query_walkers (argument_list )argument_list )call (block (expression_statement (assignment (identifier_tree) identifier_tree (call (attribute (identifier_tree) identifier_tree (identifier_accept) identifier_accept )attribute (argument_list (identifier_walker) identifier_walker )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_tree) identifier_tree )return_statement )block )function_definition )module
Parse query string using given grammar. :returns: AST that represents the query in the given grammar.
(module (function_definition (function_name_prettyln) function_name_prettyln (parameters (identifier_text) identifier_text (default_parameter (identifier_fill) identifier_fill (string_'-') string_'-' )default_parameter (default_parameter (identifier_align) identifier_align (string_'^') string_'^' )default_parameter (default_parameter (identifier_prefix) identifier_prefix (string_'[ ') string_'[ ' )default_parameter (default_parameter (identifier_suffix) identifier_suffix (string_' ]') string_' ]' )default_parameter (default_parameter (identifier_length) identifier_length (integer_69) integer_69 )default_parameter )parameters (block (expression_statement (assignment (identifier_text) identifier_text (call (attribute (string_'{prefix}{0}{suffix}') string_'{prefix}{0}{suffix}' (identifier_format) identifier_format )attribute (argument_list (identifier_text) identifier_text (keyword_argument (identifier_prefix) identifier_prefix (identifier_prefix) identifier_prefix )keyword_argument (keyword_argument (identifier_suffix) identifier_suffix (identifier_suffix) identifier_suffix )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"{0:{fill}{align}{length}}") string_"{0:{fill}{align}{length}}" (identifier_format) identifier_format )attribute (argument_list (identifier_text) identifier_text (keyword_argument (identifier_fill) identifier_fill (identifier_fill) identifier_fill )keyword_argument (keyword_argument (identifier_align) identifier_align (identifier_align) identifier_align )keyword_argument (keyword_argument (identifier_length) identifier_length (identifier_length) identifier_length )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Wrap `text` in a pretty line with maximum length.
(module (function_definition (function_name_formfield_for_dbfield) function_name_formfield_for_dbfield (parameters (identifier_self) identifier_self (identifier_db_field) identifier_db_field (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_db_field) identifier_db_field (attribute (identifier_fields) identifier_fields (identifier_OrderField) identifier_OrderField )attribute )argument_list )call (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'widget') string_'widget' )subscript (attribute (identifier_widgets) identifier_widgets (identifier_HiddenTextInput) identifier_HiddenTextInput )attribute )assignment )expression_statement )block )if_statement (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_ListView) identifier_ListView (identifier_self) identifier_self )argument_list )call (identifier_formfield_for_dbfield) identifier_formfield_for_dbfield )attribute (argument_list (identifier_db_field) identifier_db_field (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Same as parent but sets the widget for any OrderFields to HiddenTextInput.
(module (function_definition (function_name_get_view_selection) function_name_get_view_selection (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_MODEL_STORAGE_ID) identifier_MODEL_STORAGE_ID )attribute )not_operator (block (return_statement (expression_list (None) None (None) None )expression_list )return_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_paths) identifier_paths (list )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (pattern_list (identifier_model) identifier_model (identifier_paths) identifier_paths )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier__tree_selection) identifier__tree_selection )attribute (identifier_get_selected_rows) identifier_get_selected_rows )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_selected_model_list) identifier_selected_model_list (list )list )assignment )expression_statement (for_statement (identifier_path) identifier_path (identifier_paths) identifier_paths (block (expression_statement (assignment (identifier_model) identifier_model (subscript (subscript (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute (identifier_path) identifier_path )subscript (attribute (identifier_self) identifier_self (identifier_MODEL_STORAGE_ID) identifier_MODEL_STORAGE_ID )attribute )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_selected_model_list) identifier_selected_model_list (identifier_append) identifier_append )attribute (argument_list (identifier_model) identifier_model )argument_list )call )expression_statement )block )for_statement (return_statement (expression_list (attribute (identifier_self) identifier_self (identifier__tree_selection) identifier__tree_selection )attribute (identifier_selected_model_list) identifier_selected_model_list )expression_list )return_statement )block )function_definition )module
Get actual tree selection object and all respective models of selected rows
(module (function_definition (function_name_install) function_name_install (parameters (identifier_zone) identifier_zone (default_parameter (identifier_nodataset) identifier_nodataset (False) False )default_parameter (default_parameter (identifier_brand_opts) identifier_brand_opts (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary (pair (string_'status') string_'status' (True) True )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run_all') string_'cmd.run_all' )subscript (argument_list (call (attribute (string_'zoneadm -z {zone} install{nodataset}{brand_opts}') string_'zoneadm -z {zone} install{nodataset}{brand_opts}' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_zone) identifier_zone (identifier_zone) identifier_zone )keyword_argument (keyword_argument (identifier_nodataset) identifier_nodataset (conditional_expression (string_' -x nodataset') string_' -x nodataset' (identifier_nodataset) identifier_nodataset (string_'') string_'' )conditional_expression )keyword_argument (keyword_argument (identifier_brand_opts) identifier_brand_opts (conditional_expression (call (attribute (string_' {0}') string_' {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_brand_opts) identifier_brand_opts )argument_list )call (identifier_brand_opts) identifier_brand_opts (string_'') string_'' )conditional_expression )keyword_argument )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'status') string_'status' )subscript (comparison_operator (subscript (identifier_res) identifier_res (string_'retcode') string_'retcode' )subscript (integer_0) integer_0 )comparison_operator )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'message') string_'message' )subscript (conditional_expression (subscript (identifier_res) identifier_res (string_'stdout') string_'stdout' )subscript (subscript (identifier_ret) identifier_ret (string_'status') string_'status' )subscript (subscript (identifier_res) identifier_res (string_'stderr') string_'stderr' )subscript )conditional_expression )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'message') string_'message' )subscript (call (attribute (subscript (identifier_ret) identifier_ret (string_'message') string_'message' )subscript (identifier_replace) identifier_replace )attribute (argument_list (string_'zoneadm: ') string_'zoneadm: ' (string_'') string_'' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_ret) identifier_ret (string_'message') string_'message' )subscript (string_'') string_'' )comparison_operator (block (delete_statement (subscript (identifier_ret) identifier_ret (string_'message') string_'message' )subscript )delete_statement )block )if_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Install the specified zone from the system. zone : string name of the zone nodataset : boolean do not create a ZFS file system brand_opts : string brand specific options to pass CLI Example: .. code-block:: bash salt '*' zoneadm.install dolores salt '*' zoneadm.install teddy True
(module (function_definition (function_name_my_notes) function_name_my_notes (parameters (identifier_self) identifier_self (default_parameter (identifier_start_index) identifier_start_index (integer_0) integer_0 )default_parameter (default_parameter (identifier_limit) identifier_limit (integer_100) integer_100 )default_parameter (default_parameter (identifier_get_all) identifier_get_all (False) False )default_parameter (default_parameter (identifier_sort_by) identifier_sort_by (string_'loanId') string_'loanId' )default_parameter (default_parameter (identifier_sort_dir) identifier_sort_dir (string_'asc') string_'asc' )default_parameter )parameters (block (expression_statement (assignment (identifier_index) identifier_index (identifier_start_index) identifier_start_index )assignment )expression_statement (expression_statement (assignment (identifier_notes) identifier_notes (dictionary (pair (string_'loans') string_'loans' (list )list )pair (pair (string_'total') string_'total' (integer_0) integer_0 )pair (pair (string_'result') string_'result' (string_'success') string_'success' )pair )dictionary )assignment )expression_statement (while_statement (True) True (block (expression_statement (assignment (identifier_payload) identifier_payload (dictionary (pair (string_'sortBy') string_'sortBy' (identifier_sort_by) identifier_sort_by )pair (pair (string_'dir') string_'dir' (identifier_sort_dir) identifier_sort_dir )pair (pair (string_'startindex') string_'startindex' (identifier_index) identifier_index )pair (pair (string_'pagesize') string_'pagesize' (identifier_limit) identifier_limit )pair (pair (string_'namespace') string_'namespace' (string_'/account') string_'/account' )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_post) identifier_post )attribute (argument_list (string_'/account/loansAj.action') string_'/account/loansAj.action' (keyword_argument (identifier_data) identifier_data (identifier_payload) identifier_payload )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_json_response) identifier_json_response (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_json_success) identifier_json_success )attribute (argument_list (identifier_json_response) identifier_json_response )argument_list )call (block (expression_statement (augmented_assignment (subscript (identifier_notes) identifier_notes (string_'loans') string_'loans' )subscript (subscript (subscript (identifier_json_response) identifier_json_response (string_'searchresult') string_'searchresult' )subscript (string_'loans') string_'loans' )subscript )augmented_assignment )expression_statement (expression_statement (assignment (subscript (identifier_notes) identifier_notes (string_'total') string_'total' )subscript (subscript (subscript (identifier_json_response) identifier_json_response (string_'searchresult') string_'searchresult' )subscript (string_'totalRecords') string_'totalRecords' )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_notes) identifier_notes (string_'result') string_'result' )subscript (subscript (identifier_json_response) identifier_json_response (string_'result') string_'result' )subscript )assignment )expression_statement (break_statement )break_statement )block )else_clause )if_statement (if_statement (boolean_operator (comparison_operator (identifier_get_all) identifier_get_all (True) True )comparison_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (subscript (identifier_notes) identifier_notes (string_'loans') string_'loans' )subscript )argument_list )call (subscript (identifier_notes) identifier_notes (string_'total') string_'total' )subscript )comparison_operator )boolean_operator (block (expression_statement (augmented_assignment (identifier_index) identifier_index (identifier_limit) identifier_limit )augmented_assignment )expression_statement )block (else_clause (block (break_statement )break_statement )block )else_clause )if_statement )block )while_statement (return_statement (identifier_notes) identifier_notes )return_statement )block )function_definition )module
Return all the loan notes you've already invested in. By default it'll return 100 results at a time. Parameters ---------- start_index : int, optional The result index to start on. By default only 100 records will be returned at a time, so use this to start at a later index in the results. For example, to get results 200 - 300, set `start_index` to 200. (default is 0) limit : int, optional The number of results to return per request. (default is 100) get_all : boolean, optional Return all results in one request, instead of 100 per request. sort_by : string, optional What key to sort on sort_dir : {'asc', 'desc'}, optional Which direction to sort Returns ------- dict A dictionary with a list of matching notes on the `loans` key
(module (function_definition (function_name_fixed_length) function_name_fixed_length (parameters (identifier_cls) identifier_cls (identifier_l) identifier_l (default_parameter (identifier_allow_empty) identifier_allow_empty (False) False )default_parameter )parameters (block (return_statement (call (identifier_cls) identifier_cls (argument_list (identifier_l) identifier_l (identifier_l) identifier_l (keyword_argument (identifier_allow_empty) identifier_allow_empty (identifier_allow_empty) identifier_allow_empty )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Create a sedes for text data with exactly `l` encoded characters.
(module (function_definition (function_name_create_failure) function_name_create_failure (parameters (identifier_self) identifier_self (default_parameter (identifier_exception) identifier_exception (None) None )default_parameter )parameters (block (if_statement (identifier_exception) identifier_exception (block (return_statement (call (identifier_FailedFuture) identifier_FailedFuture (argument_list (call (identifier_type) identifier_type (argument_list (identifier_exception) identifier_exception )argument_list )call (identifier_exception) identifier_exception (None) None )argument_list )call )return_statement )block )if_statement (return_statement (call (identifier_FailedFuture) identifier_FailedFuture (argument_list (list_splat (call (attribute (identifier_sys) identifier_sys (identifier_exc_info) identifier_exc_info )attribute (argument_list )argument_list )call )list_splat )argument_list )call )return_statement )block )function_definition )module
This returns an object implementing IFailedFuture. If exception is None (the default) we MUST be called within an "except" block (such that sys.exc_info() returns useful information).
(module (function_definition (function_name_get_user) function_name_get_user (parameters (identifier_self) identifier_self (identifier_user_id) identifier_user_id )parameters (block (expression_statement (assignment (identifier_content) identifier_content (call (attribute (identifier_self) identifier_self (identifier__fetch) identifier__fetch )attribute (argument_list (binary_operator (string_"/user/%s") string_"/user/%s" (identifier_user_id) identifier_user_id )binary_operator )argument_list )call )assignment )expression_statement (return_statement (call (identifier_FastlyUser) identifier_FastlyUser (argument_list (identifier_self) identifier_self (identifier_content) identifier_content )argument_list )call )return_statement )block )function_definition )module
Get a specific user.
(module (function_definition (function_name_var) function_name_var (parameters (identifier_self) identifier_self (identifier_values) identifier_values (default_parameter (identifier_axis) identifier_axis (integer_0) integer_0 )default_parameter (default_parameter (identifier_weights) identifier_weights (None) None )default_parameter (default_parameter (identifier_dtype) identifier_dtype (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_values) identifier_values (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (identifier_values) identifier_values )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_unique) identifier_unique (identifier_mean) identifier_mean )pattern_list (call (attribute (identifier_self) identifier_self (identifier_mean) identifier_mean )attribute (argument_list (identifier_values) identifier_values (identifier_axis) identifier_axis (identifier_weights) identifier_weights (identifier_dtype) identifier_dtype )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_err) identifier_err (binary_operator (identifier_values) identifier_values (call (attribute (identifier_mean) identifier_mean (identifier_take) identifier_take )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_inverse) identifier_inverse )attribute (identifier_axis) identifier_axis )argument_list )call )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_weights) identifier_weights (None) None )comparison_operator (block (expression_statement (assignment (identifier_shape) identifier_shape (binary_operator (list (integer_1) integer_1 )list (attribute (identifier_values) identifier_values (identifier_ndim) identifier_ndim )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (subscript (identifier_shape) identifier_shape (identifier_axis) identifier_axis )subscript (attribute (identifier_self) identifier_self (identifier_groups) identifier_groups )attribute )assignment )expression_statement (expression_statement (assignment (identifier_group_weights) identifier_group_weights (call (attribute (attribute (identifier_self) identifier_self (identifier_count) identifier_count )attribute (identifier_reshape) identifier_reshape )attribute (argument_list (identifier_shape) identifier_shape )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_var) identifier_var (call (attribute (identifier_self) identifier_self (identifier_reduce) identifier_reduce )attribute (argument_list (binary_operator (identifier_err) identifier_err (integer_2) integer_2 )binary_operator (keyword_argument (identifier_axis) identifier_axis (identifier_axis) identifier_axis )keyword_argument (keyword_argument (identifier_dtype) identifier_dtype (identifier_dtype) identifier_dtype )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_weights) identifier_weights (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (identifier_weights) identifier_weights )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_group_weights) identifier_group_weights (call (attribute (identifier_self) identifier_self (identifier_reduce) identifier_reduce )attribute (argument_list (identifier_weights) identifier_weights (keyword_argument (identifier_axis) identifier_axis (identifier_axis) identifier_axis )keyword_argument (keyword_argument (identifier_dtype) identifier_dtype (identifier_dtype) identifier_dtype )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_var) identifier_var (call (attribute (identifier_self) identifier_self (identifier_reduce) identifier_reduce )attribute (argument_list (binary_operator (identifier_weights) identifier_weights (binary_operator (identifier_err) identifier_err (integer_2) integer_2 )binary_operator )binary_operator (keyword_argument (identifier_axis) identifier_axis (identifier_axis) identifier_axis )keyword_argument (keyword_argument (identifier_dtype) identifier_dtype (identifier_dtype) identifier_dtype )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (expression_list (identifier_unique) identifier_unique (binary_operator (identifier_var) identifier_var (identifier_group_weights) identifier_group_weights )binary_operator )expression_list )return_statement )block )function_definition )module
compute the variance over each group Parameters ---------- values : array_like, [keys, ...] values to take variance of per group axis : int, optional alternative reduction axis for values Returns ------- unique: ndarray, [groups] unique keys reduced : ndarray, [groups, ...] value array, reduced over groups
(module (function_definition (function_name_close) function_name_close (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (None) None )assignment )expression_statement (for_statement (identifier_exc) identifier_exc (identifier__EXCEPTIONS) identifier__EXCEPTIONS (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_exc) identifier_exc (None) None )argument_list )call )expression_statement )block )for_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_mdr) identifier_mdr )attribute (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block (finally_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_mdr) identifier_mdr )attribute (None) None )assignment )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Close the connection this context wraps.
(module (function_definition (function_name_csv_header_and_defaults) function_name_csv_header_and_defaults (parameters (identifier_features) identifier_features (identifier_schema) identifier_schema (identifier_stats) identifier_stats (identifier_keep_target) identifier_keep_target )parameters (block (expression_statement (assignment (identifier_target_name) identifier_target_name (call (identifier_get_target_name) identifier_get_target_name (argument_list (identifier_features) identifier_features )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_keep_target) identifier_keep_target (not_operator (identifier_target_name) identifier_target_name )not_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Cannot find target transform') string_'Cannot find target transform' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_csv_header) identifier_csv_header (list )list )assignment )expression_statement (expression_statement (assignment (identifier_record_defaults) identifier_record_defaults (list )list )assignment )expression_statement (for_statement (identifier_col) identifier_col (identifier_schema) identifier_schema (block (if_statement (boolean_operator (not_operator (identifier_keep_target) identifier_keep_target )not_operator (comparison_operator (subscript (identifier_col) identifier_col (string_'name') string_'name' )subscript (identifier_target_name) identifier_target_name )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (attribute (identifier_csv_header) identifier_csv_header (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_col) identifier_col (string_'name') string_'name' )subscript )argument_list )call )expression_statement (if_statement (comparison_operator (call (attribute (subscript (identifier_col) identifier_col (string_'type') string_'type' )subscript (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_INTEGER_SCHEMA) identifier_INTEGER_SCHEMA )comparison_operator (block (expression_statement (assignment (identifier_dtype) identifier_dtype (attribute (identifier_tf) identifier_tf (identifier_int64) identifier_int64 )attribute )assignment )expression_statement (expression_statement (assignment (identifier_default) identifier_default (call (identifier_int) identifier_int (argument_list (call (attribute (call (attribute (subscript (identifier_stats) identifier_stats (string_'column_stats') string_'column_stats' )subscript (identifier_get) identifier_get )attribute (argument_list (subscript (identifier_col) identifier_col (string_'name') string_'name' )subscript (dictionary )dictionary )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'mean') string_'mean' (integer_0) integer_0 )argument_list )call )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (call (attribute (subscript (identifier_col) identifier_col (string_'type') string_'type' )subscript (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_FLOAT_SCHEMA) identifier_FLOAT_SCHEMA )comparison_operator (block (expression_statement (assignment (identifier_dtype) identifier_dtype (attribute (identifier_tf) identifier_tf (identifier_float32) identifier_float32 )attribute )assignment )expression_statement (expression_statement (assignment (identifier_default) identifier_default (call (identifier_float) identifier_float (argument_list (call (attribute (call (attribute (subscript (identifier_stats) identifier_stats (string_'column_stats') string_'column_stats' )subscript (identifier_get) identifier_get )attribute (argument_list (subscript (identifier_col) identifier_col (string_'name') string_'name' )subscript (dictionary )dictionary )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'mean') string_'mean' (float_0.0) float_0.0 )argument_list )call )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_dtype) identifier_dtype (attribute (identifier_tf) identifier_tf (identifier_string) identifier_string )attribute )assignment )expression_statement (expression_statement (assignment (identifier_default) identifier_default (string_'') string_'' )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_record_defaults) identifier_record_defaults (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_tf) identifier_tf (identifier_constant) identifier_constant )attribute (argument_list (list (identifier_default) identifier_default )list (keyword_argument (identifier_dtype) identifier_dtype (identifier_dtype) identifier_dtype )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (expression_list (identifier_csv_header) identifier_csv_header (identifier_record_defaults) identifier_record_defaults )expression_list )return_statement )block )function_definition )module
Gets csv header and default lists.
(module (function_definition (function_name_can_create_gradebook_with_record_types) function_name_can_create_gradebook_with_record_types (parameters (identifier_self) identifier_self (identifier_gradebook_record_types) identifier_gradebook_record_types )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__catalog_session) identifier__catalog_session )attribute (None) None )comparison_operator (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__catalog_session) identifier__catalog_session )attribute (identifier_can_create_catalog_with_record_types) identifier_can_create_catalog_with_record_types )attribute (argument_list (keyword_argument (identifier_catalog_record_types) identifier_catalog_record_types (identifier_gradebook_record_types) identifier_gradebook_record_types )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Tests if this user can create a single ``Gradebook`` using the desired record types. While ``GradingManager.getGradebookRecordTypes()`` can be used to examine which records are supported, this method tests which record(s) are required for creating a specific ``Gradebook``. Providing an empty array tests if a ``Gradebook`` can be created with no records. arg: gradebook_record_types (osid.type.Type[]): array of gradebook record types return: (boolean) - ``true`` if ``Gradebook`` creation using the specified ``Types`` is supported, ``false`` otherwise raise: NullArgument - ``gradebook_record_types`` is ``null`` *compliance: mandatory -- This method must be implemented.*
(module (function_definition (function_name_folderitems) function_name_folderitems (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_items) identifier_items (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_AddAnalysesView) identifier_AddAnalysesView (identifier_self) identifier_self )argument_list )call (identifier_folderitems) identifier_folderitems )attribute (argument_list (keyword_argument (identifier_classic) identifier_classic (False) False )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_items) identifier_items )return_statement )block )function_definition )module
Return folderitems as brains
(module (function_definition (function_name___get_default_layouts_settings) function_name___get_default_layouts_settings (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"> Accessing '{0}' default layouts settings file!") string_"> Accessing '{0}' default layouts settings file!" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_UiConstants) identifier_UiConstants (identifier_layouts_file) identifier_layouts_file )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___default_layouts_settings) identifier___default_layouts_settings )attribute (call (identifier_QSettings) identifier_QSettings (argument_list (call (attribute (attribute (attribute (identifier_umbra) identifier_umbra (identifier_ui) identifier_ui )attribute (identifier_common) identifier_common )attribute (identifier_get_resource_path) identifier_get_resource_path )attribute (argument_list (attribute (identifier_UiConstants) identifier_UiConstants (identifier_layouts_file) identifier_layouts_file )attribute )argument_list )call (attribute (identifier_QSettings) identifier_QSettings (identifier_IniFormat) identifier_IniFormat )attribute )argument_list )call )assignment )expression_statement )block )function_definition )module
Gets the default layouts settings.
(module (function_definition (function_name_to_feather) function_name_to_feather (parameters (identifier_self) identifier_self (identifier_fname) identifier_fname )parameters (block (import_from_statement (dotted_name (identifier_pandas) identifier_pandas (identifier_io) identifier_io (identifier_feather_format) identifier_feather_format )dotted_name (dotted_name (identifier_to_feather) identifier_to_feather )dotted_name )import_from_statement (expression_statement (call (identifier_to_feather) identifier_to_feather (argument_list (identifier_self) identifier_self (identifier_fname) identifier_fname )argument_list )call )expression_statement )block )function_definition )module
Write out the binary feather-format for DataFrames. .. versionadded:: 0.20.0 Parameters ---------- fname : str string file path
(module (function_definition (function_name__sanity_check_fold_scope_locations_are_unique) function_name__sanity_check_fold_scope_locations_are_unique (parameters (identifier_ir_blocks) identifier_ir_blocks )parameters (block (expression_statement (assignment (identifier_observed_locations) identifier_observed_locations (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_block) identifier_block (identifier_ir_blocks) identifier_ir_blocks (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_block) identifier_block (identifier_Fold) identifier_Fold )argument_list )call (block (expression_statement (assignment (identifier_alternate) identifier_alternate (call (attribute (identifier_observed_locations) identifier_observed_locations (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_block) identifier_block (identifier_fold_scope_location) identifier_fold_scope_location )attribute (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_alternate) identifier_alternate (None) None )comparison_operator (block (raise_statement (call (identifier_AssertionError) identifier_AssertionError (argument_list (call (attribute (concatenated_string (string_u'Found two Fold blocks with identical FoldScopeLocations: ') string_u'Found two Fold blocks with identical FoldScopeLocations: ' (string_u'{} {} {}') string_u'{} {} {}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_alternate) identifier_alternate (identifier_block) identifier_block (identifier_ir_blocks) identifier_ir_blocks )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (subscript (identifier_observed_locations) identifier_observed_locations (attribute (identifier_block) identifier_block (identifier_fold_scope_location) identifier_fold_scope_location )attribute )subscript (identifier_block) identifier_block )assignment )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Assert that every FoldScopeLocation that exists on a Fold block is unique.
(module (function_definition (function_name_validate_reference_data) function_name_validate_reference_data (parameters (identifier_self) identifier_self (identifier_ref_data) identifier_ref_data )parameters (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__zotero_lib) identifier__zotero_lib )attribute (identifier_check_items) identifier_check_items )attribute (argument_list (list (identifier_ref_data) identifier_ref_data )list )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_InvalidItemFields) identifier_InvalidItemFields (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (identifier_InvalidZoteroItemError) identifier_InvalidZoteroItemError (identifier_e) identifier_e )raise_statement )block )except_clause )try_statement )block )function_definition )module
Validate the reference data. Zotero.check_items() caches data after the first API call.
(module (function_definition (function_name_clean) function_name_clean (parameters (identifier_self) identifier_self (default_parameter (identifier_critical) identifier_critical (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_clean_events_list) identifier_clean_events_list (list )list )assignment )expression_statement (while_statement (comparison_operator (call (attribute (identifier_self) identifier_self (identifier_len) identifier_len )attribute (argument_list )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_item) identifier_item (call (attribute (attribute (identifier_self) identifier_self (identifier_events_list) identifier_events_list )attribute (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (subscript (identifier_item) identifier_item (integer_1) integer_1 )subscript (integer_0) integer_0 )comparison_operator (parenthesized_expression (boolean_operator (not_operator (identifier_critical) identifier_critical )not_operator (call (attribute (subscript (identifier_item) identifier_item (integer_2) integer_2 )subscript (identifier_startswith) identifier_startswith )attribute (argument_list (string_"CRITICAL") string_"CRITICAL" )argument_list )call )boolean_operator )parenthesized_expression )boolean_operator (block (expression_statement (call (attribute (identifier_clean_events_list) identifier_clean_events_list (identifier_insert) identifier_insert )attribute (argument_list (integer_0) integer_0 (identifier_item) identifier_item )argument_list )call )expression_statement )block )if_statement )block )while_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_events_list) identifier_events_list )attribute (identifier_clean_events_list) identifier_clean_events_list )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_len) identifier_len )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Clean the logs list by deleting finished items. By default, only delete WARNING message. If critical = True, also delete CRITICAL message.
(module (function_definition (function_name_load_ipython_extension) function_name_load_ipython_extension (parameters (identifier_ipython) identifier_ipython )parameters (block (import_statement (dotted_name (identifier_IPython) identifier_IPython )dotted_name )import_statement (expression_statement (assignment (identifier_ipy_version) identifier_ipy_version (call (identifier_LooseVersion) identifier_LooseVersion (argument_list (attribute (identifier_IPython) identifier_IPython (identifier___version__) identifier___version__ )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_ipy_version) identifier_ipy_version (call (identifier_LooseVersion) identifier_LooseVersion (argument_list (string_"3.0.0") string_"3.0.0" )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_ipython) identifier_ipython (identifier_write_err) identifier_write_err )attribute (argument_list (concatenated_string (string_"Your IPython version is older than ") string_"Your IPython version is older than " (string_"version 3.0.0, the minimum for Vispy's") string_"version 3.0.0, the minimum for Vispy's" (string_"IPython backend. Please upgrade your IPython") string_"IPython backend. Please upgrade your IPython" (string_"version.") string_"version." )concatenated_string )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (call (identifier__load_webgl_backend) identifier__load_webgl_backend (argument_list (identifier_ipython) identifier_ipython )argument_list )call )expression_statement )block )function_definition )module
Entry point of the IPython extension Parameters ---------- IPython : IPython interpreter An instance of the IPython interpreter that is handed over to the extension