sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name__parse) function_name__parse (parameters (identifier_self) identifier_self (identifier_line) identifier_line )parameters (block (try_statement (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list (string_':') string_':' (keyword_argument (identifier_maxsplit) identifier_maxsplit (integer_4) integer_4 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_filename) identifier_filename (identifier_line_num_txt) identifier_line_num_txt (identifier_column_txt) identifier_column_txt (identifier_message_type) identifier_message_type (identifier_text) identifier_text )pattern_list (identifier_result) identifier_result )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (return_statement )return_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_line_num) identifier_line_num )attribute (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_line_num_txt) identifier_line_num_txt (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_column) identifier_column )attribute (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_column_txt) identifier_column_txt (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (return_statement )return_statement )block )except_clause )try_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_filename) identifier_filename )attribute (identifier_filename) identifier_filename )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_message_type) identifier_message_type )attribute (call (attribute (identifier_message_type) identifier_message_type (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_text) identifier_text )attribute (call (attribute (identifier_text) identifier_text (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_valid) identifier_valid )attribute (True) True )assignment )expression_statement )block )function_definition )module
Parse the output line
(module (function_definition (function_name_content_type) function_name_content_type (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__content_type) identifier__content_type )attribute (call (identifier_str) identifier_str (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_header) identifier_add_header )attribute (argument_list (string_'Content-Type') string_'Content-Type' (call (identifier_str) identifier_str (argument_list (identifier_data) identifier_data )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
The Content-Type header value for this request.
(module (function_definition (function_name__construct_permission) function_name__construct_permission (parameters (identifier_self) identifier_self (identifier_function) identifier_function (default_parameter (identifier_source_arn) identifier_source_arn (None) None )default_parameter (default_parameter (identifier_source_account) identifier_source_account (None) None )default_parameter (default_parameter (identifier_suffix) identifier_suffix (string_"") string_"" )default_parameter (default_parameter (identifier_event_source_token) identifier_event_source_token (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_lambda_permission) identifier_lambda_permission (call (identifier_LambdaPermission) identifier_LambdaPermission (argument_list (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_logical_id) identifier_logical_id )attribute (string_'Permission') string_'Permission' )binary_operator (identifier_suffix) identifier_suffix )binary_operator (keyword_argument (identifier_attributes) identifier_attributes (call (attribute (identifier_function) identifier_function (identifier_get_passthrough_resource_attributes) identifier_get_passthrough_resource_attributes )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_function_name_or_arn) identifier_function_name_or_arn (call (attribute (identifier_function) identifier_function (identifier_get_runtime_attr) identifier_get_runtime_attr )attribute (argument_list (string_"name") string_"name" )argument_list )call )assignment )expression_statement )block (except_clause (identifier_NotImplementedError) identifier_NotImplementedError (block (expression_statement (assignment (identifier_function_name_or_arn) identifier_function_name_or_arn (call (attribute (identifier_function) identifier_function (identifier_get_runtime_attr) identifier_get_runtime_attr )attribute (argument_list (string_"arn") string_"arn" )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (attribute (identifier_lambda_permission) identifier_lambda_permission (identifier_Action) identifier_Action )attribute (string_'lambda:invokeFunction') string_'lambda:invokeFunction' )assignment )expression_statement (expression_statement (assignment (attribute (identifier_lambda_permission) identifier_lambda_permission (identifier_FunctionName) identifier_FunctionName )attribute (identifier_function_name_or_arn) identifier_function_name_or_arn )assignment )expression_statement (expression_statement (assignment (attribute (identifier_lambda_permission) identifier_lambda_permission (identifier_Principal) identifier_Principal )attribute (attribute (identifier_self) identifier_self (identifier_principal) identifier_principal )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_lambda_permission) identifier_lambda_permission (identifier_SourceArn) identifier_SourceArn )attribute (identifier_source_arn) identifier_source_arn )assignment )expression_statement (expression_statement (assignment (attribute (identifier_lambda_permission) identifier_lambda_permission (identifier_SourceAccount) identifier_SourceAccount )attribute (identifier_source_account) identifier_source_account )assignment )expression_statement (expression_statement (assignment (attribute (identifier_lambda_permission) identifier_lambda_permission (identifier_EventSourceToken) identifier_EventSourceToken )attribute (identifier_event_source_token) identifier_event_source_token )assignment )expression_statement (return_statement (identifier_lambda_permission) identifier_lambda_permission )return_statement )block )function_definition )module
Constructs the Lambda Permission resource allowing the source service to invoke the function this event source triggers. :returns: the permission resource :rtype: model.lambda_.LambdaPermission
(module (function_definition (function_name_validate_body) function_name_validate_body (parameters (identifier_schema) identifier_schema )parameters (block (expression_statement (assignment (identifier_location) identifier_location (call (identifier_get_callsite_location) identifier_get_callsite_location (argument_list )argument_list )call )assignment )expression_statement (function_definition (function_name_decorator) function_name_decorator (parameters (identifier_fn) identifier_fn )parameters (block (expression_statement (call (identifier_validate_schema) identifier_validate_schema (argument_list (identifier_schema) identifier_schema )argument_list )call )expression_statement (expression_statement (assignment (identifier_wrapper) identifier_wrapper (call (identifier_wrap_request) identifier_wrap_request (argument_list (identifier_fn) identifier_fn (identifier_schema) identifier_schema )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_record_schemas) identifier_record_schemas (argument_list (identifier_fn) identifier_fn (identifier_wrapper) identifier_wrapper (identifier_location) identifier_location (keyword_argument (identifier_request_schema) identifier_request_schema (call (identifier_sort_schema) identifier_sort_schema (argument_list (identifier_schema) identifier_schema )argument_list )call )keyword_argument )argument_list )call )expression_statement (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition (return_statement (identifier_decorator) identifier_decorator )return_statement )block )function_definition )module
Validate the body of incoming requests for a flask view. An example usage might look like this:: from snapstore_schemas import validate_body @validate_body({ 'type': 'array', 'items': { 'type': 'object', 'properties': { 'snap_id': {'type': 'string'}, 'series': {'type': 'string'}, 'name': {'type': 'string'}, 'title': {'type': 'string'}, 'keywords': { 'type': 'array', 'items': {'type': 'string'} }, 'summary': {'type': 'string'}, 'description': {'type': 'string'}, 'created_at': {'type': 'string'}, }, 'required': ['snap_id', 'series'], 'additionalProperties': False } }) def my_flask_view(): # view code here return "Hello World", 200 All incoming request that have been routed to this view will be matched against the specified schema. If the request body does not match the schema an instance of `DataValidationError` will be raised. By default this will cause the flask application to return a 500 response, but this can be customised by telling flask how to handle these exceptions. The exception instance has an 'error_list' attribute that contains a list of all the errors encountered while processing the request body.
(module (function_definition (function_name_show_dependencies) function_name_show_dependencies (parameters (identifier_self) identifier_self (default_parameter (identifier_stream) identifier_stream (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute )default_parameter )parameters (block (function_definition (function_name_child_iter) function_name_child_iter (parameters (identifier_node) identifier_node )parameters (block (return_statement (list_comprehension (attribute (identifier_d) identifier_d (identifier_node) identifier_node )attribute (for_in_clause (identifier_d) identifier_d (attribute (identifier_node) identifier_node (identifier_deps) identifier_deps )attribute )for_in_clause )list_comprehension )return_statement )block )function_definition (function_definition (function_name_text_str) function_name_text_str (parameters (identifier_node) identifier_node )parameters (block (return_statement (call (identifier_colored) identifier_colored (argument_list (call (identifier_str) identifier_str (argument_list (identifier_node) identifier_node )argument_list )call (keyword_argument (identifier_color) identifier_color (subscript (attribute (attribute (identifier_node) identifier_node (identifier_status) identifier_status )attribute (identifier_color_opts) identifier_color_opts )attribute (string_"color") string_"color" )subscript )keyword_argument )argument_list )call )return_statement )block )function_definition (for_statement (identifier_task) identifier_task (call (attribute (identifier_self) identifier_self (identifier_iflat_tasks) identifier_iflat_tasks )attribute (argument_list )argument_list )call (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (identifier_draw_tree) identifier_draw_tree (argument_list (identifier_task) identifier_task (identifier_child_iter) identifier_child_iter (identifier_text_str) identifier_text_str )argument_list )call (keyword_argument (identifier_file) identifier_file (identifier_stream) identifier_stream )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Writes to the given stream the ASCII representation of the dependency tree.
(module (function_definition (function_name__prepareSubForm) function_name__prepareSubForm (parameters (identifier_self) identifier_self (identifier_liveForm) identifier_liveForm )parameters (block (expression_statement (assignment (identifier_liveForm) identifier_liveForm (call (attribute (identifier_liveForm) identifier_liveForm (identifier_asSubForm) identifier_asSubForm )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__parameterIsCompact) identifier__parameterIsCompact )attribute (block (expression_statement (call (attribute (identifier_liveForm) identifier_liveForm (identifier_compact) identifier_compact )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_liveForm) identifier_liveForm )return_statement )block )function_definition )module
Utility for turning liveforms into subforms, and compacting them as necessary. @param liveForm: a liveform. @type liveForm: L{LiveForm} @return: a sub form. @rtype: L{LiveForm}
(module (function_definition (function_name_srv_event) function_name_srv_event (parameters (identifier_token) identifier_token (identifier_hits) identifier_hits (default_parameter (identifier_url) identifier_url (identifier_RBA_URL) identifier_RBA_URL )default_parameter )parameters (block (if_statement (comparison_operator (identifier_url) identifier_url (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (string_"Please provide a valid RainbowAlga URL.") string_"Please provide a valid RainbowAlga URL." )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_ws_url) identifier_ws_url (binary_operator (identifier_url) identifier_url (string_'/message') string_'/message' )binary_operator )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_hits) identifier_hits (attribute (attribute (attribute (identifier_pd) identifier_pd (identifier_core) identifier_core )attribute (identifier_frame) identifier_frame )attribute (identifier_DataFrame) identifier_DataFrame )attribute )argument_list )call (block (expression_statement (assignment (identifier_pos) identifier_pos (list_comprehension (call (identifier_tuple) identifier_tuple (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (attribute (subscript (identifier_hits) identifier_hits (list (string_'x') string_'x' (string_'y') string_'y' (string_'z') string_'z' )list )subscript (identifier_values) identifier_values )attribute )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_time) identifier_time (call (identifier_list) identifier_list (argument_list (subscript (identifier_hits) identifier_hits (string_'time') string_'time' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tot) identifier_tot (call (identifier_list) identifier_list (argument_list (subscript (identifier_hits) identifier_hits (string_'tot') string_'tot' )subscript )argument_list )call )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_hits) identifier_hits (identifier_Table) identifier_Table )argument_list )call (block (expression_statement (assignment (identifier_pos) identifier_pos (call (identifier_list) identifier_list (argument_list (call (identifier_zip) identifier_zip (argument_list (attribute (identifier_hits) identifier_hits (identifier_pos_x) identifier_pos_x )attribute (attribute (identifier_hits) identifier_hits (identifier_pos_y) identifier_pos_y )attribute (attribute (identifier_hits) identifier_hits (identifier_pos_z) identifier_pos_z )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_time) identifier_time (call (identifier_list) identifier_list (argument_list (attribute (identifier_hits) identifier_hits (identifier_time) identifier_time )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tot) identifier_tot (call (identifier_list) identifier_list (argument_list (attribute (identifier_hits) identifier_hits (identifier_tot) identifier_tot )attribute )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_"No calibration information found in hits (type: {0})") string_"No calibration information found in hits (type: {0})" (identifier_format) identifier_format )attribute (argument_list (call (identifier_type) identifier_type (argument_list (identifier_hits) identifier_hits )argument_list )call )argument_list )call )argument_list )call )expression_statement (return_statement )return_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_event) identifier_event (dictionary (pair (string_"hits") string_"hits" (dictionary (pair (string_'pos') string_'pos' (identifier_pos) identifier_pos )pair (pair (string_'time') string_'time' (identifier_time) identifier_time )pair (pair (string_'tot') string_'tot' (identifier_tot) identifier_tot )pair )dictionary )pair )dictionary )assignment )expression_statement (expression_statement (call (identifier_srv_data) identifier_srv_data (argument_list (identifier_ws_url) identifier_ws_url (identifier_token) identifier_token (identifier_event) identifier_event (string_'event') string_'event' )argument_list )call )expression_statement )block )function_definition )module
Serve event to RainbowAlga
(module (function_definition (function_name_nmf_tsne) function_name_nmf_tsne (parameters (identifier_data) identifier_data (identifier_k) identifier_k (default_parameter (identifier_n_runs) identifier_n_runs (integer_10) integer_10 )default_parameter (default_parameter (identifier_init) identifier_init (string_'enhanced') string_'enhanced' )default_parameter (dictionary_splat_pattern (identifier_params) identifier_params )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_clusters) identifier_clusters (list )list )assignment )expression_statement (expression_statement (assignment (identifier_nmf) identifier_nmf (call (identifier_NMF) identifier_NMF (argument_list (identifier_k) identifier_k )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tsne) identifier_tsne (call (identifier_TSNE) identifier_TSNE (argument_list (integer_2) integer_2 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_km) identifier_km (call (identifier_KMeans) identifier_KMeans (argument_list (identifier_k) identifier_k )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_n_runs) identifier_n_runs )argument_list )call (block (expression_statement (assignment (identifier_w) identifier_w (call (attribute (identifier_nmf) identifier_nmf (identifier_fit_transform) identifier_fit_transform )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_h) identifier_h (attribute (identifier_nmf) identifier_nmf (identifier_components_) identifier_components_ )attribute )assignment )expression_statement (expression_statement (assignment (identifier_tsne_wh) identifier_tsne_wh (call (attribute (identifier_tsne) identifier_tsne (identifier_fit_transform) identifier_fit_transform )attribute (argument_list (attribute (call (attribute (identifier_w) identifier_w (identifier_dot) identifier_dot )attribute (argument_list (identifier_h) identifier_h )argument_list )call (identifier_T) identifier_T )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_clust) identifier_clust (call (attribute (identifier_km) identifier_km (identifier_fit_predict) identifier_fit_predict )attribute (argument_list (identifier_tsne_wh) identifier_tsne_wh )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_clusters) identifier_clusters (identifier_append) identifier_append )attribute (argument_list (identifier_clust) identifier_clust )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_clusterings) identifier_clusterings (call (attribute (identifier_np) identifier_np (identifier_vstack) identifier_vstack )attribute (argument_list (identifier_clusters) identifier_clusters )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_consensus) identifier_consensus (call (attribute (identifier_CE) identifier_CE (identifier_cluster_ensembles) identifier_cluster_ensembles )attribute (argument_list (identifier_clusterings) identifier_clusterings (keyword_argument (identifier_verbose) identifier_verbose (False) False )keyword_argument (keyword_argument (identifier_N_clusters_max) identifier_N_clusters_max (identifier_k) identifier_k )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_nmf_new) identifier_nmf_new (call (identifier_NMF) identifier_NMF (argument_list (identifier_k) identifier_k (keyword_argument (identifier_init) identifier_init (string_'custom') string_'custom' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_init_w) identifier_init_w (identifier_init_h) identifier_init_h )pattern_list (call (identifier_nmf_init) identifier_nmf_init (argument_list (identifier_data) identifier_data (identifier_consensus) identifier_consensus (identifier_k) identifier_k (identifier_init) identifier_init )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_W) identifier_W (call (attribute (identifier_nmf_new) identifier_nmf_new (identifier_fit_transform) identifier_fit_transform )attribute (argument_list (identifier_data) identifier_data (keyword_argument (identifier_W) identifier_W (identifier_init_w) identifier_init_w )keyword_argument (keyword_argument (identifier_H) identifier_H (identifier_init_h) identifier_init_h )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_H) identifier_H (attribute (identifier_nmf_new) identifier_nmf_new (identifier_components_) identifier_components_ )attribute )assignment )expression_statement (return_statement (expression_list (identifier_W) identifier_W (identifier_H) identifier_H )expression_list )return_statement )block )function_definition )module
runs tsne-consensus-NMF 1. run a bunch of NMFs, get W and H 2. run tsne + km on all WH matrices 3. run consensus clustering on all km results 4. use consensus clustering as initialization for a new run of NMF 5. return the W and H from the resulting NMF run
(module (function_definition (function_name_update_redirect) function_name_update_redirect (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_page_history) identifier_page_history (call (identifier_Stack) identifier_Stack (argument_list (call (attribute (identifier_session) identifier_session (identifier_get) identifier_get )attribute (argument_list (string_"page_history") string_"page_history" (list )list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_page_history) identifier_page_history (identifier_push) identifier_push )attribute (argument_list (attribute (identifier_request) identifier_request (identifier_url) identifier_url )attribute )argument_list )call )expression_statement (expression_statement (assignment (subscript (identifier_session) identifier_session (string_"page_history") string_"page_history" )subscript (call (attribute (identifier_page_history) identifier_page_history (identifier_to_json) identifier_to_json )attribute (argument_list )argument_list )call )assignment )expression_statement )block )function_definition )module
Call it on your own endpoint's to update the back history navigation. If you bypass it, the next submit or back will go over it.
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (identifier_iteration) identifier_iteration (identifier_fobj) identifier_fobj )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_bst) identifier_bst )attribute (identifier_update) identifier_update )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_dtrain) identifier_dtrain )attribute (identifier_iteration) identifier_iteration (identifier_fobj) identifier_fobj )argument_list )call )expression_statement )block )function_definition )module
Update the boosters for one iteration
(module (function_definition (function_name_only_passed_and_wait) function_name_only_passed_and_wait (parameters (identifier_result) identifier_result )parameters (block (expression_statement (assignment (identifier_verdict) identifier_verdict (call (attribute (call (attribute (call (attribute (identifier_result) identifier_result (identifier_get) identifier_get )attribute (argument_list (string_"verdict") string_"verdict" (string_"") string_"" )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_verdict) identifier_verdict (binary_operator (attribute (identifier_Verdicts) identifier_Verdicts (identifier_PASS) identifier_PASS )attribute (attribute (identifier_Verdicts) identifier_Verdicts (identifier_WAIT) identifier_WAIT )attribute )binary_operator )comparison_operator (block (return_statement (identifier_result) identifier_result )return_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Returns PASS and WAIT results only, skips everything else.
(module (function_definition (function_name_queue_bind) function_name_queue_bind (parameters (identifier_self) identifier_self (identifier_queue) identifier_queue (identifier_exchange) identifier_exchange (identifier_routing_key) identifier_routing_key (default_parameter (identifier_arguments) identifier_arguments (None) None )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_channel) identifier_channel )attribute (identifier_queue_bind) identifier_queue_bind )attribute (argument_list (keyword_argument (identifier_queue) identifier_queue (identifier_queue) identifier_queue )keyword_argument (keyword_argument (identifier_exchange) identifier_exchange (identifier_exchange) identifier_exchange )keyword_argument (keyword_argument (identifier_routing_key) identifier_routing_key (identifier_routing_key) identifier_routing_key )keyword_argument (keyword_argument (identifier_arguments) identifier_arguments (identifier_arguments) identifier_arguments )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Bind queue to an exchange using a routing key.
(module (function_definition (function_name_disable_snapshots) function_name_disable_snapshots (parameters (identifier_self) identifier_self (identifier_volume_id) identifier_volume_id (identifier_schedule_type) identifier_schedule_type )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_call) identifier_call )attribute (argument_list (string_'Network_Storage') string_'Network_Storage' (string_'disableSnapshots') string_'disableSnapshots' (identifier_schedule_type) identifier_schedule_type (keyword_argument (identifier_id) identifier_id (identifier_volume_id) identifier_volume_id )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Disables snapshots for a specific block volume at a given schedule :param integer volume_id: The id of the volume :param string schedule_type: 'HOURLY'|'DAILY'|'WEEKLY' :return: Returns whether successfully disabled or not
(module (function_definition (function_name_rollaxis) function_name_rollaxis (parameters (identifier_vari) identifier_vari (identifier_axis) identifier_axis (default_parameter (identifier_start) identifier_start (integer_0) integer_0 )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_vari) identifier_vari (identifier_Poly) identifier_Poly )argument_list )call (block (expression_statement (assignment (identifier_core_old) identifier_core_old (call (attribute (attribute (identifier_vari) identifier_vari (identifier_A) identifier_A )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_core_new) identifier_core_new (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_key) identifier_key (attribute (identifier_vari) identifier_vari (identifier_keys) identifier_keys )attribute (block (expression_statement (assignment (subscript (identifier_core_new) identifier_core_new (identifier_key) identifier_key )subscript (call (identifier_rollaxis) identifier_rollaxis (argument_list (subscript (identifier_core_old) identifier_core_old (identifier_key) identifier_key )subscript (identifier_axis) identifier_axis (identifier_start) identifier_start )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (call (identifier_Poly) identifier_Poly (argument_list (identifier_core_new) identifier_core_new (attribute (identifier_vari) identifier_vari (identifier_dim) identifier_dim )attribute (None) None (attribute (identifier_vari) identifier_vari (identifier_dtype) identifier_dtype )attribute )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (identifier_numpy) identifier_numpy (identifier_rollaxis) identifier_rollaxis )attribute (argument_list (identifier_vari) identifier_vari (identifier_axis) identifier_axis (identifier_start) identifier_start )argument_list )call )return_statement )block )function_definition )module
Roll the specified axis backwards, until it lies in a given position. Args: vari (chaospy.poly.base.Poly, numpy.ndarray): Input array or polynomial. axis (int): The axis to roll backwards. The positions of the other axes do not change relative to one another. start (int): The axis is rolled until it lies before thes position.
(module (function_definition (function_name_format_endpoint) function_name_format_endpoint (parameters (identifier_schema) identifier_schema (identifier_addr) identifier_addr (identifier_port) identifier_port (identifier_api_version) identifier_api_version )parameters (block (return_statement (call (attribute (string_'{}://{}:{}/{}/') string_'{}://{}:{}/{}/' (identifier_format) identifier_format )attribute (argument_list (identifier_schema) identifier_schema (identifier_addr) identifier_addr (identifier_port) identifier_port (call (identifier_get_api_suffix) identifier_get_api_suffix (argument_list (identifier_api_version) identifier_api_version )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Return a formatted keystone endpoint @param schema: http or https @param addr: ipv4/ipv6 host of the keystone service @param port: port of the keystone service @param api_version: 2 or 3 @returns a fully formatted keystone endpoint
(module (function_definition (function_name__set_final_freeness) function_name__set_final_freeness (parameters (identifier_self) identifier_self (identifier_flag) identifier_flag )parameters (block (if_statement (identifier_flag) identifier_flag (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute (identifier_memory) identifier_memory )attribute (identifier_store) identifier_store )attribute (argument_list (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_heap_base) identifier_heap_base )attribute (attribute (identifier_self) identifier_self (identifier_heap_size) identifier_heap_size )attribute )binary_operator (attribute (identifier_self) identifier_self (identifier__chunk_size_t_size) identifier__chunk_size_t_size )attribute )binary_operator (unary_operator (identifier_CHUNK_P_MASK) identifier_CHUNK_P_MASK )unary_operator )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute (identifier_memory) identifier_memory )attribute (identifier_store) identifier_store )attribute (argument_list (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_heap_base) identifier_heap_base )attribute (attribute (identifier_self) identifier_self (identifier_heap_size) identifier_heap_size )attribute )binary_operator (attribute (identifier_self) identifier_self (identifier__chunk_size_t_size) identifier__chunk_size_t_size )attribute )binary_operator (identifier_CHUNK_P_MASK) identifier_CHUNK_P_MASK )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Sets the freedom of the final chunk. Since no proper chunk follows the final chunk, the heap itself manages this. Nonetheless, for now it is implemented as if an additional chunk followed the final chunk.
(module (function_definition (function_name__create_filter_dsl) function_name__create_filter_dsl (parameters (identifier_urlkwargs) identifier_urlkwargs (identifier_definitions) identifier_definitions )parameters (block (expression_statement (assignment (identifier_filters) identifier_filters (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_name) identifier_name (identifier_filter_factory) identifier_filter_factory )pattern_list (call (attribute (identifier_definitions) identifier_definitions (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_values) identifier_values (call (attribute (attribute (identifier_request) identifier_request (identifier_values) identifier_values )attribute (identifier_getlist) identifier_getlist )attribute (argument_list (identifier_name) identifier_name (keyword_argument (identifier_type) identifier_type (identifier_text_type) identifier_text_type )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_values) identifier_values (block (expression_statement (call (attribute (identifier_filters) identifier_filters (identifier_append) identifier_append )attribute (argument_list (call (identifier_filter_factory) identifier_filter_factory (argument_list (identifier_values) identifier_values )argument_list )call )argument_list )call )expression_statement (for_statement (identifier_v) identifier_v (identifier_values) identifier_values (block (expression_statement (call (attribute (identifier_urlkwargs) identifier_urlkwargs (identifier_add) identifier_add )attribute (argument_list (identifier_name) identifier_name (identifier_v) identifier_v )argument_list )call )expression_statement )block )for_statement )block )if_statement )block )for_statement (return_statement (tuple (identifier_filters) identifier_filters (identifier_urlkwargs) identifier_urlkwargs )tuple )return_statement )block )function_definition )module
Create a filter DSL expression.
(module (function_definition (function_name___generate_key) function_name___generate_key (parameters (identifier_self) identifier_self (identifier_config) identifier_config )parameters (block (expression_statement (assignment (identifier_cwd) identifier_cwd (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'ssh_path') string_'ssh_path' (call (attribute (identifier_self) identifier_self (identifier__install_directory) identifier__install_directory )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_config) identifier_config (identifier_is_affirmative) identifier_is_affirmative )attribute (argument_list (string_'create') string_'create' (keyword_argument (identifier_default) identifier_default (string_"yes") string_"yes" )keyword_argument )argument_list )call (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_cwd) identifier_cwd )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_cwd) identifier_cwd )argument_list )call )expression_statement )block )if_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_cwd) identifier_cwd (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'keyname') string_'keyname' )argument_list )call )argument_list )call )argument_list )call )not_operator (block (expression_statement (assignment (identifier_command) identifier_command (binary_operator (string_"ssh-keygen -t %(type)s -f %(keyname)s -N ") string_"ssh-keygen -t %(type)s -f %(keyname)s -N " (call (attribute (identifier_config) identifier_config (identifier_to_dict) identifier_to_dict )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_lib) identifier_lib (identifier_call) identifier_call )attribute (argument_list (identifier_command) identifier_command (keyword_argument (identifier_cwd) identifier_cwd (identifier_cwd) identifier_cwd )keyword_argument (keyword_argument (identifier_output_log_level) identifier_output_log_level (attribute (identifier_logging) identifier_logging (identifier_DEBUG) identifier_DEBUG )attribute )keyword_argument )argument_list )call )expression_statement )block )if_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_config) identifier_config (identifier_has) identifier_has )attribute (argument_list (string_'ssh_path') string_'ssh_path' )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_config) identifier_config (identifier_set) identifier_set )attribute (argument_list (string_'ssh_path') string_'ssh_path' (identifier_cwd) identifier_cwd )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_config) identifier_config (identifier_set) identifier_set )attribute (argument_list (string_'ssh_key_path') string_'ssh_key_path' (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'ssh_path') string_'ssh_path' )argument_list )call (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_'keyname') string_'keyname' )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Generate the ssh key, and return the ssh config location
(module (function_definition (function_name_destroy) function_name_destroy (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_stop) identifier_stop )attribute (argument_list )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_base_pathname) identifier_base_pathname )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__robust_remove) identifier__robust_remove )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_base_pathname) identifier_base_pathname )attribute )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Undo the effects of initdb. Destroy all evidence of this DBMS, including its backing files.
(module (function_definition (function_name__extract_image_urls) function_name__extract_image_urls (parameters (typed_parameter (identifier_arg) identifier_arg (type (identifier_Message_T) identifier_Message_T )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 (expression_statement (assignment (identifier_arg_as_msg) identifier_arg_as_msg (call (identifier_Message) identifier_Message (argument_list (identifier_arg) identifier_arg )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (subscript (attribute (identifier_s) identifier_s (identifier_data) identifier_data )attribute (string_'url') string_'url' )subscript (for_in_clause (identifier_s) identifier_s (identifier_arg_as_msg) identifier_arg_as_msg )for_in_clause (if_clause (boolean_operator (comparison_operator (attribute (identifier_s) identifier_s (identifier_type) identifier_type )attribute (string_'image') string_'image' )comparison_operator (comparison_operator (string_'url') string_'url' (attribute (identifier_s) identifier_s (identifier_data) identifier_data )attribute )comparison_operator )boolean_operator )if_clause )list_comprehension )return_statement )block )function_definition )module
Extract all image urls from a message-like object.
(module (function_definition (function_name_iterpackages) function_name_iterpackages (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_pkgdir) identifier_pkgdir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__path) identifier__path )attribute (attribute (identifier_self) identifier_self (identifier_PKG_DIR) identifier_PKG_DIR )attribute )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isdir) identifier_isdir )attribute (argument_list (identifier_pkgdir) identifier_pkgdir )argument_list )call )not_operator (block (return_statement )return_statement )block )if_statement (for_statement (identifier_team) identifier_team (call (identifier_sub_dirs) identifier_sub_dirs (argument_list (identifier_pkgdir) identifier_pkgdir )argument_list )call (block (for_statement (identifier_user) identifier_user (call (identifier_sub_dirs) identifier_sub_dirs (argument_list (call (attribute (identifier_self) identifier_self (identifier_team_path) identifier_team_path )attribute (argument_list (identifier_team) identifier_team )argument_list )call )argument_list )call (block (for_statement (identifier_pkg) identifier_pkg (call (identifier_sub_dirs) identifier_sub_dirs (argument_list (call (attribute (identifier_self) identifier_self (identifier_user_path) identifier_user_path )attribute (argument_list (identifier_team) identifier_team (identifier_user) identifier_user )argument_list )call )argument_list )call (block (expression_statement (assignment (identifier_pkgpath) identifier_pkgpath (call (attribute (identifier_self) identifier_self (identifier_package_path) identifier_package_path )attribute (argument_list (identifier_team) identifier_team (identifier_user) identifier_user (identifier_pkg) identifier_pkg )argument_list )call )assignment )expression_statement (for_statement (identifier_hsh) identifier_hsh (call (identifier_sub_files) identifier_sub_files (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_pkgpath) identifier_pkgpath (attribute (identifier_PackageStore) identifier_PackageStore (identifier_CONTENTS_DIR) identifier_CONTENTS_DIR )attribute )argument_list )call )argument_list )call (block (expression_statement (yield (call (attribute (identifier_self) identifier_self (identifier_get_package) identifier_get_package )attribute (argument_list (identifier_team) identifier_team (identifier_user) identifier_user (identifier_pkg) identifier_pkg (keyword_argument (identifier_pkghash) identifier_pkghash (identifier_hsh) identifier_hsh )keyword_argument )argument_list )call )yield )expression_statement )block )for_statement )block )for_statement )block )for_statement )block )for_statement )block )function_definition )module
Return an iterator over all the packages in the PackageStore.
(module (function_definition (function_name__handle_aui) function_name__handle_aui (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_msg) identifier_msg (call (identifier_AUIMessage) identifier_AUIMessage (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_on_aui_message) identifier_on_aui_message )attribute (argument_list (keyword_argument (identifier_message) identifier_message (identifier_msg) identifier_msg )keyword_argument )argument_list )call )expression_statement (return_statement (identifier_msg) identifier_msg )return_statement )block )function_definition )module
Handle AUI messages. :param data: RF message to parse :type data: string :returns: :py:class`~alarmdecoder.messages.AUIMessage`
(module (function_definition (function_name_set_attributes) function_name_set_attributes (parameters (identifier_self) identifier_self (default_parameter (identifier_attr_obj) identifier_attr_obj (None) None )default_parameter (default_parameter (identifier_ns_uri) identifier_ns_uri (None) None )default_parameter (dictionary_splat_pattern (identifier_attr_dict) identifier_attr_dict )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set_element_attributes) identifier__set_element_attributes )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_impl_node) identifier_impl_node )attribute (keyword_argument (identifier_attr_obj) identifier_attr_obj (identifier_attr_obj) identifier_attr_obj )keyword_argument (keyword_argument (identifier_ns_uri) identifier_ns_uri (identifier_ns_uri) identifier_ns_uri )keyword_argument (dictionary_splat (identifier_attr_dict) identifier_attr_dict )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Add or update this element's attributes, where attributes can be specified in a number of ways. :param attr_obj: a dictionary or list of attribute name/value pairs. :type attr_obj: dict, list, tuple, or None :param ns_uri: a URI defining a namespace for the new attributes. :type ns_uri: string or None :param dict attr_dict: attribute name and values specified as keyword arguments.
(module (function_definition (function_name_filter_content_types) function_name_filter_content_types (parameters (identifier_self) identifier_self (identifier_content_type_qs) identifier_content_type_qs )parameters (block (expression_statement (assignment (identifier_valid_ct_ids) identifier_valid_ct_ids (list )list )assignment )expression_statement (for_statement (identifier_ct) identifier_ct (identifier_content_type_qs) identifier_content_type_qs (block (expression_statement (assignment (identifier_model) identifier_model (call (attribute (identifier_ct) identifier_ct (identifier_model_class) identifier_model_class )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_model) identifier_model (call (identifier_issubclass) identifier_issubclass (argument_list (identifier_model) identifier_model (identifier_EventBase) identifier_EventBase )argument_list )call )boolean_operator (block (expression_statement (call (attribute (identifier_valid_ct_ids) identifier_valid_ct_ids (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_ct) identifier_ct (identifier_id) identifier_id )attribute )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (call (attribute (identifier_content_type_qs) identifier_content_type_qs (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_pk__in) identifier_pk__in (identifier_valid_ct_ids) identifier_valid_ct_ids )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Filter the content types selectable to only event subclasses
(module (function_definition (function_name_instances_changed) function_name_instances_changed (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_bool) identifier_bool (argument_list (call (attribute (identifier_lib) identifier_lib (identifier_EnvGetInstancesChanged) identifier_EnvGetInstancesChanged )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__env) identifier__env )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_lib) identifier_lib (identifier_EnvSetInstancesChanged) identifier_EnvSetInstancesChanged )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__env) identifier__env )attribute (call (identifier_int) identifier_int (argument_list (False) False )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
True if any instance has changed.
(module (function_definition (function_name_on) function_name_on (parameters (identifier_self) identifier_self (identifier_event) identifier_event )parameters (block (expression_statement (assignment (identifier_handler) identifier_handler (call (attribute (attribute (identifier_self) identifier_self (identifier__handlers) identifier__handlers )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_event) identifier_event (None) None )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_handler) identifier_handler )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Unknown event '{}'") string_"Unknown event '{}'" (identifier_format) identifier_format )attribute (argument_list (identifier_event) identifier_event )argument_list )call )argument_list )call )raise_statement )block )if_statement (return_statement (attribute (identifier_handler) identifier_handler (identifier_register) identifier_register )attribute )return_statement )block )function_definition )module
Returns a wrapper for the given event. Usage: @dispatch.on("my_event") def handle_my_event(foo, bar, baz): ...
(module (function_definition (function_name_get_matrix_from_list) function_name_get_matrix_from_list (parameters (identifier_self) identifier_self (identifier_rows) identifier_rows (identifier_columns) identifier_columns (identifier_matrix_list) identifier_matrix_list (default_parameter (identifier_rowBased) identifier_rowBased (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_resultMatrix) identifier_resultMatrix (call (identifier_Matrix) identifier_Matrix (argument_list (identifier_columns) identifier_columns (identifier_rows) identifier_rows (identifier_matrix_list) identifier_matrix_list (identifier_rowBased) identifier_rowBased )argument_list )call )assignment )expression_statement (return_statement (identifier_resultMatrix) identifier_resultMatrix )return_statement )block )function_definition )module
Create a new Matrix instance from a matrix_list. :note: This method is used to create a Matrix instance using cpython. :param integer rows: The height of the Matrix. :param integer columns: The width of the Matrix. :param matrix_list: A one dimensional list containing the values for Matrix. Depending on the rowBased parameter, either the rows are combined or the columns. :param rowBased Boolean: Only necessary if the oneDimArray is given. Indicates whether the oneDimArray combines rows together (rowBased=True) or columns (rowBased=False).
(module (function_definition (function_name_set_location) function_name_set_location (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj (identifier_cursor) identifier_cursor )parameters (block (if_statement (parenthesized_expression (boolean_operator (boolean_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_cursor) identifier_cursor (string_'location') string_'location' )argument_list )call (comparison_operator (attribute (identifier_cursor) identifier_cursor (identifier_location) identifier_location )attribute (None) None )comparison_operator )boolean_operator (comparison_operator (attribute (attribute (identifier_cursor) identifier_cursor (identifier_location) identifier_location )attribute (identifier_file) identifier_file )attribute (None) None )comparison_operator )boolean_operator )parenthesized_expression (block (expression_statement (assignment (attribute (identifier_obj) identifier_obj (identifier_location) identifier_location )attribute (tuple (attribute (attribute (attribute (identifier_cursor) identifier_cursor (identifier_location) identifier_location )attribute (identifier_file) identifier_file )attribute (identifier_name) identifier_name )attribute (attribute (attribute (identifier_cursor) identifier_cursor (identifier_location) identifier_location )attribute (identifier_line) identifier_line )attribute )tuple )assignment )expression_statement )block )if_statement (return_statement )return_statement )block )function_definition )module
Location is also used for codegeneration ordering.
(module (function_definition (function_name_render_template) function_name_render_template (parameters (identifier_process) identifier_process (identifier_template_string) identifier_template_string (identifier_context) identifier_context )parameters (block (import_from_statement (dotted_name (identifier_resolwe) identifier_resolwe (identifier_flow) identifier_flow (identifier_managers) identifier_managers )dotted_name (dotted_name (identifier_manager) identifier_manager )dotted_name )import_from_statement (expression_statement (assignment (identifier_expression_engine) identifier_expression_engine (call (attribute (attribute (identifier_process) identifier_process (identifier_requirements) identifier_requirements )attribute (identifier_get) identifier_get )attribute (argument_list (string_'expression-engine') string_'expression-engine' (None) None )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_expression_engine) identifier_expression_engine )not_operator (block (return_statement (identifier_template_string) identifier_template_string )return_statement )block )if_statement (return_statement (call (attribute (call (attribute (identifier_manager) identifier_manager (identifier_get_expression_engine) identifier_get_expression_engine )attribute (argument_list (identifier_expression_engine) identifier_expression_engine )argument_list )call (identifier_evaluate_block) identifier_evaluate_block )attribute (argument_list (identifier_template_string) identifier_template_string (identifier_context) identifier_context )argument_list )call )return_statement )block )function_definition )module
Render template using the specified expression engine.
(module (function_definition (function_name_instance) function_name_instance (parameters (identifier_cls) identifier_cls (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwgs) identifier_kwgs )dictionary_splat_pattern )parameters (block (if_statement (not_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_cls) identifier_cls (string_"_instance") string_"_instance" )argument_list )call )not_operator (block (expression_statement (assignment (attribute (identifier_cls) identifier_cls (identifier__instance) identifier__instance )attribute (call (identifier_cls) identifier_cls (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwgs) identifier_kwgs )dictionary_splat )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_cls) identifier_cls (identifier__instance) identifier__instance )attribute )return_statement )block )function_definition )module
Will be the only instance
(module (function_definition (function_name_findNestedNamespaces) function_name_findNestedNamespaces (parameters (identifier_self) identifier_self (identifier_lst) identifier_lst )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_kind) identifier_kind )attribute (string_"namespace") string_"namespace" )comparison_operator (block (expression_statement (call (attribute (identifier_lst) identifier_lst (identifier_append) identifier_append )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement )block )if_statement (for_statement (identifier_c) identifier_c (attribute (identifier_self) identifier_self (identifier_children) identifier_children )attribute (block (expression_statement (call (attribute (identifier_c) identifier_c (identifier_findNestedNamespaces) identifier_findNestedNamespaces )attribute (argument_list (identifier_lst) identifier_lst )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Recursive helper function for finding nested namespaces. If this node is a namespace node, it is appended to ``lst``. Each node also calls each of its child ``findNestedNamespaces`` with the same list. :Parameters: ``lst`` (list) The list each namespace node is to be appended to.
(module (function_definition (function_name_haversine) function_name_haversine (parameters (identifier_point1) identifier_point1 (identifier_point2) identifier_point2 (default_parameter (identifier_unit) identifier_unit (string_'km') string_'km' )default_parameter )parameters (block (expression_statement (assignment (identifier_AVG_EARTH_RADIUS_KM) identifier_AVG_EARTH_RADIUS_KM (float_6371.0088) float_6371.0088 )assignment )expression_statement (expression_statement (assignment (identifier_conversions) identifier_conversions (dictionary (pair (string_'km') string_'km' (integer_1) integer_1 )pair (pair (string_'m') string_'m' (integer_1000) integer_1000 )pair (pair (string_'mi') string_'mi' (float_0.621371192) float_0.621371192 )pair (pair (string_'nmi') string_'nmi' (float_0.539956803) float_0.539956803 )pair (pair (string_'ft') string_'ft' (float_3280.839895013) float_3280.839895013 )pair (pair (string_'in') string_'in' (float_39370.078740158) float_39370.078740158 )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_avg_earth_radius) identifier_avg_earth_radius (binary_operator (identifier_AVG_EARTH_RADIUS_KM) identifier_AVG_EARTH_RADIUS_KM (subscript (identifier_conversions) identifier_conversions (identifier_unit) identifier_unit )subscript )binary_operator )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_lat1) identifier_lat1 (identifier_lng1) identifier_lng1 )pattern_list (identifier_point1) identifier_point1 )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_lat2) identifier_lat2 (identifier_lng2) identifier_lng2 )pattern_list (identifier_point2) identifier_point2 )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_lat1) identifier_lat1 (identifier_lng1) identifier_lng1 (identifier_lat2) identifier_lat2 (identifier_lng2) identifier_lng2 )pattern_list (call (identifier_map) identifier_map (argument_list (identifier_radians) identifier_radians (tuple (identifier_lat1) identifier_lat1 (identifier_lng1) identifier_lng1 (identifier_lat2) identifier_lat2 (identifier_lng2) identifier_lng2 )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_lat) identifier_lat (binary_operator (identifier_lat2) identifier_lat2 (identifier_lat1) identifier_lat1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_lng) identifier_lng (binary_operator (identifier_lng2) identifier_lng2 (identifier_lng1) identifier_lng1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_d) identifier_d (binary_operator (binary_operator (call (identifier_sin) identifier_sin (argument_list (binary_operator (identifier_lat) identifier_lat (float_0.5) float_0.5 )binary_operator )argument_list )call (integer_2) integer_2 )binary_operator (binary_operator (binary_operator (call (identifier_cos) identifier_cos (argument_list (identifier_lat1) identifier_lat1 )argument_list )call (call (identifier_cos) identifier_cos (argument_list (identifier_lat2) identifier_lat2 )argument_list )call )binary_operator (binary_operator (call (identifier_sin) identifier_sin (argument_list (binary_operator (identifier_lng) identifier_lng (float_0.5) float_0.5 )binary_operator )argument_list )call (integer_2) integer_2 )binary_operator )binary_operator )binary_operator )assignment )expression_statement (return_statement (binary_operator (binary_operator (integer_2) integer_2 (identifier_avg_earth_radius) identifier_avg_earth_radius )binary_operator (call (identifier_asin) identifier_asin (argument_list (call (identifier_sqrt) identifier_sqrt (argument_list (identifier_d) identifier_d )argument_list )call )argument_list )call )binary_operator )return_statement )block )function_definition )module
Calculate the great-circle distance between two points on the Earth surface. :input: two 2-tuples, containing the latitude and longitude of each point in decimal degrees. Keyword arguments: unit -- a string containing the initials of a unit of measurement (i.e. miles = mi) default 'km' (kilometers). Example: haversine((45.7597, 4.8422), (48.8567, 2.3508)) :output: Returns the distance between the two points. The default returned unit is kilometers. The default unit can be changed by setting the unit parameter to a string containing the initials of the desired unit. Other available units are miles (mi), nautic miles (nmi), meters (m), feets (ft) and inches (in).
(module (function_definition (function_name_get_urlhash) function_name_get_urlhash (parameters (identifier_self) identifier_self (identifier_url) identifier_url (identifier_fmt) identifier_fmt )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_self) identifier_self (identifier_open) identifier_open )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_url) identifier_url )argument_list )call )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (dictionary (pair (string_'url') string_'url' (call (identifier_fmt) identifier_fmt (argument_list (identifier_url) identifier_url )argument_list )call )pair (pair (string_'sha256') string_'sha256' (call (identifier_filehash) identifier_filehash (argument_list (identifier_f) identifier_f (string_'sha256') string_'sha256' )argument_list )call )pair )dictionary )return_statement )block )with_statement )block )function_definition )module
Returns the hash of the file of an internal url
(module (function_definition (function_name_trigger_info) function_name_trigger_info (parameters (identifier_self) identifier_self (default_parameter (identifier_trigger) identifier_trigger (None) None )default_parameter (default_parameter (identifier_dump) identifier_dump (False) False )default_parameter )parameters (block (if_statement (identifier_dump) identifier_dump (block (return_statement (attribute (identifier_self) identifier_self (identifier__syntax) identifier__syntax )attribute )return_statement )block )if_statement (expression_statement (assignment (identifier_response) identifier_response (None) None )assignment )expression_statement (for_statement (identifier_category) identifier_category (attribute (identifier_self) identifier_self (identifier__syntax) identifier__syntax )attribute (block (for_statement (identifier_topic) identifier_topic (subscript (attribute (identifier_self) identifier_self (identifier__syntax) identifier__syntax )attribute (identifier_category) identifier_category )subscript (block (if_statement (comparison_operator (identifier_trigger) identifier_trigger (subscript (subscript (attribute (identifier_self) identifier_self (identifier__syntax) identifier__syntax )attribute (identifier_category) identifier_category )subscript (identifier_topic) identifier_topic )subscript )comparison_operator (block (if_statement (comparison_operator (identifier_response) identifier_response (None) None )comparison_operator (block (expression_statement (assignment (identifier_response) identifier_response (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_fname) identifier_fname (identifier_lineno) identifier_lineno )pattern_list (subscript (subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier__syntax) identifier__syntax )attribute (identifier_category) identifier_category )subscript (identifier_topic) identifier_topic )subscript (identifier_trigger) identifier_trigger )subscript (string_'trigger') string_'trigger' )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_response) identifier_response (identifier_append) identifier_append )attribute (argument_list (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_category) identifier_category (identifier_category) identifier_category )keyword_argument (keyword_argument (identifier_topic) identifier_topic (identifier_topic) identifier_topic )keyword_argument (keyword_argument (identifier_trigger) identifier_trigger (identifier_trigger) identifier_trigger )keyword_argument (keyword_argument (identifier_filename) identifier_filename (identifier_fname) identifier_fname )keyword_argument (keyword_argument (identifier_line) identifier_line (identifier_lineno) identifier_lineno )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )for_statement (return_statement (identifier_response) identifier_response )return_statement )block )function_definition )module
Get information about a trigger. Pass in a raw trigger to find out what file name and line number it appeared at. This is useful for e.g. tracking down the location of the trigger last matched by the user via ``last_match()``. Returns a list of matching triggers, containing their topics, filenames and line numbers. Returns ``None`` if there weren't any matches found. The keys in the trigger info is as follows: * ``category``: Either 'topic' (for normal) or 'thats' (for %Previous triggers) * ``topic``: The topic name * ``trigger``: The raw trigger text * ``filename``: The filename the trigger was found in. * ``lineno``: The line number the trigger was found on. Pass in a true value for ``dump``, and the entire syntax tracking tree is returned. :param str trigger: The raw trigger text to look up. :param bool dump: Whether to dump the entire syntax tracking tree. :return: A list of matching triggers or ``None`` if no matches.
(module (function_definition (function_name_get_locator) function_name_get_locator (parameters (identifier_self) identifier_self (identifier_dmin) identifier_dmin (identifier_dmax) identifier_dmax )parameters (block (expression_statement (string_'Pick the best locator based on a distance.') string_'Pick the best locator based on a distance.' )expression_statement (expression_statement (call (identifier__check_implicitly_registered) identifier__check_implicitly_registered (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_delta) identifier_delta (call (identifier_relativedelta) identifier_relativedelta (argument_list (identifier_dmax) identifier_dmax (identifier_dmin) identifier_dmin )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_num_days) identifier_num_days (binary_operator (binary_operator (parenthesized_expression (binary_operator (binary_operator (attribute (identifier_delta) identifier_delta (identifier_years) identifier_years )attribute (float_12.0) float_12.0 )binary_operator (attribute (identifier_delta) identifier_delta (identifier_months) identifier_months )attribute )binary_operator )parenthesized_expression (float_31.0) float_31.0 )binary_operator (attribute (identifier_delta) identifier_delta (identifier_days) identifier_days )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_num_sec) identifier_num_sec (binary_operator (binary_operator (parenthesized_expression (binary_operator (binary_operator (attribute (identifier_delta) identifier_delta (identifier_hours) identifier_hours )attribute (float_60.0) float_60.0 )binary_operator (attribute (identifier_delta) identifier_delta (identifier_minutes) identifier_minutes )attribute )binary_operator )parenthesized_expression (float_60.0) float_60.0 )binary_operator (attribute (identifier_delta) identifier_delta (identifier_seconds) identifier_seconds )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_tot_sec) identifier_tot_sec (binary_operator (binary_operator (identifier_num_days) identifier_num_days (float_86400.) float_86400. )binary_operator (identifier_num_sec) identifier_num_sec )binary_operator )assignment )expression_statement (if_statement (comparison_operator (call (identifier_abs) identifier_abs (argument_list (identifier_tot_sec) identifier_tot_sec )argument_list )call (attribute (identifier_self) identifier_self (identifier_minticks) identifier_minticks )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__freq) identifier__freq )attribute (unary_operator (integer_1) integer_1 )unary_operator )assignment )expression_statement (expression_statement (assignment (identifier_locator) identifier_locator (call (identifier_MilliSecondLocator) identifier_MilliSecondLocator (argument_list (attribute (identifier_self) identifier_self (identifier_tz) identifier_tz )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_locator) identifier_locator (identifier_set_axis) identifier_set_axis )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_axis) identifier_axis )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_locator) identifier_locator (identifier_set_view_interval) identifier_set_view_interval )attribute (argument_list (list_splat (call (attribute (attribute (identifier_self) identifier_self (identifier_axis) identifier_axis )attribute (identifier_get_view_interval) identifier_get_view_interval )attribute (argument_list )argument_list )call )list_splat )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_locator) identifier_locator (identifier_set_data_interval) identifier_set_data_interval )attribute (argument_list (list_splat (call (attribute (attribute (identifier_self) identifier_self (identifier_axis) identifier_axis )attribute (identifier_get_data_interval) identifier_get_data_interval )attribute (argument_list )argument_list )call )list_splat )argument_list )call )expression_statement (return_statement (identifier_locator) identifier_locator )return_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_dates) identifier_dates (identifier_AutoDateLocator) identifier_AutoDateLocator )attribute (identifier_get_locator) identifier_get_locator )attribute (argument_list (identifier_self) identifier_self (identifier_dmin) identifier_dmin (identifier_dmax) identifier_dmax )argument_list )call )return_statement )block )function_definition )module
Pick the best locator based on a distance.
(module (function_definition (function_name_endings) function_name_endings (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_is_tagged) identifier_is_tagged )attribute (argument_list (identifier_ANALYSIS) identifier_ANALYSIS )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_tag_analysis) identifier_tag_analysis )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_get_analysis_element) identifier_get_analysis_element )attribute (argument_list (identifier_ENDING) identifier_ENDING )argument_list )call )return_statement )block )function_definition )module
The list of word endings. Ambiguous cases are separated with pipe character by default. Use :py:meth:`~estnltk.text.Text.get_analysis_element` to specify custom separator for ambiguous entries.
(module (function_definition (function_name_update_is_start) function_name_update_is_start (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_is_start) identifier_is_start )attribute (boolean_operator (boolean_operator (boolean_operator (attribute (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute (identifier_is_root_state) identifier_is_root_state )attribute (line_continuation_\) line_continuation_\ (comparison_operator (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (None) None )comparison_operator )boolean_operator (line_continuation_\) line_continuation_\ (call (identifier_isinstance) identifier_isinstance (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (identifier_state) identifier_state )attribute (identifier_LibraryState) identifier_LibraryState )argument_list )call )boolean_operator (line_continuation_\) line_continuation_\ (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute (identifier_state_id) identifier_state_id )attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute (identifier_parent) identifier_parent )attribute (identifier_start_state_id) identifier_start_state_id )attribute )comparison_operator )boolean_operator )assignment )expression_statement )block )function_definition )module
Updates the `is_start` property of the state A state is a start state, if it is the root state, it has no parent, the parent is a LibraryState or the state's state_id is identical with the ContainerState.start_state_id of the ContainerState it is within.
(module (function_definition (function_name_probably_wkt) function_name_probably_wkt (parameters (identifier_text) identifier_text )parameters (block (expression_statement (assignment (identifier_valid) identifier_valid (False) False )assignment )expression_statement (expression_statement (assignment (identifier_valid_types) identifier_valid_types (call (identifier_set) identifier_set (argument_list (list (string_'POINT') string_'POINT' (string_'LINESTRING') string_'LINESTRING' (string_'POLYGON') string_'POLYGON' (string_'MULTIPOINT') string_'MULTIPOINT' (string_'MULTILINESTRING') string_'MULTILINESTRING' (string_'MULTIPOLYGON') string_'MULTIPOLYGON' (string_'GEOMETRYCOLLECTION') string_'GEOMETRYCOLLECTION' )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_matched) identifier_matched (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (string_r'(\w+)\s*\([^)]+\)') string_r'(\w+)\s*\([^)]+\)' (call (attribute (identifier_text) identifier_text (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (identifier_matched) identifier_matched (block (expression_statement (assignment (identifier_valid) identifier_valid (comparison_operator (call (attribute (call (attribute (identifier_matched) identifier_matched (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call (identifier_valid_types) identifier_valid_types )comparison_operator )assignment )expression_statement )block )if_statement (return_statement (identifier_valid) identifier_valid )return_statement )block )function_definition )module
Quick check to determine if the provided text looks like WKT
(module (function_definition (function_name_show_config) function_name_show_config (parameters )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (string_'cpan -J') string_'cpan -J' )assignment )expression_statement (expression_statement (assignment (identifier_out) identifier_out (call (attribute (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run') string_'cmd.run' )subscript (argument_list (identifier_cmd) identifier_cmd )argument_list )call (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_line) identifier_line (identifier_out) identifier_out (block (if_statement (comparison_operator (string_'=>') string_'=>' (identifier_line) identifier_line )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_comps) identifier_comps (call (attribute (identifier_line) identifier_line (identifier_split) identifier_split )attribute (argument_list (string_'=>') string_'=>' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_key) identifier_key (call (attribute (call (attribute (subscript (identifier_comps) identifier_comps (integer_0) integer_0 )subscript (identifier_replace) identifier_replace )attribute (argument_list (string_"'") string_"'" (string_'') string_'' )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_val) identifier_val (call (attribute (call (attribute (call (attribute (subscript (identifier_comps) identifier_comps (integer_1) integer_1 )subscript (identifier_replace) identifier_replace )attribute (argument_list (string_"',") string_"'," (string_'') string_'' )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_"'") string_"'" (string_'') string_'' )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (identifier_key) identifier_key )subscript (identifier_val) identifier_val )assignment )expression_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Return a dict of CPAN configuration values CLI Example: .. code-block:: bash salt '*' cpan.show_config
(module (function_definition (function_name_load_or_create_client_key) function_name_load_or_create_client_key (parameters (identifier_pem_path) identifier_pem_path )parameters (block (expression_statement (assignment (identifier_acme_key_file) identifier_acme_key_file (call (attribute (call (attribute (identifier_pem_path) identifier_pem_path (identifier_asTextMode) identifier_asTextMode )attribute (argument_list )argument_list )call (identifier_child) identifier_child )attribute (argument_list (string_u'client.key') string_u'client.key' )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_acme_key_file) identifier_acme_key_file (identifier_exists) identifier_exists )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (identifier_serialization) identifier_serialization (identifier_load_pem_private_key) identifier_load_pem_private_key )attribute (argument_list (call (attribute (identifier_acme_key_file) identifier_acme_key_file (identifier_getContent) identifier_getContent )attribute (argument_list )argument_list )call (keyword_argument (identifier_password) identifier_password (None) None )keyword_argument (keyword_argument (identifier_backend) identifier_backend (call (identifier_default_backend) identifier_default_backend (argument_list )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_key) identifier_key (call (identifier_generate_private_key) identifier_generate_private_key (argument_list (string_u'rsa') string_u'rsa' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_acme_key_file) identifier_acme_key_file (identifier_setContent) identifier_setContent )attribute (argument_list (call (attribute (identifier_key) identifier_key (identifier_private_bytes) identifier_private_bytes )attribute (argument_list (keyword_argument (identifier_encoding) identifier_encoding (attribute (attribute (identifier_serialization) identifier_serialization (identifier_Encoding) identifier_Encoding )attribute (identifier_PEM) identifier_PEM )attribute )keyword_argument (keyword_argument (identifier_format) identifier_format (attribute (attribute (identifier_serialization) identifier_serialization (identifier_PrivateFormat) identifier_PrivateFormat )attribute (identifier_TraditionalOpenSSL) identifier_TraditionalOpenSSL )attribute )keyword_argument (keyword_argument (identifier_encryption_algorithm) identifier_encryption_algorithm (call (attribute (identifier_serialization) identifier_serialization (identifier_NoEncryption) identifier_NoEncryption )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_JWKRSA) identifier_JWKRSA (argument_list (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Load the client key from a directory, creating it if it does not exist. .. note:: The client key that will be created will be a 2048-bit RSA key. :type pem_path: ``twisted.python.filepath.FilePath`` :param pem_path: The certificate directory to use, as with the endpoint.
(module (function_definition (function_name_get_data) function_name_get_data (parameters )parameters (block (expression_statement (assignment (pattern_list (identifier_data) identifier_data (identifier_targets) identifier_targets )pattern_list (call (identifier_make_classification) identifier_make_classification (argument_list (keyword_argument (identifier_n_samples) identifier_n_samples (integer_1000) integer_1000 )keyword_argument (keyword_argument (identifier_n_features) identifier_n_features (integer_45) integer_45 )keyword_argument (keyword_argument (identifier_n_informative) identifier_n_informative (integer_12) integer_12 )keyword_argument (keyword_argument (identifier_n_redundant) identifier_n_redundant (integer_7) integer_7 )keyword_argument (keyword_argument (identifier_random_state) identifier_random_state (integer_134985745) integer_134985745 )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_data) identifier_data (identifier_targets) identifier_targets )expression_list )return_statement )block )function_definition )module
Synthetic binary classification dataset.
(module (function_definition (function_name__make_xml) function_name__make_xml (parameters (identifier_self) identifier_self (identifier_endpoints) identifier_endpoints )parameters (block (expression_statement (assignment (identifier_root) identifier_root (call (attribute (identifier_ElementTree) identifier_ElementTree (identifier_Element) identifier_Element )attribute (argument_list (identifier_TAG_ENDPOINT_DESCRIPTIONS) identifier_TAG_ENDPOINT_DESCRIPTIONS )argument_list )call )assignment )expression_statement (for_statement (identifier_endpoint) identifier_endpoint (identifier_endpoints) identifier_endpoints (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__make_endpoint) identifier__make_endpoint )attribute (argument_list (identifier_root) identifier_root (identifier_endpoint) identifier_endpoint )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__indent) identifier__indent )attribute (argument_list (identifier_root) identifier_root )argument_list )call )expression_statement (return_statement (identifier_root) identifier_root )return_statement )block )function_definition )module
Converts the given endpoint description beans into an XML Element :param endpoints: A list of EndpointDescription beans :return: A string containing an XML document
(module (function_definition (function_name_is_free) function_name_is_free (parameters (identifier_self) identifier_self )parameters (block (raise_statement (call (identifier_NotImplementedError) identifier_NotImplementedError (argument_list (binary_operator (string_"%s not implemented for %s") string_"%s not implemented for %s" (tuple (attribute (attribute (attribute (identifier_self) identifier_self (identifier_is_free) identifier_is_free )attribute (identifier___func__) identifier___func__ )attribute (identifier___name__) identifier___name__ )attribute (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )tuple )binary_operator )argument_list )call )raise_statement )block )function_definition )module
Returns a concrete determination as to whether the chunk is free.
(module (function_definition (function_name_run_fn) function_name_run_fn (parameters (identifier_self) identifier_self (identifier_name) identifier_name (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwds) identifier_kwds )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_fn) identifier_fn (None) None )assignment )expression_statement (expression_statement (assignment (identifier_to_check) identifier_to_check (list (identifier_picardrun) identifier_picardrun )list )assignment )expression_statement (for_statement (identifier_ns) identifier_ns (identifier_to_check) identifier_to_check (block (try_statement (block (expression_statement (assignment (identifier_fn) identifier_fn (call (identifier_getattr) identifier_getattr (argument_list (identifier_ns) identifier_ns (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (break_statement )break_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (assert_statement (comparison_operator (identifier_fn) identifier_fn (None) None )comparison_operator (binary_operator (string_"Could not find function %s in %s") string_"Could not find function %s in %s" (tuple (identifier_name) identifier_name (identifier_to_check) identifier_to_check )tuple )binary_operator )assert_statement (return_statement (call (identifier_fn) identifier_fn (argument_list (identifier_self) identifier_self (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwds) identifier_kwds )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Run pre-built functionality that used Broad tools by name. See the gatkrun, picardrun module for available functions.
(module (function_definition (function_name_legacy_requests_view) function_name_legacy_requests_view (parameters (identifier_request) identifier_request (identifier_rtype) identifier_rtype )parameters (block (if_statement (not_operator (comparison_operator (identifier_rtype) identifier_rtype (list (string_'food') string_'food' (string_'maintenance') string_'maintenance' )list )comparison_operator )not_operator (block (raise_statement (identifier_Http404) identifier_Http404 )raise_statement )block )if_statement (expression_statement (assignment (identifier_requests_dict) identifier_requests_dict (list )list )assignment )expression_statement (expression_statement (assignment (identifier_requests) identifier_requests (call (attribute (attribute (identifier_TeacherRequest) identifier_TeacherRequest (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_request_type) identifier_request_type (identifier_rtype) identifier_rtype )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_request_count) identifier_request_count (call (attribute (identifier_requests) identifier_requests (identifier_count) identifier_count )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_paginator) identifier_paginator (call (identifier_Paginator) identifier_Paginator (argument_list (identifier_requests) identifier_requests (integer_50) integer_50 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_page) identifier_page (call (attribute (attribute (identifier_request) identifier_request (identifier_GET) identifier_GET )attribute (identifier_get) identifier_get )attribute (argument_list (string_'page') string_'page' )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_requests) identifier_requests (call (attribute (identifier_paginator) identifier_paginator (identifier_page) identifier_page )attribute (argument_list (identifier_page) identifier_page )argument_list )call )assignment )expression_statement )block (except_clause (identifier_PageNotAnInteger) identifier_PageNotAnInteger (block (expression_statement (assignment (identifier_requests) identifier_requests (call (attribute (identifier_paginator) identifier_paginator (identifier_page) identifier_page )attribute (argument_list (integer_1) integer_1 )argument_list )call )assignment )expression_statement )block )except_clause (except_clause (identifier_EmptyPage) identifier_EmptyPage (block (expression_statement (assignment (identifier_requests) identifier_requests (call (attribute (identifier_paginator) identifier_paginator (identifier_page) identifier_page )attribute (argument_list (attribute (identifier_paginator) identifier_paginator (identifier_num_pages) identifier_num_pages )attribute )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (for_statement (identifier_req) identifier_req (identifier_requests) identifier_requests (block (expression_statement (call (attribute (identifier_requests_dict) identifier_requests_dict (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_req) identifier_req (call (attribute (attribute (identifier_TeacherResponse) identifier_TeacherResponse (identifier_objects) identifier_objects )attribute (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_request) identifier_request (identifier_req) identifier_req )keyword_argument )argument_list )call )tuple )argument_list )call )expression_statement )block )for_statement (return_statement (call (identifier_render_to_response) identifier_render_to_response (argument_list (string_'teacher_requests.html') string_'teacher_requests.html' (dictionary (pair (string_'page_name') string_'page_name' (call (attribute (string_"Legacy {rtype} Requests") string_"Legacy {rtype} Requests" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_rtype) identifier_rtype (call (attribute (identifier_rtype) identifier_rtype (identifier_title) identifier_title )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )pair (pair (string_'requests_dict') string_'requests_dict' (identifier_requests_dict) identifier_requests_dict )pair (pair (string_'requests') string_'requests' (identifier_requests) identifier_requests )pair (pair (string_'request_type') string_'request_type' (call (attribute (identifier_rtype) identifier_rtype (identifier_title) identifier_title )attribute (argument_list )argument_list )call )pair (pair (string_'request_count') string_'request_count' (identifier_request_count) identifier_request_count )pair )dictionary (keyword_argument (identifier_context_instance) identifier_context_instance (call (identifier_RequestContext) identifier_RequestContext (argument_list (identifier_request) identifier_request )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
View to see legacy requests of rtype request type, which should be either 'food' or 'maintenance'.
(module (function_definition (function_name_initialize_variables) function_name_initialize_variables (parameters (identifier_sess) identifier_sess (identifier_saver) identifier_saver (identifier_logdir) identifier_logdir (default_parameter (identifier_checkpoint) identifier_checkpoint (None) None )default_parameter (default_parameter (identifier_resume) identifier_resume (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_sess) identifier_sess (identifier_run) identifier_run )attribute (argument_list (call (attribute (identifier_tf) identifier_tf (identifier_group) identifier_group )attribute (argument_list (call (attribute (identifier_tf) identifier_tf (identifier_local_variables_initializer) identifier_local_variables_initializer )attribute (argument_list )argument_list )call (call (attribute (identifier_tf) identifier_tf (identifier_global_variables_initializer) identifier_global_variables_initializer )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )expression_statement (if_statement (boolean_operator (identifier_resume) identifier_resume (not_operator (parenthesized_expression (boolean_operator (identifier_logdir) identifier_logdir (identifier_checkpoint) identifier_checkpoint )boolean_operator )parenthesized_expression )not_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Need to specify logdir to resume a checkpoint.') string_'Need to specify logdir to resume a checkpoint.' )argument_list )call )raise_statement )block )if_statement (if_statement (identifier_logdir) identifier_logdir (block (expression_statement (assignment (identifier_state) identifier_state (call (attribute (attribute (identifier_tf) identifier_tf (identifier_train) identifier_train )attribute (identifier_get_checkpoint_state) identifier_get_checkpoint_state )attribute (argument_list (identifier_logdir) identifier_logdir )argument_list )call )assignment )expression_statement (if_statement (identifier_checkpoint) identifier_checkpoint (block (expression_statement (assignment (identifier_checkpoint) identifier_checkpoint (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_logdir) identifier_logdir (identifier_checkpoint) identifier_checkpoint )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (boolean_operator (not_operator (identifier_checkpoint) identifier_checkpoint )not_operator (identifier_state) identifier_state )boolean_operator (attribute (identifier_state) identifier_state (identifier_model_checkpoint_path) identifier_model_checkpoint_path )attribute )boolean_operator (block (expression_statement (assignment (identifier_checkpoint) identifier_checkpoint (attribute (identifier_state) identifier_state (identifier_model_checkpoint_path) identifier_model_checkpoint_path )attribute )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (identifier_checkpoint) identifier_checkpoint (comparison_operator (identifier_resume) identifier_resume (False) False )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_message) identifier_message (string_'Found unexpected checkpoint when starting a new run.') string_'Found unexpected checkpoint when starting a new run.' )assignment )expression_statement (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (identifier_message) identifier_message )argument_list )call )raise_statement )block )if_statement (if_statement (identifier_checkpoint) identifier_checkpoint (block (expression_statement (call (attribute (identifier_saver) identifier_saver (identifier_restore) identifier_restore )attribute (argument_list (identifier_sess) identifier_sess (identifier_checkpoint) identifier_checkpoint )argument_list )call )expression_statement )block )if_statement )block )if_statement )block )function_definition )module
Initialize or restore variables from a checkpoint if available. Args: sess: Session to initialize variables in. saver: Saver to restore variables. logdir: Directory to search for checkpoints. checkpoint: Specify what checkpoint name to use; defaults to most recent. resume: Whether to expect recovering a checkpoint or starting a new run. Raises: ValueError: If resume expected but no log directory specified. RuntimeError: If no resume expected but a checkpoint was found.
(module (function_definition (function_name_upload_cart) function_name_upload_cart (parameters (identifier_cart) identifier_cart (identifier_collection) identifier_collection )parameters (block (expression_statement (assignment (identifier_cart_cols) identifier_cart_cols (call (identifier_cart_db) identifier_cart_db (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cart_json) identifier_cart_json (call (identifier_read_json_document) identifier_read_json_document (argument_list (call (attribute (identifier_cart) identifier_cart (identifier_cart_file) identifier_cart_file )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_cart_id) identifier_cart_id (call (attribute (subscript (identifier_cart_cols) identifier_cart_cols (identifier_collection) identifier_collection )subscript (identifier_save) identifier_save )attribute (argument_list (identifier_cart_json) identifier_cart_json )argument_list )call )assignment )expression_statement )block (except_clause (attribute (identifier_MongoErrors) identifier_MongoErrors (identifier_AutoReconnect) identifier_AutoReconnect )attribute (block (raise_statement (call (identifier_JuicerConfigError) identifier_JuicerConfigError (argument_list (string_"Error saving cart to `cart_host`. Ensure that this node is the master.") string_"Error saving cart to `cart_host`. Ensure that this node is the master." )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (identifier_cart_id) identifier_cart_id )return_statement )block )function_definition )module
Connect to mongo and store your cart in the specified collection.
(module (function_definition (function_name_underlying_variable_ref) function_name_underlying_variable_ref (parameters (identifier_t) identifier_t )parameters (block (while_statement (comparison_operator (attribute (attribute (identifier_t) identifier_t (identifier_op) identifier_op )attribute (identifier_type) identifier_type )attribute (list (string_"Identity") string_"Identity" (string_"ReadVariableOp") string_"ReadVariableOp" (string_"Enter") string_"Enter" )list )comparison_operator (block (expression_statement (assignment (identifier_t) identifier_t (subscript (attribute (attribute (identifier_t) identifier_t (identifier_op) identifier_op )attribute (identifier_inputs) identifier_inputs )attribute (integer_0) integer_0 )subscript )assignment )expression_statement )block )while_statement (expression_statement (assignment (identifier_op_type) identifier_op_type (attribute (attribute (identifier_t) identifier_t (identifier_op) identifier_op )attribute (identifier_type) identifier_type )attribute )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (string_"Variable") string_"Variable" (identifier_op_type) identifier_op_type )comparison_operator (comparison_operator (string_"VarHandle") string_"VarHandle" (identifier_op_type) identifier_op_type )comparison_operator )boolean_operator (block (return_statement (identifier_t) identifier_t )return_statement )block (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement )block )function_definition )module
Find the underlying variable ref. Traverses through Identity, ReadVariableOp, and Enter ops. Stops when op type has Variable or VarHandle in name. Args: t: a Tensor Returns: a Tensor that is a variable ref, or None on error.
(module (function_definition (function_name_AddKeyByPath) function_name_AddKeyByPath (parameters (identifier_self) identifier_self (identifier_key_path) identifier_key_path (identifier_registry_key) identifier_registry_key )parameters (block (if_statement (not_operator (call (attribute (identifier_key_path) identifier_key_path (identifier_startswith) identifier_startswith )attribute (argument_list (attribute (identifier_definitions) identifier_definitions (identifier_KEY_PATH_SEPARATOR) identifier_KEY_PATH_SEPARATOR )attribute )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_'Key path does not start with: {0:s}') string_'Key path does not start with: {0:s}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_definitions) identifier_definitions (identifier_KEY_PATH_SEPARATOR) identifier_KEY_PATH_SEPARATOR )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__root_key) identifier__root_key )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__root_key) identifier__root_key )attribute (call (identifier_FakeWinRegistryKey) identifier_FakeWinRegistryKey (argument_list (attribute (identifier_self) identifier_self (identifier__key_path_prefix) identifier__key_path_prefix )attribute )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_path_segments) identifier_path_segments (call (attribute (identifier_key_paths) identifier_key_paths (identifier_SplitKeyPath) identifier_SplitKeyPath )attribute (argument_list (identifier_key_path) identifier_key_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_parent_key) identifier_parent_key (attribute (identifier_self) identifier_self (identifier__root_key) identifier__root_key )attribute )assignment )expression_statement (for_statement (identifier_path_segment) identifier_path_segment (identifier_path_segments) identifier_path_segments (block (try_statement (block (expression_statement (assignment (identifier_subkey) identifier_subkey (call (identifier_FakeWinRegistryKey) identifier_FakeWinRegistryKey (argument_list (identifier_path_segment) identifier_path_segment )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_parent_key) identifier_parent_key (identifier_AddSubkey) identifier_AddSubkey )attribute (argument_list (identifier_subkey) identifier_subkey )argument_list )call )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_subkey) identifier_subkey (call (attribute (identifier_parent_key) identifier_parent_key (identifier_GetSubkeyByName) identifier_GetSubkeyByName )attribute (argument_list (identifier_path_segment) identifier_path_segment )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_parent_key) identifier_parent_key (identifier_subkey) identifier_subkey )assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_parent_key) identifier_parent_key (identifier_AddSubkey) identifier_AddSubkey )attribute (argument_list (identifier_registry_key) identifier_registry_key )argument_list )call )expression_statement )block )function_definition )module
Adds a Windows Registry key for a specific key path. Args: key_path (str): Windows Registry key path to add the key. registry_key (WinRegistryKey): Windows Registry key. Raises: KeyError: if the subkey already exists. ValueError: if the Windows Registry key cannot be added.
(module (function_definition (function_name_stack_plot) function_name_stack_plot (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_df) identifier_df (call (attribute (identifier_self) identifier_self (identifier_as_pandas) identifier_as_pandas )attribute (argument_list (keyword_argument (identifier_with_metadata) identifier_with_metadata (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ax) identifier_ax (call (attribute (identifier_plotting) identifier_plotting (identifier_stack_plot) identifier_stack_plot )attribute (argument_list (identifier_df) identifier_df (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_ax) identifier_ax )return_statement )block )function_definition )module
Plot timeseries stacks of existing data see pyam.plotting.stack_plot() for all available options
(module (function_definition (function_name_AUC_analysis) function_name_AUC_analysis (parameters (identifier_AUC) identifier_AUC )parameters (block (try_statement (block (if_statement (comparison_operator (identifier_AUC) identifier_AUC (string_"None") string_"None" )comparison_operator (block (return_statement (string_"None") string_"None" )return_statement )block )if_statement (if_statement (comparison_operator (identifier_AUC) identifier_AUC (float_0.6) float_0.6 )comparison_operator (block (return_statement (string_"Poor") string_"Poor" )return_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_AUC) identifier_AUC (float_0.6) float_0.6 )comparison_operator (comparison_operator (identifier_AUC) identifier_AUC (float_0.7) float_0.7 )comparison_operator )boolean_operator (block (return_statement (string_"Fair") string_"Fair" )return_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_AUC) identifier_AUC (float_0.7) float_0.7 )comparison_operator (comparison_operator (identifier_AUC) identifier_AUC (float_0.8) float_0.8 )comparison_operator )boolean_operator (block (return_statement (string_"Good") string_"Good" )return_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_AUC) identifier_AUC (float_0.8) float_0.8 )comparison_operator (comparison_operator (identifier_AUC) identifier_AUC (float_0.9) float_0.9 )comparison_operator )boolean_operator (block (return_statement (string_"Very Good") string_"Very Good" )return_statement )block )if_statement (return_statement (string_"Excellent") string_"Excellent" )return_statement )block (except_clause (identifier_Exception) identifier_Exception (block (return_statement (string_"None") string_"None" )return_statement )block )except_clause )try_statement )block )function_definition )module
Analysis AUC with interpretation table. :param AUC: area under the ROC curve :type AUC : float :return: interpretation result as str
(module (function_definition (function_name_normpath) function_name_normpath (parameters (identifier_path) identifier_path )parameters (block (expression_statement (assignment (pattern_list (identifier_scheme) identifier_scheme (identifier_netloc) identifier_netloc (identifier_path_) identifier_path_ )pattern_list (call (identifier_parse) identifier_parse (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (return_statement (call (identifier_unparse) identifier_unparse (argument_list (identifier_scheme) identifier_scheme (identifier_netloc) identifier_netloc (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_normpath) identifier_normpath )attribute (argument_list (identifier_path_) identifier_path_ )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Normalize ``path``, collapsing redundant separators and up-level refs.
(module (function_definition (function_name_get_program_args) function_name_get_program_args (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (list )list )assignment )expression_statement (for_statement (identifier_arg) identifier_arg (attribute (call (attribute (identifier_self) identifier_self (identifier_get_options) identifier_get_options )attribute (argument_list )argument_list )call (identifier_program_args) identifier_program_args )attribute (block (expression_statement (call (attribute (identifier_ret) identifier_ret (identifier_extend) identifier_extend )attribute (argument_list (call (identifier_safe_shlex_split) identifier_safe_shlex_split (argument_list (identifier_arg) identifier_arg )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Get the program args to run this JVM with. These are the arguments passed to main() and are program-specific.
(module (function_definition (function_name__iter_bitmasks) function_name__iter_bitmasks (parameters (identifier_eid) identifier_eid )parameters (block (expression_statement (assignment (identifier_bitmask) identifier_bitmask (call (attribute (identifier_idaapi) identifier_idaapi (identifier_get_first_bmask) identifier_get_first_bmask )attribute (argument_list (identifier_eid) identifier_eid )argument_list )call )assignment )expression_statement (expression_statement (yield (identifier_bitmask) identifier_bitmask )yield )expression_statement (while_statement (comparison_operator (identifier_bitmask) identifier_bitmask (identifier_DEFMASK) identifier_DEFMASK )comparison_operator (block (expression_statement (assignment (identifier_bitmask) identifier_bitmask (call (attribute (identifier_idaapi) identifier_idaapi (identifier_get_next_bmask) identifier_get_next_bmask )attribute (argument_list (identifier_eid) identifier_eid (identifier_bitmask) identifier_bitmask )argument_list )call )assignment )expression_statement (expression_statement (yield (identifier_bitmask) identifier_bitmask )yield )expression_statement )block )while_statement )block )function_definition )module
Iterate all bitmasks in a given enum. Note that while `DEFMASK` indicates no-more-bitmasks, it is also a valid bitmask value. The only way to tell if it exists is when iterating the serials.
(module (function_definition (function_name_verify_module) function_name_verify_module (parameters (identifier_self) identifier_self (identifier_filename) identifier_filename (identifier_module) identifier_module (identifier_verify_signature) identifier_verify_signature )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'rb') string_'rb' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_module_data) identifier_module_data (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement )block )with_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_verify_checksum) identifier_verify_checksum )attribute (argument_list (identifier_module_data) identifier_module_data (subscript (identifier_module) identifier_module (string_'checksum') string_'checksum' )subscript (subscript (identifier_module) identifier_module (string_'location') string_'location' )subscript )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_gpg_verify) identifier_gpg_verify )attribute (block (expression_statement (assignment (identifier_signature_url) identifier_signature_url (call (attribute (string_"{0}/{1}") string_"{0}/{1}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute (subscript (identifier_module) identifier_module (string_'signature') string_'signature' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_file_url) identifier_file_url (call (attribute (string_"{0}/{1}") string_"{0}/{1}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute (subscript (identifier_module) identifier_module (string_'location') string_'location' )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_verify_file_signature) identifier_verify_file_signature )attribute (argument_list (identifier_signature_url) identifier_signature_url (identifier_file_url) identifier_file_url (identifier_filename) identifier_filename )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Verify kernel module checksum and signature :type filename: str :param filename: downloaded kernel module path :type module: dict :param module: kernel module metadata :type verify_signature: bool :param verify_signature: enable/disable signature verification
(module (function_definition (function_name_get_highlights) function_name_get_highlights (parameters (identifier_self) identifier_self (typed_parameter (identifier_user) identifier_user (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_int) identifier_int )type (type (identifier_Profile) identifier_Profile )type )type_parameter )generic_type )type )typed_parameter )parameters (type (generic_type (identifier_Iterator) identifier_Iterator (type_parameter (type (identifier_Highlight) identifier_Highlight )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_userid) identifier_userid (conditional_expression (identifier_user) identifier_user (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_user) identifier_user (identifier_int) identifier_int )argument_list )call (attribute (identifier_user) identifier_user (identifier_userid) identifier_userid )attribute )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (subscript (subscript (subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (identifier_graphql_query) identifier_graphql_query )attribute (argument_list (string_"7c16654f22c819fb63d1183034a5162f") string_"7c16654f22c819fb63d1183034a5162f" (dictionary (pair (string_"user_id") string_"user_id" (identifier_userid) identifier_userid )pair (pair (string_"include_chaining") string_"include_chaining" (False) False )pair (pair (string_"include_reel") string_"include_reel" (False) False )pair (pair (string_"include_suggested_users") string_"include_suggested_users" (False) False )pair (pair (string_"include_logged_out_extras") string_"include_logged_out_extras" (False) False )pair (pair (string_"include_highlight_reels") string_"include_highlight_reels" (True) True )pair )dictionary )argument_list )call (string_"data") string_"data" )subscript (string_"user") string_"user" )subscript (string_'edge_highlight_reels') string_'edge_highlight_reels' )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_data) identifier_data (None) None )comparison_operator (block (raise_statement (call (identifier_BadResponseException) identifier_BadResponseException (argument_list (string_'Bad highlights reel JSON.') string_'Bad highlights reel JSON.' )argument_list )call )raise_statement )block )if_statement (expression_statement (yield (generator_expression (call (identifier_Highlight) identifier_Highlight (argument_list (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (subscript (identifier_edge) identifier_edge (string_'node') string_'node' )subscript (conditional_expression (identifier_user) identifier_user (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_user) identifier_user (identifier_Profile) identifier_Profile )argument_list )call (None) None )conditional_expression )argument_list )call (for_in_clause (identifier_edge) identifier_edge (subscript (identifier_data) identifier_data (string_'edges') string_'edges' )subscript )for_in_clause )generator_expression )yield )expression_statement )block )function_definition )module
Get all highlights from a user. To use this, one needs to be logged in. .. versionadded:: 4.1 :param user: ID or Profile of the user whose highlights should get fetched.
(module (function_definition (function_name___get_indexer) function_name___get_indexer (parameters (identifier_in_fns) identifier_in_fns (default_parameter (identifier_selected_type) identifier_selected_type (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_indexer) identifier_indexer (None) None )assignment )expression_statement (if_statement (comparison_operator (identifier_selected_type) identifier_selected_type (None) None )comparison_operator (block (expression_statement (assignment (identifier_indexer) identifier_indexer (call (identifier_get_indexer_by_filetype) identifier_get_indexer_by_filetype (argument_list (identifier_selected_type) identifier_selected_type )argument_list )call )assignment )expression_statement )block (else_clause (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_in_fns) identifier_in_fns )argument_list )call (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_IndexError) identifier_IndexError (argument_list (binary_operator (string_"reading from stdin, unable to guess input file ") string_"reading from stdin, unable to guess input file " (string_"type, use -t option to set manually.\n") string_"type, use -t option to set manually.\n" )binary_operator )argument_list )call )raise_statement )block (else_clause (block (expression_statement (assignment (identifier_extension) identifier_extension (call (identifier_set) identifier_set (argument_list (list_comprehension (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (identifier_f) identifier_f )argument_list )call (integer_1) integer_1 )subscript (for_in_clause (identifier_f) identifier_f (identifier_in_fns) identifier_in_fns )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (assert_statement (parenthesized_expression (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_extension) identifier_extension )argument_list )call (integer_1) integer_1 )comparison_operator )parenthesized_expression )assert_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_extension) identifier_extension )argument_list )call (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_IndexError) identifier_IndexError (argument_list (binary_operator (string_"more than one file extension present, unable ") string_"more than one file extension present, unable " (string_"to get input type, use -t option to set manually.\n") string_"to get input type, use -t option to set manually.\n" )binary_operator )argument_list )call )raise_statement )block (else_clause (block (expression_statement (assignment (identifier_indexer) identifier_indexer (call (identifier_get_indexer_by_file_extension) identifier_get_indexer_by_file_extension (argument_list (subscript (call (identifier_list) identifier_list (argument_list (identifier_extension) identifier_extension )argument_list )call (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )else_clause )if_statement (assert_statement (parenthesized_expression (comparison_operator (identifier_indexer) identifier_indexer (None) None )comparison_operator )parenthesized_expression )assert_statement (return_statement (identifier_indexer) identifier_indexer )return_statement )block )function_definition )module
Determine which indexer to use based on input files and type option.
(module (function_definition (function_name_forum_topic_list) function_name_forum_topic_list (parameters (identifier_self) identifier_self (default_parameter (identifier_title_matches) identifier_title_matches (None) None )default_parameter (default_parameter (identifier_title) identifier_title (None) None )default_parameter (default_parameter (identifier_category_id) identifier_category_id (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'search[title_matches]') string_'search[title_matches]' (identifier_title_matches) identifier_title_matches )pair (pair (string_'search[title]') string_'search[title]' (identifier_title) identifier_title )pair (pair (string_'search[category_id]') string_'search[category_id]' (identifier_category_id) identifier_category_id )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (string_'forum_topics.json') string_'forum_topics.json' (identifier_params) identifier_params )argument_list )call )return_statement )block )function_definition )module
Function to get forum topics. Parameters: title_matches (str): Search body for the given terms. title (str): Exact title match. category_id (int): Can be: 0, 1, 2 (General, Tags, Bugs & Features respectively).
(module (function_definition (function_name_parse_time_step) function_name_parse_time_step (parameters (identifier_time_step) identifier_time_step (default_parameter (identifier_target) identifier_target (string_'s') string_'s' )default_parameter (default_parameter (identifier_units_ref) identifier_units_ref (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_"Parsing time step %s") string_"Parsing time step %s" (identifier_time_step) identifier_time_step )argument_list )call )expression_statement (expression_statement (assignment (identifier_value) identifier_value (subscript (call (attribute (identifier_re) identifier_re (identifier_findall) identifier_findall )attribute (argument_list (string_r'\d+') string_r'\d+' (identifier_time_step) identifier_time_step )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_valuelen) identifier_valuelen (call (identifier_len) identifier_len (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_float) identifier_float (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block (except_clause (block (expression_statement (call (identifier_HydraPluginError) identifier_HydraPluginError (argument_list (binary_operator (string_"Unable to extract number of time steps (%s) from time step %s") string_"Unable to extract number of time steps (%s) from time step %s" (tuple (identifier_value) identifier_value (identifier_time_step) identifier_time_step )tuple )binary_operator )argument_list )call )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_unit) identifier_unit (call (attribute (subscript (identifier_time_step) identifier_time_step (slice (identifier_valuelen) identifier_valuelen (colon) colon )slice )subscript (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_period) identifier_period (call (identifier_get_time_period) identifier_get_time_period (argument_list (identifier_unit) identifier_unit )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_"Time period is %s") string_"Time period is %s" (identifier_period) identifier_period )argument_list )call )expression_statement (expression_statement (assignment (identifier_converted_time_step) identifier_converted_time_step (call (attribute (identifier_units_ref) identifier_units_ref (identifier_convert) identifier_convert )attribute (argument_list (identifier_value) identifier_value (identifier_period) identifier_period (identifier_target) identifier_target )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_"Time period is %s %s") string_"Time period is %s %s" (identifier_converted_time_step) identifier_converted_time_step (identifier_period) identifier_period )argument_list )call )expression_statement (return_statement (expression_list (call (identifier_float) identifier_float (argument_list (identifier_converted_time_step) identifier_converted_time_step )argument_list )call (identifier_value) identifier_value (identifier_period) identifier_period )expression_list )return_statement )block )function_definition )module
Read in the time step and convert it to seconds.
(module (function_definition (function_name_is_file_url) function_name_is_file_url (parameters (identifier_url) identifier_url )parameters (block (import_from_statement (relative_import (import_prefix )import_prefix (dotted_name (identifier_misc) identifier_misc )dotted_name )relative_import (dotted_name (identifier_to_text) identifier_to_text )dotted_name )import_from_statement (if_statement (not_operator (identifier_url) identifier_url )not_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_url) identifier_url (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call )not_operator (block (try_statement (block (expression_statement (assignment (identifier_url) identifier_url (call (identifier_getattr) identifier_getattr (argument_list (identifier_url) identifier_url (string_"url") string_"url" )argument_list )call )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Cannot parse url from unknown type: {0!r}") string_"Cannot parse url from unknown type: {0!r}" (identifier_format) identifier_format )attribute (argument_list (identifier_url) identifier_url )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )if_statement (expression_statement (assignment (identifier_url) identifier_url (call (identifier_to_text) identifier_to_text (argument_list (identifier_url) identifier_url (keyword_argument (identifier_encoding) identifier_encoding (string_"utf-8") string_"utf-8" )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (comparison_operator (attribute (call (attribute (identifier_urllib_parse) identifier_urllib_parse (identifier_urlparse) identifier_urlparse )attribute (argument_list (call (attribute (identifier_url) identifier_url (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )argument_list )call (identifier_scheme) identifier_scheme )attribute (string_"file") string_"file" )comparison_operator )return_statement )block )function_definition )module
Returns true if the given url is a file url
(module (function_definition (function_name_setup_logging) function_name_setup_logging (parameters (identifier_verbosity) identifier_verbosity (default_parameter (identifier_formats) identifier_formats (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_formats) identifier_formats (None) None )comparison_operator (block (expression_statement (assignment (identifier_formats) identifier_formats (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_log_level) identifier_log_level (attribute (identifier_logging) identifier_logging (identifier_INFO) identifier_INFO )attribute )assignment )expression_statement (expression_statement (assignment (identifier_log_format) identifier_log_format (call (attribute (identifier_formats) identifier_formats (identifier_get) identifier_get )attribute (argument_list (string_"info") string_"info" (identifier_INFO_FORMAT) identifier_INFO_FORMAT )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_isatty) identifier_isatty )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_log_format) identifier_log_format (call (attribute (identifier_formats) identifier_formats (identifier_get) identifier_get )attribute (argument_list (string_"color") string_"color" (identifier_COLOR_FORMAT) identifier_COLOR_FORMAT )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_verbosity) identifier_verbosity (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_log_level) identifier_log_level (attribute (identifier_logging) identifier_logging (identifier_DEBUG) identifier_DEBUG )attribute )assignment )expression_statement (expression_statement (assignment (identifier_log_format) identifier_log_format (call (attribute (identifier_formats) identifier_formats (identifier_get) identifier_get )attribute (argument_list (string_"debug") string_"debug" (identifier_DEBUG_FORMAT) identifier_DEBUG_FORMAT )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_verbosity) identifier_verbosity (integer_2) integer_2 )comparison_operator (block (expression_statement (call (attribute (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (string_"botocore") string_"botocore" )argument_list )call (identifier_setLevel) identifier_setLevel )attribute (argument_list (attribute (identifier_logging) identifier_logging (identifier_CRITICAL) identifier_CRITICAL )attribute )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_hdlr) identifier_hdlr (call (attribute (identifier_logging) identifier_logging (identifier_StreamHandler) identifier_StreamHandler )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_hdlr) identifier_hdlr (identifier_setFormatter) identifier_setFormatter )attribute (argument_list (call (identifier_ColorFormatter) identifier_ColorFormatter (argument_list (identifier_log_format) identifier_log_format (identifier_ISO_8601) identifier_ISO_8601 )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_logging) identifier_logging (identifier_root) identifier_root )attribute (identifier_addHandler) identifier_addHandler )attribute (argument_list (identifier_hdlr) identifier_hdlr )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_logging) identifier_logging (identifier_root) identifier_root )attribute (identifier_setLevel) identifier_setLevel )attribute (argument_list (identifier_log_level) identifier_log_level )argument_list )call )expression_statement )block )function_definition )module
Configure a proper logger based on verbosity and optional log formats. Args: verbosity (int): 0, 1, 2 formats (dict): Optional, looks for `info`, `color`, and `debug` keys which may override the associated default log formats.
(module (function_definition (function_name_run_step) function_name_run_step (parameters (identifier_context) identifier_context )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"started") string_"started" )argument_list )call )expression_statement (expression_statement (assignment (identifier_format_expression) identifier_format_expression (call (attribute (identifier_context) identifier_context (identifier_get) identifier_get )attribute (argument_list (string_'nowUtcIn') string_'nowUtcIn' (None) None )argument_list )call )assignment )expression_statement (if_statement (identifier_format_expression) identifier_format_expression (block (expression_statement (assignment (identifier_formatted_expression) identifier_formatted_expression (call (attribute (identifier_context) identifier_context (identifier_get_formatted_string) identifier_get_formatted_string )attribute (argument_list (identifier_format_expression) identifier_format_expression )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_context) identifier_context (string_'nowUtc') string_'nowUtc' )subscript (call (attribute (call (attribute (identifier_datetime) identifier_datetime (identifier_now) identifier_now )attribute (argument_list (attribute (identifier_timezone) identifier_timezone (identifier_utc) identifier_utc )attribute )argument_list )call (identifier_strftime) identifier_strftime )attribute (argument_list (identifier_formatted_expression) identifier_formatted_expression )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_context) identifier_context (string_'nowUtc') string_'nowUtc' )subscript (call (attribute (call (attribute (identifier_datetime) identifier_datetime (identifier_now) identifier_now )attribute (argument_list (attribute (identifier_timezone) identifier_timezone (identifier_utc) identifier_utc )attribute )argument_list )call (identifier_isoformat) identifier_isoformat )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_f"timestamp {context['nowUtc']} saved to context nowUtc") string_f"timestamp {context['nowUtc']} saved to context nowUtc" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"done") string_"done" )argument_list )call )expression_statement )block )function_definition )module
pypyr step saves current utc datetime to context. Args: context: pypyr.context.Context. Mandatory. The following context key is optional: - nowUtcIn. str. Datetime formatting expression. For full list of possible expressions, check here: https://docs.python.org/3.7/library/datetime.html#strftime-and-strptime-behavior All inputs support pypyr formatting expressions. This step creates now in context, containing a string representation of the timestamp. If input formatting not specified, defaults to ISO8601. Default is: YYYY-MM-DDTHH:MM:SS.ffffff+00:00, or, if microsecond is 0, YYYY-MM-DDTHH:MM:SS Returns: None. updates context arg.
(module (function_definition (function_name_encrypt_file) function_name_encrypt_file (parameters (identifier_self) identifier_self (identifier_path) identifier_path (default_parameter (identifier_output_path) identifier_output_path (None) None )default_parameter (default_parameter (identifier_overwrite) identifier_overwrite (False) False )default_parameter (default_parameter (identifier_enable_verbose) identifier_enable_verbose (True) True )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_path) identifier_path (identifier_output_path) identifier_output_path )pattern_list (call (attribute (identifier_files) identifier_files (identifier_process_dst_overwrite_args) identifier_process_dst_overwrite_args )attribute (argument_list (keyword_argument (identifier_src) identifier_src (identifier_path) identifier_path )keyword_argument (keyword_argument (identifier_dst) identifier_dst (identifier_output_path) identifier_output_path )keyword_argument (keyword_argument (identifier_overwrite) identifier_overwrite (identifier_overwrite) identifier_overwrite )keyword_argument (keyword_argument (identifier_src_to_dst_func) identifier_src_to_dst_func (attribute (identifier_files) identifier_files (identifier_get_encrpyted_path) identifier_get_encrpyted_path )attribute )keyword_argument )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_infile) identifier_infile )as_pattern_target )as_pattern )with_item (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_output_path) identifier_output_path (string_"wb") string_"wb" )argument_list )call (as_pattern_target (identifier_outfile) identifier_outfile )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (identifier_encrypt_bigfile) identifier_encrypt_bigfile (argument_list (identifier_infile) identifier_infile (identifier_outfile) identifier_outfile (attribute (identifier_self) identifier_self (identifier_his_pubkey) identifier_his_pubkey )attribute )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Encrypt a file using rsa. RSA for big file encryption is very slow. For big file, I recommend to use symmetric encryption and use RSA to encrypt the password.
(module (function_definition (function_name_get_all_preordered_namespace_hashes) function_name_get_all_preordered_namespace_hashes (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_cur) identifier_cur (call (attribute (attribute (identifier_self) identifier_self (identifier_db) identifier_db )attribute (identifier_cursor) identifier_cursor )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_namespace_hashes) identifier_namespace_hashes (call (identifier_namedb_get_all_preordered_namespace_hashes) identifier_namedb_get_all_preordered_namespace_hashes (argument_list (identifier_cur) identifier_cur (attribute (identifier_self) identifier_self (identifier_lastblock) identifier_lastblock )attribute )argument_list )call )assignment )expression_statement (return_statement (identifier_namespace_hashes) identifier_namespace_hashes )return_statement )block )function_definition )module
Get all oustanding namespace preorder hashes that have not expired. Used for testing
(module (function_definition (function_name_set_asset_dir) function_name_set_asset_dir (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_log) identifier_log (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_cls_logger) identifier_cls_logger )attribute (string_'.get_asset_dir') string_'.get_asset_dir' )binary_operator )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_asset_dir) identifier_asset_dir )attribute (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (string_'ASSET_DIR') string_'ASSET_DIR' )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warn) identifier_warn )attribute (argument_list (string_'Environment variable ASSET_DIR is not set!') string_'Environment variable ASSET_DIR is not set!' )argument_list )call )expression_statement )block )except_clause (else_clause (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_'Found environment variable ASSET_DIR: {a}') string_'Found environment variable ASSET_DIR: {a}' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_a) identifier_a (attribute (identifier_self) identifier_self (identifier_asset_dir) identifier_asset_dir )attribute )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )else_clause )try_statement )block )function_definition )module
Returns the ASSET_DIR environment variable This method gets the ASSET_DIR environment variable for the current asset install. It returns either the string value if set or None if it is not set. :return: None
(module (function_definition (function_name_remove_column) function_name_remove_column (parameters (identifier_conn) identifier_conn (identifier_table) identifier_table (identifier_column_name) identifier_column_name (default_parameter (identifier_schema) identifier_schema (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_activity_table) identifier_activity_table (call (identifier_get_activity_table) identifier_get_activity_table (argument_list (keyword_argument (identifier_schema) identifier_schema (identifier_schema) identifier_schema )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_remove) identifier_remove (call (attribute (identifier_sa) identifier_sa (identifier_cast) identifier_cast )attribute (argument_list (identifier_column_name) identifier_column_name (attribute (identifier_sa) identifier_sa (identifier_Text) identifier_Text )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_query) identifier_query (parenthesized_expression (call (attribute (call (attribute (call (attribute (identifier_activity_table) identifier_activity_table (identifier_update) identifier_update )attribute (argument_list )argument_list )call (identifier_values) identifier_values )attribute (argument_list (keyword_argument (identifier_old_data) identifier_old_data (binary_operator (attribute (attribute (identifier_activity_table) identifier_activity_table (identifier_c) identifier_c )attribute (identifier_old_data) identifier_old_data )attribute (identifier_remove) identifier_remove )binary_operator )keyword_argument (keyword_argument (identifier_changed_data) identifier_changed_data (binary_operator (attribute (attribute (identifier_activity_table) identifier_activity_table (identifier_c) identifier_c )attribute (identifier_changed_data) identifier_changed_data )attribute (identifier_remove) identifier_remove )binary_operator )keyword_argument )argument_list )call (identifier_where) identifier_where )attribute (argument_list (comparison_operator (attribute (attribute (identifier_activity_table) identifier_activity_table (identifier_c) identifier_c )attribute (identifier_table_name) identifier_table_name )attribute (identifier_table) identifier_table )comparison_operator )argument_list )call )parenthesized_expression )assignment )expression_statement (return_statement (call (attribute (identifier_conn) identifier_conn (identifier_execute) identifier_execute )attribute (argument_list (identifier_query) identifier_query )argument_list )call )return_statement )block )function_definition )module
Removes given `activity` jsonb data column key. This function is useful when you are doing schema changes that require removing a column. Let's say you've been using PostgreSQL-Audit for a while for a table called article. Now you want to remove one audited column called 'created_at' from this table. :: from alembic import op from postgresql_audit import remove_column def upgrade(): op.remove_column('article', 'created_at') remove_column(op, 'article', 'created_at') :param conn: An object that is able to execute SQL (either SQLAlchemy Connection, Engine or Alembic Operations object) :param table: The table to remove the column from :param column_name: Name of the column to remove :param schema: Optional name of schema to use.
(module (function_definition (function_name_export) function_name_export (parameters (identifier_self) identifier_self (default_parameter (identifier_timestamp) identifier_timestamp (None) None )default_parameter )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__timestamp) identifier__timestamp )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"No timestamp set. Has the archive been initialized?") string_"No timestamp set. Has the archive been initialized?" )argument_list )call )raise_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_skip_notebook_export) identifier_skip_notebook_export )attribute (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_NotebookArchive) identifier_NotebookArchive (identifier_self) identifier_self )argument_list )call (identifier_export) identifier_export )attribute (argument_list (keyword_argument (identifier_timestamp) identifier_timestamp (attribute (identifier_self) identifier_self (identifier__timestamp) identifier__timestamp )attribute )keyword_argument (keyword_argument (identifier_info) identifier_info (dictionary (pair (string_'notebook') string_'notebook' (attribute (identifier_self) identifier_self (identifier_notebook_name) identifier_notebook_name )attribute )pair )dictionary )keyword_argument )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_export_success) identifier_export_success )attribute (None) None )assignment )expression_statement (expression_statement (assignment (identifier_name) identifier_name (call (attribute (identifier_self) identifier_self (identifier_get_namespace) identifier_get_namespace )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_capture_cmd) identifier_capture_cmd (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (string_r"var capture = '%s._notebook_data=r\"\"\"'") string_r"var capture = '%s._notebook_data=r\"\"\"'" (identifier_name) identifier_name )binary_operator )parenthesized_expression (string_r"+json_string+'\"\"\"'; ") string_r"+json_string+'\"\"\"'; " )binary_operator )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (parenthesized_expression (binary_operator (binary_operator (binary_operator (binary_operator (binary_operator (string_r'var kernel = IPython.notebook.kernel; ') string_r'var kernel = IPython.notebook.kernel; ' (string_r'var json_data = IPython.notebook.toJSON(); ') string_r'var json_data = IPython.notebook.toJSON(); ' )binary_operator (string_r'var json_string = JSON.stringify(json_data); ') string_r'var json_string = JSON.stringify(json_data); ' )binary_operator (identifier_capture_cmd) identifier_capture_cmd )binary_operator (binary_operator (string_"var pycmd = capture + ';%s._export_with_html()'; ") string_"var pycmd = capture + ';%s._export_with_html()'; " (identifier_name) identifier_name )binary_operator )binary_operator (string_r"kernel.execute(pycmd)") string_r"kernel.execute(pycmd)" )binary_operator )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_tstamp) identifier_tstamp (call (attribute (identifier_time) identifier_time (identifier_strftime) identifier_strftime )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_timestamp_format) identifier_timestamp_format )attribute (attribute (identifier_self) identifier_self (identifier__timestamp) identifier__timestamp )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_export_name) identifier_export_name (call (attribute (identifier_self) identifier_self (identifier__format) identifier__format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_export_name) identifier_export_name )attribute (dictionary (pair (string_'timestamp') string_'timestamp' (identifier_tstamp) identifier_tstamp )pair (pair (string_'notebook') string_'notebook' (attribute (identifier_self) identifier_self (identifier_notebook_name) identifier_notebook_name )attribute )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (parenthesized_expression (binary_operator (string_'Export name: %r\nDirectory %r') string_'Export name: %r\nDirectory %r' (tuple (identifier_export_name) identifier_export_name (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_root) identifier_root )attribute )argument_list )call )argument_list )call )tuple )binary_operator )parenthesized_expression (string_'\n\nIf no output appears, please check holoviews.archive.last_export_status()') string_'\n\nIf no output appears, please check holoviews.archive.last_export_status()' )binary_operator )argument_list )call )expression_statement (expression_statement (call (identifier_display) identifier_display (argument_list (call (identifier_Javascript) identifier_Javascript (argument_list (identifier_cmd) identifier_cmd )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Get the current notebook data and export.
(module (function_definition (function_name_get_scheme_dirs) function_name_get_scheme_dirs (parameters )parameters (block (expression_statement (assignment (identifier_scheme_glob) identifier_scheme_glob (call (identifier_rel_to_cwd) identifier_rel_to_cwd (argument_list (string_'schemes') string_'schemes' (string_'**') string_'**' (string_'*.yaml') string_'*.yaml' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_scheme_groups) identifier_scheme_groups (call (identifier_glob) identifier_glob (argument_list (identifier_scheme_glob) identifier_scheme_glob )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_scheme_groups) identifier_scheme_groups (list_comprehension (call (identifier_get_parent_dir) identifier_get_parent_dir (argument_list (identifier_path) identifier_path )argument_list )call (for_in_clause (identifier_path) identifier_path (identifier_scheme_groups) identifier_scheme_groups )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (call (identifier_set) identifier_set (argument_list (identifier_scheme_groups) identifier_scheme_groups )argument_list )call )return_statement )block )function_definition )module
Return a set of all scheme directories.
(module (function_definition (function_name_walk) function_name_walk (parameters (identifier_cls) identifier_cls (default_parameter (identifier_top) identifier_top (string_".") string_"." )default_parameter (default_parameter (identifier_ext) identifier_ext (string_".abo") string_".abo" )default_parameter )parameters (block (expression_statement (assignment (identifier_paths) identifier_paths (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_root) identifier_root (identifier_dirs) identifier_dirs (identifier_files) identifier_files )pattern_list (call (attribute (identifier_os) identifier_os (identifier_walk) identifier_walk )attribute (argument_list (identifier_top) identifier_top )argument_list )call (block (for_statement (identifier_f) identifier_f (identifier_files) identifier_files (block (if_statement (call (attribute (identifier_f) identifier_f (identifier_endswith) identifier_endswith )attribute (argument_list (identifier_ext) identifier_ext )argument_list )call (block (expression_statement (call (attribute (identifier_paths) identifier_paths (identifier_append) identifier_append )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_root) identifier_root (identifier_f) identifier_f )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )for_statement (expression_statement (assignment (identifier_parser) identifier_parser (call (identifier_cls) identifier_cls (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_okfiles) identifier_okfiles (call (attribute (identifier_parser) identifier_parser (identifier_parse) identifier_parse )attribute (argument_list (identifier_paths) identifier_paths )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_parser) identifier_parser (identifier_paths) identifier_paths (identifier_okfiles) identifier_okfiles )expression_list )return_statement )block )function_definition )module
Scan directory tree starting from top, look for files with extension `ext` and parse timing data. Return: (parser, paths, okfiles) where `parser` is the new object, `paths` is the list of files found and `okfiles` is the list of files that have been parsed successfully. (okfiles == paths) if all files have been parsed.
(module (function_definition (function_name__as_log_entry) function_name__as_log_entry (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_now) identifier_now )parameters (block (expression_statement (assignment (identifier_d) identifier_d (dictionary (pair (string_u'http_response_code') string_u'http_response_code' (attribute (identifier_self) identifier_self (identifier_response_code) identifier_response_code )attribute )pair (pair (string_u'timestamp') string_u'timestamp' (call (attribute (identifier_time) identifier_time (identifier_mktime) identifier_mktime )attribute (argument_list (call (attribute (identifier_now) identifier_now (identifier_timetuple) identifier_timetuple )attribute (argument_list )argument_list )call )argument_list )call )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_severity) identifier_severity (attribute (identifier__SEVERITY) identifier__SEVERITY (identifier_INFO) identifier_INFO )attribute )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_response_code) identifier_response_code )attribute (integer_400) integer_400 )comparison_operator (block (expression_statement (assignment (identifier_severity) identifier_severity (attribute (identifier__SEVERITY) identifier__SEVERITY (identifier_ERROR) identifier_ERROR )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_d) identifier_d (string_u'error_cause') string_u'error_cause' )subscript (attribute (attribute (identifier_self) identifier_self (identifier_error_cause) identifier_error_cause )attribute (identifier_name) identifier_name )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_request_size) identifier_request_size )attribute (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (subscript (identifier_d) identifier_d (string_u'request_size') string_u'request_size' )subscript (attribute (identifier_self) identifier_self (identifier_request_size) identifier_request_size )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_response_size) identifier_response_size )attribute (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (subscript (identifier_d) identifier_d (string_u'response_size') string_u'response_size' )subscript (attribute (identifier_self) identifier_self (identifier_response_size) identifier_response_size )attribute )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_method) identifier_method )attribute (block (expression_statement (assignment (subscript (identifier_d) identifier_d (string_u'http_method') string_u'http_method' )subscript (attribute (identifier_self) identifier_self (identifier_method) identifier_method )attribute )assignment )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_request_time) identifier_request_time )attribute (block (expression_statement (assignment (subscript (identifier_d) identifier_d (string_u'request_latency_in_ms') string_u'request_latency_in_ms' )subscript (binary_operator (call (attribute (attribute (identifier_self) identifier_self (identifier_request_time) identifier_request_time )attribute (identifier_total_seconds) identifier_total_seconds )attribute (argument_list )argument_list )call (integer_1000) integer_1000 )binary_operator )assignment )expression_statement )block )if_statement (for_statement (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier_COPYABLE_LOG_FIELDS) identifier_COPYABLE_LOG_FIELDS )attribute (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_key) identifier_key (None) None )argument_list )call )assignment )expression_statement (if_statement (identifier_value) identifier_value (block (expression_statement (assignment (subscript (identifier_d) identifier_d (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (call (attribute (identifier_sc_messages) identifier_sc_messages (identifier_LogEntry) identifier_LogEntry )attribute (argument_list (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_timestamp) identifier_timestamp (call (attribute (identifier_timestamp) identifier_timestamp (identifier_to_rfc3339) identifier_to_rfc3339 )attribute (argument_list (identifier_now) identifier_now )argument_list )call )keyword_argument (keyword_argument (identifier_severity) identifier_severity (identifier_severity) identifier_severity )keyword_argument (keyword_argument (identifier_structPayload) identifier_structPayload (call (identifier__struct_payload_from) identifier__struct_payload_from (argument_list (identifier_d) identifier_d )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Makes a `LogEntry` from this instance for the given log_name. Args: rules (:class:`ReportingRules`): determines what labels, metrics and logs to include in the report request. now (:class:`datetime.DateTime`): the current time Return: a ``LogEntry`` generated from this instance with the given name and timestamp Raises: ValueError: if the fields in this instance are insufficient to to create a valid ``ServicecontrolServicesReportRequest``
(module (function_definition (function_name_wrap_embedded_keyvalue) function_name_wrap_embedded_keyvalue (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (if_statement (comparison_operator (identifier_data) identifier_data (None) None )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (string_u'{}') string_u'{}' (identifier_format) identifier_format )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement )block (except_clause (identifier_UnicodeEncodeError) identifier_UnicodeEncodeError (block (pass_statement )pass_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_variables) identifier_variables (list )list )assignment )expression_statement (for_statement (identifier_v) identifier_v (call (attribute (identifier_re) identifier_re (identifier_finditer) identifier_finditer )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__vars_keyvalue_embedded) identifier__vars_keyvalue_embedded )attribute (identifier_data) identifier_data )argument_list )call (block (expression_statement (call (attribute (identifier_variables) identifier_variables (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_v) identifier_v (identifier_group) identifier_group )attribute (argument_list (integer_0) integer_0 )argument_list )call )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_var) identifier_var (call (identifier_set) identifier_set (argument_list (identifier_variables) identifier_variables )argument_list )call (block (expression_statement (assignment (identifier_variable_string) identifier_variable_string (call (attribute (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__variable_parse) identifier__variable_parse )attribute (identifier_var) identifier_var )argument_list )call (identifier_group) identifier_group )attribute (argument_list (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_data) identifier_data (identifier_replace) identifier_replace )attribute (argument_list (identifier_var) identifier_var (call (attribute (string_'": "{}"') string_'": "{}"' (identifier_format) identifier_format )attribute (argument_list (identifier_variable_string) identifier_variable_string )argument_list )call )argument_list )call )assignment )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Wrap keyvalue embedded variable in double quotes. Args: data (string): The data with embedded variables. Returns: (string): Results retrieved from DB
(module (function_definition (function_name_get_query_with_new_limit) function_name_get_query_with_new_limit (parameters (identifier_self) identifier_self (identifier_new_limit) identifier_new_limit )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__limit) identifier__limit )attribute )not_operator (block (return_statement (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_sql) identifier_sql )attribute (string_' LIMIT ') string_' LIMIT ' )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_new_limit) identifier_new_limit )argument_list )call )binary_operator )return_statement )block )if_statement (expression_statement (assignment (identifier_limit_pos) identifier_limit_pos (None) None )assignment )expression_statement (expression_statement (assignment (identifier_tokens) identifier_tokens (attribute (subscript (attribute (identifier_self) identifier_self (identifier__parsed) identifier__parsed )attribute (integer_0) integer_0 )subscript (identifier_tokens) identifier_tokens )attribute )assignment )expression_statement (for_statement (pattern_list (identifier_pos) identifier_pos (identifier_item) identifier_item )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_tokens) identifier_tokens )argument_list )call (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_item) identifier_item (identifier_ttype) identifier_ttype )attribute (identifier_Keyword) identifier_Keyword )comparison_operator (comparison_operator (call (attribute (attribute (identifier_item) identifier_item (identifier_value) identifier_value )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (string_'limit') string_'limit' )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_limit_pos) identifier_limit_pos (identifier_pos) identifier_pos )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_limit) identifier_limit (subscript (identifier_tokens) identifier_tokens (binary_operator (identifier_limit_pos) identifier_limit_pos (integer_2) integer_2 )binary_operator )subscript )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_limit) identifier_limit (identifier_ttype) identifier_ttype )attribute (attribute (attribute (attribute (attribute (identifier_sqlparse) identifier_sqlparse (identifier_tokens) identifier_tokens )attribute (identifier_Literal) identifier_Literal )attribute (identifier_Number) identifier_Number )attribute (identifier_Integer) identifier_Integer )attribute )comparison_operator (block (expression_statement (assignment (attribute (subscript (identifier_tokens) identifier_tokens (binary_operator (identifier_limit_pos) identifier_limit_pos (integer_2) integer_2 )binary_operator )subscript (identifier_value) identifier_value )attribute (identifier_new_limit) identifier_new_limit )assignment )expression_statement )block (elif_clause (attribute (identifier_limit) identifier_limit (identifier_is_group) identifier_is_group )attribute (block (expression_statement (assignment (attribute (subscript (identifier_tokens) identifier_tokens (binary_operator (identifier_limit_pos) identifier_limit_pos (integer_2) integer_2 )binary_operator )subscript (identifier_value) identifier_value )attribute (parenthesized_expression (call (attribute (string_'{}, {}') string_'{}, {}' (identifier_format) identifier_format )attribute (argument_list (call (identifier_next) identifier_next (argument_list (call (attribute (identifier_limit) identifier_limit (identifier_get_identifiers) identifier_get_identifiers )attribute (argument_list )argument_list )call )argument_list )call (identifier_new_limit) identifier_new_limit )argument_list )call )parenthesized_expression )assignment )expression_statement )block )elif_clause )if_statement (expression_statement (assignment (identifier_str_res) identifier_str_res (string_'') string_'' )assignment )expression_statement (for_statement (identifier_i) identifier_i (identifier_tokens) identifier_tokens (block (expression_statement (augmented_assignment (identifier_str_res) identifier_str_res (call (identifier_str) identifier_str (argument_list (attribute (identifier_i) identifier_i (identifier_value) identifier_value )attribute )argument_list )call )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_str_res) identifier_str_res )return_statement )block )function_definition )module
returns the query with the specified limit
(module (function_definition (function_name_items) function_name_items (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'_items') string_'_items' )argument_list )call (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_filter_items) identifier_filter_items )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__items) identifier__items )attribute )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__items) identifier__items )attribute (call (attribute (identifier_self) identifier_self (identifier_get_items) identifier_get_items )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_filter_items) identifier_filter_items )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__items) identifier__items )attribute )argument_list )call )return_statement )block )function_definition )module
access for filtered items
(module (function_definition (function_name_replace_coord) function_name_replace_coord (parameters (identifier_self) identifier_self (identifier_i) identifier_i )parameters (block (expression_statement (assignment (identifier_da) identifier_da (call (identifier_next) identifier_next (argument_list (call (identifier_islice) identifier_islice (argument_list (attribute (identifier_self) identifier_self (identifier_data_iterator) identifier_data_iterator )attribute (identifier_i) identifier_i (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_name) identifier_name (identifier_coord) identifier_coord )pattern_list (call (attribute (identifier_self) identifier_self (identifier_get_alternative_coord) identifier_get_alternative_coord )attribute (argument_list (identifier_da) identifier_da (identifier_i) identifier_i )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_other_coords) identifier_other_coords (dictionary_comprehension (pair (identifier_key) identifier_key (subscript (attribute (identifier_da) identifier_da (identifier_coords) identifier_coords )attribute (identifier_key) identifier_key )subscript )pair (for_in_clause (identifier_key) identifier_key (call (attribute (call (identifier_set) identifier_set (argument_list (attribute (identifier_da) identifier_da (identifier_coords) identifier_coords )attribute )argument_list )call (identifier_difference) identifier_difference )attribute (argument_list (attribute (identifier_da) identifier_da (identifier_dims) identifier_dims )attribute )argument_list )call )for_in_clause )dictionary_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_ret) identifier_ret (call (attribute (call (attribute (call (attribute (identifier_da) identifier_da (identifier_rename) identifier_rename )attribute (argument_list (dictionary (pair (subscript (attribute (identifier_da) identifier_da (identifier_dims) identifier_dims )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_name) identifier_name )pair )dictionary )argument_list )call (identifier_assign_coords) identifier_assign_coords )attribute (argument_list (dictionary_splat (dictionary (pair (identifier_name) identifier_name (identifier_coord) identifier_coord )pair )dictionary )dictionary_splat )argument_list )call (identifier_assign_coords) identifier_assign_coords )attribute (argument_list (dictionary_splat (identifier_other_coords) identifier_other_coords )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Replace the coordinate for the data array at the given position Parameters ---------- i: int The number of the data array in the raw data (if the raw data is not an interactive list, use 0) Returns xarray.DataArray The data array with the replaced coordinate
(module (function_definition (function_name__error_result_to_exception) function_name__error_result_to_exception (parameters (identifier_error_result) identifier_error_result )parameters (block (expression_statement (assignment (identifier_reason) identifier_reason (call (attribute (identifier_error_result) identifier_error_result (identifier_get) identifier_get )attribute (argument_list (string_"reason") string_"reason" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_status_code) identifier_status_code (call (attribute (identifier__ERROR_REASON_TO_EXCEPTION) identifier__ERROR_REASON_TO_EXCEPTION (identifier_get) identifier_get )attribute (argument_list (identifier_reason) identifier_reason (attribute (identifier_http_client) identifier_http_client (identifier_INTERNAL_SERVER_ERROR) identifier_INTERNAL_SERVER_ERROR )attribute )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_from_http_status) identifier_from_http_status )attribute (argument_list (identifier_status_code) identifier_status_code (call (attribute (identifier_error_result) identifier_error_result (identifier_get) identifier_get )attribute (argument_list (string_"message") string_"message" (string_"") string_"" )argument_list )call (keyword_argument (identifier_errors) identifier_errors (list (identifier_error_result) identifier_error_result )list )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Maps BigQuery error reasons to an exception. The reasons and their matching HTTP status codes are documented on the `troubleshooting errors`_ page. .. _troubleshooting errors: https://cloud.google.com/bigquery\ /troubleshooting-errors :type error_result: Mapping[str, str] :param error_result: The error result from BigQuery. :rtype google.cloud.exceptions.GoogleCloudError: :returns: The mapped exception.
(module (function_definition (function_name_install) function_name_install (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_SystemD) identifier_SystemD (identifier_self) identifier_self )argument_list )call (identifier_install) identifier_install )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_deploy_service_file) identifier_deploy_service_file )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_svc_file_path) identifier_svc_file_path )attribute (attribute (identifier_self) identifier_self (identifier_svc_file_dest) identifier_svc_file_dest )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_deploy_service_file) identifier_deploy_service_file )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_env_file_path) identifier_env_file_path )attribute (attribute (identifier_self) identifier_self (identifier_env_file_dest) identifier_env_file_dest )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_sh) identifier_sh (identifier_systemctl) identifier_systemctl )attribute (identifier_enable) identifier_enable )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sh) identifier_sh (identifier_systemctl) identifier_systemctl )attribute (argument_list (string_'daemon-reload') string_'daemon-reload' )argument_list )call )expression_statement )block )function_definition )module
Install the service on the local machine This is where we deploy the service files to their relevant locations and perform any other required actions to configure the service and make it ready to be `start`ed.
(module (function_definition (function_name_reset) function_name_reset (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_copy2) identifier_copy2 )attribute (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_config_file) identifier_config_file )attribute (string_".orig") string_".orig" )binary_operator (attribute (identifier_self) identifier_self (identifier_config_file) identifier_config_file )attribute )argument_list )call )expression_statement (if_statement (call (attribute (identifier_filecmp) identifier_filecmp (identifier_cmp) identifier_cmp )attribute (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_config_file) identifier_config_file )attribute (string_".orig") string_".orig" )binary_operator (attribute (identifier_self) identifier_self (identifier_config_file) identifier_config_file )attribute )argument_list )call (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"{0}The reset was done{1}") string_"{0}The reset was done{1}" (identifier_format) identifier_format )attribute (argument_list (subscript (attribute (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (identifier_color) identifier_color )attribute (string_"GREEN") string_"GREEN" )subscript (subscript (attribute (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (identifier_color) identifier_color )attribute (string_"ENDC") string_"ENDC" )subscript )argument_list )call )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"{0}Reset failed{1}") string_"{0}Reset failed{1}" (identifier_format) identifier_format )attribute (argument_list (subscript (attribute (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (identifier_color) identifier_color )attribute (string_"RED") string_"RED" )subscript (subscript (attribute (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (identifier_color) identifier_color )attribute (string_"ENDC") string_"ENDC" )subscript )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Reset slpkg.conf file with default values
(module (function_definition (function_name_xmlrpc_reschedule) function_name_xmlrpc_reschedule (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_scheduled_tasks) identifier_scheduled_tasks )attribute )argument_list )call (integer_0) integer_0 )comparison_operator )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_reschedule) identifier_reschedule )attribute (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_scheduled_tasks) identifier_scheduled_tasks )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_scheduled_tasks) identifier_scheduled_tasks )attribute (dictionary )dictionary )assignment )expression_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Reschedule all running tasks.
(module (function_definition (function_name_transport_jabsorbrpc) function_name_transport_jabsorbrpc (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (identifier_install_bundle) identifier_install_bundle )attribute (argument_list (string_"pelix.remote.transport.jabsorb_rpc") string_"pelix.remote.transport.jabsorb_rpc" )argument_list )call (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_use_waiting_list) identifier_use_waiting_list (argument_list (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute )argument_list )call (as_pattern_target (identifier_ipopo) identifier_ipopo )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_ipopo) identifier_ipopo (identifier_add) identifier_add )attribute (argument_list (attribute (identifier_rs) identifier_rs (identifier_FACTORY_TRANSPORT_JABSORBRPC_EXPORTER) identifier_FACTORY_TRANSPORT_JABSORBRPC_EXPORTER )attribute (string_"pelix-jabsorbrpc-exporter") string_"pelix-jabsorbrpc-exporter" )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_ipopo) identifier_ipopo (identifier_add) identifier_add )attribute (argument_list (attribute (identifier_rs) identifier_rs (identifier_FACTORY_TRANSPORT_JABSORBRPC_IMPORTER) identifier_FACTORY_TRANSPORT_JABSORBRPC_IMPORTER )attribute (string_"pelix-jabsorbrpc-importer") string_"pelix-jabsorbrpc-importer" )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Installs the JABSORB-RPC transport bundles and instantiates components
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_frac) identifier_frac (identifier_whole) identifier_whole )pattern_list (call (identifier_modf) identifier_modf (argument_list (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute (attribute (identifier_self) identifier_self (identifier_percent) identifier_percent )attribute )binary_operator (float_100.0) float_100.0 )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ret) identifier_ret (binary_operator (subscript (identifier_curses_bars) identifier_curses_bars (integer_8) integer_8 )subscript (call (identifier_int) identifier_int (argument_list (identifier_whole) identifier_whole )argument_list )call )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_frac) identifier_frac (integer_0) integer_0 )comparison_operator (block (expression_statement (augmented_assignment (identifier_ret) identifier_ret (subscript (identifier_curses_bars) identifier_curses_bars (call (identifier_int) identifier_int (argument_list (binary_operator (identifier_frac) identifier_frac (integer_8) integer_8 )binary_operator )argument_list )call )subscript )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_whole) identifier_whole (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement (expression_statement (augmented_assignment (identifier_ret) identifier_ret (binary_operator (attribute (identifier_self) identifier_self (identifier___empty_char) identifier___empty_char )attribute (call (identifier_int) identifier_int (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute (identifier_whole) identifier_whole )binary_operator )argument_list )call )binary_operator )augmented_assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier___with_text) identifier___with_text )attribute (block (expression_statement (assignment (identifier_ret) identifier_ret (call (attribute (string_'{}{:5.1f}%') string_'{}{:5.1f}%' (identifier_format) identifier_format )attribute (argument_list (identifier_ret) identifier_ret (attribute (identifier_self) identifier_self (identifier_percent) identifier_percent )attribute )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Return the bars.
(module (function_definition (function_name_keys) function_name_keys (parameters (identifier_self) identifier_self (identifier_name_start) identifier_name_start (identifier_name_end) identifier_name_end (default_parameter (identifier_limit) identifier_limit (integer_10) integer_10 )default_parameter )parameters (block (expression_statement (assignment (identifier_limit) identifier_limit (call (identifier_get_positive_integer) identifier_get_positive_integer (argument_list (string_'limit') string_'limit' (identifier_limit) identifier_limit )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_execute_command) identifier_execute_command )attribute (argument_list (string_'keys') string_'keys' (identifier_name_start) identifier_name_start (identifier_name_end) identifier_name_end (identifier_limit) identifier_limit )argument_list )call )return_statement )block )function_definition )module
Return a list of the top ``limit`` keys between ``name_start`` and ``name_end`` Similiar with **Redis.KEYS** .. note:: The range is (``name_start``, ``name_end``]. ``name_start`` isn't in the range, but ``name_end`` is. :param string name_start: The lower bound(not included) of keys to be returned, empty string ``''`` means -inf :param string name_end: The upper bound(included) of keys to be returned, empty string ``''`` means +inf :param int limit: number of elements will be returned. :return: a list of keys :rtype: list >>> ssdb.keys('set_x1', 'set_x3', 10) ['set_x2', 'set_x3'] >>> ssdb.keys('set_x ', 'set_xx', 3) ['set_x1', 'set_x2', 'set_x3'] >>> ssdb.keys('set_x ', '', 3) ['set_x1', 'set_x2', 'set_x3', 'set_x4'] >>> ssdb.keys('set_zzzzz ', '', ) []
(module (function_definition (function_name_items_to_extract) function_name_items_to_extract (parameters (identifier_self) identifier_self (default_parameter (identifier_offset) identifier_offset (integer_0) integer_0 )default_parameter (default_parameter (identifier_length) identifier_length (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_endoffset) identifier_endoffset (boolean_operator (identifier_length) identifier_length (binary_operator (identifier_offset) identifier_offset (identifier_length) identifier_length )binary_operator )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_qs) identifier_qs (subscript (call (attribute (identifier_self) identifier_self (identifier_origin_data) identifier_origin_data )attribute (argument_list )argument_list )call (slice (identifier_offset) identifier_offset (colon) colon (identifier_endoffset) identifier_endoffset )slice )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_items_to_extract_length) identifier_items_to_extract_length )attribute (call (attribute (identifier_qs) identifier_qs (identifier_count) identifier_count )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (identifier_qs) identifier_qs )return_statement )block )function_definition )module
Return an iterable of specific items to extract. As a side-effect, set self.items_to_extract_length. :param offset: where to start extracting :param length: how many to extract :return: An iterable of the specific
(module (function_definition (function_name_createCleanup) function_name_createCleanup (parameters (identifier_self) identifier_self (identifier_varBind) identifier_varBind (dictionary_splat_pattern (identifier_context) identifier_context )dictionary_splat_pattern )parameters (block (expression_statement (assignment (pattern_list (identifier_name) identifier_name (identifier_val) identifier_val )pattern_list (identifier_varBind) identifier_varBind )assignment )expression_statement (expression_statement (parenthesized_expression (boolean_operator (binary_operator (attribute (identifier_debug) identifier_debug (identifier_logger) identifier_logger )attribute (attribute (identifier_debug) identifier_debug (identifier_FLAG_INS) identifier_FLAG_INS )attribute )binary_operator (call (attribute (identifier_debug) identifier_debug (identifier_logger) identifier_logger )attribute (argument_list (binary_operator (string_'%s: createCleanup(%s, %r)') string_'%s: createCleanup(%s, %r)' (tuple (identifier_self) identifier_self (identifier_name) identifier_name (identifier_val) identifier_val )tuple )binary_operator )argument_list )call )boolean_operator )parenthesized_expression )expression_statement (expression_statement (assignment (identifier_instances) identifier_instances (call (attribute (subscript (identifier_context) identifier_context (string_'instances') string_'instances' )subscript (identifier_setdefault) identifier_setdefault )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute (dictionary (pair (attribute (identifier_self) identifier_self (identifier_ST_CREATE) identifier_ST_CREATE )attribute (dictionary )dictionary )pair (pair (attribute (identifier_self) identifier_self (identifier_ST_DESTROY) identifier_ST_DESTROY )attribute (dictionary )dictionary )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_idx) identifier_idx (subscript (identifier_context) identifier_context (string_'idx') string_'idx' )subscript )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_branchVersionId) identifier_branchVersionId )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (call (attribute (subscript (identifier_instances) identifier_instances (attribute (identifier_self) identifier_self (identifier_ST_CREATE) identifier_ST_CREATE )attribute )subscript (identifier_pop) identifier_pop )attribute (argument_list (binary_operator (unary_operator (identifier_idx) identifier_idx )unary_operator (integer_1) integer_1 )binary_operator (None) None )argument_list )call )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__vars) identifier__vars )attribute (identifier_name) identifier_name )subscript (identifier_writeCleanup) identifier_writeCleanup )attribute (argument_list (identifier_varBind) identifier_varBind (dictionary_splat (identifier_context) identifier_context )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Finalize Managed Object Instance creation. Implements the successful third step of the multi-step workflow similar to the SNMP SET command processing (:RFC:`1905#section-4.2.5`). The goal of the third (successful) phase is to seal the new Managed Object Instance. Once the system transitions into the *cleanup* state, no roll back to the previous Managed Object Instance state is possible. The role of this object in the MIB tree is non-terminal. It does not access the actual Managed Object Instance, but just traverses one level down the MIB tree and hands off the query to the underlying objects. Parameters ---------- varBind: :py:class:`~pysnmp.smi.rfc1902.ObjectType` object representing new Managed Object Instance value to create Other Parameters ---------------- \*\*context: Query parameters: * `cbFun` (callable) - user-supplied callable that is invoked to pass the new value of the Managed Object Instance or an error. * `instances` (dict): user-supplied dict for temporarily holding Managed Objects Instances being created. Notes ----- The callback functions (e.g. `cbFun`) have the same signature as this method where `varBind` contains the new Managed Object Instance value. In case of an error, the `error` key in the `context` dict will contain an exception object.
(module (function_definition (function_name_move_camera) function_name_move_camera (parameters (identifier_action) identifier_action (identifier_action_space) identifier_action_space (identifier_minimap) identifier_minimap )parameters (block (expression_statement (call (attribute (identifier_minimap) identifier_minimap (identifier_assign_to) identifier_assign_to )attribute (argument_list (attribute (attribute (call (identifier_spatial) identifier_spatial (argument_list (identifier_action) identifier_action (identifier_action_space) identifier_action_space )argument_list )call (identifier_camera_move) identifier_camera_move )attribute (identifier_center_minimap) identifier_center_minimap )attribute )argument_list )call )expression_statement )block )function_definition )module
Move the camera.
(module (function_definition (function_name_check_ttl_max_tries) function_name_check_ttl_max_tries (parameters (identifier_tries) identifier_tries (identifier_enqueued_at) identifier_enqueued_at (identifier_max_tries) identifier_max_tries (identifier_ttl) identifier_ttl )parameters (block (if_statement (boolean_operator (comparison_operator (identifier_max_tries) identifier_max_tries (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_tries) identifier_tries (identifier_max_tries) identifier_max_tries )comparison_operator )boolean_operator (block (raise_statement (call (identifier_FSQMaxTriesError) identifier_FSQMaxTriesError (argument_list (attribute (identifier_errno) identifier_errno (identifier_EINTR) identifier_EINTR )attribute (call (attribute (concatenated_string (string_u'Max tries exceded:') string_u'Max tries exceded:' (string_u' {0} ({1})') string_u' {0} ({1})' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_max_tries) identifier_max_tries (identifier_tries) identifier_tries )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_ttl) identifier_ttl (integer_0) integer_0 )comparison_operator (comparison_operator (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_now) identifier_now )attribute (argument_list )argument_list )call (binary_operator (identifier_enqueued_at) identifier_enqueued_at (call (attribute (identifier_datetime) identifier_datetime (identifier_timedelta) identifier_timedelta )attribute (argument_list (keyword_argument (identifier_seconds) identifier_seconds (identifier_ttl) identifier_ttl )keyword_argument )argument_list )call )binary_operator )comparison_operator )boolean_operator (block (raise_statement (call (identifier_FSQTTLExpiredError) identifier_FSQTTLExpiredError (argument_list (attribute (identifier_errno) identifier_errno (identifier_EINTR) identifier_EINTR )attribute (call (attribute (concatenated_string (string_u'TTL Expired:') string_u'TTL Expired:' (string_u' {0}') string_u' {0}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_ttl) identifier_ttl )argument_list )call )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Check that the ttl for an item has not expired, and that the item has not exceeded it's maximum allotted tries
(module (function_definition (function_name__build_toctree_node) function_name__build_toctree_node (parameters (default_parameter (identifier_parent) identifier_parent (None) None )default_parameter (default_parameter (identifier_entries) identifier_entries (None) None )default_parameter (default_parameter (identifier_includefiles) identifier_includefiles (None) None )default_parameter (default_parameter (identifier_caption) identifier_caption (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_subnode) identifier_subnode (call (attribute (attribute (identifier_sphinx) identifier_sphinx (identifier_addnodes) identifier_addnodes )attribute (identifier_toctree) identifier_toctree )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_subnode) identifier_subnode (string_'parent') string_'parent' )subscript (identifier_parent) identifier_parent )assignment )expression_statement (expression_statement (assignment (subscript (identifier_subnode) identifier_subnode (string_'entries') string_'entries' )subscript (identifier_entries) identifier_entries )assignment )expression_statement (expression_statement (assignment (subscript (identifier_subnode) identifier_subnode (string_'includefiles') string_'includefiles' )subscript (identifier_includefiles) identifier_includefiles )assignment )expression_statement (expression_statement (assignment (subscript (identifier_subnode) identifier_subnode (string_'caption') string_'caption' )subscript (identifier_caption) identifier_caption )assignment )expression_statement (expression_statement (assignment (subscript (identifier_subnode) identifier_subnode (string_'maxdepth') string_'maxdepth' )subscript (integer_1) integer_1 )assignment )expression_statement (expression_statement (assignment (subscript (identifier_subnode) identifier_subnode (string_'hidden') string_'hidden' )subscript (False) False )assignment )expression_statement (expression_statement (assignment (subscript (identifier_subnode) identifier_subnode (string_'glob') string_'glob' )subscript (None) None )assignment )expression_statement (expression_statement (assignment (subscript (identifier_subnode) identifier_subnode (string_'hidden') string_'hidden' )subscript (False) False )assignment )expression_statement (expression_statement (assignment (subscript (identifier_subnode) identifier_subnode (string_'includehidden') string_'includehidden' )subscript (False) False )assignment )expression_statement (expression_statement (assignment (subscript (identifier_subnode) identifier_subnode (string_'numbered') string_'numbered' )subscript (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (subscript (identifier_subnode) identifier_subnode (string_'titlesonly') string_'titlesonly' )subscript (False) False )assignment )expression_statement (return_statement (identifier_subnode) identifier_subnode )return_statement )block )function_definition )module
Factory for a toctree node.
(module (function_definition (function_name_create) function_name_create (parameters (identifier_graph) identifier_graph (default_parameter (identifier_kmin) identifier_kmin (integer_0) integer_0 )default_parameter (default_parameter (identifier_kmax) identifier_kmax (integer_10) integer_10 )default_parameter (default_parameter (identifier_verbose) identifier_verbose (True) True )default_parameter )parameters (block (import_from_statement (dotted_name (identifier_turicreate) identifier_turicreate (identifier__cython) identifier__cython (identifier_cy_server) identifier_cy_server )dotted_name (dotted_name (identifier_QuietProgress) identifier_QuietProgress )dotted_name )import_from_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_graph) identifier_graph (identifier__SGraph) identifier__SGraph )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_'graph input must be a SGraph object.') string_'graph input must be a SGraph object.' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_opts) identifier_opts (dictionary (pair (string_'graph') string_'graph' (attribute (identifier_graph) identifier_graph (identifier___proxy__) identifier___proxy__ )attribute )pair (pair (string_'kmin') string_'kmin' (identifier_kmin) identifier_kmin )pair (pair (string_'kmax') string_'kmax' (identifier_kmax) identifier_kmax )pair )dictionary )assignment )expression_statement (with_statement (with_clause (with_item (call (identifier_QuietProgress) identifier_QuietProgress (argument_list (identifier_verbose) identifier_verbose )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_params) identifier_params (call (attribute (attribute (attribute (attribute (attribute (identifier__tc) identifier__tc (identifier_extensions) identifier_extensions )attribute (identifier__toolkits) identifier__toolkits )attribute (identifier_graph) identifier_graph )attribute (identifier_kcore) identifier_kcore )attribute (identifier_create) identifier_create )attribute (argument_list (identifier_opts) identifier_opts )argument_list )call )assignment )expression_statement )block )with_statement (return_statement (call (identifier_KcoreModel) identifier_KcoreModel (argument_list (subscript (identifier_params) identifier_params (string_'model') string_'model' )subscript )argument_list )call )return_statement )block )function_definition )module
Compute the K-core decomposition of the graph. Return a model object with total number of cores as well as the core id for each vertex in the graph. Parameters ---------- graph : SGraph The graph on which to compute the k-core decomposition. kmin : int, optional Minimum core id. Vertices having smaller core id than `kmin` will be assigned with core_id = `kmin`. kmax : int, optional Maximum core id. Vertices having larger core id than `kmax` will be assigned with core_id=`kmax`. verbose : bool, optional If True, print progress updates. Returns ------- out : KcoreModel References ---------- - Alvarez-Hamelin, J.I., et al. (2005) `K-Core Decomposition: A Tool for the Visualization of Large Networks <http://arxiv.org/abs/cs/0504107>`_. Examples -------- If given an :class:`~turicreate.SGraph` ``g``, we can create a :class:`~turicreate.kcore.KcoreModel` as follows: >>> g = turicreate.load_sgraph('http://snap.stanford.edu/data/email-Enron.txt.gz', format='snap') >>> kc = turicreate.kcore.create(g) We can obtain the ``core id`` corresponding to each vertex in the graph ``g`` using: >>> kcore_id = kc['core_id'] # SFrame We can add the new core id field to the original graph g using: >>> g.vertices['core_id'] = kc['graph'].vertices['core_id'] Note that the task above does not require a join because the vertex ordering is preserved through ``create()``. See Also -------- KcoreModel
(module (function_definition (function_name_latex_name) function_name_latex_name (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_star) identifier_star (parenthesized_expression (conditional_expression (string_'*') string_'*' (attribute (identifier_self) identifier_self (identifier__star_latex_name) identifier__star_latex_name )attribute (string_'') string_'' )conditional_expression )parenthesized_expression )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__latex_name) identifier__latex_name )attribute (None) None )comparison_operator (block (return_statement (binary_operator (attribute (identifier_self) identifier_self (identifier__latex_name) identifier__latex_name )attribute (identifier_star) identifier_star )binary_operator )return_statement )block )if_statement (return_statement (binary_operator (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_star) identifier_star )binary_operator )return_statement )block )function_definition )module
Return the name of the class used in LaTeX. It can be `None` when the class doesn't have a name.
(module (function_definition (function_name_subscribe) function_name_subscribe (parameters (identifier_self) identifier_self (keyword_separator )keyword_separator (default_parameter (identifier_create_task) identifier_create_task (True) True )default_parameter (dictionary_splat_pattern (identifier_params) identifier_params )dictionary_splat_pattern )parameters (block (if_statement (boolean_operator (identifier_create_task) identifier_create_task (not_operator (attribute (identifier_self) identifier_self (identifier_task) identifier_task )attribute )not_operator )boolean_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_task) identifier_task )attribute (call (attribute (identifier_asyncio) identifier_asyncio (identifier_ensure_future) identifier_ensure_future )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_run) identifier_run )attribute (argument_list (dictionary_splat (identifier_params) identifier_params )dictionary_splat )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_channel) identifier_channel )attribute (identifier_subscribe) identifier_subscribe )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Subscribes to the Docker events channel. Use the keyword argument create_task=False to prevent automatically spawning the background tasks that listen to the events. This function returns a ChannelSubscriber object.
(module (function_definition (function_name_is_working_day) function_name_is_working_day (parameters (identifier_self) identifier_self (identifier_day) identifier_day (default_parameter (identifier_extra_working_days) identifier_extra_working_days (None) None )default_parameter (default_parameter (identifier_extra_holidays) identifier_extra_holidays (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_day) identifier_day (call (identifier_cleaned_date) identifier_cleaned_date (argument_list (identifier_day) identifier_day )argument_list )call )assignment )expression_statement (if_statement (identifier_extra_working_days) identifier_extra_working_days (block (expression_statement (assignment (identifier_extra_working_days) identifier_extra_working_days (call (identifier_tuple) identifier_tuple (argument_list (call (identifier_map) identifier_map (argument_list (identifier_cleaned_date) identifier_cleaned_date (identifier_extra_working_days) identifier_extra_working_days )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (identifier_extra_holidays) identifier_extra_holidays (block (expression_statement (assignment (identifier_extra_holidays) identifier_extra_holidays (call (identifier_tuple) identifier_tuple (argument_list (call (identifier_map) identifier_map (argument_list (identifier_cleaned_date) identifier_cleaned_date (identifier_extra_holidays) identifier_extra_holidays )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (identifier_extra_working_days) identifier_extra_working_days (comparison_operator (identifier_day) identifier_day (identifier_extra_working_days) identifier_extra_working_days )comparison_operator )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (comparison_operator (call (attribute (identifier_day) identifier_day (identifier_weekday) identifier_weekday )attribute (argument_list )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_get_weekend_days) identifier_get_weekend_days )attribute (argument_list )argument_list )call )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_is_holiday) identifier_is_holiday )attribute (argument_list (identifier_day) identifier_day (keyword_argument (identifier_extra_holidays) identifier_extra_holidays (identifier_extra_holidays) identifier_extra_holidays )keyword_argument )argument_list )call )not_operator )return_statement )block )function_definition )module
Return True if it's a working day. In addition to the regular holidays, you can add exceptions. By providing ``extra_working_days``, you'll state that these dates **are** working days. By providing ``extra_holidays``, you'll state that these dates **are** holidays, even if not in the regular calendar holidays (or weekends). Please note that the ``extra_working_days`` list has priority over the ``extra_holidays`` list.
(module (function_definition (function_name_import_tf_tensor) function_name_import_tf_tensor (parameters (identifier_self) identifier_self (identifier_x) identifier_x (identifier_tf_x) identifier_tf_x )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_LaidOutTensor) identifier_LaidOutTensor )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_make_slices) identifier_make_slices )attribute (argument_list (identifier_tf_x) identifier_tf_x (attribute (identifier_x) identifier_x (identifier_shape) identifier_shape )attribute )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Import a tf.Tensor, producing a LaidOutTensor. Args: x: a Tensor tf_x: a tf.Tensor Returns: a LaidOutTensor
(module (function_definition (function_name_to_string) function_name_to_string (parameters (identifier_self) identifier_self (identifier_other) identifier_other )parameters (block (expression_statement (assignment (identifier_arg) identifier_arg (binary_operator (string_"%s/%s,%s") string_"%s/%s,%s" (tuple (attribute (identifier_self) identifier_self (identifier_ttl) identifier_ttl )attribute (call (attribute (identifier_self) identifier_self (identifier_get_remaining_ttl) identifier_get_remaining_ttl )attribute (argument_list (call (identifier_current_time_millis) identifier_current_time_millis (argument_list )argument_list )call )argument_list )call (identifier_other) identifier_other )tuple )binary_operator )assignment )expression_statement (return_statement (call (attribute (identifier_DNSEntry) identifier_DNSEntry (identifier_to_string) identifier_to_string )attribute (argument_list (identifier_self) identifier_self (string_"record") string_"record" (identifier_arg) identifier_arg )argument_list )call )return_statement )block )function_definition )module
String representation with addtional information
(module (function_definition (function_name__terms) function_name__terms (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_res) identifier_res (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_sign) identifier_sign (identifier_terms) identifier_terms )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_terms) identifier_terms )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (for_statement (pattern_list (identifier_ID) identifier_ID (identifier_lon) identifier_lon )pattern_list (call (attribute (identifier_terms) identifier_terms (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_res) identifier_res (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_T) identifier_T )attribute (argument_list (identifier_ID) identifier_ID (identifier_sign) identifier_sign )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
Returns a list with the objects as terms.
(module (function_definition (function_name_merge_parts) function_name_merge_parts (parameters (identifier_self) identifier_self (default_parameter (identifier_version_id) identifier_version_id (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_file) identifier_file )attribute (identifier_update_checksum) identifier_update_checksum )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (with_statement (with_clause (with_item (call (attribute (attribute (identifier_db) identifier_db (identifier_session) identifier_session )attribute (identifier_begin_nested) identifier_begin_nested )attribute (argument_list )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_obj) identifier_obj (call (attribute (identifier_ObjectVersion) identifier_ObjectVersion (identifier_create) identifier_create )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_bucket) identifier_bucket )attribute (attribute (identifier_self) identifier_self (identifier_key) identifier_key )attribute (keyword_argument (identifier__file_id) identifier__file_id (attribute (identifier_self) identifier_self (identifier_file_id) identifier_file_id )attribute )keyword_argument (keyword_argument (identifier_version_id) identifier_version_id (identifier_version_id) identifier_version_id )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_delete) identifier_delete )attribute (argument_list )argument_list )call )expression_statement )block )with_statement (return_statement (identifier_obj) identifier_obj )return_statement )block )function_definition )module
Merge parts into object version.
(module (function_definition (function_name_parse_type_signature) function_name_parse_type_signature (parameters (identifier_sig) identifier_sig )parameters (block (expression_statement (assignment (identifier_match) identifier_match (call (attribute (identifier_TYPE_SIG_RE) identifier_TYPE_SIG_RE (identifier_match) identifier_match )attribute (argument_list (call (attribute (identifier_sig) identifier_sig (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_match) identifier_match )not_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_'Type signature invalid, got ') string_'Type signature invalid, got ' (identifier_sig) identifier_sig )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_groups) identifier_groups (call (attribute (identifier_match) identifier_match (identifier_groups) identifier_groups )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_typ) identifier_typ (subscript (identifier_groups) identifier_groups (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_generic_types) identifier_generic_types (subscript (identifier_groups) identifier_groups (integer_1) integer_1 )subscript )assignment )expression_statement (if_statement (not_operator (identifier_generic_types) identifier_generic_types )not_operator (block (expression_statement (assignment (identifier_generic_types) identifier_generic_types (list )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_generic_types) identifier_generic_types (call (identifier_split_sig) identifier_split_sig (argument_list (subscript (identifier_generic_types) identifier_generic_types (slice (integer_1) integer_1 (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_is_array) identifier_is_array (parenthesized_expression (comparison_operator (subscript (identifier_groups) identifier_groups (integer_2) integer_2 )subscript (None) None )comparison_operator )parenthesized_expression )assignment )expression_statement (return_statement (expression_list (identifier_typ) identifier_typ (identifier_generic_types) identifier_generic_types (identifier_is_array) identifier_is_array )expression_list )return_statement )block )function_definition )module
Parse a type signature
(module (function_definition (function_name_vbd_list) function_name_vbd_list (parameters (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_call) identifier_call (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_call) identifier_call (string_'function') string_'function' )comparison_operator (block (raise_statement (call (identifier_SaltCloudSystemExit) identifier_SaltCloudSystemExit (argument_list (string_'This function must be called with -a, --action argument.') string_'This function must be called with -a, --action argument.' )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_name) identifier_name (None) None )comparison_operator (block (return_statement (string_'A name kwarg is rquired') string_'A name kwarg is rquired' )return_statement )block )if_statement (expression_statement (assignment (identifier_ret) identifier_ret (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_session) identifier_session (call (identifier__get_session) identifier__get_session (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_vms) identifier_vms (call (attribute (attribute (attribute (identifier_session) identifier_session (identifier_xenapi) identifier_xenapi )attribute (identifier_VM) identifier_VM )attribute (identifier_get_by_name_label) identifier_get_by_name_label )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_vms) identifier_vms )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_vm) identifier_vm (subscript (identifier_vms) identifier_vms (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_vbds) identifier_vbds (call (attribute (attribute (attribute (identifier_session) identifier_session (identifier_xenapi) identifier_xenapi )attribute (identifier_VM) identifier_VM )attribute (identifier_get_VBDs) identifier_get_VBDs )attribute (argument_list (identifier_vm) identifier_vm )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_vbds) identifier_vbds (None) None )comparison_operator (block (expression_statement (assignment (identifier_x) identifier_x (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_vbd) identifier_vbd (identifier_vbds) identifier_vbds (block (expression_statement (assignment (identifier_vbd_record) identifier_vbd_record (call (attribute (attribute (attribute (identifier_session) identifier_session (identifier_xenapi) identifier_xenapi )attribute (identifier_VBD) identifier_VBD )attribute (identifier_get_record) identifier_get_record )attribute (argument_list (identifier_vbd) identifier_vbd )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (call (attribute (string_'vbd-{}') string_'vbd-{}' (identifier_format) identifier_format )attribute (argument_list (identifier_x) identifier_x )argument_list )call )subscript (identifier_vbd_record) identifier_vbd_record )assignment )expression_statement (expression_statement (augmented_assignment (identifier_x) identifier_x (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement )block )if_statement )block )if_statement (expression_statement (assignment (identifier_ret) identifier_ret (identifier_data) identifier_data )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Get a list of VBDs on a VM **requires**: the name of the vm with the vbd definition .. code-block:: bash salt-cloud -a vbd_list xenvm01
(module (function_definition (function_name_apply_formatting_dict) function_name_apply_formatting_dict (parameters (typed_parameter (identifier_obj) identifier_obj (type (identifier_Any) identifier_Any )type )typed_parameter (typed_parameter (identifier_formatting) identifier_formatting (type (generic_type (identifier_Dict) identifier_Dict (type_parameter (type (identifier_str) identifier_str )type (type (identifier_Any) identifier_Any )type )type_parameter )generic_type )type )typed_parameter )parameters (type (identifier_Any) identifier_Any )type (block (expression_statement (assignment (identifier_new_obj) identifier_new_obj (identifier_obj) identifier_obj )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_str) identifier_str )argument_list )call (block (if_statement (comparison_operator (string_"$") string_"$" (identifier_obj) identifier_obj )comparison_operator (block (expression_statement (assignment (identifier_new_obj) identifier_new_obj (call (attribute (call (attribute (identifier_string) identifier_string (identifier_Formatter) identifier_Formatter )attribute (argument_list )argument_list )call (identifier_vformat) identifier_vformat )attribute (argument_list (identifier_obj) identifier_obj (tuple )tuple (call (identifier_formatting_dict) identifier_formatting_dict (argument_list (dictionary_splat (identifier_formatting) identifier_formatting )dictionary_splat )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_dict) identifier_dict )argument_list )call (block (expression_statement (assignment (identifier_new_obj) identifier_new_obj (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_obj) identifier_obj (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_new_obj) identifier_new_obj (identifier_k) identifier_k )subscript (call (identifier_apply_formatting_dict) identifier_apply_formatting_dict (argument_list (identifier_v) identifier_v (identifier_formatting) identifier_formatting )argument_list )call )assignment )expression_statement )block )for_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_list) identifier_list )argument_list )call (block (expression_statement (assignment (identifier_new_obj) identifier_new_obj (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_el) identifier_el )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_obj) identifier_obj )argument_list )call (block (expression_statement (call (attribute (identifier_new_obj) identifier_new_obj (identifier_append) identifier_append )attribute (argument_list (call (identifier_apply_formatting_dict) identifier_apply_formatting_dict (argument_list (identifier_el) identifier_el (identifier_formatting) identifier_formatting )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )elif_clause (elif_clause (boolean_operator (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_int) identifier_int )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (identifier_float) identifier_float )argument_list )call )boolean_operator (comparison_operator (identifier_obj) identifier_obj (None) None )comparison_operator )boolean_operator (block (pass_statement )pass_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_obj) identifier_obj (attribute (identifier_enum) identifier_enum (identifier_Enum) identifier_Enum )attribute )argument_list )call (block (pass_statement )pass_statement )block )elif_clause (else_clause (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_f"Unrecognized obj '{obj}' of type '{type(obj)}'") string_f"Unrecognized obj '{obj}' of type '{type(obj)}'" )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (identifier_new_obj) identifier_new_obj )return_statement )block )function_definition )module
Recursively apply a formatting dict to all strings in a configuration. Note that it skips applying the formatting if the string appears to contain latex (specifically, if it contains an "$"), since the formatting fails on nested brackets. Args: obj: Some configuration object to recursively applying the formatting to. formatting (dict): String formatting options to apply to each configuration field. Returns: dict: Configuration with formatting applied to every field.
(module (function_definition (function_name_add_head) function_name_add_head (parameters (identifier_self) identifier_self (identifier_head) identifier_head )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_head) identifier_head (identifier_DependencyNode) identifier_DependencyNode )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_'"head" must be a DependencyNode') string_'"head" must be a DependencyNode' )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__heads) identifier__heads )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_head) identifier_head )argument_list )call )expression_statement )block )function_definition )module
Add head Node
(module (function_definition (function_name_add_method) function_name_add_method (parameters (identifier_info) identifier_info (identifier_target_cls) identifier_target_cls (default_parameter (identifier_virtual) identifier_virtual (False) False )default_parameter (default_parameter (identifier_dont_replace) identifier_dont_replace (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_name) identifier_name (call (identifier_escape_identifier) identifier_escape_identifier (argument_list (attribute (identifier_info) identifier_info (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (if_statement (identifier_virtual) identifier_virtual (block (expression_statement (assignment (identifier_name) identifier_name (binary_operator (string_"do_") string_"do_" (identifier_name) identifier_name )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_attr) identifier_attr (call (identifier_VirtualMethodAttribute) identifier_VirtualMethodAttribute (argument_list (identifier_info) identifier_info (identifier_target_cls) identifier_target_cls (identifier_name) identifier_name )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_attr) identifier_attr (call (identifier_MethodAttribute) identifier_MethodAttribute (argument_list (identifier_info) identifier_info (identifier_target_cls) identifier_target_cls (identifier_name) identifier_name )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (boolean_operator (identifier_dont_replace) identifier_dont_replace (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_target_cls) identifier_target_cls (identifier_name) identifier_name )argument_list )call )boolean_operator (block (return_statement )return_statement )block )if_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_target_cls) identifier_target_cls (identifier_name) identifier_name (identifier_attr) identifier_attr )argument_list )call )expression_statement )block )function_definition )module
Add a method to the target class
(module (function_definition (function_name_set_) function_name_set_ (parameters (identifier_filename) identifier_filename (identifier_section) identifier_section (identifier_parameter) identifier_parameter (identifier_value) identifier_value )parameters (block (expression_statement (assignment (identifier_filename) identifier_filename (call (identifier__quote) identifier__quote (argument_list (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_section) identifier_section (call (identifier__quote) identifier__quote (argument_list (identifier_section) identifier_section )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_parameter) identifier_parameter (call (identifier__quote) identifier__quote (argument_list (identifier_parameter) identifier_parameter )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (call (identifier__quote) identifier__quote (argument_list (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run_all') string_'cmd.run_all' )subscript (argument_list (call (attribute (string_'openstack-config --set {0} {1} {2} {3}') string_'openstack-config --set {0} {1} {2} {3}' (identifier_format) identifier_format )attribute (argument_list (identifier_filename) identifier_filename (identifier_section) identifier_section (identifier_parameter) identifier_parameter (identifier_value) identifier_value )argument_list )call (keyword_argument (identifier_python_shell) identifier_python_shell (False) False )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_result) identifier_result (string_'retcode') string_'retcode' )subscript (integer_0) integer_0 )comparison_operator (block (return_statement (subscript (identifier_result) identifier_result (string_'stdout') string_'stdout' )subscript )return_statement )block (else_clause (block (raise_statement (call (attribute (attribute (identifier_salt) identifier_salt (identifier_exceptions) identifier_exceptions )attribute (identifier_CommandExecutionError) identifier_CommandExecutionError )attribute (argument_list (subscript (identifier_result) identifier_result (string_'stderr') string_'stderr' )subscript )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Set a value in an OpenStack configuration file. filename The full path to the configuration file section The section in which the parameter will be set parameter The parameter to change value The value to set CLI Example: .. code-block:: bash salt-call openstack_config.set /etc/keystone/keystone.conf sql connection foo