sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_include_items) function_name_include_items (parameters (identifier_items) identifier_items (default_parameter (identifier_any_all) identifier_any_all (identifier_any) identifier_any )default_parameter (default_parameter (identifier_ignore_case) identifier_ignore_case (False) False )default_parameter (default_parameter (identifier_normalize_values) identifier_normalize_values (False) False )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (identifier_kwargs) identifier_kwargs (block (expression_statement (assignment (identifier_match) identifier_match (call (attribute (identifier_functools) identifier_functools (identifier_partial) identifier_partial )attribute (argument_list (identifier__match_item) identifier__match_item (keyword_argument (identifier_any_all) identifier_any_all (identifier_any_all) identifier_any_all )keyword_argument (keyword_argument (identifier_ignore_case) identifier_ignore_case (identifier_ignore_case) identifier_ignore_case )keyword_argument (keyword_argument (identifier_normalize_values) identifier_normalize_values (identifier_normalize_values) identifier_normalize_values )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (call (identifier_filter) identifier_filter (argument_list (identifier_match) identifier_match (identifier_items) identifier_items )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_iter) identifier_iter (argument_list (identifier_items) identifier_items )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Include items by matching metadata. Note: Metadata values are lowercased when ``normalized_values`` is ``True``, so ``ignore_case`` is automatically set to ``True``. Parameters: items (list): A list of item dicts or filepaths. any_all (callable): A callable to determine if any or all filters must match to include items. Expected values :obj:`any` (default) or :obj:`all`. ignore_case (bool): Perform case-insensitive matching. Default: ``False`` normalize_values (bool): Normalize metadata values to remove common differences between sources. Default: ``False`` kwargs (list): Lists of values to match the given metadata field. Yields: dict: The next item to be included. Example: >>> from google_music_utils import exclude_items >>> list(include_items(song_list, any_all=all, ignore_case=True, normalize_values=True, artist=['Beck'], album=['Odelay']))
(module (function_definition (function_name_coupl_model1) function_name_coupl_model1 (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_Coupl) identifier_Coupl )attribute (integer_0) integer_0 (integer_0) integer_0 )subscript (call (attribute (identifier_np) identifier_np (identifier_abs) identifier_abs )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_Coupl) identifier_Coupl )attribute (integer_0) integer_0 (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_Coupl) identifier_Coupl )attribute (integer_0) integer_0 (integer_1) integer_1 )subscript (unary_operator (call (attribute (identifier_np) identifier_np (identifier_abs) identifier_abs )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_Coupl) identifier_Coupl )attribute (integer_0) integer_0 (integer_1) integer_1 )subscript )argument_list )call )unary_operator )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_Coupl) identifier_Coupl )attribute (integer_1) integer_1 (integer_1) integer_1 )subscript (call (attribute (identifier_np) identifier_np (identifier_abs) identifier_abs )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_Coupl) identifier_Coupl )attribute (integer_1) integer_1 (integer_1) integer_1 )subscript )argument_list )call )assignment )expression_statement )block )function_definition )module
In model 1, we want enforce the following signs on the couplings. Model 2 has the same couplings but arbitrary signs.
(module (function_definition (function_name_a_capture_show_configuration_failed) function_name_a_capture_show_configuration_failed (parameters (identifier_ctx) identifier_ctx )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (attribute (identifier_ctx) identifier_ctx (identifier_device) identifier_device )attribute (identifier_send) identifier_send )attribute (argument_list (string_"show configuration failed") string_"show configuration failed" )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_ctx) identifier_ctx (identifier_device) identifier_device )attribute (identifier_last_command_result) identifier_last_command_result )attribute (identifier_result) identifier_result )assignment )expression_statement (expression_statement (assignment (identifier_index) identifier_index (call (attribute (identifier_result) identifier_result (identifier_find) identifier_find )attribute (argument_list (string_"SEMANTIC ERRORS") string_"SEMANTIC ERRORS" )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (attribute (attribute (identifier_ctx) identifier_ctx (identifier_device) identifier_device )attribute (identifier_chain) identifier_chain )attribute (identifier_connection) identifier_connection )attribute (identifier_emit_message) identifier_emit_message )attribute (argument_list (identifier_result) identifier_result (keyword_argument (identifier_log_level) identifier_log_level (attribute (identifier_logging) identifier_logging (identifier_ERROR) identifier_ERROR )attribute )keyword_argument )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_index) identifier_index (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_ConfigurationSemanticErrors) identifier_ConfigurationSemanticErrors (argument_list (identifier_result) identifier_result )argument_list )call )raise_statement )block (else_clause (block (raise_statement (call (identifier_ConfigurationErrors) identifier_ConfigurationErrors (argument_list (identifier_result) identifier_result )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Capture the show configuration failed result.
(module (function_definition (function_name_get_logical_drives) function_name_get_logical_drives (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_logical_drives) identifier_logical_drives (list )list )assignment )expression_statement (for_statement (identifier_controller) identifier_controller (attribute (identifier_self) identifier_self (identifier_controllers) identifier_controllers )attribute (block (for_statement (identifier_array) identifier_array (attribute (identifier_controller) identifier_controller (identifier_raid_arrays) identifier_raid_arrays )attribute (block (for_statement (identifier_logical_drive) identifier_logical_drive (attribute (identifier_array) identifier_array (identifier_logical_drives) identifier_logical_drives )attribute (block (expression_statement (call (attribute (identifier_logical_drives) identifier_logical_drives (identifier_append) identifier_append )attribute (argument_list (identifier_logical_drive) identifier_logical_drive )argument_list )call )expression_statement )block )for_statement )block )for_statement )block )for_statement (return_statement (identifier_logical_drives) identifier_logical_drives )return_statement )block )function_definition )module
Get all the RAID logical drives in the Server. This method returns all the RAID logical drives on the server by examining all the controllers. :returns: a list of LogicalDrive objects.
(module (function_definition (function_name_close) function_name_close (parameters (identifier_self) identifier_self (default_parameter (identifier_code) identifier_code (integer_1000) integer_1000 )default_parameter (default_parameter (identifier_message) identifier_message (string_'') string_'' )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_message) identifier_message (call (attribute (identifier_self) identifier_self (identifier__encode_bytes) identifier__encode_bytes )attribute (argument_list (identifier_message) identifier_message )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send_frame) identifier_send_frame )attribute (argument_list (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (binary_operator (string_'!H%ds') string_'!H%ds' (call (identifier_len) identifier_len (argument_list (identifier_message) identifier_message )argument_list )call )binary_operator (identifier_code) identifier_code (identifier_message) identifier_message )argument_list )call (keyword_argument (identifier_opcode) identifier_opcode (attribute (identifier_self) identifier_self (identifier_OPCODE_CLOSE) identifier_OPCODE_CLOSE )attribute )keyword_argument )argument_list )call )expression_statement )block (except_clause (identifier_WebSocketError) identifier_WebSocketError (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Failed to write closing frame -> closing socket") string_"Failed to write closing frame -> closing socket" )argument_list )call )expression_statement )block )except_clause (finally_clause (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Closed WebSocket") string_"Closed WebSocket" )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__closed) identifier__closed )attribute (True) True )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_stream) identifier_stream )attribute (None) None )assignment )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Close the websocket and connection, sending the specified code and message. The underlying socket object is _not_ closed, that is the responsibility of the initiator.
(module (function_definition (function_name_resolve_source_mapping) function_name_resolve_source_mapping (parameters (typed_parameter (identifier_source_directory) identifier_source_directory (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_output_directory) identifier_output_directory (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_sources) identifier_sources (type (identifier_Sources) identifier_Sources )type )typed_parameter )parameters (type (generic_type (identifier_Mapping) identifier_Mapping (type_parameter (type (identifier_str) identifier_str )type (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_result) identifier_result (dictionary_comprehension (pair (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_source_directory) identifier_source_directory (identifier_source_file) identifier_source_file )argument_list )call (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_output_directory) identifier_output_directory (identifier_output_file) identifier_output_file )argument_list )call )pair (for_in_clause (pattern_list (identifier_source_file) identifier_source_file (identifier_output_file) identifier_output_file )pattern_list (call (attribute (attribute (identifier_sources) identifier_sources (identifier_files) identifier_files )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_filesystem) identifier_filesystem (call (identifier_get_filesystem) identifier_get_filesystem (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_glob) identifier_glob (attribute (identifier_sources) identifier_sources (identifier_globs) identifier_globs )attribute (block (expression_statement (assignment (identifier_matches) identifier_matches (call (attribute (identifier_filesystem) identifier_filesystem (identifier_list) identifier_list )attribute (argument_list (identifier_source_directory) identifier_source_directory (attribute (identifier_glob) identifier_glob (identifier_patterns) identifier_patterns )attribute (keyword_argument (identifier_exclude) identifier_exclude (attribute (identifier_glob) identifier_glob (identifier_exclude) identifier_exclude )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_update) identifier_update )attribute (argument_list (dictionary_comprehension (pair (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_source_directory) identifier_source_directory (identifier_match) identifier_match )argument_list )call (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_output_directory) identifier_output_directory (identifier_match) identifier_match )argument_list )call )pair (for_in_clause (identifier_match) identifier_match (identifier_matches) identifier_matches )for_in_clause )dictionary_comprehension )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Returns a mapping from absolute source path to absolute output path as specified by the sources object. Files are not guaranteed to exist.
(module (function_definition (function_name_fetchone) function_name_fetchone (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_row) identifier_row (await (call (attribute (attribute (identifier_self) identifier_self (identifier__cursor) identifier__cursor )attribute (identifier_fetchone) identifier_fetchone )attribute (argument_list )argument_list )call )await )assignment )expression_statement (if_statement (not_operator (identifier_row) identifier_row )not_operator (block (raise_statement (identifier_GeneratorExit) identifier_GeneratorExit )raise_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__rows) identifier__rows )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_row) identifier_row )argument_list )call )expression_statement )block )function_definition )module
Fetch single row from the cursor.
(module (function_definition (function_name_show) function_name_show (parameters (identifier_self) identifier_self (identifier_commit) identifier_commit )parameters (block (expression_statement (assignment (identifier_author) identifier_author (attribute (identifier_commit) identifier_commit (identifier_author) identifier_author )attribute )assignment )expression_statement (expression_statement (assignment (identifier_author_width) identifier_author_width (integer_25) integer_25 )assignment )expression_statement (expression_statement (assignment (identifier_committer) identifier_committer (string_'') string_'' )assignment )expression_statement (expression_statement (assignment (identifier_commit_date) identifier_commit_date (call (identifier_date_to_str) identifier_date_to_str (argument_list (attribute (identifier_commit) identifier_commit (identifier_committer_time) identifier_committer_time )attribute (attribute (identifier_commit) identifier_commit (identifier_committer_tz) identifier_committer_tz )attribute (attribute (identifier_self) identifier_self (identifier_verbose) identifier_verbose )attribute )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_verbose) identifier_verbose )attribute (block (expression_statement (augmented_assignment (identifier_author) identifier_author (binary_operator (string_" %s") string_" %s" (attribute (identifier_commit) identifier_commit (identifier_author_mail) identifier_author_mail )attribute )binary_operator )augmented_assignment )expression_statement (expression_statement (assignment (identifier_author_width) identifier_author_width (integer_50) integer_50 )assignment )expression_statement (expression_statement (assignment (identifier_committer) identifier_committer (binary_operator (string_" %s %s") string_" %s %s" (tuple (attribute (identifier_commit) identifier_commit (identifier_committer) identifier_committer )attribute (attribute (identifier_commit) identifier_commit (identifier_committer_mail) identifier_committer_mail )attribute )tuple )binary_operator )assignment )expression_statement )block )if_statement (return_statement (call (attribute (string_" {} {:>5d} {:{}s} {}{}") string_" {} {:>5d} {:{}s} {}{}" (identifier_format) identifier_format )attribute (argument_list (subscript (attribute (identifier_commit) identifier_commit (identifier_uuid) identifier_uuid )attribute (slice (colon) colon (integer_8) integer_8 )slice )subscript (attribute (identifier_commit) identifier_commit (identifier_line_count) identifier_line_count )attribute (identifier_author) identifier_author (identifier_author_width) identifier_author_width (identifier_commit_date) identifier_commit_date (identifier_committer) identifier_committer )argument_list )call )return_statement )block )function_definition )module
Display one commit line. The output will be: <uuid> <#lines> <author> <short-commit-date> If verbose flag set, the output will be: <uuid> <#lines> <author+email> <long-date> <committer+email>
(module (function_definition (function_name_ising_energy) function_name_ising_energy (parameters (identifier_sample) identifier_sample (identifier_h) identifier_h (identifier_J) identifier_J (default_parameter (identifier_offset) identifier_offset (float_0.0) float_0.0 )default_parameter )parameters (block (for_statement (identifier_v) identifier_v (identifier_h) identifier_h (block (expression_statement (augmented_assignment (identifier_offset) identifier_offset (binary_operator (subscript (identifier_h) identifier_h (identifier_v) identifier_v )subscript (subscript (identifier_sample) identifier_sample (identifier_v) identifier_v )subscript )binary_operator )augmented_assignment )expression_statement )block )for_statement (for_statement (pattern_list (identifier_v0) identifier_v0 (identifier_v1) identifier_v1 )pattern_list (identifier_J) identifier_J (block (expression_statement (augmented_assignment (identifier_offset) identifier_offset (binary_operator (binary_operator (subscript (identifier_J) identifier_J (tuple (identifier_v0) identifier_v0 (identifier_v1) identifier_v1 )tuple )subscript (subscript (identifier_sample) identifier_sample (identifier_v0) identifier_v0 )subscript )binary_operator (subscript (identifier_sample) identifier_sample (identifier_v1) identifier_v1 )subscript )binary_operator )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_offset) identifier_offset )return_statement )block )function_definition )module
Calculate the energy for the specified sample of an Ising model. Energy of a sample for a binary quadratic model is defined as a sum, offset by the constant energy offset associated with the model, of the sample multipled by the linear bias of the variable and all its interactions. For an Ising model, .. math:: E(\mathbf{s}) = \sum_v h_v s_v + \sum_{u,v} J_{u,v} s_u s_v + c where :math:`s_v` is the sample, :math:`h_v` is the linear bias, :math:`J_{u,v}` the quadratic bias (interactions), and :math:`c` the energy offset. Args: sample (dict[variable, spin]): Sample for a binary quadratic model as a dict of form {v: spin, ...}, where keys are variables of the model and values are spins (either -1 or 1). h (dict[variable, bias]): Linear biases as a dict of the form {v: bias, ...}, where keys are variables of the model and values are biases. J (dict[(variable, variable), bias]): Quadratic biases as a dict of the form {(u, v): bias, ...}, where keys are 2-tuples of variables of the model and values are quadratic biases associated with the pair of variables (the interaction). offset (numeric, optional, default=0): Constant offset to be applied to the energy. Default 0. Returns: float: The induced energy. Notes: No input checking is performed. Examples: This example calculates the energy of a sample representing two down spins for an Ising model of two variables that have positive biases of value 1 and are positively coupled with an interaction of value 1. >>> import dimod >>> sample = {1: -1, 2: -1} >>> h = {1: 1, 2: 1} >>> J = {(1, 2): 1} >>> dimod.ising_energy(sample, h, J, 0.5) -0.5 References ---------- `Ising model on Wikipedia <https://en.wikipedia.org/wiki/Ising_model>`_
(module (function_definition (function_name_handle_subscribe) function_name_handle_subscribe (parameters (identifier_self) identifier_self (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (call (attribute (attribute (identifier_self) identifier_self (identifier__tree) identifier__tree )attribute (identifier_handle_subscribe) identifier_handle_subscribe )attribute (argument_list (identifier_request) identifier_request (subscript (attribute (identifier_request) identifier_request (identifier_path) identifier_path )attribute (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__subscription_keys) identifier__subscription_keys )attribute (call (attribute (identifier_request) identifier_request (identifier_generate_key) identifier_generate_key )attribute (argument_list )argument_list )call )subscript (identifier_request) identifier_request )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Handle a Subscribe request from outside. Called with lock taken
(module (function_definition (function_name_async_set_summary) function_name_async_set_summary (parameters (identifier_program) identifier_program )parameters (block (import_statement (dotted_name (identifier_aiohttp) identifier_aiohttp )dotted_name )import_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_aiohttp) identifier_aiohttp (identifier_ClientSession) identifier_ClientSession )attribute (argument_list )argument_list )call (as_pattern_target (identifier_session) identifier_session )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_resp) identifier_resp (await (call (attribute (identifier_session) identifier_session (identifier_get) identifier_get )attribute (argument_list (call (attribute (identifier_program) identifier_program (identifier_get) identifier_get )attribute (argument_list (string_'url') string_'url' )argument_list )call )argument_list )call )await )assignment )expression_statement (expression_statement (assignment (identifier_text) identifier_text (await (call (attribute (identifier_resp) identifier_resp (identifier_text) identifier_text )attribute (argument_list )argument_list )call )await )assignment )expression_statement (expression_statement (assignment (identifier_summary) identifier_summary (call (identifier_extract_program_summary) identifier_extract_program_summary (argument_list (identifier_text) identifier_text )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_program) identifier_program (string_'summary') string_'summary' )subscript (identifier_summary) identifier_summary )assignment )expression_statement (return_statement (identifier_program) identifier_program )return_statement )block )with_statement )block )function_definition )module
Set a program's summary
(module (function_definition (function_name_list) function_name_list (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_filters) identifier_filters )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (string_u'Querying %s by filters=%s') string_u'Querying %s by filters=%s' (attribute (attribute (identifier_self) identifier_self (identifier_model_class) identifier_model_class )attribute (identifier___name__) identifier___name__ )attribute (identifier_filters) identifier_filters )argument_list )call )expression_statement (expression_statement (assignment (identifier_query) identifier_query (call (attribute (identifier_self) identifier_self (identifier___queryset__) identifier___queryset__ )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_perm) identifier_perm (call (identifier_build_permission_name) identifier_build_permission_name (argument_list (attribute (identifier_self) identifier_self (identifier_model_class) identifier_model_class )attribute (string_'view') string_'view' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_u"Checking if user %s has_perm %s") string_u"Checking if user %s has_perm %s" (tuple (attribute (identifier_self) identifier_self (identifier_user) identifier_user )attribute (identifier_perm) identifier_perm )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_query_with_permission) identifier_query_with_permission (call (identifier_filter) identifier_filter (argument_list (lambda (lambda_parameters (identifier_o) identifier_o )lambda_parameters (call (attribute (attribute (identifier_self) identifier_self (identifier_user) identifier_user )attribute (identifier_has_perm) identifier_has_perm )attribute (argument_list (identifier_perm) identifier_perm (keyword_argument (identifier_obj) identifier_obj (identifier_o) identifier_o )keyword_argument )argument_list )call )lambda (identifier_query) identifier_query )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ids) identifier_ids (call (identifier_map) identifier_map (argument_list (lambda (lambda_parameters (identifier_o) identifier_o )lambda_parameters (attribute (identifier_o) identifier_o (identifier_pk) identifier_pk )attribute )lambda (identifier_query_with_permission) identifier_query_with_permission )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_queryset) identifier_queryset (call (attribute (call (attribute (identifier_self) identifier_self (identifier___queryset__) identifier___queryset__ )attribute (argument_list )argument_list )call (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_pk__in) identifier_pk__in (identifier_ids) identifier_ids )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_related) identifier_related (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (string_'select_related') string_'select_related' (None) None )argument_list )call )assignment )expression_statement (if_statement (identifier_related) identifier_related (block (expression_statement (assignment (identifier_queryset) identifier_queryset (call (attribute (identifier_queryset) identifier_queryset (identifier_select_related) identifier_select_related )attribute (argument_list (list_splat (identifier_related) identifier_related )list_splat )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_queryset) identifier_queryset )return_statement )block )function_definition )module
Returns a queryset filtering object by user permission. If you want, you can specify filter arguments. See https://docs.djangoproject.com/en/dev/ref/models/querysets/#filter for more details
(module (function_definition (function_name_calc_qiga1_v1) function_name_calc_qiga1_v1 (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_der) identifier_der (attribute (attribute (attribute (identifier_self) identifier_self (identifier_parameters) identifier_parameters )attribute (identifier_derived) identifier_derived )attribute (identifier_fastaccess) identifier_fastaccess )attribute )assignment )expression_statement (expression_statement (assignment (identifier_old) identifier_old (attribute (attribute (attribute (identifier_self) identifier_self (identifier_sequences) identifier_sequences )attribute (identifier_states) identifier_states )attribute (identifier_fastaccess_old) identifier_fastaccess_old )attribute )assignment )expression_statement (expression_statement (assignment (identifier_new) identifier_new (attribute (attribute (attribute (identifier_self) identifier_self (identifier_sequences) identifier_sequences )attribute (identifier_states) identifier_states )attribute (identifier_fastaccess_new) identifier_fastaccess_new )attribute )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_der) identifier_der (identifier_ki1) identifier_ki1 )attribute (float_0.) float_0. )comparison_operator (block (expression_statement (assignment (attribute (identifier_new) identifier_new (identifier_qiga1) identifier_qiga1 )attribute (attribute (identifier_new) identifier_new (identifier_qigz1) identifier_qigz1 )attribute )assignment )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_der) identifier_der (identifier_ki1) identifier_ki1 )attribute (float_1e200) float_1e200 )comparison_operator (block (expression_statement (assignment (attribute (identifier_new) identifier_new (identifier_qiga1) identifier_qiga1 )attribute (binary_operator (binary_operator (attribute (identifier_old) identifier_old (identifier_qiga1) identifier_qiga1 )attribute (attribute (identifier_new) identifier_new (identifier_qigz1) identifier_qigz1 )attribute )binary_operator (attribute (identifier_old) identifier_old (identifier_qigz1) identifier_qigz1 )attribute )binary_operator )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_d_temp) identifier_d_temp (parenthesized_expression (binary_operator (float_1.) float_1. (call (attribute (identifier_modelutils) identifier_modelutils (identifier_exp) identifier_exp )attribute (argument_list (binary_operator (unary_operator (float_1.) float_1. )unary_operator (attribute (identifier_der) identifier_der (identifier_ki1) identifier_ki1 )attribute )binary_operator )argument_list )call )binary_operator )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (attribute (identifier_new) identifier_new (identifier_qiga1) identifier_qiga1 )attribute (parenthesized_expression (binary_operator (binary_operator (attribute (identifier_old) identifier_old (identifier_qiga1) identifier_qiga1 )attribute (binary_operator (parenthesized_expression (binary_operator (attribute (identifier_old) identifier_old (identifier_qigz1) identifier_qigz1 )attribute (attribute (identifier_old) identifier_old (identifier_qiga1) identifier_qiga1 )attribute )binary_operator )parenthesized_expression (identifier_d_temp) identifier_d_temp )binary_operator )binary_operator (binary_operator (parenthesized_expression (binary_operator (attribute (identifier_new) identifier_new (identifier_qigz1) identifier_qigz1 )attribute (attribute (identifier_old) identifier_old (identifier_qigz1) identifier_qigz1 )attribute )binary_operator )parenthesized_expression (parenthesized_expression (binary_operator (float_1.) float_1. (binary_operator (attribute (identifier_der) identifier_der (identifier_ki1) identifier_ki1 )attribute (identifier_d_temp) identifier_d_temp )binary_operator )binary_operator )parenthesized_expression )binary_operator )binary_operator )parenthesized_expression )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Perform the runoff concentration calculation for the first interflow component. The working equation is the analytical solution of the linear storage equation under the assumption of constant change in inflow during the simulation time step. Required derived parameter: |KI1| Required state sequence: |QIGZ1| Calculated state sequence: |QIGA1| Basic equation: :math:`QIGA1_{neu} = QIGA1_{alt} + (QIGZ1_{alt}-QIGA1_{alt}) \\cdot (1-exp(-KI1^{-1})) + (QIGZ1_{neu}-QIGZ1_{alt}) \\cdot (1-KI1\\cdot(1-exp(-KI1^{-1})))` Examples: A normal test case: >>> from hydpy.models.lland import * >>> parameterstep() >>> derived.ki1(0.1) >>> states.qigz1.old = 2.0 >>> states.qigz1.new = 4.0 >>> states.qiga1.old = 3.0 >>> model.calc_qiga1_v1() >>> states.qiga1 qiga1(3.800054) First extreme test case (zero division is circumvented): >>> derived.ki1(0.0) >>> model.calc_qiga1_v1() >>> states.qiga1 qiga1(4.0) Second extreme test case (numerical overflow is circumvented): >>> derived.ki1(1e500) >>> model.calc_qiga1_v1() >>> states.qiga1 qiga1(5.0)
(module (function_definition (function_name_Append) function_name_Append (parameters (identifier_self) identifier_self (identifier_other) identifier_other )parameters (block (expression_statement (assignment (identifier_orig_len) identifier_orig_len (call (identifier_len) identifier_len (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_Set) identifier_Set )attribute (argument_list (binary_operator (identifier_orig_len) identifier_orig_len (call (identifier_len) identifier_len (argument_list (identifier_other) identifier_other )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_ipoint) identifier_ipoint (identifier_orig_len) identifier_orig_len )assignment )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'SetPointError') string_'SetPointError' )argument_list )call (block (for_statement (identifier_point) identifier_point (identifier_other) identifier_other (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_SetPoint) identifier_SetPoint )attribute (argument_list (identifier_ipoint) identifier_ipoint (attribute (attribute (identifier_point) identifier_point (identifier_x) identifier_x )attribute (identifier_value) identifier_value )attribute (attribute (attribute (identifier_point) identifier_point (identifier_y) identifier_y )attribute (identifier_value) identifier_value )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_SetPointError) identifier_SetPointError )attribute (argument_list (identifier_ipoint) identifier_ipoint (attribute (attribute (identifier_point) identifier_point (identifier_x) identifier_x )attribute (identifier_error_low) identifier_error_low )attribute (attribute (attribute (identifier_point) identifier_point (identifier_x) identifier_x )attribute (identifier_error_hi) identifier_error_hi )attribute (attribute (attribute (identifier_point) identifier_point (identifier_y) identifier_y )attribute (identifier_error_low) identifier_error_low )attribute (attribute (attribute (identifier_point) identifier_point (identifier_y) identifier_y )attribute (identifier_error_hi) identifier_error_hi )attribute )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_ipoint) identifier_ipoint (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement )block (else_clause (block (for_statement (identifier_point) identifier_point (identifier_other) identifier_other (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_SetPoint) identifier_SetPoint )attribute (argument_list (identifier_ipoint) identifier_ipoint (attribute (attribute (identifier_point) identifier_point (identifier_x) identifier_x )attribute (identifier_value) identifier_value )attribute (attribute (attribute (identifier_point) identifier_point (identifier_y) identifier_y )attribute (identifier_value) identifier_value )attribute )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_ipoint) identifier_ipoint (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement )block )else_clause )if_statement )block )function_definition )module
Append points from another graph
(module (function_definition (function_name_make_inverse_connectivity) function_name_make_inverse_connectivity (parameters (identifier_conns) identifier_conns (identifier_n_nod) identifier_n_nod (default_parameter (identifier_ret_offsets) identifier_ret_offsets (True) True )default_parameter )parameters (block (import_from_statement (dotted_name (identifier_itertools) identifier_itertools )dotted_name (dotted_name (identifier_chain) identifier_chain )dotted_name )import_from_statement (expression_statement (assignment (identifier_iconn) identifier_iconn (list_comprehension (list )list (for_in_clause (identifier_ii) identifier_ii (call (identifier_xrange) identifier_xrange (argument_list (identifier_n_nod) identifier_n_nod )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_n_els) identifier_n_els (binary_operator (list (integer_0) integer_0 )list (identifier_n_nod) identifier_n_nod )binary_operator )assignment )expression_statement (for_statement (pattern_list (identifier_ig) identifier_ig (identifier_conn) identifier_conn )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_conns) identifier_conns )argument_list )call (block (for_statement (pattern_list (identifier_iel) identifier_iel (identifier_row) identifier_row )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_conn) identifier_conn )argument_list )call (block (for_statement (identifier_node) identifier_node (identifier_row) identifier_row (block (expression_statement (call (attribute (subscript (identifier_iconn) identifier_iconn (identifier_node) identifier_node )subscript (identifier_extend) identifier_extend )attribute (argument_list (list (identifier_ig) identifier_ig (identifier_iel) identifier_iel )list )argument_list )call )expression_statement (expression_statement (augmented_assignment (subscript (identifier_n_els) identifier_n_els (identifier_node) identifier_node )subscript (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement )block )for_statement )block )for_statement (expression_statement (assignment (identifier_n_els) identifier_n_els (call (attribute (identifier_nm) identifier_nm (identifier_array) identifier_array )attribute (argument_list (identifier_n_els) identifier_n_els (keyword_argument (identifier_dtype) identifier_dtype (attribute (identifier_nm) identifier_nm (identifier_int32) identifier_int32 )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_iconn) identifier_iconn (call (attribute (identifier_nm) identifier_nm (identifier_fromiter) identifier_fromiter )attribute (argument_list (call (identifier_chain) identifier_chain (argument_list (list_splat (identifier_iconn) identifier_iconn )list_splat )argument_list )call (attribute (identifier_nm) identifier_nm (identifier_int32) identifier_int32 )attribute )argument_list )call )assignment )expression_statement (if_statement (identifier_ret_offsets) identifier_ret_offsets (block (expression_statement (assignment (identifier_offsets) identifier_offsets (call (attribute (identifier_nm) identifier_nm (identifier_cumsum) identifier_cumsum )attribute (argument_list (subscript (attribute (identifier_nm) identifier_nm (identifier_r_) identifier_r_ )attribute (integer_0) integer_0 (identifier_n_els) identifier_n_els )subscript (keyword_argument (identifier_dtype) identifier_dtype (attribute (identifier_nm) identifier_nm (identifier_int32) identifier_int32 )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_offsets) identifier_offsets (identifier_iconn) identifier_iconn )expression_list )return_statement )block (else_clause (block (return_statement (expression_list (identifier_n_els) identifier_n_els (identifier_iconn) identifier_iconn )expression_list )return_statement )block )else_clause )if_statement )block )function_definition )module
For each mesh node referenced in the connectivity conns, make a list of elements it belongs to.
(module (function_definition (function_name__create_api_method) function_name__create_api_method (parameters (identifier_cls) identifier_cls (identifier_name) identifier_name (identifier_api_method) identifier_api_method )parameters (block (function_definition (function_name__api_method) function_name__api_method (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_command) identifier_command (subscript (identifier_api_method) identifier_api_method (string_'name') string_'name' )subscript )assignment )expression_statement (if_statement (identifier_kwargs) identifier_kwargs (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__make_request) identifier__make_request )attribute (argument_list (identifier_command) identifier_command (identifier_kwargs) identifier_kwargs )argument_list )call )return_statement )block (else_clause (block (expression_statement (assignment (identifier_kwargs) identifier_kwargs (dictionary )dictionary )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__make_request) identifier__make_request )attribute (argument_list (identifier_command) identifier_command (identifier_kwargs) identifier_kwargs )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition (expression_statement (assignment (attribute (identifier__api_method) identifier__api_method (identifier___doc__) identifier___doc__ )attribute (subscript (identifier_api_method) identifier_api_method (string_'description') string_'description' )subscript )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier__api_method) identifier__api_method (identifier___doc__) identifier___doc__ )attribute (call (identifier__add_params_docstring) identifier__add_params_docstring (argument_list (subscript (identifier_api_method) identifier_api_method (string_'params') string_'params' )subscript )argument_list )call )augmented_assignment )expression_statement (expression_statement (assignment (attribute (identifier__api_method) identifier__api_method (identifier___name__) identifier___name__ )attribute (call (identifier_str) identifier_str (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_cls) identifier_cls (attribute (identifier__api_method) identifier__api_method (identifier___name__) identifier___name__ )attribute (identifier__api_method) identifier__api_method )argument_list )call )expression_statement )block )function_definition )module
Create dynamic class methods based on the Cloudmonkey precached_verbs
(module (function_definition (function_name_actuator_on) function_name_actuator_on (parameters (identifier_self) identifier_self (identifier_service_location_id) identifier_service_location_id (identifier_actuator_id) identifier_actuator_id (default_parameter (identifier_duration) identifier_duration (None) None )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__actuator_on_off) identifier__actuator_on_off )attribute (argument_list (keyword_argument (identifier_on_off) identifier_on_off (string_'on') string_'on' )keyword_argument (keyword_argument (identifier_service_location_id) identifier_service_location_id (identifier_service_location_id) identifier_service_location_id )keyword_argument (keyword_argument (identifier_actuator_id) identifier_actuator_id (identifier_actuator_id) identifier_actuator_id )keyword_argument (keyword_argument (identifier_duration) identifier_duration (identifier_duration) identifier_duration )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Turn actuator on Parameters ---------- service_location_id : int actuator_id : int duration : int, optional 300,900,1800 or 3600 , specifying the time in seconds the actuator should be turned on. Any other value results in turning on for an undetermined period of time. Returns ------- requests.Response
(module (function_definition (function_name_is_running) function_name_is_running (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_proxy_url) identifier_proxy_url )attribute )argument_list )call )assignment )expression_statement )block (except_clause (identifier_RequestException) identifier_RequestException (block (return_statement (False) False )return_statement )block )except_clause )try_statement (if_statement (comparison_operator (string_'ZAP-Header') string_'ZAP-Header' (call (attribute (attribute (identifier_result) identifier_result (identifier_headers) identifier_headers )attribute (identifier_get) identifier_get )attribute (argument_list (string_'Access-Control-Allow-Headers') string_'Access-Control-Allow-Headers' (list )list )argument_list )call )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (raise_statement (call (identifier_ZAPError) identifier_ZAPError (argument_list (call (attribute (string_'Another process is listening on {0}') string_'Another process is listening on {0}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_proxy_url) identifier_proxy_url )attribute )argument_list )call )argument_list )call )raise_statement )block )function_definition )module
Check if ZAP is running.
(module (function_definition (function_name_get_form_kwargs) function_name_get_form_kwargs (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_kwargs) identifier_kwargs (call (attribute (call (identifier_super) identifier_super (argument_list )argument_list )call (identifier_get_form_kwargs) identifier_get_form_kwargs )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (identifier_method) identifier_method )attribute (string_'POST') string_'POST' )comparison_operator (block (expression_statement (assignment (identifier_data) identifier_data (call (identifier_copy) identifier_copy (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (identifier_POST) identifier_POST )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_i) identifier_i (integer_0) integer_0 )assignment )expression_statement (while_statement (parenthesized_expression (call (attribute (identifier_data) identifier_data (identifier_get) identifier_get )attribute (argument_list (binary_operator (string_'%s-%s-id') string_'%s-%s-id' (tuple (attribute (identifier_settings) identifier_settings (identifier_FLAT_MENU_ITEMS_RELATED_NAME) identifier_FLAT_MENU_ITEMS_RELATED_NAME )attribute (identifier_i) identifier_i )tuple )binary_operator )argument_list )call )parenthesized_expression (block (expression_statement (assignment (subscript (identifier_data) identifier_data (binary_operator (string_'%s-%s-id') string_'%s-%s-id' (tuple (attribute (identifier_settings) identifier_settings (identifier_FLAT_MENU_ITEMS_RELATED_NAME) identifier_FLAT_MENU_ITEMS_RELATED_NAME )attribute (identifier_i) identifier_i )tuple )binary_operator )subscript (None) None )assignment )expression_statement (expression_statement (augmented_assignment (identifier_i) identifier_i (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'data') string_'data' (identifier_data) identifier_data )pair (pair (string_'instance') string_'instance' (call (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (argument_list )argument_list )call )pair )dictionary )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_kwargs) identifier_kwargs )return_statement )block )function_definition )module
When the form is posted, don't pass an instance to the form. It should create a new one out of the posted data. We also need to nullify any IDs posted for inline menu items, so that new instances of those are created too.
(module (function_definition (function_name_git_lines) function_name_git_lines (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (default_parameter (identifier_git) identifier_git (identifier_maybeloggit) identifier_maybeloggit )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (string_'Generator of stdout lines from given git command') string_'Generator of stdout lines from given git command' )expression_statement (expression_statement (assignment (identifier_err) identifier_err (call (attribute (identifier_io) identifier_io (identifier_StringIO) identifier_StringIO )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (for_statement (identifier_line) identifier_line (call (identifier_git) identifier_git (argument_list (string_'--no-pager') string_'--no-pager' (keyword_argument (identifier__err) identifier__err (identifier_err) identifier_err )keyword_argument (list_splat (identifier_args) identifier_args )list_splat (keyword_argument (identifier__decode_errors) identifier__decode_errors (string_'replace') string_'replace' )keyword_argument (keyword_argument (identifier__iter) identifier__iter (True) True )keyword_argument (keyword_argument (identifier__bg_exc) identifier__bg_exc (False) False )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (block (expression_statement (yield (subscript (identifier_line) identifier_line (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )yield )expression_statement )block )for_statement )block (except_clause (as_pattern (attribute (identifier_sh) identifier_sh (identifier_ErrorReturnCode) identifier_ErrorReturnCode )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (identifier_status) identifier_status (argument_list (binary_operator (string_'exit_code=%s') string_'exit_code=%s' (attribute (identifier_e) identifier_e (identifier_exit_code) identifier_exit_code )attribute )binary_operator )argument_list )call )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_errlines) identifier_errlines (call (attribute (call (attribute (identifier_err) identifier_err (identifier_getvalue) identifier_getvalue )attribute (argument_list )argument_list )call (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_errlines) identifier_errlines )argument_list )call (integer_3) integer_3 )comparison_operator (block (for_statement (identifier_line) identifier_line (identifier_errlines) identifier_errlines (block (expression_statement (call (identifier_status) identifier_status (argument_list (identifier_line) identifier_line )argument_list )call )expression_statement )block )for_statement )block (else_clause (block (expression_statement (call (attribute (call (identifier_vd) identifier_vd (argument_list )argument_list )call (identifier_push) identifier_push )attribute (argument_list (call (identifier_TextSheet) identifier_TextSheet (argument_list (binary_operator (string_'git ') string_'git ' (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (identifier_args) identifier_args )argument_list )call )binary_operator (identifier_errlines) identifier_errlines )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Generator of stdout lines from given git command
(module (function_definition (function_name_enable_logging) function_name_enable_logging (parameters (identifier_main) identifier_main )parameters (block (decorated_definition (decorator (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_main) identifier_main )argument_list )call )decorator (function_definition (function_name_wrapper) function_name_wrapper (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (import_statement (dotted_name (identifier_argparse) identifier_argparse )dotted_name )import_statement (expression_statement (assignment (identifier_parser) identifier_parser (call (attribute (identifier_argparse) identifier_argparse (identifier_ArgumentParser) identifier_ArgumentParser )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_add_argument) identifier_add_argument )attribute (argument_list (string_'--loglevel') string_'--loglevel' (keyword_argument (identifier_default) identifier_default (string_"ERROR") string_"ERROR" )keyword_argument (keyword_argument (identifier_type) identifier_type (identifier_str) identifier_str )keyword_argument (keyword_argument (identifier_help) identifier_help (concatenated_string (string_"Set the loglevel. Possible values: CRITICAL, ERROR (default),") string_"Set the loglevel. Possible values: CRITICAL, ERROR (default)," (string_"WARNING, INFO, DEBUG") string_"WARNING, INFO, DEBUG" )concatenated_string )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_options) identifier_options (call (attribute (identifier_parser) identifier_parser (identifier_parse_args) identifier_parse_args )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_numeric_level) identifier_numeric_level (call (identifier_getattr) identifier_getattr (argument_list (identifier_logging) identifier_logging (call (attribute (attribute (identifier_options) identifier_options (identifier_loglevel) identifier_loglevel )attribute (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call (None) None )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_numeric_level) identifier_numeric_level (identifier_int) identifier_int )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_'Invalid log level: %s') string_'Invalid log level: %s' (attribute (identifier_options) identifier_options (identifier_loglevel) identifier_loglevel )attribute )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_basicConfig) identifier_basicConfig )attribute (argument_list (keyword_argument (identifier_level) identifier_level (identifier_numeric_level) identifier_numeric_level )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_retcode) identifier_retcode (call (identifier_main) identifier_main (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (identifier_retcode) identifier_retcode )return_statement )block )function_definition )decorated_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
This decorator is used to decorate main functions. It adds the initialization of the logger and an argument parser that allows one to select the loglevel. Useful if we are writing simple main functions that call libraries where the logging module is used Args: main: main function.
(module (function_definition (function_name_is_jail) function_name_is_jail (parameters (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_jails) identifier_jails (call (identifier_list_jails) identifier_list_jails (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_jail) identifier_jail (identifier_jails) identifier_jails (block (if_statement (comparison_operator (subscript (call (attribute (identifier_jail) identifier_jail (identifier_split) identifier_split )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript (identifier_name) identifier_name )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Return True if jail exists False if not CLI Example: .. code-block:: bash salt '*' poudriere.is_jail <jail name>
(module (function_definition (function_name_show_rsa) function_name_show_rsa (parameters (identifier_minion_id) identifier_minion_id (identifier_dns_name) identifier_dns_name )parameters (block (expression_statement (assignment (identifier_cache) identifier_cache (call (attribute (attribute (identifier_salt) identifier_salt (identifier_cache) identifier_cache )attribute (identifier_Cache) identifier_Cache )attribute (argument_list (identifier___opts__) identifier___opts__ (attribute (identifier_syspaths) identifier_syspaths (identifier_CACHE_DIR) identifier_CACHE_DIR )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bank) identifier_bank (string_'digicert/domains') string_'digicert/domains' )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_cache) identifier_cache (identifier_fetch) identifier_fetch )attribute (argument_list (identifier_bank) identifier_bank (identifier_dns_name) identifier_dns_name )argument_list )call )assignment )expression_statement (return_statement (subscript (identifier_data) identifier_data (string_'private_key') string_'private_key' )subscript )return_statement )block )function_definition )module
Show a private RSA key CLI Example: .. code-block:: bash salt-run digicert.show_rsa myminion domain.example.com
(module (function_definition (function_name__tc_below) function_name__tc_below (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_tr_below) identifier_tr_below (attribute (identifier_self) identifier_self (identifier__tr_below) identifier__tr_below )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_tr_below) identifier_tr_below (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (return_statement (call (attribute (identifier_tr_below) identifier_tr_below (identifier_tc_at_grid_col) identifier_tc_at_grid_col )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__grid_col) identifier__grid_col )attribute )argument_list )call )return_statement )block )function_definition )module
The tc element immediately below this one in its grid column.
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (identifier_ids) identifier_ids )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (identifier_build_uri_with_ids) identifier_build_uri_with_ids (argument_list (string_'api/v4/as/%s/') string_'api/v4/as/%s/' (identifier_ids) identifier_ids )argument_list )call )assignment )expression_statement (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_ApiV4As) identifier_ApiV4As (identifier_self) identifier_self )argument_list )call (identifier_delete) identifier_delete )attribute (argument_list (identifier_url) identifier_url )argument_list )call )return_statement )block )function_definition )module
Method to delete asns by their id's :param ids: Identifiers of asns :return: None
(module (function_definition (function_name_as_dict) function_name_as_dict (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_d) identifier_d (dictionary )dictionary )assignment )expression_statement (expression_statement (call (identifier__add_value) identifier__add_value (argument_list (identifier_d) identifier_d (string_'obstory_ids') string_'obstory_ids' (attribute (identifier_self) identifier_self (identifier_obstory_ids) identifier_obstory_ids )attribute )argument_list )call )expression_statement (expression_statement (call (identifier__add_string) identifier__add_string (argument_list (identifier_d) identifier_d (string_'field_name') string_'field_name' (attribute (identifier_self) identifier_self (identifier_field_name) identifier_field_name )attribute )argument_list )call )expression_statement (expression_statement (call (identifier__add_value) identifier__add_value (argument_list (identifier_d) identifier_d (string_'lat_min') string_'lat_min' (attribute (identifier_self) identifier_self (identifier_lat_min) identifier_lat_min )attribute )argument_list )call )expression_statement (expression_statement (call (identifier__add_value) identifier__add_value (argument_list (identifier_d) identifier_d (string_'lat_max') string_'lat_max' (attribute (identifier_self) identifier_self (identifier_lat_max) identifier_lat_max )attribute )argument_list )call )expression_statement (expression_statement (call (identifier__add_value) identifier__add_value (argument_list (identifier_d) identifier_d (string_'long_min') string_'long_min' (attribute (identifier_self) identifier_self (identifier_long_min) identifier_long_min )attribute )argument_list )call )expression_statement (expression_statement (call (identifier__add_value) identifier__add_value (argument_list (identifier_d) identifier_d (string_'long_max') string_'long_max' (attribute (identifier_self) identifier_self (identifier_long_max) identifier_long_max )attribute )argument_list )call )expression_statement (expression_statement (call (identifier__add_value) identifier__add_value (argument_list (identifier_d) identifier_d (string_'time_min') string_'time_min' (attribute (identifier_self) identifier_self (identifier_time_min) identifier_time_min )attribute )argument_list )call )expression_statement (expression_statement (call (identifier__add_value) identifier__add_value (argument_list (identifier_d) identifier_d (string_'time_max') string_'time_max' (attribute (identifier_self) identifier_self (identifier_time_max) identifier_time_max )attribute )argument_list )call )expression_statement (expression_statement (call (identifier__add_string) identifier__add_string (argument_list (identifier_d) identifier_d (string_'item_id') string_'item_id' (attribute (identifier_self) identifier_self (identifier_item_id) identifier_item_id )attribute )argument_list )call )expression_statement (expression_statement (call (identifier__add_value) identifier__add_value (argument_list (identifier_d) identifier_d (string_'skip') string_'skip' (attribute (identifier_self) identifier_self (identifier_skip) identifier_skip )attribute )argument_list )call )expression_statement (expression_statement (call (identifier__add_value) identifier__add_value (argument_list (identifier_d) identifier_d (string_'limit') string_'limit' (attribute (identifier_self) identifier_self (identifier_limit) identifier_limit )attribute )argument_list )call )expression_statement (expression_statement (call (identifier__add_boolean) identifier__add_boolean (argument_list (identifier_d) identifier_d (string_'exclude_imported') string_'exclude_imported' (attribute (identifier_self) identifier_self (identifier_exclude_imported) identifier_exclude_imported )attribute )argument_list )call )expression_statement (expression_statement (call (identifier__add_string) identifier__add_string (argument_list (identifier_d) identifier_d (string_'exclude_export_to') string_'exclude_export_to' (attribute (identifier_self) identifier_self (identifier_exclude_export_to) identifier_exclude_export_to )attribute )argument_list )call )expression_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
Convert this ObservatoryMetadataSearch to a dict, ready for serialization to JSON for use in the API. :return: Dict representation of this ObservatoryMetadataSearch instance
(module (function_definition (function_name_setup_project_view) function_name_setup_project_view (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_i) identifier_i (list (integer_1) integer_1 (integer_2) integer_2 (integer_3) integer_3 )list (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_hideColumn) identifier_hideColumn )attribute (argument_list (identifier_i) identifier_i )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_setHeaderHidden) identifier_setHeaderHidden )attribute (argument_list (True) True )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_filter_directories) identifier_filter_directories )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Setup view for projects
(module (function_definition (function_name_token_network_leave) function_name_token_network_leave (parameters (identifier_self) identifier_self (typed_parameter (identifier_registry_address) identifier_registry_address (type (identifier_PaymentNetworkID) identifier_PaymentNetworkID )type )typed_parameter (typed_parameter (identifier_token_address) identifier_token_address (type (identifier_TokenAddress) identifier_TokenAddress )type )typed_parameter )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_NettingChannelState) identifier_NettingChannelState )type )type_parameter )generic_type )type (block (if_statement (not_operator (call (identifier_is_binary_address) identifier_is_binary_address (argument_list (identifier_registry_address) identifier_registry_address )argument_list )call )not_operator (block (raise_statement (call (identifier_InvalidAddress) identifier_InvalidAddress (argument_list (string_'registry_address must be a valid address in binary') string_'registry_address must be a valid address in binary' )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_is_binary_address) identifier_is_binary_address (argument_list (identifier_token_address) identifier_token_address )argument_list )call )not_operator (block (raise_statement (call (identifier_InvalidAddress) identifier_InvalidAddress (argument_list (string_'token_address must be a valid address in binary') string_'token_address must be a valid address in binary' )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_token_address) identifier_token_address (call (attribute (identifier_self) identifier_self (identifier_get_tokens_list) identifier_get_tokens_list )attribute (argument_list (identifier_registry_address) identifier_registry_address )argument_list )call )comparison_operator (block (raise_statement (call (identifier_UnknownTokenAddress) identifier_UnknownTokenAddress (argument_list (string_'token_address unknown') string_'token_address unknown' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_token_network_identifier) identifier_token_network_identifier (call (attribute (identifier_views) identifier_views (identifier_get_token_network_identifier_by_token_address) identifier_get_token_network_identifier_by_token_address )attribute (argument_list (keyword_argument (identifier_chain_state) identifier_chain_state (call (attribute (identifier_views) identifier_views (identifier_state_from_raiden) identifier_state_from_raiden )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_raiden) identifier_raiden )attribute )argument_list )call )keyword_argument (keyword_argument (identifier_payment_network_id) identifier_payment_network_id (identifier_registry_address) identifier_registry_address )keyword_argument (keyword_argument (identifier_token_address) identifier_token_address (identifier_token_address) identifier_token_address )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_connection_manager) identifier_connection_manager (call (attribute (attribute (identifier_self) identifier_self (identifier_raiden) identifier_raiden )attribute (identifier_connection_manager_for_token_network) identifier_connection_manager_for_token_network )attribute (argument_list (identifier_token_network_identifier) identifier_token_network_identifier )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_connection_manager) identifier_connection_manager (identifier_leave) identifier_leave )attribute (argument_list (identifier_registry_address) identifier_registry_address )argument_list )call )return_statement )block )function_definition )module
Close all channels and wait for settlement.
(module (function_definition (function_name_list_users) function_name_list_users (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_lines) identifier_lines (call (identifier_output_lines) identifier_output_lines (argument_list (call (attribute (identifier_self) identifier_self (identifier_exec_rabbitmqctl_list) identifier_exec_rabbitmqctl_list )attribute (argument_list (string_'users') string_'users' )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (call (identifier__parse_rabbitmq_user) identifier__parse_rabbitmq_user (argument_list (identifier_line) identifier_line )argument_list )call (for_in_clause (identifier_line) identifier_line (identifier_lines) identifier_lines )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Run the ``list_users`` command and return a list of tuples describing the users. :return: A list of 2-element tuples. The first element is the username, the second a list of tags for the user.
(module (function_definition (function_name_fetch) function_name_fetch (parameters (identifier_self) identifier_self (default_parameter (identifier_buf) identifier_buf (None) None )default_parameter (default_parameter (identifier_traceno) identifier_traceno (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_buf) identifier_buf (None) None )comparison_operator (block (expression_statement (assignment (identifier_buf) identifier_buf (attribute (identifier_self) identifier_self (identifier_buf) identifier_buf )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_traceno) identifier_traceno (None) None )comparison_operator (block (expression_statement (assignment (identifier_traceno) identifier_traceno (attribute (identifier_self) identifier_self (identifier_traceno) identifier_traceno )attribute )assignment )expression_statement )block )if_statement (try_statement (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_kind) identifier_kind )attribute (identifier_TraceField) identifier_TraceField )comparison_operator (block (if_statement (comparison_operator (identifier_traceno) identifier_traceno (None) None )comparison_operator (block (return_statement (identifier_buf) identifier_buf )return_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_filehandle) identifier_filehandle )attribute (identifier_getth) identifier_getth )attribute (argument_list (identifier_traceno) identifier_traceno (identifier_buf) identifier_buf )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_filehandle) identifier_filehandle )attribute (identifier_getbin) identifier_getbin )attribute (argument_list )argument_list )call )return_statement )block )else_clause )if_statement )block (except_clause (identifier_IOError) identifier_IOError (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_readonly) identifier_readonly )attribute )not_operator (block (return_statement (call (identifier_bytearray) identifier_bytearray (argument_list (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_buf) identifier_buf )attribute )argument_list )call )argument_list )call )return_statement )block (else_clause (block (raise_statement )raise_statement )block )else_clause )if_statement )block )except_clause )try_statement )block )function_definition )module
Fetch the header from disk This object will read header when it is constructed, which means it might be out-of-date if the file is updated through some other handle. This method is largely meant for internal use - if you need to reload disk contents, use ``reload``. Fetch does not update any internal state (unless `buf` is ``None`` on a trace header, and the read succeeds), but returns the fetched header contents. This method can be used to reposition the trace header, which is useful for constructing generators. If this is called on a writable, new file, and this header has not yet been written to, it will successfully return an empty buffer that, when written to, will be reflected on disk. Parameters ---------- buf : bytearray buffer to read into instead of ``self.buf`` traceno : int Returns ------- buf : bytearray Notes ----- .. versionadded:: 1.6 This method is not intended as user-oriented functionality, but might be useful in high-performance code.
(module (function_definition (function_name___load) function_name___load (parameters (identifier_self) identifier_self (identifier_path) identifier_path )parameters (block (try_statement (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_path) identifier_path (string_'rb') string_'rb' )argument_list )call (as_pattern_target (identifier_df) identifier_df )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (pattern_list (attribute (identifier_self) identifier_self (identifier___data) identifier___data )attribute (attribute (identifier_self) identifier_self (identifier___classes) identifier___classes )attribute (attribute (identifier_self) identifier_self (identifier___labels) identifier___labels )attribute (line_continuation_\) line_continuation_\ (attribute (identifier_self) identifier_self (identifier___dtype) identifier___dtype )attribute (attribute (identifier_self) identifier_self (identifier___description) identifier___description )attribute (line_continuation_\) line_continuation_\ (attribute (identifier_self) identifier_self (identifier___num_features) identifier___num_features )attribute (attribute (identifier_self) identifier_self (identifier___feature_names) identifier___feature_names )attribute )pattern_list (call (attribute (identifier_pickle) identifier_pickle (identifier_load) identifier_load )attribute (argument_list (identifier_df) identifier_df )argument_list )call )assignment )expression_statement )block )with_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier___validate) identifier___validate )attribute (argument_list (attribute (identifier_self) identifier_self (identifier___data) identifier___data )attribute (attribute (identifier_self) identifier_self (identifier___classes) identifier___classes )attribute (attribute (identifier_self) identifier_self (identifier___labels) identifier___labels )attribute )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_IOError) identifier_IOError (as_pattern_target (identifier_ioe) identifier_ioe )as_pattern_target )as_pattern (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (string_'Unable to read the dataset from file: {}') string_'Unable to read the dataset from file: {}' (call (identifier_format) identifier_format (argument_list (identifier_ioe) identifier_ioe )argument_list )call )argument_list )call )raise_statement )block )except_clause (except_clause (block (raise_statement )raise_statement )block )except_clause )try_statement )block )function_definition )module
Method to load the serialized dataset from disk.
(module (function_definition (function_name__adjust_image_paths) function_name__adjust_image_paths (parameters (identifier_self) identifier_self (typed_parameter (identifier_content) identifier_content (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_md_file_path) identifier_md_file_path (type (identifier_Path) identifier_Path )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (function_definition (function_name__sub) function_name__sub (parameters (identifier_image) identifier_image )parameters (block (expression_statement (assignment (identifier_image_caption) identifier_image_caption (call (attribute (identifier_image) identifier_image (identifier_group) identifier_group )attribute (argument_list (string_'caption') string_'caption' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_image_path) identifier_image_path (binary_operator (attribute (identifier_md_file_path) identifier_md_file_path (identifier_parent) identifier_parent )attribute (call (identifier_Path) identifier_Path (argument_list (call (attribute (identifier_image) identifier_image (identifier_group) identifier_group )attribute (argument_list (string_'path') string_'path' )argument_list )call )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_f'Updating image reference; user specified path: {image.group("path")}, ') string_f'Updating image reference; user specified path: {image.group("path")}, ' (string_f'absolute path: {image_path}, caption: {image_caption}') string_f'absolute path: {image_path}, caption: {image_caption}' )binary_operator )argument_list )call )expression_statement (return_statement (string_f'![{image_caption}]({image_path.absolute().as_posix()})') string_f'![{image_caption}]({image_path.absolute().as_posix()})' )return_statement )block )function_definition (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__image_pattern) identifier__image_pattern )attribute (identifier_sub) identifier_sub )attribute (argument_list (identifier__sub) identifier__sub (identifier_content) identifier_content )argument_list )call )return_statement )block )function_definition )module
Locate images referenced in a Markdown string and replace their paths with the absolute ones. :param content: Markdown content :param md_file_path: Path to the Markdown file containing the content :returns: Markdown content with absolute image paths
(module (function_definition (function_name__process_token) function_name__process_token (parameters (identifier_cls) identifier_cls (identifier_token) identifier_token )parameters (block (assert_statement (boolean_operator (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_token) identifier_token )argument_list )call (identifier__TokenType) identifier__TokenType )comparison_operator (call (identifier_callable) identifier_callable (argument_list (identifier_token) identifier_token )argument_list )call )boolean_operator (binary_operator (string_'token type must be simple type or callable, not %r') string_'token type must be simple type or callable, not %r' (tuple (identifier_token) identifier_token )tuple )binary_operator )assert_statement (return_statement (identifier_token) identifier_token )return_statement )block )function_definition )module
Preprocess the token component of a token definition.
(module (function_definition (function_name_geodetic2aer) function_name_geodetic2aer (parameters (typed_parameter (identifier_lat) identifier_lat (type (identifier_float) identifier_float )type )typed_parameter (typed_parameter (identifier_lon) identifier_lon (type (identifier_float) identifier_float )type )typed_parameter (typed_parameter (identifier_h) identifier_h (type (identifier_float) identifier_float )type )typed_parameter (typed_parameter (identifier_lat0) identifier_lat0 (type (identifier_float) identifier_float )type )typed_parameter (typed_parameter (identifier_lon0) identifier_lon0 (type (identifier_float) identifier_float )type )typed_parameter (typed_parameter (identifier_h0) identifier_h0 (type (identifier_float) identifier_float )type )typed_parameter (default_parameter (identifier_ell) identifier_ell (None) None )default_parameter (typed_default_parameter (identifier_deg) identifier_deg (type (identifier_bool) identifier_bool )type (True) True )typed_default_parameter )parameters (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_float) identifier_float )type (type (identifier_float) identifier_float )type (type (identifier_float) identifier_float )type )type_parameter )generic_type )type (block (expression_statement (assignment (pattern_list (identifier_e) identifier_e (identifier_n) identifier_n (identifier_u) identifier_u )pattern_list (call (identifier_geodetic2enu) identifier_geodetic2enu (argument_list (identifier_lat) identifier_lat (identifier_lon) identifier_lon (identifier_h) identifier_h (identifier_lat0) identifier_lat0 (identifier_lon0) identifier_lon0 (identifier_h0) identifier_h0 (identifier_ell) identifier_ell (keyword_argument (identifier_deg) identifier_deg (identifier_deg) identifier_deg )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_enu2aer) identifier_enu2aer (argument_list (identifier_e) identifier_e (identifier_n) identifier_n (identifier_u) identifier_u (keyword_argument (identifier_deg) identifier_deg (identifier_deg) identifier_deg )keyword_argument )argument_list )call )return_statement )block )function_definition )module
gives azimuth, elevation and slant range from an Observer to a Point with geodetic coordinates. Parameters ---------- lat : float or numpy.ndarray of float target geodetic latitude lon : float or numpy.ndarray of float target geodetic longitude h : float or numpy.ndarray of float target altitude above geodetic ellipsoid (meters) lat0 : float Observer geodetic latitude lon0 : float Observer geodetic longitude h0 : float observer altitude above geodetic ellipsoid (meters) ell : Ellipsoid, optional reference ellipsoid deg : bool, optional degrees input/output (False: radians in/out) Returns ------- az : float or numpy.ndarray of float azimuth el : float or numpy.ndarray of float elevation srange : float or numpy.ndarray of float slant range [meters]
(module (function_definition (function_name_decompress) function_name_decompress (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (if_statement (identifier_value) identifier_value (block (try_statement (block (expression_statement (assignment (identifier_pk) identifier_pk (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_queryset) identifier_queryset )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_recurrence_rule) identifier_recurrence_rule (identifier_value) identifier_value )keyword_argument )argument_list )call (identifier_pk) identifier_pk )attribute )assignment )expression_statement )block (except_clause (attribute (attribute (attribute (identifier_self) identifier_self (identifier_queryset) identifier_queryset )attribute (identifier_model) identifier_model )attribute (identifier_DoesNotExist) identifier_DoesNotExist )attribute (block (expression_statement (assignment (identifier_pk) identifier_pk (None) None )assignment )expression_statement )block )except_clause )try_statement (return_statement (list (identifier_pk) identifier_pk (None) None (identifier_value) identifier_value )list )return_statement )block )if_statement (return_statement (list (None) None (None) None (None) None )list )return_statement )block )function_definition )module
Return the primary key value for the ``Select`` widget if the given recurrence rule exists in the queryset.
(module (function_definition (function_name_Parse) function_name_Parse (parameters (identifier_self) identifier_self (identifier_rdf_data) identifier_rdf_data )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__filter) identifier__filter )attribute (block (return_statement (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__filter) identifier__filter )attribute (identifier_Parse) identifier_Parse )attribute (argument_list (identifier_rdf_data) identifier_rdf_data (attribute (identifier_self) identifier_self (identifier_expression) identifier_expression )attribute )argument_list )call )argument_list )call )return_statement )block )if_statement (return_statement (identifier_rdf_data) identifier_rdf_data )return_statement )block )function_definition )module
Process rdf data through the filter. Filters sift data according to filter rules. Data that passes the filter rule is kept, other data is dropped. If no filter method is provided, the data is returned as a list. Otherwise, a items that meet filter conditions are returned in a list. Args: rdf_data: Host data that has already been processed by a Parser into RDF. Returns: A list containing data items that matched the filter rules.
(module (function_definition (function_name_send_comment_email) function_name_send_comment_email (parameters (identifier_email) identifier_email (identifier_package_owner) identifier_package_owner (identifier_package_name) identifier_package_name (identifier_commenter) identifier_commenter )parameters (block (expression_statement (assignment (identifier_link) identifier_link (call (attribute (string_'{CATALOG_URL}/package/{owner}/{pkg}/comments') string_'{CATALOG_URL}/package/{owner}/{pkg}/comments' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_CATALOG_URL) identifier_CATALOG_URL (identifier_CATALOG_URL) identifier_CATALOG_URL )keyword_argument (keyword_argument (identifier_owner) identifier_owner (identifier_package_owner) identifier_package_owner )keyword_argument (keyword_argument (identifier_pkg) identifier_pkg (identifier_package_name) identifier_package_name )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_subject) identifier_subject (call (attribute (string_"New comment on {package_owner}/{package_name}") string_"New comment on {package_owner}/{package_name}" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_package_owner) identifier_package_owner (identifier_package_owner) identifier_package_owner )keyword_argument (keyword_argument (identifier_package_name) identifier_package_name (identifier_package_name) identifier_package_name )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_html) identifier_html (call (identifier_render_template) identifier_render_template (argument_list (string_'comment_email.html') string_'comment_email.html' (keyword_argument (identifier_commenter) identifier_commenter (identifier_commenter) identifier_commenter )keyword_argument (keyword_argument (identifier_link) identifier_link (identifier_link) identifier_link )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_body) identifier_body (call (identifier_render_template) identifier_render_template (argument_list (string_'comment_email.txt') string_'comment_email.txt' (keyword_argument (identifier_commenter) identifier_commenter (identifier_commenter) identifier_commenter )keyword_argument (keyword_argument (identifier_link) identifier_link (identifier_link) identifier_link )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_send_email) identifier_send_email (argument_list (keyword_argument (identifier_recipients) identifier_recipients (list (identifier_email) identifier_email )list )keyword_argument (keyword_argument (identifier_sender) identifier_sender (identifier_DEFAULT_SENDER) identifier_DEFAULT_SENDER )keyword_argument (keyword_argument (identifier_subject) identifier_subject (identifier_subject) identifier_subject )keyword_argument (keyword_argument (identifier_html) identifier_html (identifier_html) identifier_html )keyword_argument (keyword_argument (identifier_body) identifier_body (identifier_body) identifier_body )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Send email to owner of package regarding new comment
(module (function_definition (function_name_register_linter) function_name_register_linter (parameters (identifier_linter) identifier_linter )parameters (block (if_statement (boolean_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_linter) identifier_linter (string_"EXTS") string_"EXTS" )argument_list )call (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_linter) identifier_linter (string_"run") string_"run" )argument_list )call )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_LintFactory) identifier_LintFactory (identifier_PLUGINS) identifier_PLUGINS )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_linter) identifier_linter )argument_list )call )expression_statement )block (else_clause (block (raise_statement (call (identifier_LinterException) identifier_LinterException (argument_list (string_"Linter does not have 'run' method or EXTS variable!") string_"Linter does not have 'run' method or EXTS variable!" )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Register a Linter class for file verification. :param linter: :return:
(module (function_definition (function_name_unregister_file) function_name_unregister_file (parameters (identifier_path) identifier_path (default_parameter (identifier_pkg) identifier_pkg (None) None )default_parameter (default_parameter (identifier_conn) identifier_conn (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_close) identifier_close (False) False )assignment )expression_statement (if_statement (comparison_operator (identifier_conn) identifier_conn (None) None )comparison_operator (block (expression_statement (assignment (identifier_close) identifier_close (True) True )assignment )expression_statement (expression_statement (assignment (identifier_conn) identifier_conn (call (identifier_init) identifier_init (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_conn) identifier_conn (identifier_execute) identifier_execute )attribute (argument_list (string_'DELETE FROM files WHERE path=?') string_'DELETE FROM files WHERE path=?' (tuple (identifier_path) identifier_path )tuple )argument_list )call )expression_statement (if_statement (identifier_close) identifier_close (block (expression_statement (call (attribute (identifier_conn) identifier_conn (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Unregister a file from the package database
(module (function_definition (function_name__populate) function_name__populate (parameters (identifier_self) identifier_self (identifier_json) identifier_json )parameters (block (import_from_statement (relative_import (import_prefix )import_prefix (dotted_name (identifier_volume) identifier_volume )dotted_name )relative_import (dotted_name (identifier_Volume) identifier_Volume )dotted_name )import_from_statement (expression_statement (call (attribute (identifier_DerivedBase) identifier_DerivedBase (identifier__populate) identifier__populate )attribute (argument_list (identifier_self) identifier_self (identifier_json) identifier_json )argument_list )call )expression_statement (expression_statement (assignment (identifier_devices) identifier_devices (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_device_index) identifier_device_index (identifier_device) identifier_device )pattern_list (call (attribute (subscript (identifier_json) identifier_json (string_'devices') string_'devices' )subscript (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (not_operator (identifier_device) identifier_device )not_operator (block (expression_statement (assignment (subscript (identifier_devices) identifier_devices (identifier_device_index) identifier_device_index )subscript (None) None )assignment )expression_statement (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_dev) identifier_dev (None) None )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (string_'disk_id') string_'disk_id' (identifier_device) identifier_device )comparison_operator (subscript (identifier_device) identifier_device (string_'disk_id') string_'disk_id' )subscript )boolean_operator (block (expression_statement (assignment (identifier_dev) identifier_dev (call (attribute (identifier_Disk) identifier_Disk (identifier_make_instance) identifier_make_instance )attribute (argument_list (subscript (identifier_device) identifier_device (string_'disk_id') string_'disk_id' )subscript (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (keyword_argument (identifier_parent_id) identifier_parent_id (attribute (identifier_self) identifier_self (identifier_linode_id) identifier_linode_id )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_dev) identifier_dev (call (attribute (identifier_Volume) identifier_Volume (identifier_make_instance) identifier_make_instance )attribute (argument_list (subscript (identifier_device) identifier_device (string_'volume_id') string_'volume_id' )subscript (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (keyword_argument (identifier_parent_id) identifier_parent_id (attribute (identifier_self) identifier_self (identifier_linode_id) identifier_linode_id )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (subscript (identifier_devices) identifier_devices (identifier_device_index) identifier_device_index )subscript (identifier_dev) identifier_dev )assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set) identifier__set )attribute (argument_list (string_'devices') string_'devices' (call (identifier_MappedObject) identifier_MappedObject (argument_list (dictionary_splat (identifier_devices) identifier_devices )dictionary_splat )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Map devices more nicely while populating.
(module (function_definition (function_name_items) function_name_items (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_dictreader) identifier_dictreader (attribute (identifier_self) identifier_self (identifier__csv_dictreader_list) identifier__csv_dictreader_list )attribute (block (for_statement (identifier_entry) identifier_entry (identifier_dictreader) identifier_dictreader (block (expression_statement (assignment (identifier_item) identifier_item (call (attribute (identifier_self) identifier_self (identifier_factory) identifier_factory )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_item) identifier_item (identifier_key) identifier_key )attribute (call (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_item) identifier_item (identifier_attributes) identifier_attributes )attribute (identifier_entry) identifier_entry )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_item) identifier_item (identifier_validate) identifier_validate )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"skipping entry due to item validation exception: %s") string_"skipping entry due to item validation exception: %s" (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )argument_list )call )expression_statement (continue_statement )continue_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"found validated item in CSV source, key: %s") string_"found validated item in CSV source, key: %s" (call (identifier_str) identifier_str (argument_list (subscript (attribute (identifier_item) identifier_item (identifier_attributes) identifier_attributes )attribute (call (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute (argument_list )argument_list )call )subscript )argument_list )call )argument_list )call )expression_statement (expression_statement (yield (identifier_item) identifier_item )yield )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
Returns a generator of available ICachableItem in the ICachableSource
(module (function_definition (function_name__read_byte) function_name__read_byte (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_to_return) identifier_to_return (string_"") string_"" )assignment )expression_statement (if_statement (parenthesized_expression (comparison_operator (attribute (identifier_self) identifier_self (identifier__mode) identifier__mode )attribute (identifier_PROP_MODE_SERIAL) identifier_PROP_MODE_SERIAL )comparison_operator )parenthesized_expression (block (expression_statement (assignment (identifier_to_return) identifier_to_return (call (attribute (attribute (identifier_self) identifier_self (identifier__serial) identifier__serial )attribute (identifier_read) identifier_read )attribute (argument_list (integer_1) integer_1 )argument_list )call )assignment )expression_statement )block (elif_clause (parenthesized_expression (comparison_operator (attribute (identifier_self) identifier_self (identifier__mode) identifier__mode )attribute (identifier_PROP_MODE_TCP) identifier_PROP_MODE_TCP )comparison_operator )parenthesized_expression (block (expression_statement (assignment (identifier_to_return) identifier_to_return (call (attribute (attribute (identifier_self) identifier_self (identifier__socket) identifier__socket )attribute (identifier_recv) identifier_recv )attribute (argument_list (integer_1) integer_1 )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (parenthesized_expression (comparison_operator (attribute (identifier_self) identifier_self (identifier__mode) identifier__mode )attribute (identifier_PROP_MODE_FILE) identifier_PROP_MODE_FILE )comparison_operator )parenthesized_expression (block (expression_statement (assignment (identifier_to_return) identifier_to_return (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_"B") string_"B" (call (identifier_int) identifier_int (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__file) identifier__file )attribute (identifier_readline) identifier_readline )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement (expression_statement (call (attribute (identifier__LOGGER) identifier__LOGGER (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_"READ: ") string_"READ: " (call (identifier_str) identifier_str (argument_list (call (identifier_ord) identifier_ord (argument_list (identifier_to_return) identifier_to_return )argument_list )call )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__logdata) identifier__logdata )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_ord) identifier_ord (argument_list (identifier_to_return) identifier_to_return )argument_list )call )argument_list )call )expression_statement (if_statement (parenthesized_expression (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__logdata) identifier__logdata )attribute )argument_list )call (attribute (identifier_self) identifier_self (identifier__logdatalen) identifier__logdatalen )attribute )comparison_operator )parenthesized_expression (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__logdata) identifier__logdata )attribute (subscript (attribute (identifier_self) identifier_self (identifier__logdata) identifier__logdata )attribute (slice (binary_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__logdata) identifier__logdata )attribute )argument_list )call (attribute (identifier_self) identifier_self (identifier__logdatalen) identifier__logdatalen )attribute )binary_operator (colon) colon )slice )subscript )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__debug) identifier__debug )attribute (argument_list (identifier_PROP_LOGLEVEL_TRACE) identifier_PROP_LOGLEVEL_TRACE (binary_operator (string_"READ: ") string_"READ: " (call (identifier_str) identifier_str (argument_list (call (identifier_ord) identifier_ord (argument_list (identifier_to_return) identifier_to_return )argument_list )call )argument_list )call )binary_operator )argument_list )call )expression_statement (return_statement (identifier_to_return) identifier_to_return )return_statement )block )function_definition )module
Read a byte from input.
(module (function_definition (function_name_get_parent_image_koji_data) function_name_get_parent_image_koji_data (parameters (identifier_workflow) identifier_workflow )parameters (block (expression_statement (assignment (identifier_koji_parent) identifier_koji_parent (boolean_operator (call (attribute (attribute (identifier_workflow) identifier_workflow (identifier_prebuild_results) identifier_prebuild_results )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_PLUGIN_KOJI_PARENT_KEY) identifier_PLUGIN_KOJI_PARENT_KEY )argument_list )call (dictionary )dictionary )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_image_metadata) identifier_image_metadata (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_parents) identifier_parents (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_img) identifier_img (identifier_build) identifier_build )pattern_list (call (attribute (parenthesized_expression (boolean_operator (call (attribute (identifier_koji_parent) identifier_koji_parent (identifier_get) identifier_get )attribute (argument_list (identifier_PARENT_IMAGES_KOJI_BUILDS) identifier_PARENT_IMAGES_KOJI_BUILDS )argument_list )call (dictionary )dictionary )boolean_operator )parenthesized_expression (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (not_operator (identifier_build) identifier_build )not_operator (block (expression_statement (assignment (subscript (identifier_parents) identifier_parents (call (identifier_str) identifier_str (argument_list (identifier_img) identifier_img )argument_list )call )subscript (None) None )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_parents) identifier_parents (call (identifier_str) identifier_str (argument_list (identifier_img) identifier_img )argument_list )call )subscript (dictionary_comprehension (pair (identifier_key) identifier_key (identifier_val) identifier_val )pair (for_in_clause (pattern_list (identifier_key) identifier_key (identifier_val) identifier_val )pattern_list (call (attribute (identifier_build) identifier_build (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_key) identifier_key (tuple (string_'id') string_'id' (string_'nvr') string_'nvr' )tuple )comparison_operator )if_clause )dictionary_comprehension )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (assignment (subscript (identifier_image_metadata) identifier_image_metadata (identifier_PARENT_IMAGE_BUILDS_KEY) identifier_PARENT_IMAGE_BUILDS_KEY )subscript (identifier_parents) identifier_parents )assignment )expression_statement (expression_statement (assignment (subscript (identifier_image_metadata) identifier_image_metadata (identifier_PARENT_IMAGES_KEY) identifier_PARENT_IMAGES_KEY )subscript (attribute (attribute (identifier_workflow) identifier_workflow (identifier_builder) identifier_builder )attribute (identifier_parents_ordered) identifier_parents_ordered )attribute )assignment )expression_statement (if_statement (attribute (attribute (identifier_workflow) identifier_workflow (identifier_builder) identifier_builder )attribute (identifier_base_from_scratch) identifier_base_from_scratch )attribute (block (return_statement (identifier_image_metadata) identifier_image_metadata )return_statement )block )if_statement (expression_statement (assignment (identifier_base_info) identifier_base_info (boolean_operator (call (attribute (identifier_koji_parent) identifier_koji_parent (identifier_get) identifier_get )attribute (argument_list (identifier_BASE_IMAGE_KOJI_BUILD) identifier_BASE_IMAGE_KOJI_BUILD )argument_list )call (dictionary )dictionary )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_parent_id) identifier_parent_id (call (attribute (identifier_base_info) identifier_base_info (identifier_get) identifier_get )attribute (argument_list (string_'id') string_'id' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_parent_id) identifier_parent_id (None) None )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_parent_id) identifier_parent_id (call (identifier_int) identifier_int (argument_list (identifier_parent_id) identifier_parent_id )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_exception) identifier_exception )attribute (argument_list (string_"invalid koji parent id %r") string_"invalid koji parent id %r" (identifier_parent_id) identifier_parent_id )argument_list )call )expression_statement )block )except_clause (else_clause (block (expression_statement (assignment (subscript (identifier_image_metadata) identifier_image_metadata (identifier_BASE_IMAGE_BUILD_ID_KEY) identifier_BASE_IMAGE_BUILD_ID_KEY )subscript (identifier_parent_id) identifier_parent_id )assignment )expression_statement )block )else_clause )try_statement )block )if_statement (return_statement (identifier_image_metadata) identifier_image_metadata )return_statement )block )function_definition )module
Transform koji_parent plugin results into metadata dict.
(module (function_definition (function_name__send_method) function_name__send_method (parameters (identifier_self) identifier_self (identifier_method_sig) identifier_method_sig (default_parameter (identifier_args) identifier_args (call (identifier_bytes) identifier_bytes (argument_list )argument_list )call )default_parameter (default_parameter (identifier_content) identifier_content (None) None )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_args) identifier_args (identifier_AMQPWriter) identifier_AMQPWriter )argument_list )call (block (expression_statement (assignment (identifier_args) identifier_args (call (attribute (identifier_args) identifier_args (identifier_getvalue) identifier_getvalue )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_connection) identifier_connection )attribute (identifier_method_writer) identifier_method_writer )attribute (identifier_write_method) identifier_write_method )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_channel_id) identifier_channel_id )attribute (identifier_method_sig) identifier_method_sig (identifier_args) identifier_args (identifier_content) identifier_content )argument_list )call )expression_statement )block )function_definition )module
Send a method for our channel.
(module (function_definition (function_name_insert_before) function_name_insert_before (parameters (identifier_old) identifier_old (identifier_new) identifier_new )parameters (block (expression_statement (assignment (identifier_parent) identifier_parent (call (attribute (identifier_old) identifier_old (identifier_getparent) identifier_getparent )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_parent) identifier_parent (identifier_insert) identifier_insert )attribute (argument_list (call (attribute (identifier_parent) identifier_parent (identifier_index) identifier_index )attribute (argument_list (identifier_old) identifier_old )argument_list )call (identifier_new) identifier_new )argument_list )call )expression_statement )block )function_definition )module
A simple way to insert a new element node before the old element node among its siblings.
(module (function_definition (function_name_cleanJsbConfig) function_name_cleanJsbConfig (parameters (identifier_self) identifier_self (identifier_jsbconfig) identifier_jsbconfig )parameters (block (expression_statement (assignment (identifier_config) identifier_config (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (identifier_jsbconfig) identifier_jsbconfig )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__cleanJsbAllClassesSection) identifier__cleanJsbAllClassesSection )attribute (argument_list (identifier_config) identifier_config )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__cleanJsbAppAllSection) identifier__cleanJsbAppAllSection )attribute (argument_list (identifier_config) identifier_config )argument_list )call )expression_statement (return_statement (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_config) identifier_config (keyword_argument (identifier_indent) identifier_indent (integer_4) integer_4 )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Clean up the JSB config.
(module (function_definition (function_name_getheader) function_name_getheader (parameters (identifier_self) identifier_self (identifier_which) identifier_which (default_parameter (identifier_use_hash) identifier_use_hash (None) None )default_parameter (default_parameter (identifier_polish) identifier_polish (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_header) identifier_header (call (identifier_getheader) identifier_getheader (argument_list (identifier_which) identifier_which (keyword_argument (identifier_use_hash) identifier_use_hash (identifier_use_hash) identifier_use_hash )keyword_argument (keyword_argument (identifier_target) identifier_target (attribute (identifier_self) identifier_self (identifier_target) identifier_target )attribute )keyword_argument (keyword_argument (identifier_no_tco) identifier_no_tco (attribute (identifier_self) identifier_self (identifier_no_tco) identifier_no_tco )attribute )keyword_argument (keyword_argument (identifier_strict) identifier_strict (attribute (identifier_self) identifier_self (identifier_strict) identifier_strict )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_polish) identifier_polish (block (expression_statement (assignment (identifier_header) identifier_header (call (attribute (identifier_self) identifier_self (identifier_polish) identifier_polish )attribute (argument_list (identifier_header) identifier_header )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_header) identifier_header )return_statement )block )function_definition )module
Get a formatted header.
(module (function_definition (function_name_scan_file) function_name_scan_file (parameters (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (assert_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_path) identifier_path )argument_list )call (binary_operator (string_"Unreachable file '%s'.") string_"Unreachable file '%s'." (identifier_path) identifier_path )binary_operator )assert_statement (try_statement (block (expression_statement (assignment (identifier_cd) identifier_cd (call (attribute (identifier_pyclamd) identifier_pyclamd (identifier_ClamdUnixSocket) identifier_ClamdUnixSocket )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cd) identifier_cd (identifier_ping) identifier_ping )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (attribute (identifier_pyclamd) identifier_pyclamd (identifier_ConnectionError) identifier_ConnectionError )attribute (block (expression_statement (assignment (identifier_cd) identifier_cd (call (attribute (identifier_pyclamd) identifier_pyclamd (identifier_ClamdNetworkSocket) identifier_ClamdNetworkSocket )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_cd) identifier_cd (identifier_ping) identifier_ping )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (attribute (identifier_pyclamd) identifier_pyclamd (identifier_ConnectionError) identifier_ConnectionError )attribute (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Couldn't connect to clamd server using unix/network socket.") string_"Couldn't connect to clamd server using unix/network socket." )argument_list )call )raise_statement )block )except_clause )try_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_cd) identifier_cd (call (attribute (identifier_pyclamd) identifier_pyclamd (identifier_ClamdUnixSocket) identifier_ClamdUnixSocket )attribute (argument_list )argument_list )call )assignment )expression_statement (assert_statement (call (attribute (identifier_cd) identifier_cd (identifier_ping) identifier_ping )attribute (argument_list )argument_list )call (string_"clamd server is not reachable!") string_"clamd server is not reachable!" )assert_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_cd) identifier_cd (identifier_scan_file) identifier_scan_file )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (identifier_result) identifier_result (identifier_result) identifier_result (dictionary )dictionary )conditional_expression )return_statement )block )function_definition )module
Scan `path` for viruses using ``clamd`` antivirus daemon. Args: path (str): Relative or absolute path of file/directory you need to scan. Returns: dict: ``{filename: ("FOUND", "virus type")}`` or blank dict. Raises: ValueError: When the server is not running. AssertionError: When the internal file doesn't exists.
(module (function_definition (function_name__incomplete_files) function_name__incomplete_files (parameters (identifier_filenames) identifier_filenames )parameters (block (expression_statement (assignment (identifier_tmp_files) identifier_tmp_files (list_comprehension (call (identifier_get_incomplete_path) identifier_get_incomplete_path (argument_list (identifier_f) identifier_f )argument_list )call (for_in_clause (identifier_f) identifier_f (identifier_filenames) identifier_filenames )for_in_clause )list_comprehension )assignment )expression_statement (try_statement (block (expression_statement (yield (identifier_tmp_files) identifier_tmp_files )yield )expression_statement (for_statement (pattern_list (identifier_tmp) identifier_tmp (identifier_output) identifier_output )pattern_list (call (identifier_zip) identifier_zip (argument_list (identifier_tmp_files) identifier_tmp_files (identifier_filenames) identifier_filenames )argument_list )call (block (expression_statement (call (attribute (attribute (attribute (identifier_tf) identifier_tf (identifier_io) identifier_io )attribute (identifier_gfile) identifier_gfile )attribute (identifier_rename) identifier_rename )attribute (argument_list (identifier_tmp) identifier_tmp (identifier_output) identifier_output )argument_list )call )expression_statement )block )for_statement )block (finally_clause (block (for_statement (identifier_tmp) identifier_tmp (identifier_tmp_files) identifier_tmp_files (block (if_statement (call (attribute (attribute (attribute (identifier_tf) identifier_tf (identifier_io) identifier_io )attribute (identifier_gfile) identifier_gfile )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_tmp) identifier_tmp )argument_list )call (block (expression_statement (call (attribute (attribute (attribute (identifier_tf) identifier_tf (identifier_io) identifier_io )attribute (identifier_gfile) identifier_gfile )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_tmp) identifier_tmp )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )finally_clause )try_statement )block )function_definition )module
Create temporary files for filenames and rename on exit.
(module (function_definition (function_name_make_filesystem) function_name_make_filesystem (parameters (identifier_blk_device) identifier_blk_device (default_parameter (identifier_fstype) identifier_fstype (string_'ext4') string_'ext4' )default_parameter (default_parameter (identifier_timeout) identifier_timeout (integer_10) integer_10 )default_parameter )parameters (block (expression_statement (assignment (identifier_count) identifier_count (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_e_noent) identifier_e_noent (attribute (attribute (identifier_os) identifier_os (identifier_errno) identifier_errno )attribute (identifier_ENOENT) identifier_ENOENT )attribute )assignment )expression_statement (while_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_blk_device) identifier_blk_device )argument_list )call )not_operator (block (if_statement (comparison_operator (identifier_count) identifier_count (identifier_timeout) identifier_timeout )comparison_operator (block (expression_statement (call (identifier_log) identifier_log (argument_list (binary_operator (string_'Gave up waiting on block device %s') string_'Gave up waiting on block device %s' (identifier_blk_device) identifier_blk_device )binary_operator (keyword_argument (identifier_level) identifier_level (identifier_ERROR) identifier_ERROR )keyword_argument )argument_list )call )expression_statement (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (identifier_e_noent) identifier_e_noent (call (attribute (identifier_os) identifier_os (identifier_strerror) identifier_strerror )attribute (argument_list (identifier_e_noent) identifier_e_noent )argument_list )call (identifier_blk_device) identifier_blk_device )argument_list )call )raise_statement )block )if_statement (expression_statement (call (identifier_log) identifier_log (argument_list (binary_operator (string_'Waiting for block device %s to appear') string_'Waiting for block device %s to appear' (identifier_blk_device) identifier_blk_device )binary_operator (keyword_argument (identifier_level) identifier_level (identifier_DEBUG) identifier_DEBUG )keyword_argument )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_count) identifier_count (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_log) identifier_log (argument_list (binary_operator (string_'Formatting block device %s as filesystem %s.') string_'Formatting block device %s as filesystem %s.' (tuple (identifier_blk_device) identifier_blk_device (identifier_fstype) identifier_fstype )tuple )binary_operator (keyword_argument (identifier_level) identifier_level (identifier_INFO) identifier_INFO )keyword_argument )argument_list )call )expression_statement (expression_statement (call (identifier_check_call) identifier_check_call (argument_list (list (string_'mkfs') string_'mkfs' (string_'-t') string_'-t' (identifier_fstype) identifier_fstype (identifier_blk_device) identifier_blk_device )list )argument_list )call )expression_statement )block )else_clause )while_statement )block )function_definition )module
Make a new filesystem on the specified block device.
(module (function_definition (function_name_health) function_name_health (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_uptime) identifier_uptime (call (attribute (string_'{:.3f}s') string_'{:.3f}s' (identifier_format) identifier_format )attribute (argument_list (parenthesized_expression (binary_operator (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call (attribute (identifier_self) identifier_self (identifier__start_time) identifier__start_time )attribute )binary_operator )parenthesized_expression )argument_list )call )keyword_argument )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Health check method, returns the up-time of the device.
(module (function_definition (function_name_json) function_name_json (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'_json') string_'_json' )argument_list )call (block (return_statement (attribute (identifier_self) identifier_self (identifier__json) identifier__json )attribute )return_statement )block )if_statement (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__json) identifier__json )attribute (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (boolean_operator (attribute (identifier_self) identifier_self (identifier_text) identifier_text )attribute (attribute (identifier_self) identifier_self (identifier_content) identifier_content )attribute )boolean_operator )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__json) identifier__json )attribute (None) None )assignment )expression_statement )block )except_clause )try_statement (return_statement (attribute (identifier_self) identifier_self (identifier__json) identifier__json )attribute )return_statement )block )function_definition )module
Returns the json-encoded content of the response, if any.
(module (function_definition (function_name_delete_processing_block) function_name_delete_processing_block (parameters (identifier_processing_block_id) identifier_processing_block_id )parameters (block (expression_statement (assignment (identifier_scheduling_block_id) identifier_scheduling_block_id (subscript (call (attribute (identifier_processing_block_id) identifier_processing_block_id (identifier_split) identifier_split )attribute (argument_list (string_':') string_':' )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_config) identifier_config (call (identifier_get_scheduling_block) identifier_get_scheduling_block (argument_list (identifier_scheduling_block_id) identifier_scheduling_block_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_processing_blocks) identifier_processing_blocks (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'processing_blocks') string_'processing_blocks' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_processing_block) identifier_processing_block (subscript (call (identifier_list) identifier_list (argument_list (call (identifier_filter) identifier_filter (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (comparison_operator (call (attribute (identifier_x) identifier_x (identifier_get) identifier_get )attribute (argument_list (string_'id') string_'id' )argument_list )call (identifier_processing_block_id) identifier_processing_block_id )comparison_operator )lambda (identifier_processing_blocks) identifier_processing_blocks )argument_list )call )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (call (attribute (subscript (identifier_config) identifier_config (string_'processing_blocks') string_'processing_blocks' )subscript (identifier_remove) identifier_remove )attribute (argument_list (identifier_processing_block) identifier_processing_block )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_DB) identifier_DB (identifier_set) identifier_set )attribute (argument_list (call (attribute (string_'scheduling_block/{}') string_'scheduling_block/{}' (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_config) identifier_config (string_'id') string_'id' )subscript )argument_list )call (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_config) identifier_config )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_DB) identifier_DB (identifier_rpush) identifier_rpush )attribute (argument_list (string_'processing_block_events') string_'processing_block_events' (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_type) identifier_type (string_"deleted") string_"deleted" )keyword_argument (keyword_argument (identifier_id) identifier_id (identifier_processing_block_id) identifier_processing_block_id )keyword_argument )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Delete Processing Block with the specified ID
(module (function_definition (function_name__dump) function_name__dump (parameters (identifier_obj) identifier_obj (identifier_abspath) identifier_abspath (identifier_serializer_type) identifier_serializer_type (default_parameter (identifier_dumper_func) identifier_dumper_func (None) None )default_parameter (default_parameter (identifier_compress) identifier_compress (True) True )default_parameter (default_parameter (identifier_overwrite) identifier_overwrite (False) False )default_parameter (default_parameter (identifier_verbose) identifier_verbose (False) False )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (identifier__check_serializer_type) identifier__check_serializer_type (argument_list (identifier_serializer_type) identifier_serializer_type )argument_list )call )expression_statement (if_statement (not_operator (call (attribute (identifier_inspect) identifier_inspect (identifier_isfunction) identifier_isfunction )attribute (argument_list (identifier_dumper_func) identifier_dumper_func )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (concatenated_string (string_"dumper_func has to be a function take object as input ") string_"dumper_func has to be a function take object as input " (string_"and return binary!") string_"and return binary!" )concatenated_string )argument_list )call )raise_statement )block )if_statement (expression_statement (call (identifier_prt_console) identifier_prt_console (argument_list (binary_operator (string_"\nDump to '%s' ...") string_"\nDump to '%s' ..." (identifier_abspath) identifier_abspath )binary_operator (identifier_verbose) identifier_verbose )argument_list )call )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_abspath) identifier_abspath )argument_list )call (block (if_statement (not_operator (identifier_overwrite) identifier_overwrite )not_operator (block (expression_statement (call (identifier_prt_console) identifier_prt_console (argument_list (string_" Stop! File exists and overwrite is not allowed") string_" Stop! File exists and overwrite is not allowed" (identifier_verbose) identifier_verbose )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement )block )if_statement (expression_statement (assignment (identifier_st) identifier_st (call (attribute (identifier_time) identifier_time (identifier_clock) identifier_clock )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_b_or_str) identifier_b_or_str (call (identifier_dumper_func) identifier_dumper_func (argument_list (identifier_obj) identifier_obj (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_serializer_type) identifier_serializer_type (string_"str") string_"str" )comparison_operator (block (expression_statement (assignment (identifier_b) identifier_b (call (attribute (identifier_b_or_str) identifier_b_or_str (identifier_encode) identifier_encode )attribute (argument_list (string_"utf-8") string_"utf-8" )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_b) identifier_b (identifier_b_or_str) identifier_b_or_str )assignment )expression_statement )block )else_clause )if_statement (if_statement (identifier_compress) identifier_compress (block (expression_statement (assignment (identifier_b) identifier_b (call (attribute (identifier_zlib) identifier_zlib (identifier_compress) identifier_compress )attribute (argument_list (identifier_b) identifier_b )argument_list )call )assignment )expression_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_atomic_write) identifier_atomic_write (argument_list (identifier_abspath) identifier_abspath (keyword_argument (identifier_overwrite) identifier_overwrite (identifier_overwrite) identifier_overwrite )keyword_argument (keyword_argument (identifier_mode) identifier_mode (string_"wb") string_"wb" )keyword_argument )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (identifier_b) identifier_b )argument_list )call )expression_statement )block )with_statement (expression_statement (assignment (identifier_elapsed) identifier_elapsed (binary_operator (call (attribute (identifier_time) identifier_time (identifier_clock) identifier_clock )attribute (argument_list )argument_list )call (identifier_st) identifier_st )binary_operator )assignment )expression_statement (expression_statement (call (identifier_prt_console) identifier_prt_console (argument_list (binary_operator (string_" Complete! Elapse %.6f sec.") string_" Complete! Elapse %.6f sec." (identifier_elapsed) identifier_elapsed )binary_operator (identifier_verbose) identifier_verbose )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_serializer_type) identifier_serializer_type (string_"str") string_"str" )comparison_operator (block (return_statement (identifier_b_or_str) identifier_b_or_str )return_statement )block (else_clause (block (return_statement (identifier_b) identifier_b )return_statement )block )else_clause )if_statement )block )function_definition )module
Dump object to file. :param abspath: The file path you want dump to. :type abspath: str :param serializer_type: 'binary' or 'str'. :type serializer_type: str :param dumper_func: A dumper function that takes an object as input, return binary or string. :type dumper_func: callable function :param compress: default ``False``. If True, then compress binary. :type compress: bool :param overwrite: default ``False``, If ``True``, when you dump to existing file, it silently overwrite it. If ``False``, an alert message is shown. Default setting ``False`` is to prevent overwrite file by mistake. :type overwrite: boolean :param verbose: default True, help-message-display trigger. :type verbose: boolean
(module (function_definition (function_name__AddStopTimeObjectUnordered) function_name__AddStopTimeObjectUnordered (parameters (identifier_self) identifier_self (identifier_stoptime) identifier_stoptime (identifier_schedule) identifier_schedule )parameters (block (expression_statement (assignment (identifier_stop_time_class) identifier_stop_time_class (attribute (call (attribute (identifier_self) identifier_self (identifier_GetGtfsFactory) identifier_GetGtfsFactory )attribute (argument_list )argument_list )call (identifier_StopTime) identifier_StopTime )attribute )assignment )expression_statement (expression_statement (assignment (identifier_cursor) identifier_cursor (call (attribute (attribute (identifier_schedule) identifier_schedule (identifier__connection) identifier__connection )attribute (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_insert_query) identifier_insert_query (binary_operator (string_"INSERT INTO stop_times (%s) VALUES (%s);") string_"INSERT INTO stop_times (%s) VALUES (%s);" (tuple (call (attribute (string_',') string_',' (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_stop_time_class) identifier_stop_time_class (identifier__SQL_FIELD_NAMES) identifier__SQL_FIELD_NAMES )attribute )argument_list )call (call (attribute (string_',') string_',' (identifier_join) identifier_join )attribute (argument_list (binary_operator (list (string_'?') string_'?' )list (call (identifier_len) identifier_len (argument_list (attribute (identifier_stop_time_class) identifier_stop_time_class (identifier__SQL_FIELD_NAMES) identifier__SQL_FIELD_NAMES )attribute )argument_list )call )binary_operator )argument_list )call )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_cursor) identifier_cursor (call (attribute (attribute (identifier_schedule) identifier_schedule (identifier__connection) identifier__connection )attribute (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_execute) identifier_execute )attribute (argument_list (identifier_insert_query) identifier_insert_query (call (attribute (identifier_stoptime) identifier_stoptime (identifier_GetSqlValuesTuple) identifier_GetSqlValuesTuple )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_trip_id) identifier_trip_id )attribute )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Add StopTime object to this trip. The trip isn't checked for duplicate sequence numbers so it must be validated later.
(module (function_definition (function_name_from_object) function_name_from_object (parameters (identifier_self) identifier_self (typed_parameter (identifier_obj) identifier_obj (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_str) identifier_str )type (type (identifier_Any) identifier_Any )type )type_parameter )generic_type )type )typed_parameter )parameters (type (None) None )type (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_obj) identifier_obj (call (attribute (identifier_importer) identifier_importer (identifier_import_object_str) identifier_import_object_str )attribute (argument_list (identifier_obj) identifier_obj )argument_list )call )assignment )expression_statement )block )if_statement (for_statement (identifier_key) identifier_key (call (identifier_dir) identifier_dir (argument_list (identifier_obj) identifier_obj )argument_list )call (block (if_statement (call (attribute (identifier_key) identifier_key (identifier_isupper) identifier_isupper )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_getattr) identifier_getattr (argument_list (identifier_obj) identifier_obj (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__setattr) identifier__setattr )attribute (argument_list (identifier_key) identifier_key (identifier_value) identifier_value )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"Config is loaded from object: %r") string_"Config is loaded from object: %r" (identifier_obj) identifier_obj )argument_list )call )expression_statement )block )function_definition )module
Load values from an object.
(module (function_definition (function_name_assert_powernode) function_name_assert_powernode (parameters (identifier_self) identifier_self (typed_parameter (identifier_name) identifier_name (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (boolean_operator (None) None (identifier_ValueError) identifier_ValueError )boolean_operator )type (block (if_statement (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_inclusions) identifier_inclusions )attribute )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Powernode '{}' does not exists.") string_"Powernode '{}' does not exists." (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier_is_node) identifier_is_node )attribute (argument_list (identifier_name) identifier_name )argument_list )call (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Given name '{}' is a node.") string_"Given name '{}' is a node." (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Do nothing if given name refers to a powernode in given graph. Raise a ValueError in any other case.
(module (function_definition (function_name_directed_tripartition_indices) function_name_directed_tripartition_indices (parameters (identifier_N) identifier_N )parameters (block (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (if_statement (comparison_operator (identifier_N) identifier_N (integer_0) integer_0 )comparison_operator (block (return_statement (identifier_result) identifier_result )return_statement )block )if_statement (expression_statement (assignment (identifier_base) identifier_base (list (integer_0) integer_0 (integer_1) integer_1 (integer_2) integer_2 )list )assignment )expression_statement (for_statement (identifier_key) identifier_key (call (identifier_product) identifier_product (argument_list (identifier_base) identifier_base (keyword_argument (identifier_repeat) identifier_repeat (identifier_N) identifier_N )keyword_argument )argument_list )call (block (expression_statement (assignment (identifier_part) identifier_part (list (list )list (list )list (list )list )list )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_location) identifier_location )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_key) identifier_key )argument_list )call (block (expression_statement (call (attribute (subscript (identifier_part) identifier_part (identifier_location) identifier_location )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_i) identifier_i )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (call (identifier_tuple) identifier_tuple (generator_expression (call (identifier_tuple) identifier_tuple (argument_list (identifier_p) identifier_p )argument_list )call (for_in_clause (identifier_p) identifier_p (identifier_part) identifier_part )for_in_clause )generator_expression )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Return indices for directed tripartitions of a sequence. Args: N (int): The length of the sequence. Returns: list[tuple]: A list of tuples containing the indices for each partition. Example: >>> N = 1 >>> directed_tripartition_indices(N) [((0,), (), ()), ((), (0,), ()), ((), (), (0,))]
(module (function_definition (function_name_befriend) function_name_befriend (parameters (identifier_self) identifier_self (identifier_other_agent) identifier_other_agent (default_parameter (identifier_force) identifier_force (False) False )default_parameter )parameters (block (if_statement (boolean_operator (identifier_force) identifier_force (comparison_operator (subscript (identifier_self) identifier_self (string_'openness') string_'openness' )subscript (call (identifier_random) identifier_random (argument_list )argument_list )call )comparison_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_env) identifier_env )attribute (identifier_add_edge) identifier_add_edge )attribute (argument_list (identifier_self) identifier_self (identifier_other_agent) identifier_other_agent )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_'Made some friend {}') string_'Made some friend {}' (identifier_format) identifier_format )attribute (argument_list (identifier_other_agent) identifier_other_agent )argument_list )call )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Try to become friends with another agent. The chances of success depend on both agents' openness.
(module (function_definition (function_name_tostring) function_name_tostring (parameters (identifier_self) identifier_self (identifier_encoding) identifier_encoding )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_kind) identifier_kind )attribute (string_'string') string_'string' )comparison_operator (block (if_statement (comparison_operator (identifier_encoding) identifier_encoding (None) None )comparison_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier_converted) identifier_converted )attribute )return_statement )block )if_statement (return_statement (call (attribute (string_'"{converted}"') string_'"{converted}"' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_converted) identifier_converted (attribute (identifier_self) identifier_self (identifier_converted) identifier_converted )attribute )keyword_argument )argument_list )call )return_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_kind) identifier_kind )attribute (string_'float') string_'float' )comparison_operator (block (return_statement (call (identifier_repr) identifier_repr (argument_list (attribute (identifier_self) identifier_self (identifier_converted) identifier_converted )attribute )argument_list )call )return_statement )block )elif_clause )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier_converted) identifier_converted )attribute )return_statement )block )function_definition )module
quote the string if not encoded else encode and return
(module (function_definition (function_name_kitchen_create) function_name_kitchen_create (parameters (identifier_backend) identifier_backend (identifier_parent) identifier_parent (identifier_kitchen) identifier_kitchen )parameters (block (expression_statement (call (attribute (identifier_click) identifier_click (identifier_secho) identifier_secho )attribute (argument_list (binary_operator (string_'%s - Creating kitchen %s from parent kitchen %s') string_'%s - Creating kitchen %s from parent kitchen %s' (tuple (call (identifier_get_datetime) identifier_get_datetime (argument_list )argument_list )call (identifier_kitchen) identifier_kitchen (identifier_parent) identifier_parent )tuple )binary_operator (keyword_argument (identifier_fg) identifier_fg (string_'green') string_'green' )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_master) identifier_master (string_'master') string_'master' )assignment )expression_statement (if_statement (comparison_operator (call (attribute (identifier_kitchen) identifier_kitchen (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (call (attribute (identifier_master) identifier_master (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (call (identifier_check_and_print) identifier_check_and_print (argument_list (call (attribute (identifier_DKCloudCommandRunner) identifier_DKCloudCommandRunner (identifier_create_kitchen) identifier_create_kitchen )attribute (argument_list (attribute (identifier_backend) identifier_backend (identifier_dki) identifier_dki )attribute (identifier_parent) identifier_parent (identifier_kitchen) identifier_kitchen )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (raise_statement (call (attribute (identifier_click) identifier_click (identifier_ClickException) identifier_ClickException )attribute (argument_list (binary_operator (string_'Cannot create a kitchen called %s') string_'Cannot create a kitchen called %s' (identifier_master) identifier_master )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Create a new kitchen
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_render) identifier_render )attribute (argument_list (string_'index.html') string_'index.html' (keyword_argument (identifier_databench_version) identifier_databench_version (identifier_DATABENCH_VERSION) identifier_DATABENCH_VERSION )keyword_argument (keyword_argument (identifier_meta_infos) identifier_meta_infos (call (attribute (identifier_self) identifier_self (identifier_meta_infos) identifier_meta_infos )attribute (argument_list )argument_list )call )keyword_argument (dictionary_splat (attribute (identifier_self) identifier_self (identifier_info) identifier_info )attribute )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Render the List-of-Analyses overview page.
(module (function_definition (function_name_has_pending) function_name_has_pending (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_pending) identifier_pending )attribute (block (return_statement (True) True )return_statement )block )if_statement (for_statement (identifier_pending) identifier_pending (call (attribute (attribute (identifier_self) identifier_self (identifier_node2pending) identifier_node2pending )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (if_statement (identifier_pending) identifier_pending (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Return True if there are pending test items This indicates that collection has finished and nodes are still processing test items, so this can be thought of as "the scheduler is active".
(module (function_definition (function_name__generic_hook) function_name__generic_hook (parameters (identifier_self) identifier_self (identifier_name) identifier_name (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_entries) identifier_entries (list_comprehension (identifier_entry) identifier_entry (for_in_clause (identifier_entry) identifier_entry (call (attribute (attribute (identifier_self) identifier_self (identifier__plugin_manager) identifier__plugin_manager )attribute (identifier_call_hook) identifier_call_hook )attribute (argument_list (identifier_name) identifier_name (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )for_in_clause (if_clause (comparison_operator (identifier_entry) identifier_entry (None) None )comparison_operator )if_clause )list_comprehension )assignment )expression_statement (return_statement (call (attribute (string_"\n") string_"\n" (identifier_join) identifier_join )attribute (argument_list (identifier_entries) identifier_entries )argument_list )call )return_statement )block )function_definition )module
A generic hook that links the TemplateHelper with PluginManager
(module (function_definition (function_name_get_attributes) function_name_get_attributes (parameters (identifier_aspect) identifier_aspect (identifier_id) identifier_id )parameters (block (expression_statement (assignment (identifier_attributes) identifier_attributes (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_entry) identifier_entry (identifier_aspect) identifier_aspect (block (if_statement (comparison_operator (subscript (identifier_entry) identifier_entry (string_'po') string_'po' )subscript (identifier_id) identifier_id )comparison_operator (block (expression_statement (assignment (subscript (identifier_attributes) identifier_attributes (subscript (identifier_entry) identifier_entry (string_'n') string_'n' )subscript )subscript (subscript (identifier_entry) identifier_entry (string_'v') string_'v' )subscript )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_attributes) identifier_attributes )return_statement )block )function_definition )module
Return the attributes pointing to a given ID in a given aspect.
(module (function_definition (function_name_hash_bytes) function_name_hash_bytes (parameters (identifier_key) identifier_key (default_parameter (identifier_seed) identifier_seed (integer_0x0) integer_0x0 )default_parameter (default_parameter (identifier_x64arch) identifier_x64arch (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_hash_128) identifier_hash_128 (call (identifier_hash128) identifier_hash128 (argument_list (identifier_key) identifier_key (identifier_seed) identifier_seed (identifier_x64arch) identifier_x64arch )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bytestring) identifier_bytestring (string_'') string_'' )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_xrange) identifier_xrange (argument_list (integer_0) integer_0 (integer_16) integer_16 (integer_1) integer_1 )argument_list )call (block (expression_statement (assignment (identifier_lsbyte) identifier_lsbyte (binary_operator (identifier_hash_128) identifier_hash_128 (integer_0xFF) integer_0xFF )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_bytestring) identifier_bytestring (binary_operator (identifier_bytestring) identifier_bytestring (call (identifier_str) identifier_str (argument_list (call (identifier_chr) identifier_chr (argument_list (identifier_lsbyte) identifier_lsbyte )argument_list )call )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_hash_128) identifier_hash_128 (binary_operator (identifier_hash_128) identifier_hash_128 (integer_8) integer_8 )binary_operator )assignment )expression_statement )block )for_statement (return_statement (identifier_bytestring) identifier_bytestring )return_statement )block )function_definition )module
Implements 128bit murmur3 hash. Returns a byte string.
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_lookup) identifier_lookup (call (attribute (identifier_self) identifier_self (identifier_with_respect_to) identifier_with_respect_to )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_lookup) identifier_lookup (string_"_order__gte") string_"_order__gte" )subscript (attribute (identifier_self) identifier_self (identifier__order) identifier__order )attribute )assignment )expression_statement (expression_statement (assignment (identifier_concrete_model) identifier_concrete_model (call (identifier_base_concrete_model) identifier_base_concrete_model (argument_list (identifier_Orderable) identifier_Orderable (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_after) identifier_after (call (attribute (attribute (identifier_concrete_model) identifier_concrete_model (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (dictionary_splat (identifier_lookup) identifier_lookup )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_after) identifier_after (identifier_update) identifier_update )attribute (argument_list (keyword_argument (identifier__order) identifier__order (binary_operator (call (attribute (identifier_models) identifier_models (identifier_F) identifier_F )attribute (argument_list (string_"_order") string_"_order" )argument_list )call (integer_1) integer_1 )binary_operator )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_Orderable) identifier_Orderable (identifier_self) identifier_self )argument_list )call (identifier_delete) identifier_delete )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Update the ordering values for siblings.
(module (function_definition (function_name_remove_configurable) function_name_remove_configurable (parameters (identifier_self) identifier_self (identifier_configurable_class) identifier_configurable_class (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_configurable_class_name) identifier_configurable_class_name (call (attribute (attribute (identifier_configurable_class) identifier_configurable_class (identifier___name__) identifier___name__ )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"Removing %s: '%s'") string_"Removing %s: '%s'" (identifier_configurable_class_name) identifier_configurable_class_name (identifier_name) identifier_name )argument_list )call )expression_statement (expression_statement (assignment (identifier_registry) identifier_registry (call (attribute (identifier_self) identifier_self (identifier_registry_for) identifier_registry_for )attribute (argument_list (identifier_configurable_class) identifier_configurable_class )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_name) identifier_name (identifier_registry) identifier_registry )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warn) identifier_warn )attribute (argument_list (string_"Tried to remove unknown active %s: '%s'") string_"Tried to remove unknown active %s: '%s'" (identifier_configurable_class_name) identifier_configurable_class_name (identifier_name) identifier_name )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_hook) identifier_hook (call (attribute (identifier_self) identifier_self (identifier_hook_for) identifier_hook_for )attribute (argument_list (identifier_configurable_class) identifier_configurable_class (keyword_argument (identifier_action) identifier_action (string_"remove") string_"remove" )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_hook) identifier_hook )not_operator (block (expression_statement (call (attribute (identifier_registry) identifier_registry (identifier_pop) identifier_pop )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (function_definition (function_name_done) function_name_done (parameters (identifier_f) identifier_f )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_result) identifier_result )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_registry) identifier_registry (identifier_pop) identifier_pop )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_exception) identifier_exception )attribute (argument_list (string_"Error removing configurable '%s'") string_"Error removing configurable '%s'" (identifier_name) identifier_name )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition (expression_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_work_pool) identifier_work_pool )attribute (identifier_submit) identifier_submit )attribute (argument_list (identifier_hook) identifier_hook (identifier_name) identifier_name )argument_list )call (identifier_add_done_callback) identifier_add_done_callback )attribute (argument_list (identifier_done) identifier_done )argument_list )call )expression_statement )block )function_definition )module
Callback fired when a configurable instance is removed. Looks up the existing configurable in the proper "registry" and removes it. If a method named "on_<configurable classname>_remove" is defined it is called via the work pooland passed the configurable's name. If the removed configurable is not present, a warning is given and no further action is taken.
(module (function_definition (function_name_get_contact_from_id) function_name_get_contact_from_id (parameters (identifier_self) identifier_self (identifier_contact_id) identifier_contact_id )parameters (block (expression_statement (assignment (identifier_contact) identifier_contact (call (attribute (attribute (identifier_self) identifier_self (identifier_wapi_functions) identifier_wapi_functions )attribute (identifier_getContact) identifier_getContact )attribute (argument_list (identifier_contact_id) identifier_contact_id )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_contact) identifier_contact (None) None )comparison_operator (block (raise_statement (call (identifier_ContactNotFoundError) identifier_ContactNotFoundError (argument_list (call (attribute (string_"Contact {0} not found") string_"Contact {0} not found" (identifier_format) identifier_format )attribute (argument_list (identifier_contact_id) identifier_contact_id )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_Contact) identifier_Contact (argument_list (identifier_contact) identifier_contact (identifier_self) identifier_self )argument_list )call )return_statement )block )function_definition )module
Fetches a contact given its ID :param contact_id: Contact ID :type contact_id: str :return: Contact or Error :rtype: Contact
(module (function_definition (function_name_units) function_name_units (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (attribute (identifier_self) identifier_self (identifier__units) identifier__units )attribute (identifier_value) identifier_value )pattern_list (call (attribute (identifier_self) identifier_self (identifier_get_attr_string) identifier_get_attr_string )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__units) identifier__units )attribute (string_'units') string_'units' )argument_list )call )assignment )expression_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
Returns the units of the measured value for the current mode. May return empty string
(module (function_definition (function_name_scan) function_name_scan (parameters (identifier_context) identifier_context (identifier_root_dir) identifier_root_dir )parameters (block (expression_statement (assignment (identifier_root_dir) identifier_root_dir (boolean_operator (identifier_root_dir) identifier_root_dir (subscript (attribute (identifier_context) identifier_context (identifier_obj) identifier_obj )attribute (string_'root') string_'root' )subscript )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_config_files) identifier_config_files (call (attribute (call (identifier_Path) identifier_Path (argument_list (identifier_root_dir) identifier_root_dir )argument_list )call (identifier_glob) identifier_glob )attribute (argument_list (string_'*/analysis/*_config.yaml') string_'*/analysis/*_config.yaml' )argument_list )call )assignment )expression_statement (for_statement (identifier_config_file) identifier_config_file (identifier_config_files) identifier_config_files (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_debug) identifier_debug )attribute (argument_list (string_"found analysis config: %s") string_"found analysis config: %s" (identifier_config_file) identifier_config_file )argument_list )call )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_config_file) identifier_config_file (identifier_open) identifier_open )attribute (argument_list )argument_list )call (as_pattern_target (identifier_stream) identifier_stream )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_context) identifier_context (identifier_invoke) identifier_invoke )attribute (argument_list (identifier_log_cmd) identifier_log_cmd (keyword_argument (identifier_config) identifier_config (identifier_stream) identifier_stream )keyword_argument (keyword_argument (identifier_quiet) identifier_quiet (True) True )keyword_argument )argument_list )call )expression_statement )block )with_statement )block )for_statement (expression_statement (call (attribute (subscript (attribute (identifier_context) identifier_context (identifier_obj) identifier_obj )attribute (string_'store') string_'store' )subscript (identifier_track_update) identifier_track_update )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Scan a directory for analyses.
(module (function_definition (function_name_WSGIMimeRender) function_name_WSGIMimeRender (parameters (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (function_definition (function_name_wrapper) function_name_wrapper (parameters (list_splat_pattern (identifier_args2) identifier_args2 )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs2) identifier_kwargs2 )dictionary_splat_pattern )parameters (block (function_definition (function_name_wrapped) function_name_wrapped (parameters (identifier_f) identifier_f )parameters (block (return_statement (call (call (call (identifier__WSGIMimeRender) identifier__WSGIMimeRender (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (argument_list (list_splat (identifier_args2) identifier_args2 )list_splat (dictionary_splat (identifier_kwargs2) identifier_kwargs2 )dictionary_splat )argument_list )call (argument_list (call (identifier_wsgi_wrap) identifier_wsgi_wrap (argument_list (identifier_f) identifier_f )argument_list )call )argument_list )call )return_statement )block )function_definition (return_statement (identifier_wrapped) identifier_wrapped )return_statement )block )function_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
A wrapper for _WSGIMimeRender that wrapps the inner callable with wsgi_wrap first.
(module (function_definition (function_name_focus_right) function_name_focus_right (parameters (identifier_pymux) identifier_pymux )parameters (block (expression_statement (string_" Move focus to the right. ") string_" Move focus to the right. " )expression_statement (expression_statement (call (identifier__move_focus) identifier__move_focus (argument_list (identifier_pymux) identifier_pymux (lambda (lambda_parameters (identifier_wp) identifier_wp )lambda_parameters (binary_operator (binary_operator (attribute (identifier_wp) identifier_wp (identifier_xpos) identifier_xpos )attribute (attribute (identifier_wp) identifier_wp (identifier_width) identifier_width )attribute )binary_operator (integer_1) integer_1 )binary_operator )lambda (lambda (lambda_parameters (identifier_wp) identifier_wp )lambda_parameters (attribute (identifier_wp) identifier_wp (identifier_ypos) identifier_ypos )attribute )lambda )argument_list )call )expression_statement )block )function_definition )module
Move focus to the right.
(module (function_definition (function_name__get_value) function_name__get_value (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__aux_variable) identifier__aux_variable )attribute (block (return_statement (call (subscript (attribute (identifier_self) identifier_self (identifier__aux_variable) identifier__aux_variable )attribute (string_'law') string_'law' )subscript (argument_list (attribute (subscript (attribute (identifier_self) identifier_self (identifier__aux_variable) identifier__aux_variable )attribute (string_'variable') string_'variable' )subscript (identifier_value) identifier_value )attribute )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__transformation) identifier__transformation )attribute (None) None )comparison_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier__internal_value) identifier__internal_value )attribute )return_statement )block (else_clause (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__transformation) identifier__transformation )attribute (identifier_backward) identifier_backward )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__internal_value) identifier__internal_value )attribute )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Return current parameter value
(module (function_definition (function_name__build_cmd) function_name__build_cmd (parameters (identifier_self) identifier_self (typed_parameter (identifier_args) identifier_args (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_list) identifier_list )type (type (identifier_tuple) identifier_tuple )type )type_parameter )generic_type )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_cmd) identifier_cmd (list (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )list )assignment )expression_statement (expression_statement (call (attribute (identifier_cmd) identifier_cmd (identifier_extend) identifier_extend )attribute (argument_list (identifier_args) identifier_args )argument_list )call )expression_statement (return_statement (identifier_cmd) identifier_cmd )return_statement )block )function_definition )module
Build command.
(module (function_definition (function_name_number) function_name_number (parameters (identifier_items) identifier_items )parameters (block (expression_statement (assignment (identifier_n) identifier_n (call (identifier_len) identifier_len (argument_list (identifier_items) identifier_items )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_n) identifier_n (integer_0) integer_0 )comparison_operator (block (return_statement (identifier_items) identifier_items )return_statement )block )if_statement (expression_statement (assignment (identifier_places) identifier_places (call (identifier_str) identifier_str (argument_list (call (identifier_int) identifier_int (argument_list (binary_operator (binary_operator (call (attribute (identifier_math) identifier_math (identifier_log10) identifier_log10 )attribute (argument_list (identifier_n) identifier_n )argument_list )call (integer_1) integer_1 )binary_operator (integer_1) integer_1 )binary_operator )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_format) identifier_format (binary_operator (binary_operator (string_'[{0[0]:') string_'[{0[0]:' (call (identifier_str) identifier_str (argument_list (call (identifier_int) identifier_int (argument_list (identifier_places) identifier_places )argument_list )call )argument_list )call )binary_operator (string_'d}] {0[1]}') string_'d}] {0[1]}' )binary_operator )assignment )expression_statement (return_statement (call (identifier_map) identifier_map (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (call (attribute (identifier_format) identifier_format (identifier_format) identifier_format )attribute (argument_list (identifier_x) identifier_x )argument_list )call )lambda (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_items) identifier_items )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Maps numbering onto given values
(module (function_definition (function_name_register) function_name_register (parameters (identifier_self) identifier_self (identifier_identified_with) identifier_identified_with (identifier_identifier) identifier_identifier (identifier_user) identifier_user )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_kv_store) identifier_kv_store )attribute (identifier_set) identifier_set )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__get_storage_key) identifier__get_storage_key )attribute (argument_list (identifier_identified_with) identifier_identified_with (identifier_identifier) identifier_identifier )argument_list )call (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_serialization) identifier_serialization )attribute (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_user) identifier_user )argument_list )call (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Register new key for given client identifier. This is only a helper method that allows to register new user objects for client identities (keys, tokens, addresses etc.). Args: identified_with (object): authentication middleware used to identify the user. identifier (str): user identifier. user (str): user object to be stored in the backend.
(module (function_definition (function_name_run_deps) function_name_run_deps (parameters (identifier_self) identifier_self (identifier_conf) identifier_conf (identifier_images) identifier_images )parameters (block (for_statement (pattern_list (identifier_dependency_name) identifier_dependency_name (identifier_detached) identifier_detached )pattern_list (call (attribute (identifier_conf) identifier_conf (identifier_dependency_images) identifier_dependency_images )attribute (argument_list (keyword_argument (identifier_for_running) identifier_for_running (True) True )keyword_argument )argument_list )call (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_run_container) identifier_run_container )attribute (argument_list (subscript (identifier_images) identifier_images (identifier_dependency_name) identifier_dependency_name )subscript (identifier_images) identifier_images (keyword_argument (identifier_detach) identifier_detach (identifier_detached) identifier_detached )keyword_argument (keyword_argument (identifier_dependency) identifier_dependency (True) True )keyword_argument )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (raise_statement (call (identifier_BadImage) identifier_BadImage (argument_list (string_"Failed to start dependency container") string_"Failed to start dependency container" (keyword_argument (identifier_image) identifier_image (attribute (identifier_conf) identifier_conf (identifier_name) identifier_name )attribute )keyword_argument (keyword_argument (identifier_dependency) identifier_dependency (identifier_dependency_name) identifier_dependency_name )keyword_argument (keyword_argument (identifier_error) identifier_error (identifier_error) identifier_error )keyword_argument )argument_list )call )raise_statement )block )except_clause )try_statement )block )for_statement )block )function_definition )module
Start containers for all our dependencies
(module (function_definition (function_name_get_value) function_name_get_value (parameters (identifier_self) identifier_self (identifier_name) identifier_name (default_parameter (identifier_parameters) identifier_parameters (None) None )default_parameter )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_parameters) identifier_parameters (identifier_dict) identifier_dict )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"parameters must a dict") string_"parameters must a dict" )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier__cache) identifier__cache )attribute )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_hash) identifier_hash (call (attribute (identifier_self) identifier_self (identifier__parameter_hash) identifier__parameter_hash )attribute (argument_list (identifier_parameters) identifier_parameters )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_hashdigest) identifier_hashdigest (call (attribute (identifier_hash) identifier_hash (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__cache) identifier__cache )attribute (identifier_name) identifier_name )subscript (identifier_get) identifier_get )attribute (argument_list (identifier_hashdigest) identifier_hashdigest (None) None )argument_list )call )return_statement )block )function_definition )module
Return the value of a cached variable if applicable The value of the variable 'name' is returned, if no parameters are passed or if all parameters are identical to the ones stored for the variable. :param str name: Name of teh variable :param dict parameters: Current parameters or None if parameters do not matter :return: The cached value of the variable or None if the parameters differ
(module (function_definition (function_name_textile) function_name_textile (parameters (identifier_value) identifier_value )parameters (block (try_statement (block (import_statement (dotted_name (identifier_textile) identifier_textile )dotted_name )import_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (string_"The Python textile library isn't installed.") string_"The Python textile library isn't installed." (identifier_RuntimeWarning) identifier_RuntimeWarning )argument_list )call )expression_statement (return_statement (identifier_value) identifier_value )return_statement )block )except_clause )try_statement (return_statement (call (attribute (identifier_textile) identifier_textile (identifier_textile) identifier_textile )attribute (argument_list (call (identifier_force_text) identifier_force_text (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Textile processing.
(module (function_definition (function_name_compute_position) function_name_compute_position (parameters (identifier_self) identifier_self (identifier_layout) identifier_layout )parameters (block (expression_statement (assignment (identifier_params) identifier_params (call (attribute (attribute (identifier_self) identifier_self (identifier_position) identifier_position )attribute (identifier_setup_params) identifier_setup_params )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (attribute (identifier_self) identifier_self (identifier_position) identifier_position )attribute (identifier_setup_data) identifier_setup_data )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_params) identifier_params )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (attribute (identifier_self) identifier_self (identifier_position) identifier_position )attribute (identifier_compute_layer) identifier_compute_layer )attribute (argument_list (identifier_data) identifier_data (identifier_params) identifier_params (identifier_layout) identifier_layout )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_data) identifier_data )assignment )expression_statement )block )function_definition )module
Compute the position of each geometric object in concert with the other objects in the panel
(module (function_definition (function_name_get_ordered_tokens_from_vocab) function_name_get_ordered_tokens_from_vocab (parameters (typed_parameter (identifier_vocab) identifier_vocab (type (identifier_Vocab) identifier_Vocab )type )typed_parameter )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type (block (return_statement (list_comprehension (identifier_token) identifier_token (for_in_clause (pattern_list (identifier_token) identifier_token (identifier_token_id) identifier_token_id )pattern_list (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (identifier_vocab) identifier_vocab (identifier_items) identifier_items )attribute (argument_list )argument_list )call (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_i) identifier_i )lambda_parameters (subscript (identifier_i) identifier_i (integer_1) integer_1 )subscript )lambda )keyword_argument )argument_list )call )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Returns the list of tokens in a vocabulary, ordered by increasing vocabulary id. :param vocab: Input vocabulary. :return: List of tokens.
(module (function_definition (function_name_dns_encode) function_name_dns_encode (parameters (identifier_x) identifier_x (default_parameter (identifier_check_built) identifier_check_built (False) False )default_parameter )parameters (block (if_statement (boolean_operator (not_operator (identifier_x) identifier_x )not_operator (comparison_operator (identifier_x) identifier_x (string_b".") string_b"." )comparison_operator )boolean_operator (block (return_statement (string_b"\x00") string_b"\x00" )return_statement )block )if_statement (if_statement (boolean_operator (boolean_operator (identifier_check_built) identifier_check_built (comparison_operator (string_b".") string_b"." (identifier_x) identifier_x )comparison_operator )boolean_operator (parenthesized_expression (boolean_operator (comparison_operator (call (identifier_orb) identifier_orb (argument_list (subscript (identifier_x) identifier_x (unary_operator (integer_1) integer_1 )unary_operator )subscript )argument_list )call (integer_0) integer_0 )comparison_operator (comparison_operator (parenthesized_expression (binary_operator (call (identifier_orb) identifier_orb (argument_list (subscript (identifier_x) identifier_x (unary_operator (integer_2) integer_2 )unary_operator )subscript )argument_list )call (integer_0xc0) integer_0xc0 )binary_operator )parenthesized_expression (integer_0xc0) integer_0xc0 )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (block (return_statement (identifier_x) identifier_x )return_statement )block )if_statement (expression_statement (assignment (identifier_x) identifier_x (call (attribute (string_b"") string_b"" (identifier_join) identifier_join )attribute (generator_expression (binary_operator (call (identifier_chb) identifier_chb (argument_list (call (identifier_len) identifier_len (argument_list (identifier_y) identifier_y )argument_list )call )argument_list )call (identifier_y) identifier_y )binary_operator (for_in_clause (identifier_y) identifier_y (generator_expression (subscript (identifier_k) identifier_k (slice (colon) colon (integer_63) integer_63 )slice )subscript (for_in_clause (identifier_k) identifier_k (call (attribute (identifier_x) identifier_x (identifier_split) identifier_split )attribute (argument_list (string_b".") string_b"." )argument_list )call )for_in_clause )generator_expression )for_in_clause )generator_expression )call )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_x) identifier_x (slice (unary_operator (integer_1) integer_1 )unary_operator (colon) colon )slice )subscript (string_b"\x00") string_b"\x00" )comparison_operator (block (expression_statement (augmented_assignment (identifier_x) identifier_x (string_b"\x00") string_b"\x00" )augmented_assignment )expression_statement )block )if_statement (return_statement (identifier_x) identifier_x )return_statement )block )function_definition )module
Encodes a bytes string into the DNS format :param x: the string :param check_built: detect already-built strings and ignore them :returns: the encoded bytes string
(module (function_definition (function_name_fetch) function_name_fetch (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_params) identifier_params (call (attribute (identifier_values) identifier_values (identifier_of) identifier_of )attribute (argument_list (dictionary )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_payload) identifier_payload (call (attribute (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_fetch) identifier_fetch )attribute (argument_list (string_'GET') string_'GET' (attribute (identifier_self) identifier_self (identifier__uri) identifier__uri )attribute (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_BalanceInstance) identifier_BalanceInstance (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_payload) identifier_payload (keyword_argument (identifier_account_sid) identifier_account_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'account_sid') string_'account_sid' )subscript )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Fetch a BalanceInstance :returns: Fetched BalanceInstance :rtype: twilio.rest.api.v2010.account.balance.BalanceInstance
(module (function_definition (function_name_toc) function_name_toc (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_output) identifier_output (list )list )assignment )expression_statement (for_statement (identifier_key) identifier_key (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_catalog) identifier_catalog )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_edition) identifier_edition (subscript (subscript (attribute (identifier_self) identifier_self (identifier_catalog) identifier_catalog )attribute (identifier_key) identifier_key )subscript (string_'edition') string_'edition' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_length) identifier_length (call (identifier_len) identifier_len (argument_list (subscript (subscript (attribute (identifier_self) identifier_self (identifier_catalog) identifier_catalog )attribute (identifier_key) identifier_key )subscript (string_'transliteration') string_'transliteration' )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_output) identifier_output (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_"Pnum: {key}, Edition: {edition}, length: {length} line(s)") string_"Pnum: {key}, Edition: {edition}, length: {length} line(s)" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_edition) identifier_edition (identifier_edition) identifier_edition )keyword_argument (keyword_argument (identifier_length) identifier_length (identifier_length) identifier_length )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_output) identifier_output )return_statement )block )function_definition )module
Returns a rich list of texts in the catalog.
(module (function_definition (function_name_fetch_all_droplets) function_name_fetch_all_droplets (parameters (identifier_self) identifier_self (default_parameter (identifier_tag_name) identifier_tag_name (None) None )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_tag_name) identifier_tag_name (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_"tag_name") string_"tag_name" )subscript (call (identifier_str) identifier_str (argument_list (identifier_tag_name) identifier_tag_name )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (identifier_map) identifier_map (argument_list (attribute (identifier_self) identifier_self (identifier__droplet) identifier__droplet )attribute (call (attribute (identifier_self) identifier_self (identifier_paginate) identifier_paginate )attribute (argument_list (string_'/v2/droplets') string_'/v2/droplets' (string_'droplets') string_'droplets' (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )argument_list )call )return_statement )block )function_definition )module
r""" Returns a generator that yields all of the droplets belonging to the account .. versionchanged:: 0.2.0 ``tag_name`` parameter added :param tag_name: if non-`None`, only droplets with the given tag are returned :type tag_name: string or `Tag` :rtype: generator of `Droplet`\ s :raises DOAPIError: if the API endpoint replies with an error
(module (function_definition (function_name_on) function_name_on (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_on_command) identifier_on_command (call (identifier_StandardSend) identifier_StandardSend (argument_list (attribute (identifier_self) identifier_self (identifier__address) identifier__address )attribute (identifier_COMMAND_LIGHT_ON_0X11_NONE) identifier_COMMAND_LIGHT_ON_0X11_NONE (integer_0xff) integer_0xff )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__send_method) identifier__send_method )attribute (argument_list (identifier_on_command) identifier_on_command (attribute (identifier_self) identifier_self (identifier__on_message_received) identifier__on_message_received )attribute )argument_list )call )expression_statement )block )function_definition )module
Send ON command to device.
(module (function_definition (function_name_get_random_connection) function_name_get_random_connection (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__available_connections) identifier__available_connections )attribute (block (expression_statement (assignment (identifier_node_name) identifier_node_name (call (attribute (identifier_random) identifier_random (identifier_choice) identifier_choice )attribute (argument_list (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__available_connections) identifier__available_connections )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_conn_list) identifier_conn_list (subscript (attribute (identifier_self) identifier_self (identifier__available_connections) identifier__available_connections )attribute (identifier_node_name) identifier_node_name )subscript )assignment )expression_statement (if_statement (identifier_conn_list) identifier_conn_list (block (return_statement (call (attribute (identifier_conn_list) identifier_conn_list (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )return_statement )block )if_statement )block )if_statement (for_statement (identifier_node) identifier_node (call (attribute (attribute (identifier_self) identifier_self (identifier_nodes) identifier_nodes )attribute (identifier_random_startup_node_iter) identifier_random_startup_node_iter )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_connection) identifier_connection (call (attribute (identifier_self) identifier_self (identifier_get_connection_by_node) identifier_get_connection_by_node )attribute (argument_list (identifier_node) identifier_node )argument_list )call )assignment )expression_statement (if_statement (identifier_connection) identifier_connection (block (return_statement (identifier_connection) identifier_connection )return_statement )block )if_statement )block )for_statement (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"Cant reach a single startup node.") string_"Cant reach a single startup node." )argument_list )call )raise_statement )block )function_definition )module
Open new connection to random redis server.
(module (function_definition (function_name_set_units_property) function_name_set_units_property (parameters (identifier_self) identifier_self (keyword_separator )keyword_separator (default_parameter (identifier_unit_ids) identifier_unit_ids (None) None )default_parameter (identifier_property_name) identifier_property_name (identifier_values) identifier_values )parameters (block (if_statement (comparison_operator (identifier_unit_ids) identifier_unit_ids (None) None )comparison_operator (block (expression_statement (assignment (identifier_unit_ids) identifier_unit_ids (call (attribute (identifier_self) identifier_self (identifier_get_unit_ids) identifier_get_unit_ids )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_unit) identifier_unit )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_unit_ids) identifier_unit_ids )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_set_unit_property) identifier_set_unit_property )attribute (argument_list (keyword_argument (identifier_unit_id) identifier_unit_id (identifier_unit) identifier_unit )keyword_argument (keyword_argument (identifier_property_name) identifier_property_name (identifier_property_name) identifier_property_name )keyword_argument (keyword_argument (identifier_value) identifier_value (subscript (identifier_values) identifier_values (identifier_i) identifier_i )subscript )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Sets unit property data for a list of units Parameters ---------- unit_ids: list The list of unit ids for which the property will be set Defaults to get_unit_ids() property_name: str The name of the property value: list The list of values to be set
(module (function_definition (function_name_make_processors) function_name_make_processors (parameters (dictionary_splat_pattern (identifier_config) identifier_config )dictionary_splat_pattern )parameters (block (global_statement (identifier_processors) identifier_processors )global_statement (if_statement (identifier_processors) identifier_processors (block (return_statement )return_statement )block )if_statement (import_statement (dotted_name (identifier_pkg_resources) identifier_pkg_resources )dotted_name )import_statement (expression_statement (assignment (identifier_processors) identifier_processors (list )list )assignment )expression_statement (for_statement (identifier_processor) identifier_processor (call (attribute (identifier_pkg_resources) identifier_pkg_resources (identifier_iter_entry_points) identifier_iter_entry_points )attribute (argument_list (string_'fedmsg.meta') string_'fedmsg.meta' )argument_list )call (block (try_statement (block (expression_statement (call (attribute (identifier_processors) identifier_processors (identifier_append) identifier_append )attribute (argument_list (call (call (attribute (identifier_processor) identifier_processor (identifier_load) identifier_load )attribute (argument_list )argument_list )call (argument_list (identifier__) identifier__ (dictionary_splat (identifier_config) identifier_config )dictionary_splat )argument_list )call )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warn) identifier_warn )attribute (argument_list (binary_operator (string_"Failed to load %r processor.") string_"Failed to load %r processor." (attribute (identifier_processor) identifier_processor (identifier_name) identifier_name )attribute )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_exception) identifier_exception )attribute (argument_list (identifier_e) identifier_e )argument_list )call )expression_statement )block )except_clause )try_statement )block )for_statement (expression_statement (call (attribute (identifier_processors) identifier_processors (identifier_append) identifier_append )attribute (argument_list (call (identifier_DefaultProcessor) identifier_DefaultProcessor (argument_list (identifier__) identifier__ (dictionary_splat (identifier_config) identifier_config )dictionary_splat )argument_list )call )argument_list )call )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_processors) identifier_processors )argument_list )call (integer_3) integer_3 )comparison_operator (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warn) identifier_warn )attribute (argument_list (string_"No fedmsg.meta plugins found. fedmsg.meta.msg2* crippled") string_"No fedmsg.meta plugins found. fedmsg.meta.msg2* crippled" )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Initialize all of the text processors. You'll need to call this once before using any of the other functions in this module. >>> import fedmsg.config >>> import fedmsg.meta >>> config = fedmsg.config.load_config([], None) >>> fedmsg.meta.make_processors(**config) >>> text = fedmsg.meta.msg2repr(some_message_dict, **config)
(module (function_definition (function_name_dfilter) function_name_dfilter (parameters (identifier_fn) identifier_fn (identifier_record) identifier_record )parameters (block (return_statement (call (identifier_dict) identifier_dict (argument_list (list_comprehension (tuple (identifier_k) identifier_k (identifier_v) identifier_v )tuple (for_in_clause (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_record) identifier_record (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause (if_clause (call (identifier_fn) identifier_fn (argument_list (identifier_v) identifier_v )argument_list )call )if_clause )list_comprehension )argument_list )call )return_statement )block )function_definition )module
filter for a directory :param fn: A predicate function :param record: a dict :returns: a dict >>> odd = lambda x: x % 2 != 0 >>> dfilter(odd, {'Terry': 30, 'Graham': 35, 'John': 27}) {'John': 27, 'Graham': 35}
(module (function_definition (function_name__events) function_name__events (parameters (identifier_self) identifier_self (identifier_using_url) identifier_using_url (default_parameter (identifier_filters) identifier_filters (None) None )default_parameter (default_parameter (identifier_limit) identifier_limit (None) None )default_parameter )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_limit) identifier_limit (tuple (identifier_int) identifier_int (identifier_NoneType) identifier_NoneType )tuple )argument_list )call )not_operator (block (expression_statement (assignment (identifier_limit) identifier_limit (None) None )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_filters) identifier_filters (None) None )comparison_operator (block (expression_statement (assignment (identifier_filters) identifier_filters (list )list )assignment )expression_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_filters) identifier_filters (identifier_string_types) identifier_string_types )argument_list )call (block (expression_statement (assignment (identifier_filters) identifier_filters (call (attribute (identifier_filters) identifier_filters (identifier_split) identifier_split )attribute (argument_list (string_',') string_',' )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_blocking) identifier_blocking )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_blocking) identifier_blocking )attribute (True) True )assignment )expression_statement )block )if_statement (while_statement (attribute (identifier_self) identifier_self (identifier_blocking) identifier_blocking )attribute (block (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'since') string_'since' (attribute (identifier_self) identifier_self (identifier__last_seen_id) identifier__last_seen_id )attribute )pair (pair (string_'limit') string_'limit' (identifier_limit) identifier_limit )pair )dictionary )assignment )expression_statement (if_statement (identifier_filters) identifier_filters (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'events') string_'events' )subscript (call (attribute (string_',') string_',' (identifier_join) identifier_join )attribute (argument_list (call (identifier_map) identifier_map (argument_list (identifier_str) identifier_str (identifier_filters) identifier_filters )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (identifier_using_url) identifier_using_url (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_raw_exceptions) identifier_raw_exceptions (True) True )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (tuple (identifier_ConnectTimeout) identifier_ConnectTimeout (identifier_ConnectionError) identifier_ConnectionError )tuple (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_data) identifier_data (None) None )assignment )expression_statement )block )except_clause (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (identifier_reraise) identifier_reraise (argument_list (string_'') string_'' (identifier_e) identifier_e )argument_list )call )expression_statement )block )except_clause )try_statement (if_statement (identifier_data) identifier_data (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__last_seen_id) identifier__last_seen_id )attribute (subscript (subscript (identifier_data) identifier_data (unary_operator (integer_1) integer_1 )unary_operator )subscript (string_'id') string_'id' )subscript )assignment )expression_statement (for_statement (identifier_event) identifier_event (identifier_data) identifier_data (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__count) identifier__count )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (yield (identifier_event) identifier_event )yield )expression_statement )block )for_statement )block )if_statement )block )while_statement )block )function_definition )module
A long-polling method that queries Syncthing for events.. Args: using_url (str): REST HTTP endpoint filters (List[str]): Creates an "event group" in Syncthing to only receive events that have been subscribed to. limit (int): The number of events to query in the history to catch up to the current state. Returns: generator[dict]
(module (function_definition (function_name_timeout) function_name_timeout (parameters (identifier_delay) identifier_delay (default_parameter (identifier_handler) identifier_handler (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_delay) identifier_delay (call (identifier_int) identifier_int (argument_list (identifier_delay) identifier_delay )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_handler) identifier_handler (None) None )comparison_operator (block (function_definition (function_name_default_handler) function_name_default_handler (parameters (identifier_signum) identifier_signum (identifier_frame) identifier_frame )parameters (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (call (attribute (string_"{:d} seconds timeout expired") string_"{:d} seconds timeout expired" (identifier_format) identifier_format )attribute (argument_list (identifier_delay) identifier_delay )argument_list )call )argument_list )call )raise_statement )block )function_definition (expression_statement (assignment (identifier_handler) identifier_handler (identifier_default_handler) identifier_default_handler )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_prev_sigalrm_handler) identifier_prev_sigalrm_handler (call (attribute (identifier_signal) identifier_signal (identifier_getsignal) identifier_getsignal )attribute (argument_list (attribute (identifier_signal) identifier_signal (identifier_SIGALRM) identifier_SIGALRM )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_signal) identifier_signal (identifier_signal) identifier_signal )attribute (argument_list (attribute (identifier_signal) identifier_signal (identifier_SIGALRM) identifier_SIGALRM )attribute (identifier_handler) identifier_handler )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_signal) identifier_signal (identifier_alarm) identifier_alarm )attribute (argument_list (identifier_delay) identifier_delay )argument_list )call )expression_statement (expression_statement (yield )yield )expression_statement (expression_statement (call (attribute (identifier_signal) identifier_signal (identifier_alarm) identifier_alarm )attribute (argument_list (integer_0) integer_0 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_signal) identifier_signal (identifier_signal) identifier_signal )attribute (argument_list (attribute (identifier_signal) identifier_signal (identifier_SIGALRM) identifier_SIGALRM )attribute (identifier_prev_sigalrm_handler) identifier_prev_sigalrm_handler )argument_list )call )expression_statement )block )function_definition )module
Context manager to run code and deliver a SIGALRM signal after `delay` seconds. Note that `delay` must be a whole number; otherwise it is converted to an integer by Python's `int()` built-in function. For floating-point numbers, that means rounding off to the nearest integer from below. If the optional argument `handler` is supplied, it must be a callable that is invoked if the alarm triggers while the code is still running. If no `handler` is provided (default), then a `RuntimeError` with message ``Timeout`` is raised.
(module (function_definition (function_name_result) function_name_result (parameters (identifier_self) identifier_self (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__blocking_poll) identifier__blocking_poll )attribute (argument_list (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__exception) identifier__exception )attribute (None) None )comparison_operator (block (raise_statement (attribute (identifier_self) identifier_self (identifier__exception) identifier__exception )attribute )raise_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__result) identifier__result )attribute )return_statement )block )function_definition )module
Get the result of the operation, blocking if necessary. Args: timeout (int): How long (in seconds) to wait for the operation to complete. If None, wait indefinitely. Returns: google.protobuf.Message: The Operation's result. Raises: google.api_core.GoogleAPICallError: If the operation errors or if the timeout is reached before the operation completes.
(module (function_definition (function_name__get_label_uuid) function_name__get_label_uuid (parameters (identifier_xapi) identifier_xapi (identifier_rectype) identifier_rectype (identifier_label) identifier_label )parameters (block (try_statement (block (return_statement (subscript (call (attribute (call (identifier_getattr) identifier_getattr (argument_list (identifier_xapi) identifier_xapi (identifier_rectype) identifier_rectype )argument_list )call (identifier_get_by_name_label) identifier_get_by_name_label )attribute (argument_list (identifier_label) identifier_label )argument_list )call (integer_0) integer_0 )subscript )return_statement )block (except_clause (identifier_Exception) identifier_Exception (block (return_statement (False) False )return_statement )block )except_clause )try_statement )block )function_definition )module
Internal, returns label's uuid
(module (function_definition (function_name_get_msg_count_info) function_name_get_msg_count_info (parameters (identifier_self) identifier_self (default_parameter (identifier_channel) identifier_channel (attribute (identifier_Channel) identifier_Channel (identifier_CHANNEL_CH0) identifier_CHANNEL_CH0 )attribute )default_parameter )parameters (block (expression_statement (assignment (identifier_msg_count_info) identifier_msg_count_info (call (identifier_MsgCountInfo) identifier_MsgCountInfo (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_UcanGetMsgCountInfoEx) identifier_UcanGetMsgCountInfoEx (argument_list (attribute (identifier_self) identifier_self (identifier__handle) identifier__handle )attribute (identifier_channel) identifier_channel (call (identifier_byref) identifier_byref (argument_list (identifier_msg_count_info) identifier_msg_count_info )argument_list )call )argument_list )call )expression_statement (return_statement (expression_list (attribute (identifier_msg_count_info) identifier_msg_count_info (identifier_sent_msg_count) identifier_sent_msg_count )attribute (attribute (identifier_msg_count_info) identifier_msg_count_info (identifier_recv_msg_count) identifier_recv_msg_count )attribute )expression_list )return_statement )block )function_definition )module
Reads the message counters of the specified CAN channel. :param int channel: CAN channel, which is to be used (:data:`Channel.CHANNEL_CH0` or :data:`Channel.CHANNEL_CH1`). :return: Tuple with number of CAN messages sent and received. :rtype: tuple(int, int)
(module (function_definition (function_name_get_licenses) function_name_get_licenses (parameters (identifier_service_instance) identifier_service_instance (default_parameter (identifier_license_manager) identifier_license_manager (None) None )default_parameter )parameters (block (if_statement (not_operator (identifier_license_manager) identifier_license_manager )not_operator (block (expression_statement (assignment (identifier_license_manager) identifier_license_manager (call (identifier_get_license_manager) identifier_get_license_manager (argument_list (identifier_service_instance) identifier_service_instance )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'Retrieving licenses') string_'Retrieving licenses' )argument_list )call )expression_statement (try_statement (block (return_statement (attribute (identifier_license_manager) identifier_license_manager (identifier_licenses) identifier_licenses )attribute )return_statement )block (except_clause (as_pattern (attribute (attribute (identifier_vim) identifier_vim (identifier_fault) identifier_fault )attribute (identifier_NoPermission) identifier_NoPermission )attribute (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_exception) identifier_exception )attribute (argument_list (identifier_exc) identifier_exc )argument_list )call )expression_statement (raise_statement (call (attribute (attribute (identifier_salt) identifier_salt (identifier_exceptions) identifier_exceptions )attribute (identifier_VMwareApiError) identifier_VMwareApiError )attribute (argument_list (call (attribute (concatenated_string (string_'Not enough permissions. Required privilege: ') string_'Not enough permissions. Required privilege: ' (string_'{0}') string_'{0}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_exc) identifier_exc (identifier_privilegeId) identifier_privilegeId )attribute )argument_list )call )argument_list )call )raise_statement )block )except_clause (except_clause (as_pattern (attribute (attribute (identifier_vim) identifier_vim (identifier_fault) identifier_fault )attribute (identifier_VimFault) identifier_VimFault )attribute (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_exception) identifier_exception )attribute (argument_list (identifier_exc) identifier_exc )argument_list )call )expression_statement (raise_statement (call (attribute (attribute (identifier_salt) identifier_salt (identifier_exceptions) identifier_exceptions )attribute (identifier_VMwareApiError) identifier_VMwareApiError )attribute (argument_list (attribute (identifier_exc) identifier_exc (identifier_msg) identifier_msg )attribute )argument_list )call )raise_statement )block )except_clause (except_clause (as_pattern (attribute (identifier_vmodl) identifier_vmodl (identifier_RuntimeFault) identifier_RuntimeFault )attribute (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_exception) identifier_exception )attribute (argument_list (identifier_exc) identifier_exc )argument_list )call )expression_statement (raise_statement (call (attribute (attribute (identifier_salt) identifier_salt (identifier_exceptions) identifier_exceptions )attribute (identifier_VMwareRuntimeError) identifier_VMwareRuntimeError )attribute (argument_list (attribute (identifier_exc) identifier_exc (identifier_msg) identifier_msg )attribute )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Returns the licenses on a specific instance. service_instance The Service Instance Object from which to obrain the licenses. license_manager The License Manager object of the service instance. If not provided it will be retrieved.
(module (function_definition (function_name_remove_user) function_name_remove_user (parameters (identifier_self) identifier_self (identifier_user) identifier_user (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_user) identifier_user (identifier_Entity) identifier_Entity )argument_list )call (block (expression_statement (assignment (identifier_user) identifier_user (subscript (identifier_user) identifier_user (string_'id') string_'id' )subscript )assignment )expression_statement )block )if_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_user) identifier_user (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call )assert_statement (expression_statement (assignment (identifier_endpoint) identifier_endpoint (call (attribute (string_'{0}/{1}/users/{2}') string_'{0}/{1}/users/{2}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_endpoint) identifier_endpoint )attribute (subscript (identifier_self) identifier_self (string_'id') string_'id' )subscript (identifier_user) identifier_user )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (argument_list (string_'DELETE') string_'DELETE' (keyword_argument (identifier_endpoint) identifier_endpoint (identifier_endpoint) identifier_endpoint )keyword_argument (keyword_argument (identifier_query_params) identifier_query_params (identifier_kwargs) identifier_kwargs )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Remove a user from this team.
(module (function_definition (function_name_get_keybinding) function_name_get_keybinding (parameters (identifier_self) identifier_self (identifier_mode) identifier_mode (identifier_key) identifier_key )parameters (block (expression_statement (assignment (identifier_cmdline) identifier_cmdline (None) None )assignment )expression_statement (expression_statement (assignment (identifier_bindings) identifier_bindings (attribute (identifier_self) identifier_self (identifier__bindings) identifier__bindings )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_key) identifier_key (attribute (identifier_bindings) identifier_bindings (identifier_scalars) identifier_scalars )attribute )comparison_operator (block (expression_statement (assignment (identifier_cmdline) identifier_cmdline (subscript (identifier_bindings) identifier_bindings (identifier_key) identifier_key )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_mode) identifier_mode (attribute (identifier_bindings) identifier_bindings (identifier_sections) identifier_sections )attribute )comparison_operator (block (if_statement (comparison_operator (identifier_key) identifier_key (attribute (subscript (identifier_bindings) identifier_bindings (identifier_mode) identifier_mode )subscript (identifier_scalars) identifier_scalars )attribute )comparison_operator (block (expression_statement (assignment (identifier_value) identifier_value (subscript (subscript (identifier_bindings) identifier_bindings (identifier_mode) identifier_mode )subscript (identifier_key) identifier_key )subscript )assignment )expression_statement (if_statement (identifier_value) identifier_value (block (expression_statement (assignment (identifier_cmdline) identifier_cmdline (identifier_value) identifier_value )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_cmdline) identifier_cmdline (None) None )assignment )expression_statement )block )else_clause )if_statement )block )if_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_cmdline) identifier_cmdline (identifier_list) identifier_list )argument_list )call (block (expression_statement (assignment (identifier_cmdline) identifier_cmdline (call (attribute (string_',') string_',' (identifier_join) identifier_join )attribute (argument_list (identifier_cmdline) identifier_cmdline )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_cmdline) identifier_cmdline )return_statement )block )function_definition )module
look up keybinding from `MODE-maps` sections :param mode: mode identifier :type mode: str :param key: urwid-style key identifier :type key: str :returns: a command line to be applied upon keypress :rtype: str
(module (function_definition (function_name_devices) function_name_devices (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_verify_integrity) identifier_verify_integrity )attribute (argument_list )argument_list )call )expression_statement (if_statement (call (attribute (identifier_session) identifier_session (identifier_get) identifier_get )attribute (argument_list (string_'u2f_device_management_authorized') string_'u2f_device_management_authorized' (False) False )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_request) identifier_request (identifier_method) identifier_method )attribute (string_'GET') string_'GET' )comparison_operator (block (return_statement (expression_list (call (identifier_jsonify) identifier_jsonify (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_devices) identifier_get_devices )attribute (argument_list )argument_list )call )argument_list )call (integer_200) integer_200 )expression_list )return_statement )block (elif_clause (comparison_operator (attribute (identifier_request) identifier_request (identifier_method) identifier_method )attribute (string_'DELETE') string_'DELETE' )comparison_operator (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier_remove_device) identifier_remove_device )attribute (argument_list (attribute (identifier_request) identifier_request (identifier_json) identifier_json )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_response) identifier_response (string_'status') string_'status' )subscript (string_'ok') string_'ok' )comparison_operator (block (return_statement (expression_list (call (identifier_jsonify) identifier_jsonify (argument_list (identifier_response) identifier_response )argument_list )call (integer_200) integer_200 )expression_list )return_statement )block (else_clause (block (return_statement (expression_list (call (identifier_jsonify) identifier_jsonify (argument_list (identifier_response) identifier_response )argument_list )call (integer_404) integer_404 )expression_list )return_statement )block )else_clause )if_statement )block )elif_clause )if_statement )block )if_statement (return_statement (expression_list (call (identifier_jsonify) identifier_jsonify (argument_list (dictionary (pair (string_'status') string_'status' (string_'failed') string_'failed' )pair (pair (string_'error') string_'error' (string_'Unauthorized!') string_'Unauthorized!' )pair )dictionary )argument_list )call (integer_401) integer_401 )expression_list )return_statement )block )function_definition )module
Manages users enrolled u2f devices