sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_create_window) function_name_create_window (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_undocked_window) identifier_undocked_window )attribute (assignment (identifier_window) identifier_window (call (identifier_PluginWindow) identifier_PluginWindow (argument_list (identifier_self) identifier_self )argument_list )call )assignment )assignment )expression_statement (expression_statement (call (attribute (identifier_window) identifier_window (identifier_setAttribute) identifier_setAttribute )attribute (argument_list (attribute (identifier_Qt) identifier_Qt (identifier_WA_DeleteOnClose) identifier_WA_DeleteOnClose )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_icon) identifier_icon (call (attribute (identifier_self) identifier_self (identifier_get_plugin_icon) identifier_get_plugin_icon )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (identifier_is_text_string) identifier_is_text_string (argument_list (identifier_icon) identifier_icon )argument_list )call (block (expression_statement (assignment (identifier_icon) identifier_icon (call (attribute (identifier_self) identifier_self (identifier_get_icon) identifier_get_icon )attribute (argument_list (identifier_icon) identifier_icon )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_window) identifier_window (identifier_setWindowIcon) identifier_setWindowIcon )attribute (argument_list (identifier_icon) identifier_icon )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_window) identifier_window (identifier_setWindowTitle) identifier_setWindowTitle )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_plugin_title) identifier_get_plugin_title )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_window) identifier_window (identifier_setCentralWidget) identifier_setCentralWidget )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_window) identifier_window (identifier_resize) identifier_resize )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_refresh_plugin) identifier_refresh_plugin )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_dockwidget) identifier_dockwidget )attribute (identifier_setFloating) identifier_setFloating )attribute (argument_list (False) False )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_dockwidget) identifier_dockwidget )attribute (identifier_setVisible) identifier_setVisible )attribute (argument_list (False) False )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_window) identifier_window (identifier_show) identifier_show )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Create a QMainWindow instance containing this plugin.
(module (function_definition (function_name_clear_conditions) function_name_clear_conditions (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_conkeys) identifier_conkeys )list_splat_pattern (dictionary_splat_pattern (identifier_noclear) identifier_noclear )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_offenders) identifier_offenders (binary_operator (call (identifier_set) identifier_set (argument_list (identifier_conkeys) identifier_conkeys )argument_list )call (call (identifier_set) identifier_set (argument_list (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_conconf) identifier_conconf )attribute (identifier_conditions) identifier_conditions )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )binary_operator )assignment )expression_statement (if_statement (identifier_offenders) identifier_offenders (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (list_comprehension (identifier_off) identifier_off (for_in_clause (identifier_off) identifier_off (identifier_offenders) identifier_offenders )for_in_clause )list_comprehension )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_offenders) identifier_offenders (binary_operator (call (identifier_set) identifier_set (argument_list (identifier_noclear) identifier_noclear )argument_list )call (call (identifier_set) identifier_set (argument_list (set (string_'noclear') string_'noclear' )set )argument_list )call )binary_operator )assignment )expression_statement (if_statement (identifier_offenders) identifier_offenders (block (raise_statement (call (identifier_KeyError) identifier_KeyError (argument_list (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (list_comprehension (identifier_off) identifier_off (for_in_clause (identifier_off) identifier_off (identifier_offenders) identifier_offenders )for_in_clause )list_comprehension )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_noclear) identifier_noclear (call (attribute (identifier_noclear) identifier_noclear (identifier_get) identifier_get )attribute (argument_list (string_'noclear') string_'noclear' (False) False )argument_list )call )assignment )expression_statement (for_statement (identifier_ck) identifier_ck (attribute (attribute (identifier_self) identifier_self (identifier_conconf) identifier_conconf )attribute (identifier_conditions) identifier_conditions )attribute (block (if_statement (not_operator (identifier_conkeys) identifier_conkeys )not_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_conconf) identifier_conconf )attribute (identifier_reset) identifier_reset )attribute (argument_list )argument_list )call )expression_statement (break_statement )break_statement )block (elif_clause (boolean_operator (not_operator (identifier_noclear) identifier_noclear )not_operator (comparison_operator (identifier_ck) identifier_ck (identifier_conkeys) identifier_conkeys )comparison_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_conconf) identifier_conconf )attribute (identifier_set_condition) identifier_set_condition )attribute (argument_list (identifier_ck) identifier_ck (None) None )argument_list )call )expression_statement )block )elif_clause (elif_clause (boolean_operator (identifier_noclear) identifier_noclear (comparison_operator (identifier_ck) identifier_ck (identifier_conkeys) identifier_conkeys )comparison_operator )boolean_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_conconf) identifier_conconf )attribute (identifier_set_condition) identifier_set_condition )attribute (argument_list (identifier_ck) identifier_ck (None) None )argument_list )call )expression_statement )block )elif_clause )if_statement )block )for_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_no_auto) identifier_no_auto )attribute )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_make_mask) identifier_make_mask )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Clear conditions. Clear only the conditions conkeys if specified. Clear only the conditions not specified by conkeys if noclear is True (False default). .. note:: Updates the mask if not no_auto.
(module (function_definition (function_name__calculate_day_cost) function_name__calculate_day_cost (parameters (identifier_self) identifier_self (identifier_plan) identifier_plan (identifier_period) identifier_period )parameters (block (expression_statement (assignment (identifier_plan_pricings) identifier_plan_pricings (call (attribute (call (attribute (attribute (identifier_plan) identifier_plan (identifier_planpricing_set) identifier_planpricing_set )attribute (identifier_order_by) identifier_order_by )attribute (argument_list (string_'-pricing__period') string_'-pricing__period' )argument_list )call (identifier_select_related) identifier_select_related )attribute (argument_list (string_'pricing') string_'pricing' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_selected_pricing) identifier_selected_pricing (None) None )assignment )expression_statement (for_statement (identifier_plan_pricing) identifier_plan_pricing (identifier_plan_pricings) identifier_plan_pricings (block (expression_statement (assignment (identifier_selected_pricing) identifier_selected_pricing (identifier_plan_pricing) identifier_plan_pricing )assignment )expression_statement (if_statement (comparison_operator (attribute (attribute (identifier_plan_pricing) identifier_plan_pricing (identifier_pricing) identifier_pricing )attribute (identifier_period) identifier_period )attribute (identifier_period) identifier_period )comparison_operator (block (break_statement )break_statement )block )if_statement )block )for_statement (if_statement (identifier_selected_pricing) identifier_selected_pricing (block (return_statement (call (attribute (parenthesized_expression (binary_operator (attribute (identifier_selected_pricing) identifier_selected_pricing (identifier_price) identifier_price )attribute (attribute (attribute (identifier_selected_pricing) identifier_selected_pricing (identifier_pricing) identifier_pricing )attribute (identifier_period) identifier_period )attribute )binary_operator )parenthesized_expression (identifier_quantize) identifier_quantize )attribute (argument_list (call (identifier_Decimal) identifier_Decimal (argument_list (string_'1.00') string_'1.00' )argument_list )call )argument_list )call )return_statement )block )if_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_'Plan %s has no pricings.') string_'Plan %s has no pricings.' (identifier_plan) identifier_plan )binary_operator )argument_list )call )raise_statement )block )function_definition )module
Finds most fitted plan pricing for a given period, and calculate day cost
(module (function_definition (function_name_encode_offset_commit_request) function_name_encode_offset_commit_request (parameters (identifier_cls) identifier_cls (identifier_group) identifier_group (identifier_payloads) identifier_payloads )parameters (block (return_statement (call (subscript (attribute (attribute (attribute (identifier_kafka) identifier_kafka (identifier_protocol) identifier_protocol )attribute (identifier_commit) identifier_commit )attribute (identifier_OffsetCommitRequest) identifier_OffsetCommitRequest )attribute (integer_0) integer_0 )subscript (argument_list (keyword_argument (identifier_consumer_group) identifier_consumer_group (identifier_group) identifier_group )keyword_argument (keyword_argument (identifier_topics) identifier_topics (list_comprehension (tuple (identifier_topic) identifier_topic (list_comprehension (tuple (identifier_partition) identifier_partition (attribute (identifier_payload) identifier_payload (identifier_offset) identifier_offset )attribute (attribute (identifier_payload) identifier_payload (identifier_metadata) identifier_metadata )attribute )tuple (for_in_clause (pattern_list (identifier_partition) identifier_partition (identifier_payload) identifier_payload )pattern_list (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (identifier_topic_payloads) identifier_topic_payloads )argument_list )call )for_in_clause )list_comprehension )tuple (for_in_clause (pattern_list (identifier_topic) identifier_topic (identifier_topic_payloads) identifier_topic_payloads )pattern_list (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (call (identifier_group_by_topic_and_partition) identifier_group_by_topic_and_partition (argument_list (identifier_payloads) identifier_payloads )argument_list )call )argument_list )call )for_in_clause )list_comprehension )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Encode an OffsetCommitRequest struct Arguments: group: string, the consumer group you are committing offsets for payloads: list of OffsetCommitRequestPayload
(module (function_definition (function_name_face_adjacency) function_name_face_adjacency (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_adjacency) identifier_adjacency (identifier_edges) identifier_edges )pattern_list (call (attribute (identifier_graph) identifier_graph (identifier_face_adjacency) identifier_face_adjacency )attribute (argument_list (keyword_argument (identifier_mesh) identifier_mesh (identifier_self) identifier_self )keyword_argument (keyword_argument (identifier_return_edges) identifier_return_edges (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__cache) identifier__cache )attribute (string_'face_adjacency_edges') string_'face_adjacency_edges' )subscript (identifier_edges) identifier_edges )assignment )expression_statement (return_statement (identifier_adjacency) identifier_adjacency )return_statement )block )function_definition )module
Find faces that share an edge, which we call here 'adjacent'. Returns ---------- adjacency : (n,2) int Pairs of faces which share an edge Examples --------- In [1]: mesh = trimesh.load('models/featuretype.STL') In [2]: mesh.face_adjacency Out[2]: array([[ 0, 1], [ 2, 3], [ 0, 3], ..., [1112, 949], [3467, 3475], [1113, 3475]]) In [3]: mesh.faces[mesh.face_adjacency[0]] Out[3]: TrackedArray([[ 1, 0, 408], [1239, 0, 1]], dtype=int64) In [4]: import networkx as nx In [5]: graph = nx.from_edgelist(mesh.face_adjacency) In [6]: groups = nx.connected_components(graph)
(module (function_definition (function_name_aggregate_repeated_calls) function_name_aggregate_repeated_calls (parameters (identifier_frame) identifier_frame (identifier_options) identifier_options )parameters (block (if_statement (comparison_operator (identifier_frame) identifier_frame (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_children_by_identifier) identifier_children_by_identifier (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_child) identifier_child (attribute (identifier_frame) identifier_frame (identifier_children) identifier_children )attribute (block (if_statement (comparison_operator (attribute (identifier_child) identifier_child (identifier_identifier) identifier_identifier )attribute (identifier_children_by_identifier) identifier_children_by_identifier )comparison_operator (block (expression_statement (assignment (identifier_aggregate_frame) identifier_aggregate_frame (subscript (identifier_children_by_identifier) identifier_children_by_identifier (attribute (identifier_child) identifier_child (identifier_identifier) identifier_identifier )attribute )subscript )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_aggregate_frame) identifier_aggregate_frame (identifier_self_time) identifier_self_time )attribute (attribute (identifier_child) identifier_child (identifier_self_time) identifier_self_time )attribute )augmented_assignment )expression_statement (if_statement (attribute (identifier_child) identifier_child (identifier_children) identifier_children )attribute (block (expression_statement (call (attribute (identifier_aggregate_frame) identifier_aggregate_frame (identifier_add_children) identifier_add_children )attribute (argument_list (attribute (identifier_child) identifier_child (identifier_children) identifier_children )attribute )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_child) identifier_child (identifier_remove_from_parent) identifier_remove_from_parent )attribute (argument_list )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_children_by_identifier) identifier_children_by_identifier (attribute (identifier_child) identifier_child (identifier_identifier) identifier_identifier )attribute )subscript (identifier_child) identifier_child )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (for_statement (identifier_child) identifier_child (attribute (identifier_frame) identifier_frame (identifier_children) identifier_children )attribute (block (expression_statement (call (identifier_aggregate_repeated_calls) identifier_aggregate_repeated_calls (argument_list (identifier_child) identifier_child (keyword_argument (identifier_options) identifier_options (identifier_options) identifier_options )keyword_argument )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_frame) identifier_frame (identifier__children) identifier__children )attribute (identifier_sort) identifier_sort )attribute (argument_list (keyword_argument (identifier_key) identifier_key (call (identifier_methodcaller) identifier_methodcaller (argument_list (string_'time') string_'time' )argument_list )call )keyword_argument (keyword_argument (identifier_reverse) identifier_reverse (True) True )keyword_argument )argument_list )call )expression_statement (return_statement (identifier_frame) identifier_frame )return_statement )block )function_definition )module
Converts a timeline into a time-aggregate summary. Adds together calls along the same call stack, so that repeated calls appear as the same frame. Removes time-linearity - frames are sorted according to total time spent. Useful for outputs that display a summary of execution (e.g. text and html outputs)
(module (function_definition (function_name_connected_objects) function_name_connected_objects (parameters (identifier_self) identifier_self (identifier_from_obj) identifier_from_obj )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_to_content_type) identifier_to_content_type )attribute (identifier_get_all_objects_for_this_type) identifier_get_all_objects_for_this_type )attribute (argument_list (keyword_argument (identifier_pk__in) identifier_pk__in (call (attribute (identifier_self) identifier_self (identifier_connected_object_ids) identifier_connected_object_ids )attribute (argument_list (identifier_from_obj) identifier_from_obj )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns a query set matching all connected objects with the given object as a source.
(module (function_definition (function_name_get_fullsize) function_name_get_fullsize (parameters (identifier_self) identifier_self (identifier_kwargs) identifier_kwargs )parameters (block (expression_statement (assignment (identifier_fullsize_args) identifier_fullsize_args (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (string_'absolute') string_'absolute' (identifier_kwargs) identifier_kwargs )comparison_operator (block (expression_statement (assignment (subscript (identifier_fullsize_args) identifier_fullsize_args (string_'absolute') string_'absolute' )subscript (subscript (identifier_kwargs) identifier_kwargs (string_'absolute') string_'absolute' )subscript )assignment )expression_statement )block )if_statement (for_statement (identifier_key) identifier_key (tuple (string_'width') string_'width' (string_'height') string_'height' (string_'quality') string_'quality' (string_'format') string_'format' (string_'background') string_'background' (string_'crop') string_'crop' )tuple (block (expression_statement (assignment (identifier_fsk) identifier_fsk (binary_operator (string_'fullsize_') string_'fullsize_' (identifier_key) identifier_key )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_fsk) identifier_fsk (identifier_kwargs) identifier_kwargs )comparison_operator (block (expression_statement (assignment (subscript (identifier_fullsize_args) identifier_fullsize_args (identifier_key) identifier_key )subscript (subscript (identifier_kwargs) identifier_kwargs (identifier_fsk) identifier_fsk )subscript )assignment )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (pattern_list (identifier_img_fullsize) identifier_img_fullsize (identifier__) identifier__ )pattern_list (call (attribute (identifier_self) identifier_self (identifier_get_rendition) identifier_get_rendition )attribute (argument_list (integer_1) integer_1 (dictionary_splat (identifier_fullsize_args) identifier_fullsize_args )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (identifier_img_fullsize) identifier_img_fullsize )return_statement )block )function_definition )module
Get the fullsize rendition URL
(module (function_definition (function_name_get_instance) function_name_get_instance (parameters (identifier_self) identifier_self (identifier_payload) identifier_payload )parameters (block (return_statement (call (identifier_InviteInstance) identifier_InviteInstance (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_payload) identifier_payload (keyword_argument (identifier_service_sid) identifier_service_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'service_sid') string_'service_sid' )subscript )keyword_argument (keyword_argument (identifier_channel_sid) identifier_channel_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'channel_sid') string_'channel_sid' )subscript )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Build an instance of InviteInstance :param dict payload: Payload response from the API :returns: twilio.rest.chat.v2.service.channel.invite.InviteInstance :rtype: twilio.rest.chat.v2.service.channel.invite.InviteInstance
(module (function_definition (function_name_subscribe_list) function_name_subscribe_list (parameters (identifier_self) identifier_self (identifier_list_id) identifier_list_id )parameters (block (return_statement (call (identifier_List) identifier_List (argument_list (call (identifier_tweepy_list_to_json) identifier_tweepy_list_to_json (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_subscribe_list) identifier_subscribe_list )attribute (argument_list (keyword_argument (identifier_list_id) identifier_list_id (identifier_list_id) identifier_list_id )keyword_argument )argument_list )call )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Subscribe to a list :param list_id: list ID number :return: :class:`~responsebot.models.List` object
(module (function_definition (function_name_abbreviate_tab_names_changed) function_name_abbreviate_tab_names_changed (parameters (identifier_self) identifier_self (identifier_settings) identifier_settings (identifier_key) identifier_key (identifier_user_data) identifier_user_data )parameters (block (expression_statement (assignment (identifier_abbreviate_tab_names) identifier_abbreviate_tab_names (call (attribute (identifier_settings) identifier_settings (identifier_get_boolean) identifier_get_boolean )attribute (argument_list (string_'abbreviate-tab-names') string_'abbreviate-tab-names' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_guake) identifier_guake )attribute (identifier_abbreviate) identifier_abbreviate )attribute (identifier_abbreviate_tab_names) identifier_abbreviate_tab_names )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_guake) identifier_guake )attribute (identifier_recompute_tabs_titles) identifier_recompute_tabs_titles )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
If the gconf var abbreviate_tab_names be changed, this method will be called and will update tab names.
(module (function_definition (function_name_get_sdb_keys) function_name_get_sdb_keys (parameters (identifier_self) identifier_self (identifier_path) identifier_path )parameters (block (expression_statement (assignment (identifier_list_resp) identifier_list_resp (call (identifier_get_with_retry) identifier_get_with_retry (argument_list (binary_operator (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_cerberus_url) identifier_cerberus_url )attribute (string_'/v1/secret/') string_'/v1/secret/' )binary_operator (identifier_path) identifier_path )binary_operator (string_'/?list=true') string_'/?list=true' )binary_operator (keyword_argument (identifier_headers) identifier_headers (attribute (identifier_self) identifier_self (identifier_HEADERS) identifier_HEADERS )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_throw_if_bad_response) identifier_throw_if_bad_response (argument_list (identifier_list_resp) identifier_list_resp )argument_list )call )expression_statement (return_statement (subscript (subscript (call (attribute (identifier_list_resp) identifier_list_resp (identifier_json) identifier_json )attribute (argument_list )argument_list )call (string_'data') string_'data' )subscript (string_'keys') string_'keys' )subscript )return_statement )block )function_definition )module
Return the keys for a SDB, which are need for the full secure data path
(module (function_definition (function_name_set_features) function_name_set_features (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_allpsms_str) identifier_allpsms_str (call (attribute (identifier_readers) identifier_readers (identifier_generate_psms_multiple_fractions_strings) identifier_generate_psms_multiple_fractions_strings )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_mergefiles) identifier_mergefiles )attribute (attribute (identifier_self) identifier_self (identifier_ns) identifier_ns )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_allpeps) identifier_allpeps (call (attribute (identifier_preparation) identifier_preparation (identifier_merge_peptides) identifier_merge_peptides )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_mergefiles) identifier_mergefiles )attribute (attribute (identifier_self) identifier_self (identifier_ns) identifier_ns )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_features) identifier_features )attribute (dictionary (pair (string_'psm') string_'psm' (identifier_allpsms_str) identifier_allpsms_str )pair (pair (string_'peptide') string_'peptide' (identifier_allpeps) identifier_allpeps )pair )dictionary )assignment )expression_statement )block )function_definition )module
Merge all psms and peptides
(module (function_definition (function_name_update_rejection_permissions) function_name_update_rejection_permissions (parameters (identifier_portal) identifier_portal )parameters (block (expression_statement (assignment (identifier_updated) identifier_updated (call (identifier_update_rejection_permissions_for) identifier_update_rejection_permissions_for (argument_list (identifier_portal) identifier_portal (string_"bika_ar_workflow") string_"bika_ar_workflow" (string_"Reject Analysis Request") string_"Reject Analysis Request" )argument_list )call )assignment )expression_statement (if_statement (identifier_updated) identifier_updated (block (expression_statement (assignment (identifier_brains) identifier_brains (call (attribute (identifier_api) identifier_api (identifier_search) identifier_search )attribute (argument_list (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_portal_type) identifier_portal_type (string_"AnalysisRequest") string_"AnalysisRequest" )keyword_argument )argument_list )call (identifier_CATALOG_ANALYSIS_REQUEST_LISTING) identifier_CATALOG_ANALYSIS_REQUEST_LISTING )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_update_rolemappings_for) identifier_update_rolemappings_for (argument_list (identifier_brains) identifier_brains (string_"bika_ar_workflow") string_"bika_ar_workflow" )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_updated) identifier_updated (call (identifier_update_rejection_permissions_for) identifier_update_rejection_permissions_for (argument_list (identifier_portal) identifier_portal (string_"bika_sample_workflow") string_"bika_sample_workflow" (string_"Reject Sample") string_"Reject Sample" )argument_list )call )assignment )expression_statement (if_statement (identifier_updated) identifier_updated (block (expression_statement (assignment (identifier_brains) identifier_brains (call (attribute (identifier_api) identifier_api (identifier_search) identifier_search )attribute (argument_list (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_portal_type) identifier_portal_type (string_"Sample") string_"Sample" )keyword_argument )argument_list )call (string_"bika_catalog") string_"bika_catalog" )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_update_rolemappings_for) identifier_update_rolemappings_for (argument_list (identifier_brains) identifier_brains (string_"bika_sample_workflow") string_"bika_sample_workflow" )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Adds the permission 'Reject Analysis Request' and update the permission mappings accordingly
(module (function_definition (function_name__annotate_query) function_name__annotate_query (parameters (identifier_query) identifier_query (identifier_generate_dict) identifier_generate_dict )parameters (block (expression_statement (assignment (identifier_annotate_key_list) identifier_annotate_key_list (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_field_name) identifier_field_name (identifier_annotate_dict) identifier_annotate_dict )pattern_list (call (attribute (identifier_generate_dict) identifier_generate_dict (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (for_statement (pattern_list (identifier_annotate_name) identifier_annotate_name (identifier_annotate_func) identifier_annotate_func )pattern_list (call (attribute (subscript (identifier_annotate_dict) identifier_annotate_dict (string_"annotate_dict") string_"annotate_dict" )subscript (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_query) identifier_query (call (identifier_annotate_func) identifier_annotate_func (argument_list (identifier_query) identifier_query )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_annotate_key_list) identifier_annotate_key_list (identifier_append) identifier_append )attribute (argument_list (identifier_annotate_name) identifier_annotate_name )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (expression_list (identifier_query) identifier_query (identifier_annotate_key_list) identifier_annotate_key_list )expression_list )return_statement )block )function_definition )module
Add annotations to the query to retrieve values required by field value generate functions.
(module (function_definition (function_name_removeSingleCachedFile) function_name_removeSingleCachedFile (parameters (identifier_self) identifier_self (identifier_fileStoreID) identifier_fileStoreID )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (attribute (identifier_self) identifier_self (identifier__CacheState) identifier__CacheState )attribute (identifier_open) identifier_open )attribute (argument_list (identifier_self) identifier_self )argument_list )call (as_pattern_target (identifier_cacheInfo) identifier_cacheInfo )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_cachedFile) identifier_cachedFile (call (attribute (identifier_self) identifier_self (identifier_encodedFileID) identifier_encodedFileID )attribute (argument_list (identifier_fileStoreID) identifier_fileStoreID )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cachedFileStats) identifier_cachedFileStats (call (attribute (identifier_os) identifier_os (identifier_stat) identifier_stat )attribute (argument_list (identifier_cachedFile) identifier_cachedFile )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (attribute (identifier_cachedFileStats) identifier_cachedFileStats (identifier_st_nlink) identifier_st_nlink )attribute (attribute (identifier_self) identifier_self (identifier_nlinkThreshold) identifier_nlinkThreshold )attribute )comparison_operator (string_'Attempting to delete a global file that is in use by another job.') string_'Attempting to delete a global file that is in use by another job.' )assert_statement (assert_statement (comparison_operator (attribute (identifier_cachedFileStats) identifier_cachedFileStats (identifier_st_nlink) identifier_st_nlink )attribute (attribute (identifier_self) identifier_self (identifier_nlinkThreshold) identifier_nlinkThreshold )attribute )comparison_operator (string_'A global file has too FEW links at deletion time. Our link threshold is incorrect!') string_'A global file has too FEW links at deletion time. Our link threshold is incorrect!' )assert_statement (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_cachedFile) identifier_cachedFile )argument_list )call )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_nlinkThreshold) identifier_nlinkThreshold )attribute (integer_2) integer_2 )comparison_operator (block (expression_statement (augmented_assignment (attribute (identifier_cacheInfo) identifier_cacheInfo (identifier_cached) identifier_cached )attribute (attribute (identifier_cachedFileStats) identifier_cachedFileStats (identifier_st_size) identifier_st_size )attribute )augmented_assignment )expression_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_cacheInfo) identifier_cacheInfo (identifier_isBalanced) identifier_isBalanced )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_logToMaster) identifier_logToMaster )attribute (argument_list (string_'CACHE: The cache was not balanced on removing single file') string_'CACHE: The cache was not balanced on removing single file' (attribute (identifier_logging) identifier_logging (identifier_WARN) identifier_WARN )attribute )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_logToMaster) identifier_logToMaster )attribute (argument_list (binary_operator (string_'CACHE: Successfully removed file with ID \'%s\'.') string_'CACHE: Successfully removed file with ID \'%s\'.' (identifier_fileStoreID) identifier_fileStoreID )binary_operator )argument_list )call )expression_statement )block )with_statement (return_statement (None) None )return_statement )block )function_definition )module
Removes a single file described by the fileStoreID from the cache forcibly.
(module (function_definition (function_name_expand) function_name_expand (parameters (identifier_self) identifier_self (identifier_msgpos) identifier_msgpos )parameters (block (expression_statement (assignment (identifier_MT) identifier_MT (subscript (attribute (identifier_self) identifier_self (identifier__tree) identifier__tree )attribute (identifier_msgpos) identifier_msgpos )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_MT) identifier_MT (identifier_expand) identifier_expand )attribute (argument_list (attribute (identifier_MT) identifier_MT (identifier_root) identifier_root )attribute )argument_list )call )expression_statement )block )function_definition )module
expand message at given position
(module (function_definition (function_name__build_url) function_name__build_url (parameters (identifier_self) identifier_self (default_parameter (identifier_shorten) identifier_shorten (True) True )default_parameter )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute (call (attribute (identifier_URL_FORMAT) identifier_URL_FORMAT (identifier_format) identifier_format )attribute (argument_list (list_splat (call (attribute (identifier_self) identifier_self (identifier__get_url_params) identifier__get_url_params )attribute (argument_list (keyword_argument (identifier_shorten) identifier_shorten (identifier_shorten) identifier_shorten )keyword_argument )argument_list )call )list_splat )argument_list )call )assignment )expression_statement )block )function_definition )module
Build the url for a cable ratings page
(module (function_definition (function_name_status) function_name_status (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_hw_type) identifier_hw_type (identifier_name) identifier_name (identifier_major) identifier_major (identifier_minor) identifier_minor (identifier_patch) identifier_patch (identifier_status) identifier_status )pattern_list (call (attribute (identifier_self) identifier_self (identifier_rpc) identifier_rpc )attribute (argument_list (integer_0x00) integer_0x00 (integer_0x04) integer_0x04 (keyword_argument (identifier_result_format) identifier_result_format (string_"H6sBBBB") string_"H6sBBBB" )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_status) identifier_status (dictionary (pair (string_'hw_type') string_'hw_type' (identifier_hw_type) identifier_hw_type )pair (pair (string_'name') string_'name' (call (attribute (identifier_name) identifier_name (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )pair (pair (string_'version') string_'version' (tuple (identifier_major) identifier_major (identifier_minor) identifier_minor (identifier_patch) identifier_patch )tuple )pair (pair (string_'status') string_'status' (identifier_status) identifier_status )pair )dictionary )assignment )expression_statement (return_statement (identifier_status) identifier_status )return_statement )block )function_definition )module
Query the status of an IOTile including its name and version
(module (function_definition (function_name_find_backwards) function_name_find_backwards (parameters (identifier_self) identifier_self (identifier_stream_name) identifier_stream_name (identifier_predicate) identifier_predicate (default_parameter (identifier_predicate_label) identifier_predicate_label (string_'predicate') string_'predicate' )default_parameter )parameters (block (expression_statement (assignment (identifier_logger) identifier_logger (call (attribute (attribute (identifier_self) identifier_self (identifier__logger) identifier__logger )attribute (identifier_getChild) identifier_getChild )attribute (argument_list (identifier_predicate_label) identifier_predicate_label )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_'Fetching first matching event') string_'Fetching first matching event' )argument_list )call )expression_statement (expression_statement (assignment (identifier_uri) identifier_uri (attribute (identifier_self) identifier_self (identifier__head_uri) identifier__head_uri )attribute )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_page) identifier_page (await (call (attribute (attribute (identifier_self) identifier_self (identifier__fetcher) identifier__fetcher )attribute (identifier_fetch) identifier_fetch )attribute (argument_list (identifier_uri) identifier_uri )argument_list )call )await )assignment )expression_statement )block (except_clause (as_pattern (identifier_HttpNotFoundError) identifier_HttpNotFoundError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_StreamNotFoundError) identifier_StreamNotFoundError (argument_list )argument_list )call (identifier_e) identifier_e )raise_statement )block )except_clause )try_statement (while_statement (True) True (block (expression_statement (assignment (identifier_evt) identifier_evt (call (identifier_next) identifier_next (argument_list (call (attribute (identifier_page) identifier_page (identifier_iter_events_matching) identifier_iter_events_matching )attribute (argument_list (identifier_predicate) identifier_predicate )argument_list )call (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_evt) identifier_evt (None) None )comparison_operator (block (return_statement (identifier_evt) identifier_evt )return_statement )block )if_statement (expression_statement (assignment (identifier_uri) identifier_uri (call (attribute (identifier_page) identifier_page (identifier_get_link) identifier_get_link )attribute (argument_list (string_"next") string_"next" )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_uri) identifier_uri (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (string_"No matching event found") string_"No matching event found" )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_page) identifier_page (await (call (attribute (attribute (identifier_self) identifier_self (identifier__fetcher) identifier__fetcher )attribute (identifier_fetch) identifier_fetch )attribute (argument_list (identifier_uri) identifier_uri )argument_list )call )await )assignment )expression_statement )block )while_statement )block )function_definition )module
Return first event matching predicate, or None if none exists. Note: 'backwards', both here and in Event Store, means 'towards the event emitted furthest in the past'.
(module (function_definition (function_name_disconnect) function_name_disconnect (parameters (identifier_self) identifier_self (identifier_callback) identifier_callback )parameters (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__callbacks) identifier__callbacks )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_callback) identifier_callback )argument_list )call )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__callbacks) identifier__callbacks )attribute (identifier_remove) identifier_remove )attribute (argument_list (call (identifier_ref) identifier_ref (argument_list (identifier_callback) identifier_callback )argument_list )call )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Disconnects a callback from this signal. :param callback: The callback to disconnect. :param weak: A flag that must have the same value than the one specified during the call to `connect`. .. warning:: If the callback is not connected at the time of call, a :class:`ValueError` exception is thrown. .. note:: You may call `disconnect` from a connected callback.
(module (function_definition (function_name_financial_float) function_name_financial_float (parameters (identifier_s) identifier_s (default_parameter (identifier_scale_factor) identifier_scale_factor (integer_1) integer_1 )default_parameter (default_parameter (identifier_typ) identifier_typ (identifier_float) identifier_float )default_parameter (default_parameter (identifier_ignore) identifier_ignore (identifier_FINANCIAL_WHITESPACE) identifier_FINANCIAL_WHITESPACE )default_parameter (default_parameter (identifier_percent_str) identifier_percent_str (identifier_PERCENT_SYMBOLS) identifier_PERCENT_SYMBOLS )default_parameter (default_parameter (identifier_replace) identifier_replace (identifier_FINANCIAL_MAPPING) identifier_FINANCIAL_MAPPING )default_parameter (default_parameter (identifier_normalize_case) identifier_normalize_case (attribute (identifier_str) identifier_str (identifier_lower) identifier_lower )attribute )default_parameter )parameters (block (expression_statement (assignment (identifier_percent_scale_factor) identifier_percent_scale_factor (integer_1) integer_1 )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_s) identifier_s (identifier_basestring) identifier_basestring )argument_list )call (block (expression_statement (assignment (identifier_s) identifier_s (call (attribute (call (identifier_normalize_case) identifier_normalize_case (argument_list (identifier_s) identifier_s )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (identifier_ignore) identifier_ignore (block (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_s) identifier_s (identifier_replace) identifier_replace )attribute (argument_list (call (identifier_normalize_case) identifier_normalize_case (argument_list (identifier_i) identifier_i )argument_list )call (string_'') string_'' )argument_list )call )assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_s) identifier_s (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_old) identifier_old (identifier_new) identifier_new )pattern_list (identifier_replace) identifier_replace (block (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_s) identifier_s (identifier_replace) identifier_replace )attribute (argument_list (identifier_old) identifier_old (identifier_new) identifier_new )argument_list )call )assignment )expression_statement )block )for_statement (for_statement (identifier_p) identifier_p (identifier_percent_str) identifier_percent_str (block (if_statement (call (attribute (identifier_s) identifier_s (identifier_endswith) identifier_endswith )attribute (argument_list (identifier_p) identifier_p )argument_list )call (block (expression_statement (augmented_assignment (identifier_percent_scale_factor) identifier_percent_scale_factor (float_0.01) float_0.01 )augmented_assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (subscript (identifier_s) identifier_s (slice (colon) colon (unary_operator (call (identifier_len) identifier_len (argument_list (identifier_p) identifier_p )argument_list )call )unary_operator )slice )subscript )assignment )expression_statement )block )if_statement )block )for_statement )block )if_statement (try_statement (block (return_statement (binary_operator (parenthesized_expression (conditional_expression (identifier_scale_factor) identifier_scale_factor (comparison_operator (identifier_scale_factor) identifier_scale_factor (integer_1) integer_1 )comparison_operator (identifier_percent_scale_factor) identifier_percent_scale_factor )conditional_expression )parenthesized_expression (call (identifier_typ) identifier_typ (argument_list (call (identifier_float) identifier_float (argument_list (identifier_s) identifier_s )argument_list )call )argument_list )call )binary_operator )return_statement )block (except_clause (tuple (identifier_ValueError) identifier_ValueError (identifier_TypeError) identifier_TypeError )tuple (block (return_statement (identifier_s) identifier_s )return_statement )block )except_clause )try_statement )block )function_definition )module
Strip dollar signs and commas from financial numerical string Also, convert percentages to fractions/factors (generally between 0 and 1.0) >>> [financial_float(x) for x in ("12k Flat", "12,000 flat", "20%", "$10,000 Flat", "15K flat", "null", "None", "", None)] [12000.0, 12000.0, 0.2, 10000.0, 15000.0, 'null', 'none', '', None]
(module (function_definition (function_name_traverse_until_fixpoint) function_name_traverse_until_fixpoint (parameters (identifier_predicate) identifier_predicate (identifier_tree) identifier_tree )parameters (block (expression_statement (assignment (identifier_old_tree) identifier_old_tree (None) None )assignment )expression_statement (expression_statement (assignment (identifier_tree) identifier_tree (call (identifier_simplify) identifier_simplify (argument_list (identifier_tree) identifier_tree )argument_list )call )assignment )expression_statement (while_statement (boolean_operator (identifier_tree) identifier_tree (comparison_operator (identifier_old_tree) identifier_old_tree (identifier_tree) identifier_tree )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_old_tree) identifier_old_tree (identifier_tree) identifier_tree )assignment )expression_statement (expression_statement (assignment (identifier_tree) identifier_tree (call (attribute (identifier_tree) identifier_tree (identifier_traverse) identifier_traverse )attribute (argument_list (identifier_predicate) identifier_predicate )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_tree) identifier_tree )not_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_tree) identifier_tree (call (identifier_simplify) identifier_simplify (argument_list (identifier_tree) identifier_tree )argument_list )call )assignment )expression_statement )block )while_statement (return_statement (identifier_tree) identifier_tree )return_statement )block )function_definition )module
Traverses the tree again and again until it is not modified.
(module (function_definition (function_name_fill_transaction_defaults) function_name_fill_transaction_defaults (parameters (identifier_web3) identifier_web3 (identifier_transaction) identifier_transaction )parameters (block (expression_statement (assignment (identifier_defaults) identifier_defaults (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_default_getter) identifier_default_getter )pattern_list (call (attribute (identifier_TRANSACTION_DEFAULTS) identifier_TRANSACTION_DEFAULTS (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_transaction) identifier_transaction )comparison_operator (block (if_statement (call (identifier_callable) identifier_callable (argument_list (identifier_default_getter) identifier_default_getter )argument_list )call (block (if_statement (comparison_operator (identifier_web3) identifier_web3 (None) None )comparison_operator (block (expression_statement (assignment (identifier_default_val) identifier_default_val (call (identifier_default_getter) identifier_default_getter (argument_list (identifier_web3) identifier_web3 (identifier_transaction) identifier_transaction )argument_list )call )assignment )expression_statement )block (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"You must specify %s in the transaction") string_"You must specify %s in the transaction" (identifier_key) identifier_key )binary_operator )argument_list )call )raise_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (identifier_default_val) identifier_default_val (identifier_default_getter) identifier_default_getter )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (subscript (identifier_defaults) identifier_defaults (identifier_key) identifier_key )subscript (identifier_default_val) identifier_default_val )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (call (identifier_merge) identifier_merge (argument_list (identifier_defaults) identifier_defaults (identifier_transaction) identifier_transaction )argument_list )call )return_statement )block )function_definition )module
if web3 is None, fill as much as possible while offline
(module (function_definition (function_name_upoint2bddpoint) function_name_upoint2bddpoint (parameters (identifier_upoint) identifier_upoint )parameters (block (expression_statement (assignment (identifier_point) identifier_point (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_uniqid) identifier_uniqid (subscript (identifier_upoint) identifier_upoint (integer_0) integer_0 )subscript (block (expression_statement (assignment (subscript (identifier_point) identifier_point (subscript (identifier__VARS) identifier__VARS (identifier_uniqid) identifier_uniqid )subscript )subscript (integer_0) integer_0 )assignment )expression_statement )block )for_statement (for_statement (identifier_uniqid) identifier_uniqid (subscript (identifier_upoint) identifier_upoint (integer_1) integer_1 )subscript (block (expression_statement (assignment (subscript (identifier_point) identifier_point (subscript (identifier__VARS) identifier__VARS (identifier_uniqid) identifier_uniqid )subscript )subscript (integer_1) integer_1 )assignment )expression_statement )block )for_statement (return_statement (identifier_point) identifier_point )return_statement )block )function_definition )module
Convert an untyped point into a BDD point. .. seealso:: For definitions of points and untyped points, see the :mod:`pyeda.boolalg.boolfunc` module.
(module (function_definition (function_name__six_fail_hook) function_name__six_fail_hook (parameters (identifier_modname) identifier_modname )parameters (block (expression_statement (assignment (identifier_attribute_of) identifier_attribute_of (boolean_operator (comparison_operator (identifier_modname) identifier_modname (string_"six.moves") string_"six.moves" )comparison_operator (call (attribute (identifier_modname) identifier_modname (identifier_startswith) identifier_startswith )attribute (argument_list (string_"six.moves") string_"six.moves" )argument_list )call )boolean_operator )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_modname) identifier_modname (string_"six.moves") string_"six.moves" )comparison_operator (not_operator (identifier_attribute_of) identifier_attribute_of )not_operator )boolean_operator (block (raise_statement (call (identifier_AstroidBuildingError) identifier_AstroidBuildingError (argument_list (keyword_argument (identifier_modname) identifier_modname (identifier_modname) identifier_modname )keyword_argument )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_module) identifier_module (call (attribute (call (identifier_AstroidBuilder) identifier_AstroidBuilder (argument_list (identifier_MANAGER) identifier_MANAGER )argument_list )call (identifier_string_build) identifier_string_build )attribute (argument_list (identifier__IMPORTS) identifier__IMPORTS )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_module) identifier_module (identifier_name) identifier_name )attribute (string_"six.moves") string_"six.moves" )assignment )expression_statement (if_statement (identifier_attribute_of) identifier_attribute_of (block (expression_statement (assignment (identifier_start_index) identifier_start_index (call (identifier_len) identifier_len (argument_list (attribute (identifier_module) identifier_module (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_attribute) identifier_attribute (call (attribute (call (attribute (subscript (identifier_modname) identifier_modname (slice (identifier_start_index) identifier_start_index (colon) colon )slice )subscript (identifier_lstrip) identifier_lstrip )attribute (argument_list (string_".") string_"." )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_".") string_"." (string_"_") string_"_" )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_import_attr) identifier_import_attr (subscript (call (attribute (identifier_module) identifier_module (identifier_getattr) identifier_getattr )attribute (argument_list (identifier_attribute) identifier_attribute )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement )block (except_clause (identifier_AttributeInferenceError) identifier_AttributeInferenceError (block (raise_statement (call (identifier_AstroidBuildingError) identifier_AstroidBuildingError (argument_list (keyword_argument (identifier_modname) identifier_modname (identifier_modname) identifier_modname )keyword_argument )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_import_attr) identifier_import_attr (attribute (identifier_nodes) identifier_nodes (identifier_Import) identifier_Import )attribute )argument_list )call (block (expression_statement (assignment (identifier_submodule) identifier_submodule (call (attribute (identifier_MANAGER) identifier_MANAGER (identifier_ast_from_module_name) identifier_ast_from_module_name )attribute (argument_list (subscript (subscript (attribute (identifier_import_attr) identifier_import_attr (identifier_names) identifier_names )attribute (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (return_statement (identifier_submodule) identifier_submodule )return_statement )block )if_statement )block )if_statement (return_statement (identifier_module) identifier_module )return_statement )block )function_definition )module
Fix six.moves imports due to the dynamic nature of this class. Construct a pseudo-module which contains all the necessary imports for six :param modname: Name of failed module :type modname: str :return: An astroid module :rtype: nodes.Module
(module (function_definition (function_name_get_orgs) function_name_get_orgs (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_orgs) identifier_orgs (list )list )assignment )expression_statement (for_statement (identifier_resource) identifier_resource (subscript (call (attribute (identifier_self) identifier_self (identifier__get_orgs) identifier__get_orgs )attribute (argument_list )argument_list )call (string_'resources') string_'resources' )subscript (block (expression_statement (call (attribute (identifier_orgs) identifier_orgs (identifier_append) identifier_append )attribute (argument_list (subscript (subscript (identifier_resource) identifier_resource (string_'entity') string_'entity' )subscript (string_'name') string_'name' )subscript )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_orgs) identifier_orgs )return_statement )block )function_definition )module
Returns a flat list of the names for the organizations user belongs.
(module (function_definition (function_name_validate_pro) function_name_validate_pro (parameters )parameters (block (expression_statement (assignment (identifier_cmd) identifier_cmd (list (string_'python3') string_'python3' (string_'validate.py') string_'validate.py' (attribute (identifier_FLAGS) identifier_FLAGS (identifier_pro_dataset) identifier_pro_dataset )attribute (string_'--use_tpu') string_'--use_tpu' (call (attribute (string_'--tpu_name={}') string_'--tpu_name={}' (identifier_format) identifier_format )attribute (argument_list (identifier_TPU_NAME) identifier_TPU_NAME )argument_list )call (call (attribute (string_'--work_dir={}') string_'--work_dir={}' (identifier_format) identifier_format )attribute (argument_list (call (attribute (identifier_fsdb) identifier_fsdb (identifier_working_dir) identifier_working_dir )attribute (argument_list )argument_list )call )argument_list )call (string_'--flagfile=rl_loop/distributed_flags') string_'--flagfile=rl_loop/distributed_flags' (string_'--validate_name=pro') string_'--validate_name=pro' )list )assignment )expression_statement (expression_statement (call (attribute (identifier_mask_flags) identifier_mask_flags (identifier_run) identifier_run )attribute (argument_list (identifier_cmd) identifier_cmd )argument_list )call )expression_statement )block )function_definition )module
Validate on professional data.
(module (function_definition (function_name__check_for_duplicates) function_name__check_for_duplicates (parameters (identifier_durations) identifier_durations (identifier_events) identifier_events )parameters (block (expression_statement (assignment (identifier_df) identifier_df (call (attribute (identifier_pd) identifier_pd (identifier_DataFrame) identifier_DataFrame )attribute (argument_list (dictionary (pair (string_"t") string_"t" (identifier_durations) identifier_durations )pair (pair (string_"e") string_"e" (identifier_events) identifier_events )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dup_times) identifier_dup_times (call (attribute (subscript (attribute (identifier_df) identifier_df (identifier_loc) identifier_loc )attribute (comparison_operator (subscript (identifier_df) identifier_df (string_"e") string_"e" )subscript (integer_0) integer_0 )comparison_operator (string_"t") string_"t" )subscript (identifier_duplicated) identifier_duplicated )attribute (argument_list (keyword_argument (identifier_keep) identifier_keep (False) False )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dup_events) identifier_dup_events (call (attribute (subscript (attribute (identifier_df) identifier_df (identifier_loc) identifier_loc )attribute (comparison_operator (subscript (identifier_df) identifier_df (string_"e") string_"e" )subscript (integer_0) integer_0 )comparison_operator (list (string_"t") string_"t" (string_"e") string_"e" )list )subscript (identifier_duplicated) identifier_duplicated )attribute (argument_list (keyword_argument (identifier_keep) identifier_keep (False) False )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (parenthesized_expression (binary_operator (identifier_dup_times) identifier_dup_times (parenthesized_expression (unary_operator (identifier_dup_events) identifier_dup_events )unary_operator )parenthesized_expression )binary_operator )parenthesized_expression (identifier_any) identifier_any )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Checks for duplicated event times in the data set. This is narrowed to detecting duplicated event times where the events are of different types
(module (function_definition (function_name___copy_extracted) function_name___copy_extracted (parameters (identifier_self) identifier_self (identifier_path) identifier_path (identifier_destination) identifier_destination )parameters (block (expression_statement (assignment (identifier_unpacked_dir) identifier_unpacked_dir (binary_operator (attribute (identifier_self) identifier_self (identifier_filename) identifier_filename )attribute (string_'.unpacked') string_'.unpacked' )binary_operator )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_unpacked_dir) identifier_unpacked_dir )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_warn) identifier_warn )attribute (argument_list (string_'Failed to copy extracted file %s, no extracted dir') string_'Failed to copy extracted file %s, no extracted dir' (identifier_path) identifier_path )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_source_path) identifier_source_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_unpacked_dir) identifier_unpacked_dir (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_source_path) identifier_source_path )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_warn) identifier_warn )attribute (argument_list (string_'Failed to copy extracted file %s, does not exist') string_'Failed to copy extracted file %s, does not exist' (identifier_path) identifier_path )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_destination_path) identifier_destination_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_destination) identifier_destination (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_copyfile) identifier_copyfile )attribute (argument_list (identifier_source_path) identifier_source_path (identifier_destination_path) identifier_destination_path )argument_list )call )expression_statement )block )function_definition )module
Copies a file that was already extracted to the destination directory. Args: path (str): Relative (to the root of the archive) of the file to copy. destination (str): Directory to extract the archive to.
(module (function_definition (function_name_best_assemblyfile) function_name_best_assemblyfile (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_sample) identifier_sample (attribute (identifier_self) identifier_self (identifier_metadata) identifier_metadata )attribute (block (try_statement (block (expression_statement (assignment (identifier_filtered_outputfile) identifier_filtered_outputfile (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 (string_'raw_assemblies') string_'raw_assemblies' (call (attribute (string_'{}.fasta') string_'{}.fasta' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_sample) identifier_sample (identifier_name) identifier_name )attribute )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (attribute (attribute (identifier_sample) identifier_sample (identifier_general) identifier_general )attribute (identifier_assemblyfile) identifier_assemblyfile )attribute )argument_list )call (block (expression_statement (assignment (identifier_size) identifier_size (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_getsize) identifier_getsize )attribute (argument_list (attribute (attribute (identifier_sample) identifier_sample (identifier_general) identifier_general )attribute (identifier_assemblyfile) identifier_assemblyfile )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_size) identifier_size (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (attribute (attribute (identifier_sample) identifier_sample (identifier_general) identifier_general )attribute (identifier_bestassemblyfile) identifier_bestassemblyfile )attribute (string_'NA') string_'NA' )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (attribute (identifier_sample) identifier_sample (identifier_general) identifier_general )attribute (identifier_bestassemblyfile) identifier_bestassemblyfile )attribute (attribute (attribute (identifier_sample) identifier_sample (identifier_general) identifier_general )attribute (identifier_assemblyfile) identifier_assemblyfile )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_copyfile) identifier_copyfile )attribute (argument_list (attribute (attribute (identifier_sample) identifier_sample (identifier_general) identifier_general )attribute (identifier_bestassemblyfile) identifier_bestassemblyfile )attribute (identifier_filtered_outputfile) identifier_filtered_outputfile )argument_list )call )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (attribute (attribute (identifier_sample) identifier_sample (identifier_general) identifier_general )attribute (identifier_bestassemblyfile) identifier_bestassemblyfile )attribute (string_'NA') string_'NA' )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (attribute (identifier_sample) identifier_sample (identifier_general) identifier_general )attribute (identifier_filteredfile) identifier_filteredfile )attribute (identifier_filtered_outputfile) identifier_filtered_outputfile )assignment )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (expression_statement (assignment (attribute (attribute (identifier_sample) identifier_sample (identifier_general) identifier_general )attribute (identifier_assemblyfile) identifier_assemblyfile )attribute (string_'NA') string_'NA' )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_sample) identifier_sample (identifier_general) identifier_general )attribute (identifier_bestassemblyfile) identifier_bestassemblyfile )attribute (string_'NA') string_'NA' )assignment )expression_statement )block )except_clause )try_statement )block )for_statement )block )function_definition )module
Determine whether the contigs.fasta output file from the assembler is present. If not, set the .bestassembly attribute to 'NA'
(module (function_definition (function_name_qgis_version_detailed) function_name_qgis_version_detailed (parameters )parameters (block (expression_statement (assignment (identifier_version) identifier_version (call (identifier_str) identifier_str (argument_list (attribute (identifier_Qgis) identifier_Qgis (identifier_QGIS_VERSION_INT) identifier_QGIS_VERSION_INT )attribute )argument_list )call )assignment )expression_statement (return_statement (list (call (identifier_int) identifier_int (argument_list (subscript (identifier_version) identifier_version (integer_0) integer_0 )subscript )argument_list )call (call (identifier_int) identifier_int (argument_list (subscript (identifier_version) identifier_version (slice (integer_1) integer_1 (colon) colon (integer_3) integer_3 )slice )subscript )argument_list )call (call (identifier_int) identifier_int (argument_list (subscript (identifier_version) identifier_version (slice (integer_3) integer_3 (colon) colon )slice )subscript )argument_list )call )list )return_statement )block )function_definition )module
Get the detailed version of QGIS. :returns: List containing major, minor and patch. :rtype: list
(module (function_definition (function_name_stopThread) function_name_stopThread (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__thread) identifier__thread )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_performSelector_onThread_withObject_waitUntilDone_) identifier_performSelector_onThread_withObject_waitUntilDone_ )attribute (argument_list (string_'stopPowerNotificationsThread') string_'stopPowerNotificationsThread' (attribute (identifier_self) identifier_self (identifier__thread) identifier__thread )attribute (None) None (attribute (identifier_objc) identifier_objc (identifier_YES) identifier_YES )attribute )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__thread) identifier__thread )attribute (None) None )assignment )expression_statement )block )if_statement )block )function_definition )module
Stops spawned NSThread.
(module (function_definition (function_name_inspect_streamer) function_name_inspect_streamer (parameters (identifier_self) identifier_self (identifier_index) identifier_index )parameters (block (if_statement (comparison_operator (identifier_index) identifier_index (call (identifier_len) identifier_len (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_graph) identifier_graph )attribute (identifier_streamers) identifier_streamers )attribute )argument_list )call )comparison_operator (block (return_statement (list (call (identifier__pack_sgerror) identifier__pack_sgerror (argument_list (attribute (identifier_SensorGraphError) identifier_SensorGraphError (identifier_STREAMER_NOT_ALLOCATED) identifier_STREAMER_NOT_ALLOCATED )attribute )argument_list )call (binary_operator (string_b'\0') string_b'\0' (integer_14) integer_14 )binary_operator )list )return_statement )block )if_statement (return_statement (list (attribute (identifier_Error) identifier_Error (identifier_NO_ERROR) identifier_NO_ERROR )attribute (call (attribute (identifier_streamer_descriptor) identifier_streamer_descriptor (identifier_create_binary_descriptor) identifier_create_binary_descriptor )attribute (argument_list (subscript (attribute (attribute (identifier_self) identifier_self (identifier_graph) identifier_graph )attribute (identifier_streamers) identifier_streamers )attribute (identifier_index) identifier_index )subscript )argument_list )call )list )return_statement )block )function_definition )module
Inspect the streamer at the given index.
(module (function_definition (function_name_augment_excmessage) function_name_augment_excmessage (parameters (default_parameter (identifier_prefix) identifier_prefix (None) None )default_parameter (default_parameter (identifier_suffix) identifier_suffix (None) None )default_parameter )parameters (type (identifier_NoReturn) identifier_NoReturn )type (block (expression_statement (assignment (identifier_exc_old) identifier_exc_old (subscript (call (attribute (identifier_sys) identifier_sys (identifier_exc_info) identifier_exc_info )attribute (argument_list )argument_list )call (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_message) identifier_message (call (identifier_str) identifier_str (argument_list (identifier_exc_old) identifier_exc_old )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_prefix) identifier_prefix (None) None )comparison_operator (block (expression_statement (assignment (identifier_message) identifier_message (string_f'{prefix}, the following error occurred: {message}') string_f'{prefix}, the following error occurred: {message}' )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_suffix) identifier_suffix (None) None )comparison_operator (block (expression_statement (assignment (identifier_message) identifier_message (string_f'{message} {suffix}') string_f'{message} {suffix}' )assignment )expression_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_exc_new) identifier_exc_new (call (call (identifier_type) identifier_type (argument_list (identifier_exc_old) identifier_exc_old )argument_list )call (argument_list (identifier_message) identifier_message )argument_list )call )assignment )expression_statement )block (except_clause (identifier_BaseException) identifier_BaseException (block (expression_statement (assignment (identifier_exc_name) identifier_exc_name (subscript (call (attribute (call (identifier_str) identifier_str (argument_list (call (identifier_type) identifier_type (argument_list (identifier_exc_old) identifier_exc_old )argument_list )call )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_"'") string_"'" )argument_list )call (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_exc_type) identifier_exc_type (call (identifier_type) identifier_type (argument_list (identifier_exc_name) identifier_exc_name (tuple (identifier_BaseException) identifier_BaseException )tuple (dictionary )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_exc_type) identifier_exc_type (identifier___module) identifier___module )attribute (attribute (identifier_exc_old) identifier_exc_old (identifier___module__) identifier___module__ )attribute )assignment )expression_statement (raise_statement (call (identifier_exc_type) identifier_exc_type (argument_list (identifier_message) identifier_message )argument_list )call (identifier_exc_old) identifier_exc_old )raise_statement )block )except_clause )try_statement (raise_statement (identifier_exc_new) identifier_exc_new (identifier_exc_old) identifier_exc_old )raise_statement )block )function_definition )module
Augment an exception message with additional information while keeping the original traceback. You can prefix and/or suffix text. If you prefix something (which happens much more often in the HydPy framework), the sub-clause ', the following error occurred:' is automatically included: >>> from hydpy.core import objecttools >>> import textwrap >>> try: ... 1 + '1' ... except BaseException: ... prefix = 'While showing how prefixing works' ... suffix = '(This is a final remark.)' ... objecttools.augment_excmessage(prefix, suffix) Traceback (most recent call last): ... TypeError: While showing how prefixing works, the following error \ occurred: unsupported operand type(s) for +: 'int' and 'str' \ (This is a final remark.) Some exceptions derived by site-packages do not support exception chaining due to requiring multiple initialisation arguments. In such cases, |augment_excmessage| generates an exception with the same name on the fly and raises it afterwards, which is pointed out by the exception name mentioning to the "objecttools" module: >>> class WrongError(BaseException): ... def __init__(self, arg1, arg2): ... pass >>> try: ... raise WrongError('info 1', 'info 2') ... except BaseException: ... objecttools.augment_excmessage( ... 'While showing how prefixing works') Traceback (most recent call last): ... hydpy.core.objecttools.hydpy.core.objecttools.WrongError: While showing \ how prefixing works, the following error occurred: ('info 1', 'info 2')
(module (function_definition (function_name__sha1_for_file) function_name__sha1_for_file (parameters (identifier_filename) identifier_filename )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_fileobj) identifier_fileobj )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_contents) identifier_contents (call (attribute (identifier_fileobj) identifier_fileobj (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (call (attribute (identifier_hashlib) identifier_hashlib (identifier_sha1) identifier_sha1 )attribute (argument_list (identifier_contents) identifier_contents )argument_list )call (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Return sha1 for contents of filename.
(module (function_definition (function_name_single_device_data_message) function_name_single_device_data_message (parameters (identifier_self) identifier_self (default_parameter (identifier_registration_id) identifier_registration_id (None) None )default_parameter (default_parameter (identifier_condition) identifier_condition (None) None )default_parameter (default_parameter (identifier_collapse_key) identifier_collapse_key (None) None )default_parameter (default_parameter (identifier_delay_while_idle) identifier_delay_while_idle (False) False )default_parameter (default_parameter (identifier_time_to_live) identifier_time_to_live (None) None )default_parameter (default_parameter (identifier_restricted_package_name) identifier_restricted_package_name (None) None )default_parameter (default_parameter (identifier_low_priority) identifier_low_priority (False) False )default_parameter (default_parameter (identifier_dry_run) identifier_dry_run (False) False )default_parameter (default_parameter (identifier_data_message) identifier_data_message (None) None )default_parameter (default_parameter (identifier_content_available) identifier_content_available (None) None )default_parameter (default_parameter (identifier_android_channel_id) identifier_android_channel_id (None) None )default_parameter (default_parameter (identifier_timeout) identifier_timeout (integer_5) integer_5 )default_parameter (default_parameter (identifier_extra_notification_kwargs) identifier_extra_notification_kwargs (None) None )default_parameter (default_parameter (identifier_extra_kwargs) identifier_extra_kwargs (dictionary )dictionary )default_parameter )parameters (block (if_statement (comparison_operator (identifier_registration_id) identifier_registration_id (None) None )comparison_operator (block (raise_statement (call (identifier_InvalidDataError) identifier_InvalidDataError (argument_list (string_'Invalid registration ID') string_'Invalid registration ID' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_payload) identifier_payload (call (attribute (identifier_self) identifier_self (identifier_parse_payload) identifier_parse_payload )attribute (argument_list (keyword_argument (identifier_registration_ids) identifier_registration_ids (list (identifier_registration_id) identifier_registration_id )list )keyword_argument (keyword_argument (identifier_condition) identifier_condition (identifier_condition) identifier_condition )keyword_argument (keyword_argument (identifier_collapse_key) identifier_collapse_key (identifier_collapse_key) identifier_collapse_key )keyword_argument (keyword_argument (identifier_delay_while_idle) identifier_delay_while_idle (identifier_delay_while_idle) identifier_delay_while_idle )keyword_argument (keyword_argument (identifier_time_to_live) identifier_time_to_live (identifier_time_to_live) identifier_time_to_live )keyword_argument (keyword_argument (identifier_restricted_package_name) identifier_restricted_package_name (identifier_restricted_package_name) identifier_restricted_package_name )keyword_argument (keyword_argument (identifier_low_priority) identifier_low_priority (identifier_low_priority) identifier_low_priority )keyword_argument (keyword_argument (identifier_dry_run) identifier_dry_run (identifier_dry_run) identifier_dry_run )keyword_argument (keyword_argument (identifier_data_message) identifier_data_message (identifier_data_message) identifier_data_message )keyword_argument (keyword_argument (identifier_content_available) identifier_content_available (identifier_content_available) identifier_content_available )keyword_argument (keyword_argument (identifier_remove_notification) identifier_remove_notification (True) True )keyword_argument (keyword_argument (identifier_android_channel_id) identifier_android_channel_id (identifier_android_channel_id) identifier_android_channel_id )keyword_argument (keyword_argument (identifier_extra_notification_kwargs) identifier_extra_notification_kwargs (identifier_extra_notification_kwargs) identifier_extra_notification_kwargs )keyword_argument (dictionary_splat (identifier_extra_kwargs) identifier_extra_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send_request) identifier_send_request )attribute (argument_list (list (identifier_payload) identifier_payload )list (identifier_timeout) identifier_timeout )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_parse_responses) identifier_parse_responses )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Send push message to a single device Args: registration_id (list, optional): FCM device registration ID condition (str, optiona): Topic condition to deliver messages to collapse_key (str, optional): Identifier for a group of messages that can be collapsed so that only the last message gets sent when delivery can be resumed. Defaults to `None`. delay_while_idle (bool, optional): deprecated time_to_live (int, optional): How long (in seconds) the message should be kept in FCM storage if the device is offline. The maximum time to live supported is 4 weeks. Defaults to `None` which uses the FCM default of 4 weeks. restricted_package_name (str, optional): Name of package low_priority (bool, optional): Whether to send notification with the low priority flag. Defaults to `False`. dry_run (bool, optional): If `True` no message will be sent but request will be tested. data_message (dict, optional): Custom key-value pairs content_available (bool, optional): Inactive client app is awoken android_channel_id (str, optional): Starting in Android 8.0 (API level 26), all notifications must be assigned to a channel. For each channel, you can set the visual and auditory behavior that is applied to all notifications in that channel. Then, users can change these settings and decide which notification channels from your app should be intrusive or visible at all. timeout (int, optional): set time limit for the request extra_notification_kwargs (dict, optional): More notification keyword arguments extra_kwargs (dict, optional): More keyword arguments Returns: dict: Response from FCM server (`multicast_id`, `success`, `failure`, `canonical_ids`, `results`) Raises: AuthenticationError: If :attr:`api_key` is not set or provided or there is an error authenticating the sender. FCMServerError: Internal server error or timeout error on Firebase cloud messaging server InvalidDataError: Invalid data provided InternalPackageError: Mostly from changes in the response of FCM, contact the project owner to resolve the issue
(module (function_definition (function_name_submit) function_name_submit (parameters (identifier_self) identifier_self (default_parameter (identifier_command) identifier_command (string_"") string_"" )default_parameter (default_parameter (identifier_blocksize) identifier_blocksize (integer_1) integer_1 )default_parameter (default_parameter (identifier_job_name) identifier_job_name (string_"parsl.auto") string_"parsl.auto" )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_instance) identifier_instance (identifier_name) identifier_name )pattern_list (call (attribute (identifier_self) identifier_self (identifier_create_instance) identifier_create_instance )attribute (argument_list (keyword_argument (identifier_command) identifier_command (identifier_command) identifier_command )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_provisioned_blocks) identifier_provisioned_blocks )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_resources) identifier_resources )attribute (identifier_name) identifier_name )subscript (dictionary (pair (string_"job_id") string_"job_id" (identifier_name) identifier_name )pair (pair (string_"status") string_"status" (subscript (identifier_translate_table) identifier_translate_table (subscript (identifier_instance) identifier_instance (string_'status') string_'status' )subscript )subscript )pair )dictionary )assignment )expression_statement (return_statement (identifier_name) identifier_name )return_statement )block )function_definition )module
The submit method takes the command string to be executed upon instantiation of a resource most often to start a pilot. Args : - command (str) : The bash command string to be executed. - blocksize (int) : Blocksize to be requested KWargs: - job_name (str) : Human friendly name to be assigned to the job request Returns: - A job identifier, this could be an integer, string etc Raises: - ExecutionProviderException or its subclasses
(module (function_definition (function_name_fillna) function_name_fillna (parameters (identifier_series_or_arr) identifier_series_or_arr (default_parameter (identifier_missing_value) identifier_missing_value (float_0.0) float_0.0 )default_parameter )parameters (block (if_statement (call (attribute (identifier_pandas) identifier_pandas (identifier_notnull) identifier_notnull )attribute (argument_list (identifier_missing_value) identifier_missing_value )argument_list )call (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_series_or_arr) identifier_series_or_arr (parenthesized_expression (attribute (identifier_numpy) identifier_numpy (identifier_ndarray) identifier_ndarray )attribute )parenthesized_expression )argument_list )call (block (expression_statement (assignment (subscript (identifier_series_or_arr) identifier_series_or_arr (call (attribute (identifier_numpy) identifier_numpy (identifier_isnan) identifier_isnan )attribute (argument_list (identifier_series_or_arr) identifier_series_or_arr )argument_list )call )subscript (identifier_missing_value) identifier_missing_value )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_series_or_arr) identifier_series_or_arr (identifier_fillna) identifier_fillna )attribute (argument_list (identifier_missing_value) identifier_missing_value (keyword_argument (identifier_inplace) identifier_inplace (True) True )keyword_argument )argument_list )call )expression_statement )block )else_clause )if_statement )block )if_statement (return_statement (identifier_series_or_arr) identifier_series_or_arr )return_statement )block )function_definition )module
Fill missing values in pandas objects and numpy arrays. Arguments --------- series_or_arr : pandas.Series, numpy.ndarray The numpy array or pandas series for which the missing values need to be replaced. missing_value : float, int, str The value to replace the missing value with. Default 0.0. Returns ------- pandas.Series, numpy.ndarray The numpy array or pandas series with the missing values filled.
(module (function_definition (function_name__effective_view_filter) function_name__effective_view_filter (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__effective_view) identifier__effective_view )attribute (identifier_EFFECTIVE) identifier_EFFECTIVE )comparison_operator (block (expression_statement (assignment (identifier_now) identifier_now (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (dictionary (pair (string_'startDate') string_'startDate' (dictionary (pair (string_'$$lte') string_'$$lte' (identifier_now) identifier_now )pair )dictionary )pair (pair (string_'endDate') string_'endDate' (dictionary (pair (string_'$$gte') string_'$$gte' (identifier_now) identifier_now )pair )dictionary )pair )dictionary )return_statement )block )if_statement (return_statement (dictionary )dictionary )return_statement )block )function_definition )module
Returns the mongodb relationship filter for effective views
(module (function_definition (function_name_save) function_name_save (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_is_valid) identifier_is_valid )attribute (argument_list )argument_list )call )not_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier__errors) identifier__errors )attribute )return_statement )block )if_statement (expression_statement (assignment (identifier__new) identifier__new (call (attribute (identifier_self) identifier_self (identifier_is_new) identifier_is_new )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier__new) identifier__new (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__initialize_id) identifier__initialize_id )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (with_statement (with_clause (with_item (call (identifier_Mutex) identifier_Mutex (argument_list (identifier_self) identifier_self )argument_list )call )with_item )with_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__write) identifier__write )attribute (argument_list (identifier__new) identifier__new )argument_list )call )expression_statement )block )with_statement (return_statement (True) True )return_statement )block )function_definition )module
Saves the instance to the datastore.
(module (function_definition (function_name_ustr) function_name_ustr (parameters (identifier_obj) identifier_obj )parameters (block (if_statement (comparison_operator (subscript (attribute (identifier_sys) identifier_sys (identifier_version_info) identifier_version_info )attribute (integer_0) integer_0 )subscript (integer_2) integer_2 )comparison_operator (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_obj) identifier_obj )argument_list )call (list (identifier_str) identifier_str (identifier_basestring) identifier_basestring )list )comparison_operator (block (return_statement (call (identifier_unicode) identifier_unicode (argument_list (identifier_obj) identifier_obj (identifier_DEFAULT_ENCODING) identifier_DEFAULT_ENCODING )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_unicode) identifier_unicode (argument_list (identifier_obj) identifier_obj )argument_list )call )return_statement )block )else_clause )if_statement )block (else_clause (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_obj) identifier_obj )argument_list )call (list (identifier_bytes) identifier_bytes )list )comparison_operator (block (return_statement (call (attribute (identifier_obj) identifier_obj (identifier_decode) identifier_decode )attribute (argument_list (identifier_DEFAULT_ENCODING) identifier_DEFAULT_ENCODING )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_str) identifier_str (argument_list (identifier_obj) identifier_obj )argument_list )call )return_statement )block )else_clause )if_statement )block )else_clause )if_statement )block )function_definition )module
Python 2 and 3 utility method that converts an obj to unicode in python 2 and to a str object in python 3
(module (function_definition (function_name_delete_resourcegroupitems) function_name_delete_resourcegroupitems (parameters (identifier_scenario_id) identifier_scenario_id (identifier_item_ids) identifier_item_ids (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_user_id) identifier_user_id (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'user_id') string_'user_id' )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (identifier__get_scenario) identifier__get_scenario (argument_list (identifier_scenario_id) identifier_scenario_id (identifier_user_id) identifier_user_id )argument_list )call )expression_statement (for_statement (identifier_item_id) identifier_item_id (identifier_item_ids) identifier_item_ids (block (expression_statement (assignment (identifier_rgi) identifier_rgi (call (attribute (call (attribute (call (attribute (attribute (identifier_db) identifier_db (identifier_DBSession) identifier_DBSession )attribute (identifier_query) identifier_query )attribute (argument_list (identifier_ResourceGroupItem) identifier_ResourceGroupItem )argument_list )call (line_continuation_\) line_continuation_\ (identifier_filter) identifier_filter )attribute (argument_list (comparison_operator (attribute (identifier_ResourceGroupItem) identifier_ResourceGroupItem (identifier_id) identifier_id )attribute (identifier_item_id) identifier_item_id )comparison_operator )argument_list )call (identifier_one) identifier_one )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_db) identifier_db (identifier_DBSession) identifier_DBSession )attribute (identifier_delete) identifier_delete )attribute (argument_list (identifier_rgi) identifier_rgi )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_db) identifier_db (identifier_DBSession) identifier_DBSession )attribute (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Delete specified items in a group, in a scenario.
(module (function_definition (function_name_write_tree_newick) function_name_write_tree_newick (parameters (identifier_self) identifier_self (identifier_filename) identifier_filename (default_parameter (identifier_hide_rooted_prefix) identifier_hide_rooted_prefix (False) False )default_parameter )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_filename) identifier_filename (identifier_str) identifier_str )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"filename must be a str") string_"filename must be a str" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_treestr) identifier_treestr (call (attribute (identifier_self) identifier_self (identifier_newick) identifier_newick )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_hide_rooted_prefix) identifier_hide_rooted_prefix (block (if_statement (call (attribute (identifier_treestr) identifier_treestr (identifier_startswith) identifier_startswith )attribute (argument_list (string_'[&R]') string_'[&R]' )argument_list )call (block (expression_statement (assignment (identifier_treestr) identifier_treestr (call (attribute (subscript (identifier_treestr) identifier_treestr (slice (integer_4) integer_4 (colon) colon )slice )subscript (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (call (identifier_warn) identifier_warn (argument_list (string_"Specified hide_rooted_prefix, but tree was not rooted") string_"Specified hide_rooted_prefix, but tree was not rooted" )argument_list )call )expression_statement )block )else_clause )if_statement )block )if_statement (if_statement (call (attribute (call (attribute (identifier_filename) identifier_filename (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_endswith) identifier_endswith )attribute (argument_list (string_'.gz') string_'.gz' )argument_list )call (block (expression_statement (assignment (identifier_f) identifier_f (call (identifier_gopen) identifier_gopen (argument_list (call (identifier_expanduser) identifier_expanduser (argument_list (identifier_filename) identifier_filename )argument_list )call (string_'wb') string_'wb' (integer_9) integer_9 )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_treestr) identifier_treestr (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_f) identifier_f (call (identifier_open) identifier_open (argument_list (call (identifier_expanduser) identifier_expanduser (argument_list (identifier_filename) identifier_filename )argument_list )call (string_'w') string_'w' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (identifier_treestr) identifier_treestr )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Write this ``Tree`` to a Newick file Args: ``filename`` (``str``): Path to desired output file (plain-text or gzipped)
(module (function_definition (function_name_get_schema_dir) function_name_get_schema_dir (parameters (default_parameter (identifier_db_version) identifier_db_version (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_v) identifier_v (call (identifier_str) identifier_str (argument_list (identifier_db_version) identifier_db_version )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier__top_dir) identifier__top_dir (string_'..') string_'..' (string_'schemata') string_'schemata' (string_'versions') string_'versions' (identifier_v) identifier_v )argument_list )call )return_statement )block )function_definition )module
Get path to directory with schemata. :param db_version: Version of the database :type db_version: int :return: Path :rtype: str
(module (function_definition (function_name_copy_graph) function_name_copy_graph (parameters (identifier_subject) identifier_subject (identifier_existing_graph) identifier_existing_graph )parameters (block (expression_statement (assignment (identifier_new_graph) identifier_new_graph (call (attribute (identifier_rdflib) identifier_rdflib (identifier_Graph) identifier_Graph )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_predicate) identifier_predicate (identifier_object_) identifier_object_ )pattern_list (call (attribute (identifier_existing_graph) identifier_existing_graph (identifier_predicate_objects) identifier_predicate_objects )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_new_graph) identifier_new_graph (identifier_add) identifier_add )attribute (argument_list (tuple (identifier_subject) identifier_subject (identifier_predicate) identifier_predicate (identifier_object_) identifier_object_ )tuple )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_new_graph) identifier_new_graph )return_statement )block )function_definition )module
Function takes a subject and an existing graph, returns a new graph with all predicate and objects of the existing graph copied to the new_graph with subject as the new subject Args: subject(rdflib.URIRef): A URIRef subject existing_graph(rdflib.Graph): A rdflib.Graph Returns: rdflib.Graph
(module (function_definition (function_name_temporal_segmentation) function_name_temporal_segmentation (parameters (identifier_segments) identifier_segments (identifier_min_time) identifier_min_time )parameters (block (expression_statement (assignment (identifier_final_segments) identifier_final_segments (list )list )assignment )expression_statement (for_statement (identifier_segment) identifier_segment (identifier_segments) identifier_segments (block (expression_statement (call (attribute (identifier_final_segments) identifier_final_segments (identifier_append) identifier_append )attribute (argument_list (list )list )argument_list )call )expression_statement (for_statement (identifier_point) identifier_point (identifier_segment) identifier_segment (block (if_statement (comparison_operator (attribute (identifier_point) identifier_point (identifier_dt) identifier_dt )attribute (identifier_min_time) identifier_min_time )comparison_operator (block (expression_statement (call (attribute (identifier_final_segments) identifier_final_segments (identifier_append) identifier_append )attribute (argument_list (list )list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (subscript (identifier_final_segments) identifier_final_segments (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_point) identifier_point )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_final_segments) identifier_final_segments )return_statement )block )function_definition )module
Segments based on time distant points Args: segments (:obj:`list` of :obj:`list` of :obj:`Point`): segment points min_time (int): minimum required time for segmentation
(module (function_definition (function_name_xml_entity_escape) function_name_xml_entity_escape (parameters (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_data) identifier_data (identifier_replace) identifier_replace )attribute (argument_list (string_"&") string_"&" (string_"&amp;") string_"&amp;" )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 (string_">") string_">" (string_"&gt;") string_"&gt;" )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 (string_"<") string_"<" (string_"&lt;") string_"&lt;" )argument_list )call )assignment )expression_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
replace special characters with their XML entity versions
(module (function_definition (function_name__apply_mapping) function_name__apply_mapping (parameters (identifier_self) identifier_self (identifier_mapping) identifier_mapping )parameters (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__POST) identifier__POST )attribute (string_"P0100LDR__") string_"P0100LDR__" )subscript (subscript (identifier_mapping) identifier_mapping (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__POST) identifier__POST )attribute (string_"P0200FMT__") string_"P0200FMT__" )subscript (subscript (identifier_mapping) identifier_mapping (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__POST) identifier__POST )attribute (string_"P0300BAS__a") string_"P0300BAS__a" )subscript (subscript (identifier_mapping) identifier_mapping (integer_2) integer_2 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__POST) identifier__POST )attribute (string_"P07022001_b") string_"P07022001_b" )subscript (subscript (identifier_mapping) identifier_mapping (integer_3) integer_3 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__POST) identifier__POST )attribute (string_"P1501IST1_a") string_"P1501IST1_a" )subscript (subscript (identifier_mapping) identifier_mapping (integer_4) integer_4 )subscript )assignment )expression_statement )block )function_definition )module
Map some case specific data to the fields in internal dictionary.
(module (function_definition (function_name_mount) function_name_mount (parameters (identifier_dev) identifier_dev (identifier_mountpoint) identifier_mountpoint (default_parameter (identifier_flags) identifier_flags (string_'') string_'' )default_parameter (default_parameter (identifier_log) identifier_log (None) None )default_parameter )parameters (block (expression_statement (call (identifier_ensureDirectory) identifier_ensureDirectory (argument_list (identifier_mountpoint) identifier_mountpoint )argument_list )call )expression_statement (expression_statement (call (identifier_systemCall) identifier_systemCall (argument_list (binary_operator (string_'mount %s %s %s') string_'mount %s %s %s' (tuple (identifier_flags) identifier_flags (identifier_dev) identifier_dev (identifier_mountpoint) identifier_mountpoint )tuple )binary_operator (keyword_argument (identifier_log) identifier_log (identifier_log) identifier_log )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Mount the given dev to the given mountpoint by using the given flags
(module (function_definition (function_name_unpause) function_name_unpause (parameters (identifier_self) identifier_self )parameters (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier__pause_level) identifier__pause_level )attribute (integer_1) integer_1 )augmented_assignment )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__pause_level) identifier__pause_level )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__offset) identifier__offset )attribute (binary_operator (attribute (identifier_self) identifier_self (identifier__paused_time) identifier__paused_time )attribute (call (attribute (identifier_self) identifier_self (identifier__clock) identifier__clock )attribute (argument_list )argument_list )call )binary_operator )assignment )expression_statement )block )if_statement )block )function_definition )module
Unpause the animation.
(module (function_definition (function_name_read) function_name_read (parameters (identifier_self) identifier_self )parameters (type (identifier_bytes) identifier_bytes )type (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__read_bytes) identifier__read_bytes )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_body) identifier_body (call (identifier_bytearray) identifier_bytearray (argument_list )argument_list )call )assignment )expression_statement (while_statement (True) True (block (expression_statement (assignment (identifier_chunk) identifier_chunk (await (call (attribute (attribute (identifier_self) identifier_self (identifier__payload) identifier__payload )attribute (identifier_readany) identifier_readany )attribute (argument_list )argument_list )call )await )assignment )expression_statement (expression_statement (call (attribute (identifier_body) identifier_body (identifier_extend) identifier_extend )attribute (argument_list (identifier_chunk) identifier_chunk )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__client_max_size) identifier__client_max_size )attribute (block (expression_statement (assignment (identifier_body_size) identifier_body_size (call (identifier_len) identifier_len (argument_list (identifier_body) identifier_body )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_body_size) identifier_body_size (attribute (identifier_self) identifier_self (identifier__client_max_size) identifier__client_max_size )attribute )comparison_operator (block (raise_statement (call (identifier_HTTPRequestEntityTooLarge) identifier_HTTPRequestEntityTooLarge (argument_list (keyword_argument (identifier_max_size) identifier_max_size (attribute (identifier_self) identifier_self (identifier__client_max_size) identifier__client_max_size )attribute )keyword_argument (keyword_argument (identifier_actual_size) identifier_actual_size (identifier_body_size) identifier_body_size )keyword_argument )argument_list )call )raise_statement )block )if_statement )block )if_statement (if_statement (not_operator (identifier_chunk) identifier_chunk )not_operator (block (break_statement )break_statement )block )if_statement )block )while_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__read_bytes) identifier__read_bytes )attribute (call (identifier_bytes) identifier_bytes (argument_list (identifier_body) identifier_body )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__read_bytes) identifier__read_bytes )attribute )return_statement )block )function_definition )module
Read request body if present. Returns bytes object with full request content.
(module (function_definition (function_name_to_pandas) function_name_to_pandas (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_is_raw) identifier_is_raw )attribute (argument_list )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Cannot convert to pandas Index if not evaluated.') string_'Cannot convert to pandas Index if not evaluated.' )argument_list )call )raise_statement )block )if_statement (import_from_statement (dotted_name (identifier_pandas) identifier_pandas )dotted_name (aliased_import (dotted_name (identifier_Index) identifier_Index )dotted_name (identifier_PandasIndex) identifier_PandasIndex )aliased_import )import_from_statement (return_statement (call (identifier_PandasIndex) identifier_PandasIndex (argument_list (attribute (identifier_self) identifier_self (identifier_values) identifier_values )attribute (attribute (identifier_self) identifier_self (identifier_dtype) identifier_dtype )attribute (keyword_argument (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Convert to pandas Index. Returns ------- pandas.base.Index
(module (function_definition (function_name_is_builtin) function_name_is_builtin (parameters (identifier_text) identifier_text )parameters (block (import_from_statement (dotted_name (identifier_spyder) identifier_spyder (identifier_py3compat) identifier_py3compat )dotted_name (dotted_name (identifier_builtins) identifier_builtins )dotted_name )import_from_statement (return_statement (comparison_operator (identifier_text) identifier_text (list_comprehension (call (identifier_str) identifier_str (argument_list (identifier_name) identifier_name )argument_list )call (for_in_clause (identifier_name) identifier_name (call (identifier_dir) identifier_dir (argument_list (identifier_builtins) identifier_builtins )argument_list )call )for_in_clause (if_clause (not_operator (call (attribute (identifier_name) identifier_name (identifier_startswith) identifier_startswith )attribute (argument_list (string_'_') string_'_' )argument_list )call )not_operator )if_clause )list_comprehension )comparison_operator )return_statement )block )function_definition )module
Test if passed string is the name of a Python builtin object
(module (function_definition (function_name_read_creds_from_environment_variables) function_name_read_creds_from_environment_variables (parameters )parameters (block (expression_statement (assignment (identifier_creds) identifier_creds (call (identifier_init_creds) identifier_init_creds (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (string_'AWS_ACCESS_KEY_ID') string_'AWS_ACCESS_KEY_ID' (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute )comparison_operator (comparison_operator (string_'AWS_SECRET_ACCESS_KEY') string_'AWS_SECRET_ACCESS_KEY' (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute )comparison_operator )boolean_operator (block (expression_statement (assignment (subscript (identifier_creds) identifier_creds (string_'AccessKeyId') string_'AccessKeyId' )subscript (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (string_'AWS_ACCESS_KEY_ID') string_'AWS_ACCESS_KEY_ID' )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_creds) identifier_creds (string_'SecretAccessKey') string_'SecretAccessKey' )subscript (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (string_'AWS_SECRET_ACCESS_KEY') string_'AWS_SECRET_ACCESS_KEY' )subscript )assignment )expression_statement (if_statement (comparison_operator (string_'AWS_SESSION_TOKEN') string_'AWS_SESSION_TOKEN' (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute )comparison_operator (block (expression_statement (assignment (subscript (identifier_creds) identifier_creds (string_'SessionToken') string_'SessionToken' )subscript (subscript (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute (string_'AWS_SESSION_TOKEN') string_'AWS_SESSION_TOKEN' )subscript )assignment )expression_statement )block )if_statement )block )if_statement (return_statement (identifier_creds) identifier_creds )return_statement )block )function_definition )module
Read credentials from environment variables :return:
(module (function_definition (function_name_set_transform_interface_params) function_name_set_transform_interface_params (parameters (identifier_spec) identifier_spec (identifier_input_features) identifier_input_features (identifier_output_features) identifier_output_features (default_parameter (identifier_are_optional) identifier_are_optional (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_input_features) identifier_input_features (call (attribute (identifier__fm) identifier__fm (identifier_process_or_validate_features) identifier_process_or_validate_features )attribute (argument_list (identifier_input_features) identifier_input_features )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output_features) identifier_output_features (call (attribute (identifier__fm) identifier__fm (identifier_process_or_validate_features) identifier_process_or_validate_features )attribute (argument_list (identifier_output_features) identifier_output_features )argument_list )call )assignment )expression_statement (for_statement (tuple_pattern (identifier_fname) identifier_fname (identifier_ftype) identifier_ftype )tuple_pattern (identifier_input_features) identifier_input_features (block (expression_statement (assignment (identifier_input_) identifier_input_ (call (attribute (attribute (attribute (identifier_spec) identifier_spec (identifier_description) identifier_description )attribute (identifier_input) identifier_input )attribute (identifier_add) identifier_add )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_input_) identifier_input_ (identifier_name) identifier_name )attribute (identifier_fname) identifier_fname )assignment )expression_statement (expression_statement (call (attribute (identifier_datatypes) identifier_datatypes (identifier__set_datatype) identifier__set_datatype )attribute (argument_list (attribute (identifier_input_) identifier_input_ (identifier_type) identifier_type )attribute (identifier_ftype) identifier_ftype )argument_list )call )expression_statement (if_statement (identifier_are_optional) identifier_are_optional (block (expression_statement (assignment (attribute (attribute (identifier_input_) identifier_input_ (identifier_type) identifier_type )attribute (identifier_isOptional) identifier_isOptional )attribute (identifier_are_optional) identifier_are_optional )assignment )expression_statement )block )if_statement )block )for_statement (for_statement (tuple_pattern (identifier_fname) identifier_fname (identifier_ftype) identifier_ftype )tuple_pattern (identifier_output_features) identifier_output_features (block (expression_statement (assignment (identifier_output_) identifier_output_ (call (attribute (attribute (attribute (identifier_spec) identifier_spec (identifier_description) identifier_description )attribute (identifier_output) identifier_output )attribute (identifier_add) identifier_add )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_output_) identifier_output_ (identifier_name) identifier_name )attribute (identifier_fname) identifier_fname )assignment )expression_statement (expression_statement (call (attribute (identifier_datatypes) identifier_datatypes (identifier__set_datatype) identifier__set_datatype )attribute (argument_list (attribute (identifier_output_) identifier_output_ (identifier_type) identifier_type )attribute (identifier_ftype) identifier_ftype )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_spec) identifier_spec )return_statement )block )function_definition )module
Common utilities to set transform interface params.
(module (function_definition (function_name_get_specific_nodes) function_name_get_specific_nodes (parameters (identifier_self) identifier_self (identifier_node) identifier_node (identifier_names) identifier_names )parameters (block (expression_statement (assignment (identifier_nodes) identifier_nodes (list_comprehension (tuple (attribute (identifier_x) identifier_x (identifier_tagName) identifier_tagName )attribute (identifier_x) identifier_x )tuple (for_in_clause (identifier_x) identifier_x (attribute (identifier_node) identifier_node (identifier_childNodes) identifier_childNodes )attribute )for_in_clause (if_clause (boolean_operator (comparison_operator (attribute (identifier_x) identifier_x (identifier_nodeType) identifier_nodeType )attribute (attribute (identifier_x) identifier_x (identifier_ELEMENT_NODE) identifier_ELEMENT_NODE )attribute )comparison_operator (comparison_operator (attribute (identifier_x) identifier_x (identifier_tagName) identifier_tagName )attribute (identifier_names) identifier_names )comparison_operator )boolean_operator )if_clause )list_comprehension )assignment )expression_statement (return_statement (call (identifier_dict) identifier_dict (argument_list (identifier_nodes) identifier_nodes )argument_list )call )return_statement )block )function_definition )module
Given a node and a sequence of strings in `names`, return a dictionary containing the names as keys and child `ELEMENT_NODEs`, that have a `tagName` equal to the name.
(module (function_definition (function_name_generate_manifest) function_name_generate_manifest (parameters (identifier_self) identifier_self (default_parameter (identifier_progressbar) identifier_progressbar (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_items) identifier_items (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_progressbar) identifier_progressbar (block (expression_statement (assignment (attribute (identifier_progressbar) identifier_progressbar (identifier_label) identifier_label )attribute (string_"Generating manifest") string_"Generating manifest" )assignment )expression_statement )block )if_statement (for_statement (identifier_handle) identifier_handle (call (attribute (attribute (identifier_self) identifier_self (identifier__storage_broker) identifier__storage_broker )attribute (identifier_iter_item_handles) identifier_iter_item_handles )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (attribute (identifier_dtoolcore) identifier_dtoolcore (identifier_utils) identifier_utils )attribute (identifier_generate_identifier) identifier_generate_identifier )attribute (argument_list (identifier_handle) identifier_handle )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_value) identifier_value (call (attribute (attribute (identifier_self) identifier_self (identifier__storage_broker) identifier__storage_broker )attribute (identifier_item_properties) identifier_item_properties )attribute (argument_list (identifier_handle) identifier_handle )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_items) identifier_items (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement (if_statement (identifier_progressbar) identifier_progressbar (block (expression_statement (assignment (attribute (identifier_progressbar) identifier_progressbar (identifier_item_show_func) identifier_item_show_func )attribute (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (identifier_handle) identifier_handle )lambda )assignment )expression_statement (expression_statement (call (attribute (identifier_progressbar) identifier_progressbar (identifier_update) identifier_update )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_manifest) identifier_manifest (dictionary (pair (string_"items") string_"items" (identifier_items) identifier_items )pair (pair (string_"dtoolcore_version") string_"dtoolcore_version" (identifier___version__) identifier___version__ )pair (pair (string_"hash_function") string_"hash_function" (attribute (attribute (attribute (identifier_self) identifier_self (identifier__storage_broker) identifier__storage_broker )attribute (identifier_hasher) identifier_hasher )attribute (identifier_name) identifier_name )attribute )pair )dictionary )assignment )expression_statement (return_statement (identifier_manifest) identifier_manifest )return_statement )block )function_definition )module
Return manifest generated from knowledge about contents.
(module (function_definition (function_name__get_params) function_name__get_params (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'accountNumber') string_'accountNumber' (attribute (attribute (identifier_self) identifier_self (identifier__service) identifier__service )attribute (identifier_accountNumber) identifier_accountNumber )attribute )pair )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_val) identifier_val )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier___dict__) identifier___dict__ )attribute (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier_field_order) identifier_field_order )attribute )comparison_operator (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (identifier_str) identifier_str )argument_list )call (block (expression_statement (assignment (identifier_val) identifier_val (call (attribute (identifier_val) identifier_val (identifier_decode) identifier_decode )attribute (argument_list (string_'utf8') string_'utf8' )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_params) identifier_params (identifier_key) identifier_key )subscript (identifier_val) identifier_val )assignment )expression_statement )block )if_statement )block )for_statement (for_statement (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier_field_order) identifier_field_order )attribute (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_params) identifier_params )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (identifier_key) identifier_key )subscript (string_u'') string_u'' )assignment )expression_statement )block )if_statement )block )for_statement (function_definition (function_name_order_keys) function_name_order_keys (parameters (identifier_k) identifier_k )parameters (block (if_statement (comparison_operator (subscript (identifier_k) identifier_k (integer_0) integer_0 )subscript (attribute (identifier_self) identifier_self (identifier_field_order) identifier_field_order )attribute )comparison_operator (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_field_order) identifier_field_order )attribute (identifier_index) identifier_index )attribute (argument_list (subscript (identifier_k) identifier_k (integer_0) integer_0 )subscript )argument_list )call )return_statement )block )if_statement (return_statement (binary_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_field_order) identifier_field_order )attribute )argument_list )call (integer_1) integer_1 )binary_operator )return_statement )block )function_definition (expression_statement (assignment (identifier_params) identifier_params (call (identifier_OrderedDict) identifier_OrderedDict (argument_list (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (identifier_params) identifier_params (identifier_items) identifier_items )attribute (argument_list )argument_list )call (keyword_argument (identifier_key) identifier_key (identifier_order_keys) identifier_order_keys )keyword_argument )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'hash') string_'hash' )argument_list )call (comparison_operator (attribute (identifier_self) identifier_self (identifier_hash) identifier_hash )attribute (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'hash') string_'hash' )subscript (attribute (identifier_self) identifier_self (identifier_hash) identifier_hash )attribute )assignment )expression_statement )block )if_statement (return_statement (identifier_params) identifier_params )return_statement )block )function_definition )module
Generate SOAP parameters.
(module (function_definition (function_name__verify_cert) function_name__verify_cert (parameters (identifier_self) identifier_self (typed_parameter (identifier_sock) identifier_sock (type (attribute (identifier_ssl) identifier_ssl (identifier_SSLSocket) identifier_SSLSocket )attribute )type )typed_parameter )parameters (block (expression_statement (assignment (identifier_verify_mode) identifier_verify_mode (attribute (attribute (identifier_self) identifier_self (identifier__ssl_context) identifier__ssl_context )attribute (identifier_verify_mode) identifier_verify_mode )attribute )assignment )expression_statement (assert_statement (comparison_operator (identifier_verify_mode) identifier_verify_mode (tuple (attribute (identifier_ssl) identifier_ssl (identifier_CERT_NONE) identifier_CERT_NONE )attribute (attribute (identifier_ssl) identifier_ssl (identifier_CERT_REQUIRED) identifier_CERT_REQUIRED )attribute (attribute (identifier_ssl) identifier_ssl (identifier_CERT_OPTIONAL) identifier_CERT_OPTIONAL )attribute )tuple )comparison_operator (call (attribute (string_'Unknown verify mode {}') string_'Unknown verify mode {}' (identifier_format) identifier_format )attribute (argument_list (identifier_verify_mode) identifier_verify_mode )argument_list )call )assert_statement (if_statement (comparison_operator (identifier_verify_mode) identifier_verify_mode (attribute (identifier_ssl) identifier_ssl (identifier_CERT_NONE) identifier_CERT_NONE )attribute )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_cert) identifier_cert (call (attribute (identifier_sock) identifier_sock (identifier_getpeercert) identifier_getpeercert )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_cert) identifier_cert )not_operator (comparison_operator (identifier_verify_mode) identifier_verify_mode (attribute (identifier_ssl) identifier_ssl (identifier_CERT_OPTIONAL) identifier_CERT_OPTIONAL )attribute )comparison_operator )boolean_operator (block (return_statement )return_statement )block )if_statement (if_statement (not_operator (identifier_cert) identifier_cert )not_operator (block (raise_statement (call (identifier_SSLVerificationError) identifier_SSLVerificationError (argument_list (string_'No SSL certificate given') string_'No SSL certificate given' )argument_list )call )raise_statement )block )if_statement (try_statement (block (expression_statement (call (attribute (identifier_ssl) identifier_ssl (identifier_match_hostname) identifier_match_hostname )attribute (argument_list (identifier_cert) identifier_cert (attribute (identifier_self) identifier_self (identifier__hostname) identifier__hostname )attribute )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (identifier_ssl) identifier_ssl (identifier_CertificateError) identifier_CertificateError )attribute (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (raise_statement (call (identifier_SSLVerificationError) identifier_SSLVerificationError (argument_list (string_'Invalid SSL certificate') string_'Invalid SSL certificate' )argument_list )call (identifier_error) identifier_error )raise_statement )block )except_clause )try_statement )block )function_definition )module
Check if certificate matches hostname.
(module (function_definition (function_name_fetch) function_name_fetch (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_retrieveVals) identifier_retrieveVals )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier_parent_name) identifier_parent_name (attribute (identifier_self) identifier_self (identifier__graphNames) identifier__graphNames )attribute (block (expression_statement (assignment (identifier_graph) identifier_graph (subscript (attribute (identifier_self) identifier_self (identifier__graphDict) identifier__graphDict )attribute (identifier_parent_name) identifier_parent_name )subscript )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_isMultigraph) identifier_isMultigraph )attribute (block (print_statement (binary_operator (string_"multigraph %s") string_"multigraph %s" (call (attribute (identifier_self) identifier_self (identifier__getMultigraphID) identifier__getMultigraphID )attribute (argument_list (identifier_parent_name) identifier_parent_name )argument_list )call )binary_operator )print_statement )block )if_statement (print_statement (call (attribute (identifier_self) identifier_self (identifier__formatVals) identifier__formatVals )attribute (argument_list (call (attribute (identifier_graph) identifier_graph (identifier_getVals) identifier_getVals )attribute (argument_list )argument_list )call )argument_list )call )print_statement (expression_statement (identifier_print) identifier_print )expression_statement )block )for_statement (if_statement (parenthesized_expression (boolean_operator (boolean_operator (boolean_operator (attribute (identifier_self) identifier_self (identifier_isMultigraph) identifier_isMultigraph )attribute (attribute (identifier_self) identifier_self (identifier__nestedGraphs) identifier__nestedGraphs )attribute )boolean_operator (attribute (identifier_self) identifier_self (identifier__subgraphDict) identifier__subgraphDict )attribute )boolean_operator (attribute (identifier_self) identifier_self (identifier__subgraphNames) identifier__subgraphNames )attribute )boolean_operator )parenthesized_expression (block (for_statement (tuple_pattern (identifier_parent_name) identifier_parent_name (identifier_subgraph_names) identifier_subgraph_names )tuple_pattern (call (attribute (attribute (identifier_self) identifier_self (identifier__subgraphNames) identifier__subgraphNames )attribute (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call (block (for_statement (identifier_graph_name) identifier_graph_name (identifier_subgraph_names) identifier_subgraph_names (block (expression_statement (assignment (identifier_graph) identifier_graph (subscript (subscript (attribute (identifier_self) identifier_self (identifier__subgraphDict) identifier__subgraphDict )attribute (identifier_parent_name) identifier_parent_name )subscript (identifier_graph_name) identifier_graph_name )subscript )assignment )expression_statement (print_statement (binary_operator (string_"multigraph %s") string_"multigraph %s" (call (attribute (identifier_self) identifier_self (identifier_getMultigraphID) identifier_getMultigraphID )attribute (argument_list (identifier_parent_name) identifier_parent_name (identifier_graph_name) identifier_graph_name )argument_list )call )binary_operator )print_statement (print_statement (call (attribute (identifier_self) identifier_self (identifier__formatVals) identifier__formatVals )attribute (argument_list (call (attribute (identifier_graph) identifier_graph (identifier_getVals) identifier_getVals )attribute (argument_list )argument_list )call )argument_list )call )print_statement (expression_statement (identifier_print) identifier_print )expression_statement )block )for_statement )block )for_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Implements Munin Plugin Fetch Option. Prints out measured values.
(module (function_definition (function_name_combine_first) function_name_combine_first (parameters (identifier_self) identifier_self (identifier_other) identifier_other )parameters (block (expression_statement (assignment (identifier_new_index) identifier_new_index (call (attribute (attribute (identifier_self) identifier_self (identifier_index) identifier_index )attribute (identifier_union) identifier_union )attribute (argument_list (attribute (identifier_other) identifier_other (identifier_index) identifier_index )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_this) identifier_this (call (attribute (identifier_self) identifier_self (identifier_reindex) identifier_reindex )attribute (argument_list (identifier_new_index) identifier_new_index (keyword_argument (identifier_copy) identifier_copy (False) False )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_other) identifier_other (call (attribute (identifier_other) identifier_other (identifier_reindex) identifier_reindex )attribute (argument_list (identifier_new_index) identifier_new_index (keyword_argument (identifier_copy) identifier_copy (False) False )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (identifier_is_datetimelike) identifier_is_datetimelike (argument_list (identifier_this) identifier_this )argument_list )call (not_operator (call (identifier_is_datetimelike) identifier_is_datetimelike (argument_list (identifier_other) identifier_other )argument_list )call )not_operator )boolean_operator (block (expression_statement (assignment (identifier_other) identifier_other (call (identifier_to_datetime) identifier_to_datetime (argument_list (identifier_other) identifier_other )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_this) identifier_this (identifier_where) identifier_where )attribute (argument_list (call (identifier_notna) identifier_notna (argument_list (identifier_this) identifier_this )argument_list )call (identifier_other) identifier_other )argument_list )call )return_statement )block )function_definition )module
Combine Series values, choosing the calling Series's values first. Parameters ---------- other : Series The value(s) to be combined with the `Series`. Returns ------- Series The result of combining the Series with the other object. See Also -------- Series.combine : Perform elementwise operation on two Series using a given function. Notes ----- Result index will be the union of the two indexes. Examples -------- >>> s1 = pd.Series([1, np.nan]) >>> s2 = pd.Series([3, 4]) >>> s1.combine_first(s2) 0 1.0 1 4.0 dtype: float64
(module (function_definition (function_name_batch) function_name_batch (parameters (identifier_self) identifier_self (default_parameter (identifier_timelimit) identifier_timelimit (None) None )default_parameter )parameters (block (import_from_statement (relative_import (import_prefix )import_prefix (dotted_name (identifier_launcher) identifier_launcher )dotted_name )relative_import (dotted_name (identifier_BatchLauncher) identifier_BatchLauncher )dotted_name )import_from_statement (expression_statement (assignment (identifier_prev_dir) identifier_prev_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (list_splat (subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_workdir) identifier_workdir )attribute (identifier_split) identifier_split )attribute (argument_list (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_sep) identifier_sep )attribute )argument_list )call (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )list_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_prev_dir) identifier_prev_dir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_sep) identifier_sep )attribute (identifier_prev_dir) identifier_prev_dir )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_workdir) identifier_workdir (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_prev_dir) identifier_prev_dir (binary_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_workdir) identifier_workdir )attribute )argument_list )call (string_"_batch") string_"_batch" )binary_operator )argument_list )call )assignment )expression_statement (return_statement (call (attribute (call (identifier_BatchLauncher) identifier_BatchLauncher (argument_list (keyword_argument (identifier_workdir) identifier_workdir (identifier_workdir) identifier_workdir )keyword_argument (keyword_argument (identifier_flows) identifier_flows (identifier_self) identifier_self )keyword_argument )argument_list )call (identifier_submit) identifier_submit )attribute (argument_list (keyword_argument (identifier_timelimit) identifier_timelimit (identifier_timelimit) identifier_timelimit )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Run the flow in batch mode, return exit status of the job script. Requires a manager.yml file and a batch_adapter adapter. Args: timelimit: Time limit (int with seconds or string with time given with the slurm convention: "days-hours:minutes:seconds"). If timelimit is None, the default value specified in the `batch_adapter` entry of `manager.yml` is used.
(module (function_definition (function_name_get_monitor_pos) function_name_get_monitor_pos (parameters (identifier_monitor) identifier_monitor )parameters (block (expression_statement (assignment (identifier_xpos_value) identifier_xpos_value (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_xpos) identifier_xpos (call (attribute (identifier_ctypes) identifier_ctypes (identifier_pointer) identifier_pointer )attribute (argument_list (identifier_xpos_value) identifier_xpos_value )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ypos_value) identifier_ypos_value (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list (integer_0) integer_0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ypos) identifier_ypos (call (attribute (identifier_ctypes) identifier_ctypes (identifier_pointer) identifier_pointer )attribute (argument_list (identifier_ypos_value) identifier_ypos_value )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier__glfw) identifier__glfw (identifier_glfwGetMonitorPos) identifier_glfwGetMonitorPos )attribute (argument_list (identifier_monitor) identifier_monitor (identifier_xpos) identifier_xpos (identifier_ypos) identifier_ypos )argument_list )call )expression_statement (return_statement (expression_list (attribute (identifier_xpos_value) identifier_xpos_value (identifier_value) identifier_value )attribute (attribute (identifier_ypos_value) identifier_ypos_value (identifier_value) identifier_value )attribute )expression_list )return_statement )block )function_definition )module
Returns the position of the monitor's viewport on the virtual screen. Wrapper for: void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos);
(module (function_definition (function_name__interface_to_service) function_name__interface_to_service (parameters (identifier_iface) identifier_iface )parameters (block (for_statement (identifier__service) identifier__service (call (identifier__get_services) identifier__get_services (argument_list )argument_list )call (block (expression_statement (assignment (identifier_service_info) identifier_service_info (call (attribute (identifier_pyconnman) identifier_pyconnman (identifier_ConnService) identifier_ConnService )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_SERVICE_PATH) identifier_SERVICE_PATH (identifier__service) identifier__service )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (call (attribute (identifier_service_info) identifier_service_info (identifier_get_property) identifier_get_property )attribute (argument_list (string_'Ethernet') string_'Ethernet' )argument_list )call (string_'Interface') string_'Interface' )subscript (identifier_iface) identifier_iface )comparison_operator (block (return_statement (identifier__service) identifier__service )return_statement )block )if_statement )block )for_statement (return_statement (None) None )return_statement )block )function_definition )module
returns the coresponding service to given interface if exists, otherwise return None
(module (function_definition (function_name_send_mails) function_name_send_mails (parameters (identifier_cls) identifier_cls )parameters (block (if_statement (boolean_operator (attribute (identifier_settings) identifier_settings (identifier_CAS_NEW_VERSION_EMAIL_WARNING) identifier_CAS_NEW_VERSION_EMAIL_WARNING )attribute (attribute (identifier_settings) identifier_settings (identifier_ADMINS) identifier_ADMINS )attribute )boolean_operator (block (try_statement (block (expression_statement (assignment (identifier_obj) identifier_obj (call (attribute (attribute (identifier_cls) identifier_cls (identifier_objects) identifier_objects )attribute (identifier_get) identifier_get )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (attribute (identifier_cls) identifier_cls (identifier_DoesNotExist) identifier_DoesNotExist )attribute (block (expression_statement (assignment (identifier_obj) identifier_obj (call (attribute (attribute (identifier_NewVersionWarning) identifier_NewVersionWarning (identifier_objects) identifier_objects )attribute (identifier_create) identifier_create )attribute (argument_list (keyword_argument (identifier_version) identifier_version (identifier_VERSION) identifier_VERSION )keyword_argument )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_LAST_VERSION) identifier_LAST_VERSION (call (attribute (identifier_utils) identifier_utils (identifier_last_version) identifier_last_version )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_LAST_VERSION) identifier_LAST_VERSION (None) None )comparison_operator (comparison_operator (identifier_LAST_VERSION) identifier_LAST_VERSION (attribute (identifier_obj) identifier_obj (identifier_version) identifier_version )attribute )comparison_operator )boolean_operator (block (if_statement (comparison_operator (call (attribute (identifier_utils) identifier_utils (identifier_decode_version) identifier_decode_version )attribute (argument_list (identifier_VERSION) identifier_VERSION )argument_list )call (call (attribute (identifier_utils) identifier_utils (identifier_decode_version) identifier_decode_version )attribute (argument_list (identifier_LAST_VERSION) identifier_LAST_VERSION )argument_list )call )comparison_operator (block (try_statement (block (expression_statement (call (identifier_send_mail) identifier_send_mail (argument_list (binary_operator (parenthesized_expression (string_'%sA new version of django-cas-server is available') string_'%sA new version of django-cas-server is available' )parenthesized_expression (attribute (identifier_settings) identifier_settings (identifier_EMAIL_SUBJECT_PREFIX) identifier_EMAIL_SUBJECT_PREFIX )attribute )binary_operator (binary_operator (call (attribute (identifier_u) identifier_u (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (tuple (identifier_VERSION) identifier_VERSION (identifier_LAST_VERSION) identifier_LAST_VERSION )tuple )binary_operator (attribute (identifier_settings) identifier_settings (identifier_SERVER_EMAIL) identifier_SERVER_EMAIL )attribute (list_comprehension (binary_operator (string_"%s <%s>") string_"%s <%s>" (identifier_admin) identifier_admin )binary_operator (for_in_clause (identifier_admin) identifier_admin (attribute (identifier_settings) identifier_settings (identifier_ADMINS) identifier_ADMINS )attribute )for_in_clause )list_comprehension (keyword_argument (identifier_fail_silently) identifier_fail_silently (False) False )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_obj) identifier_obj (identifier_version) identifier_version )attribute (identifier_LAST_VERSION) identifier_LAST_VERSION )assignment )expression_statement (expression_statement (call (attribute (identifier_obj) identifier_obj (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (identifier_smtplib) identifier_smtplib (identifier_SMTPException) identifier_SMTPException )attribute (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_"Unable to send new version mail: %s") string_"Unable to send new version mail: %s" (identifier_error) identifier_error )binary_operator )argument_list )call )expression_statement )block )except_clause )try_statement )block )if_statement )block )if_statement )block )if_statement )block )function_definition )module
For each new django-cas-server version, if the current instance is not up to date send one mail to ``settings.ADMINS``.
(module (function_definition (function_name_get_logs) function_name_get_logs (parameters (identifier_self) identifier_self (default_parameter (identifier_login) identifier_login (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier__login) identifier__login (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'login') string_'login' (identifier_login) identifier_login )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_log_events_url) identifier_log_events_url (call (attribute (identifier_GSA_LOGS_URL) identifier_GSA_LOGS_URL (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_login) identifier_login (identifier__login) identifier__login )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (call (attribute (identifier_self) identifier_self (identifier__request_api) identifier__request_api )attribute (argument_list (keyword_argument (identifier_url) identifier_url (identifier_log_events_url) identifier_log_events_url )keyword_argument )argument_list )call (identifier_json) identifier_json )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Get a user's logs. :param str login: User's login (Default: self._login) :return: JSON
(module (function_definition (function_name_inet_ntop) function_name_inet_ntop (parameters (identifier_af) identifier_af (identifier_addr) identifier_addr )parameters (block (expression_statement (assignment (identifier_addr) identifier_addr (call (identifier_bytes_encode) identifier_bytes_encode (argument_list (identifier_addr) identifier_addr )argument_list )call )assignment )expression_statement (try_statement (block (return_statement (call (attribute (identifier_socket) identifier_socket (identifier_inet_ntop) identifier_inet_ntop )attribute (argument_list (identifier_af) identifier_af (identifier_addr) identifier_addr )argument_list )call )return_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (try_statement (block (return_statement (call (subscript (identifier__INET_NTOP) identifier__INET_NTOP (identifier_af) identifier_af )subscript (argument_list (identifier_addr) identifier_addr )argument_list )call )return_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"unknown address family %d") string_"unknown address family %d" (identifier_af) identifier_af )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement )block )except_clause )try_statement )block )function_definition )module
Convert an IP address from binary form into text representation.
(module (function_definition (function_name_tsv_import) function_name_tsv_import (parameters (identifier_self) identifier_self (identifier_xsv_source) identifier_xsv_source (default_parameter (identifier_encoding) identifier_encoding (string_"UTF-8") string_"UTF-8" )default_parameter (default_parameter (identifier_transforms) identifier_transforms (None) None )default_parameter (default_parameter (identifier_row_class) identifier_row_class (identifier_DataObject) identifier_DataObject )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__xsv_import) identifier__xsv_import )attribute (argument_list (identifier_xsv_source) identifier_xsv_source (identifier_encoding) identifier_encoding (keyword_argument (identifier_transforms) identifier_transforms (identifier_transforms) identifier_transforms )keyword_argument (keyword_argument (identifier_delimiter) identifier_delimiter (string_"\t") string_"\t" )keyword_argument (keyword_argument (identifier_row_class) identifier_row_class (identifier_row_class) identifier_row_class )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Imports the contents of a tab-separated data file into this table. @param xsv_source: tab-separated data file - if a string is given, the file with that name will be opened, read, and closed; if a file object is given, then that object will be read as-is, and left for the caller to be closed. @type xsv_source: string or file @param transforms: dict of functions by attribute name; if given, each attribute will be transformed using the corresponding transform; if there is no matching transform, the attribute will be read as a string (default); the transform function can also be defined as a (function, default-value) tuple; if there is an Exception raised by the transform function, then the attribute will be set to the given default value @type transforms: dict (optional)
(module (function_definition (function_name_show) function_name_show (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_with_matplotlib) identifier_with_matplotlib (True) True )assignment )expression_statement (try_statement (block (import_statement (aliased_import (dotted_name (identifier_matplotlib) identifier_matplotlib (identifier_pyplot) identifier_pyplot )dotted_name (identifier_plt) identifier_plt )aliased_import )import_statement )block (except_clause (identifier_RuntimeError) identifier_RuntimeError (block (import_statement (aliased_import (dotted_name (identifier_skimage) identifier_skimage (identifier_io) identifier_io )dotted_name (identifier_io) identifier_io )aliased_import )import_statement (expression_statement (assignment (identifier_with_matplotlib) identifier_with_matplotlib (False) False )assignment )expression_statement )block )except_clause )try_statement (if_statement (identifier_with_matplotlib) identifier_with_matplotlib (block (expression_statement (assignment (identifier_equalised_img) identifier_equalised_img (call (attribute (identifier_self) identifier_self (identifier_equalise) identifier_equalise )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier__) identifier__ (identifier_ax) identifier_ax )pattern_list (call (attribute (identifier_plt) identifier_plt (identifier_subplots) identifier_subplots )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_ax) identifier_ax (identifier_imshow) identifier_imshow )attribute (argument_list (identifier_equalised_img) identifier_equalised_img (keyword_argument (identifier_cmap) identifier_cmap (string_'gray') string_'gray' )keyword_argument )argument_list )call )expression_statement (import_statement (dotted_name (identifier_random) identifier_random )dotted_name )import_statement (for_statement (identifier_contour_set) identifier_contour_set (call (attribute (attribute (identifier_self) identifier_self (identifier_as_contours) identifier_as_contours )attribute (identifier_itervalues) identifier_itervalues )attribute (argument_list )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_r) identifier_r (identifier_g) identifier_g (identifier_b) identifier_b )pattern_list (expression_list (call (attribute (identifier_random) identifier_random (identifier_random) identifier_random )attribute (argument_list )argument_list )call (call (attribute (identifier_random) identifier_random (identifier_random) identifier_random )attribute (argument_list )argument_list )call (call (attribute (identifier_random) identifier_random (identifier_random) identifier_random )attribute (argument_list )argument_list )call )expression_list )assignment )expression_statement (expression_statement (list_comprehension (call (attribute (identifier_ax) identifier_ax (identifier_plot) identifier_plot )attribute (argument_list (subscript (identifier_contour) identifier_contour (slice (colon) colon )slice (integer_1) integer_1 )subscript (subscript (identifier_contour) identifier_contour (slice (colon) colon )slice (integer_0) integer_0 )subscript (keyword_argument (identifier_linewidth) identifier_linewidth (integer_2) integer_2 )keyword_argument (keyword_argument (identifier_color) identifier_color (tuple (identifier_r) identifier_r (identifier_g) identifier_g (identifier_b) identifier_b (integer_1) integer_1 )tuple )keyword_argument )argument_list )call (for_in_clause (identifier_contour) identifier_contour (identifier_contour_set) identifier_contour_set )for_in_clause )list_comprehension )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_ax) identifier_ax (identifier_axis) identifier_axis )attribute (argument_list (string_'image') string_'image' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_ax) identifier_ax (identifier_set_xticks) identifier_set_xticks )attribute (argument_list (list )list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_ax) identifier_ax (identifier_set_yticks) identifier_set_yticks )attribute (argument_list (list )list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_show) identifier_show )attribute (argument_list )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_io) identifier_io (identifier_imshow) identifier_imshow )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_equalise) identifier_equalise )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_io) identifier_io (identifier_show) identifier_show )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Display the image
(module (function_definition (function_name_find_outer_region) function_name_find_outer_region (parameters (identifier_im) identifier_im (default_parameter (identifier_r) identifier_r (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (comparison_operator (identifier_r) identifier_r (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_dt) identifier_dt (call (attribute (identifier_spim) identifier_spim (identifier_distance_transform_edt) identifier_distance_transform_edt )attribute (argument_list (keyword_argument (identifier_input) identifier_input (identifier_im) identifier_im )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (binary_operator (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_sp) identifier_sp (identifier_amax) identifier_amax )attribute (argument_list (identifier_dt) identifier_dt )argument_list )call )argument_list )call (integer_2) integer_2 )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_im_padded) identifier_im_padded (call (attribute (identifier_sp) identifier_sp (identifier_pad) identifier_pad )attribute (argument_list (keyword_argument (identifier_array) identifier_array (identifier_im) identifier_im )keyword_argument (keyword_argument (identifier_pad_width) identifier_pad_width (identifier_r) identifier_r )keyword_argument (keyword_argument (identifier_mode) identifier_mode (string_'constant') string_'constant' )keyword_argument (keyword_argument (identifier_constant_values) identifier_constant_values (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dt) identifier_dt (call (attribute (identifier_spim) identifier_spim (identifier_distance_transform_edt) identifier_distance_transform_edt )attribute (argument_list (keyword_argument (identifier_input) identifier_input (identifier_im_padded) identifier_im_padded )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_seeds) identifier_seeds (binary_operator (parenthesized_expression (comparison_operator (identifier_dt) identifier_dt (identifier_r) identifier_r )comparison_operator )parenthesized_expression (call (identifier_get_border) identifier_get_border (argument_list (keyword_argument (identifier_shape) identifier_shape (attribute (identifier_im_padded) identifier_im_padded (identifier_shape) identifier_shape )attribute )keyword_argument )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_labels) identifier_labels (subscript (call (attribute (identifier_spim) identifier_spim (identifier_label) identifier_label )attribute (argument_list (identifier_seeds) identifier_seeds )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_mask) identifier_mask (comparison_operator (identifier_labels) identifier_labels (integer_1) integer_1 )comparison_operator )assignment )expression_statement (expression_statement (assignment (identifier_dt) identifier_dt (call (attribute (identifier_spim) identifier_spim (identifier_distance_transform_edt) identifier_distance_transform_edt )attribute (argument_list (unary_operator (identifier_mask) identifier_mask )unary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_outer_region) identifier_outer_region (comparison_operator (identifier_dt) identifier_dt (identifier_r) identifier_r )comparison_operator )assignment )expression_statement (expression_statement (assignment (identifier_outer_region) identifier_outer_region (call (identifier_extract_subsection) identifier_extract_subsection (argument_list (keyword_argument (identifier_im) identifier_im (identifier_outer_region) identifier_outer_region )keyword_argument (keyword_argument (identifier_shape) identifier_shape (attribute (identifier_im) identifier_im (identifier_shape) identifier_shape )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_outer_region) identifier_outer_region )return_statement )block )function_definition )module
r""" Finds regions of the image that are outside of the solid matrix. This function uses the rolling ball method to define where the outer region ends and the void space begins. This function is particularly useful for samples that do not fill the entire rectangular image, such as cylindrical cores or samples with non- parallel faces. Parameters ---------- im : ND-array Image of the porous material with 1's for void and 0's for solid r : scalar The radius of the rolling ball to use. If not specified then a value is calculated as twice maximum of the distance transform. The image size is padded by this amount in all directions, so the image can become quite large and unwieldy if too large a value is given. Returns ------- image : ND-array A boolean mask the same shape as ``im``, containing True in all voxels identified as *outside* the sample.
(module (function_definition (function_name_to_valid_state_vector) function_name_to_valid_state_vector (parameters (typed_parameter (identifier_state_rep) identifier_state_rep (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_int) identifier_int )type (type (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )type )type_parameter )generic_type )type )typed_parameter (typed_parameter (identifier_num_qubits) identifier_num_qubits (type (identifier_int) identifier_int )type )typed_parameter (typed_default_parameter (identifier_dtype) identifier_dtype (type (generic_type (identifier_Type) identifier_Type (type_parameter (type (attribute (identifier_np) identifier_np (identifier_number) identifier_number )attribute )type )type_parameter )generic_type )type (attribute (identifier_np) identifier_np (identifier_complex64) identifier_complex64 )attribute )typed_default_parameter )parameters (type (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )type (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_state_rep) identifier_state_rep (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute )argument_list )call (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_state_rep) identifier_state_rep )argument_list )call (binary_operator (integer_2) integer_2 (identifier_num_qubits) identifier_num_qubits )binary_operator )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_'initial state was of size {} ') string_'initial state was of size {} ' (string_'but expected state for {} qubits') string_'but expected state for {} qubits' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_state_rep) identifier_state_rep )argument_list )call (identifier_num_qubits) identifier_num_qubits )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_state) identifier_state (identifier_state_rep) identifier_state_rep )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_state_rep) identifier_state_rep (identifier_int) identifier_int )argument_list )call (block (if_statement (comparison_operator (identifier_state_rep) identifier_state_rep (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'initial_state must be positive') string_'initial_state must be positive' )argument_list )call )raise_statement )block (elif_clause (comparison_operator (identifier_state_rep) identifier_state_rep (binary_operator (integer_2) integer_2 (identifier_num_qubits) identifier_num_qubits )binary_operator )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_'initial state was {} but expected state for {} qubits') string_'initial state was {} but expected state for {} qubits' (identifier_format) identifier_format )attribute (argument_list (identifier_state_rep) identifier_state_rep (identifier_num_qubits) identifier_num_qubits )argument_list )call )argument_list )call )raise_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_state) identifier_state (call (attribute (identifier_np) identifier_np (identifier_zeros) identifier_zeros )attribute (argument_list (binary_operator (integer_2) integer_2 (identifier_num_qubits) identifier_num_qubits )binary_operator (keyword_argument (identifier_dtype) identifier_dtype (identifier_dtype) identifier_dtype )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_state) identifier_state (identifier_state_rep) identifier_state_rep )subscript (float_1.0) float_1.0 )assignment )expression_statement )block )else_clause )if_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_'initial_state was not of type int or ndarray') string_'initial_state was not of type int or ndarray' )argument_list )call )raise_statement )block )else_clause )if_statement (expression_statement (call (identifier_validate_normalized_state) identifier_validate_normalized_state (argument_list (identifier_state) identifier_state (identifier_num_qubits) identifier_num_qubits (identifier_dtype) identifier_dtype )argument_list )call )expression_statement (return_statement (identifier_state) identifier_state )return_statement )block )function_definition )module
Verifies the state_rep is valid and converts it to ndarray form. This method is used to support passing in an integer representing a computational basis state or a full wave function as a representation of a state. Args: state_rep: If an int, the state returned is the state corresponding to a computational basis state. If an numpy array this is the full wave function. Both of these are validated for the given number of qubits, and the state must be properly normalized and of the appropriate dtype. num_qubits: The number of qubits for the state. The state_rep must be valid for this number of qubits. dtype: The numpy dtype of the state, will be used when creating the state for a computational basis state, or validated against if state_rep is a numpy array. Returns: A numpy ndarray corresponding to the state on the given number of qubits. Raises: ValueError if the state is not valid.
(module (function_definition (function_name_Update) function_name_Update (parameters (identifier_self) identifier_self (default_parameter (identifier_attribute) identifier_attribute (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_currently_running) identifier_currently_running (call (attribute (identifier_self) identifier_self (identifier_Get) identifier_Get )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_Schema) identifier_Schema )attribute (identifier_CONTENT_LOCK) identifier_CONTENT_LOCK )attribute )argument_list )call )assignment )expression_statement (if_statement (identifier_currently_running) identifier_currently_running (block (expression_statement (assignment (identifier_flow_obj) identifier_flow_obj (call (attribute (attribute (identifier_aff4) identifier_aff4 (identifier_FACTORY) identifier_FACTORY )attribute (identifier_Open) identifier_Open )attribute (argument_list (identifier_currently_running) identifier_currently_running (keyword_argument (identifier_token) identifier_token (attribute (identifier_self) identifier_self (identifier_token) identifier_token )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_flow_obj) identifier_flow_obj (call (attribute (call (attribute (identifier_flow_obj) identifier_flow_obj (identifier_GetRunner) identifier_GetRunner )attribute (argument_list )argument_list )call (identifier_IsRunning) identifier_IsRunning )attribute (argument_list )argument_list )call )boolean_operator (block (return_statement )return_statement )block )if_statement )block )if_statement (expression_statement (assignment (identifier_client_id) identifier_client_id (subscript (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_urn) identifier_urn )attribute (identifier_Path) identifier_Path )attribute (argument_list )argument_list )call (identifier_split) identifier_split )attribute (argument_list (string_"/") string_"/" (integer_2) integer_2 )argument_list )call (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_pathspec) identifier_pathspec (attribute (call (attribute (identifier_self) identifier_self (identifier_Get) identifier_Get )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_Schema) identifier_Schema )attribute (identifier_STAT) identifier_STAT )attribute )argument_list )call (identifier_pathspec) identifier_pathspec )attribute )assignment )expression_statement (expression_statement (assignment (identifier_flow_urn) identifier_flow_urn (call (attribute (identifier_flow) identifier_flow (identifier_StartAFF4Flow) identifier_StartAFF4Flow )attribute (argument_list (keyword_argument (identifier_client_id) identifier_client_id (identifier_client_id) identifier_client_id )keyword_argument (keyword_argument (identifier_flow_name) identifier_flow_name (string_"MultiGetFile") string_"MultiGetFile" )keyword_argument (keyword_argument (identifier_token) identifier_token (attribute (identifier_self) identifier_self (identifier_token) identifier_token )attribute )keyword_argument (keyword_argument (identifier_pathspecs) identifier_pathspecs (list (identifier_pathspec) identifier_pathspec )list )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_Set) identifier_Set )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_Schema) identifier_Schema )attribute (identifier_CONTENT_LOCK) identifier_CONTENT_LOCK )attribute (argument_list (identifier_flow_urn) identifier_flow_urn )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_Close) identifier_Close )attribute (argument_list )argument_list )call )expression_statement (return_statement (identifier_flow_urn) identifier_flow_urn )return_statement )block )function_definition )module
Update an attribute from the client.
(module (function_definition (function_name_alter_object) function_name_alter_object (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj )parameters (block (for_statement (pattern_list (identifier_attname) identifier_attname (identifier_field) identifier_field (identifier_replacer) identifier_replacer )pattern_list (attribute (identifier_self) identifier_self (identifier_replacers) identifier_replacers )attribute (block (expression_statement (assignment (identifier_currentval) identifier_currentval (call (identifier_getattr) identifier_getattr (argument_list (identifier_obj) identifier_obj (identifier_attname) identifier_attname )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_replacement) identifier_replacement (call (identifier_replacer) identifier_replacer (argument_list (identifier_self) identifier_self (identifier_obj) identifier_obj (identifier_field) identifier_field (identifier_currentval) identifier_currentval )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_obj) identifier_obj (identifier_attname) identifier_attname (identifier_replacement) identifier_replacement )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Alters all the attributes in an individual object. If it returns False, the object will not be saved
(module (function_definition (function_name_get_page_square_dpi) function_name_get_page_square_dpi (parameters (identifier_pageinfo) identifier_pageinfo (identifier_options) identifier_options )parameters (block (expression_statement (string_"Get the DPI when we require xres == yres, scaled to physical units") string_"Get the DPI when we require xres == yres, scaled to physical units" )expression_statement (expression_statement (assignment (identifier_xres) identifier_xres (boolean_operator (attribute (identifier_pageinfo) identifier_pageinfo (identifier_xres) identifier_xres )attribute (integer_0) integer_0 )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_yres) identifier_yres (boolean_operator (attribute (identifier_pageinfo) identifier_pageinfo (identifier_yres) identifier_yres )attribute (integer_0) integer_0 )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_userunit) identifier_userunit (boolean_operator (attribute (identifier_pageinfo) identifier_pageinfo (identifier_userunit) identifier_userunit )attribute (integer_1) integer_1 )boolean_operator )assignment )expression_statement (return_statement (call (identifier_float) identifier_float (argument_list (call (identifier_max) identifier_max (argument_list (boolean_operator (parenthesized_expression (binary_operator (identifier_xres) identifier_xres (identifier_userunit) identifier_userunit )binary_operator )parenthesized_expression (identifier_VECTOR_PAGE_DPI) identifier_VECTOR_PAGE_DPI )boolean_operator (boolean_operator (parenthesized_expression (binary_operator (identifier_yres) identifier_yres (identifier_userunit) identifier_userunit )binary_operator )parenthesized_expression (identifier_VECTOR_PAGE_DPI) identifier_VECTOR_PAGE_DPI )boolean_operator (conditional_expression (identifier_VECTOR_PAGE_DPI) identifier_VECTOR_PAGE_DPI (attribute (identifier_pageinfo) identifier_pageinfo (identifier_has_vector) identifier_has_vector )attribute (integer_0) integer_0 )conditional_expression (boolean_operator (attribute (identifier_options) identifier_options (identifier_oversample) identifier_oversample )attribute (integer_0) integer_0 )boolean_operator )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Get the DPI when we require xres == yres, scaled to physical units
(module (function_definition (function_name_render) function_name_render (parameters (identifier_file) identifier_file )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_file) identifier_file (identifier_open) identifier_open )attribute (argument_list )argument_list )call (as_pattern_target (identifier_fp) identifier_fp )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_encoding) identifier_encoding (call (identifier_detect_encoding) identifier_detect_encoding (argument_list (identifier_fp) identifier_fp (keyword_argument (identifier_default) identifier_default (string_'utf-8') string_'utf-8' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_mistune) identifier_mistune (identifier_markdown) identifier_markdown )attribute (argument_list (call (attribute (call (attribute (identifier_fp) identifier_fp (identifier_read) identifier_read )attribute (argument_list )argument_list )call (identifier_decode) identifier_decode )attribute (argument_list (identifier_encoding) identifier_encoding )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )with_statement )block )function_definition )module
Render HTML from Markdown file content.
(module (function_definition (function_name_one_hot_encoding) function_name_one_hot_encoding (parameters (identifier_labels) identifier_labels (identifier_num_classes) identifier_num_classes (default_parameter (identifier_scope) identifier_scope (None) None )default_parameter )parameters (block (with_statement (with_clause (with_item (call (attribute (identifier_tf) identifier_tf (identifier_name_scope) identifier_name_scope )attribute (argument_list (identifier_scope) identifier_scope (string_'OneHotEncoding') string_'OneHotEncoding' (list (identifier_labels) identifier_labels )list )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_batch_size) identifier_batch_size (subscript (call (attribute (identifier_labels) identifier_labels (identifier_get_shape) identifier_get_shape )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_indices) identifier_indices (call (attribute (identifier_tf) identifier_tf (identifier_expand_dims) identifier_expand_dims )attribute (argument_list (call (attribute (identifier_tf) identifier_tf (identifier_range) identifier_range )attribute (argument_list (integer_0) integer_0 (identifier_batch_size) identifier_batch_size )argument_list )call (integer_1) integer_1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_labels) identifier_labels (call (attribute (identifier_tf) identifier_tf (identifier_cast) identifier_cast )attribute (argument_list (call (attribute (identifier_tf) identifier_tf (identifier_expand_dims) identifier_expand_dims )attribute (argument_list (identifier_labels) identifier_labels (integer_1) integer_1 )argument_list )call (attribute (identifier_indices) identifier_indices (identifier_dtype) identifier_dtype )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_concated) identifier_concated (call (attribute (identifier_tf) identifier_tf (identifier_concat) identifier_concat )attribute (argument_list (keyword_argument (identifier_axis) identifier_axis (integer_1) integer_1 )keyword_argument (keyword_argument (identifier_values) identifier_values (list (identifier_indices) identifier_indices (identifier_labels) identifier_labels )list )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_onehot_labels) identifier_onehot_labels (call (attribute (identifier_tf) identifier_tf (identifier_sparse_to_dense) identifier_sparse_to_dense )attribute (argument_list (identifier_concated) identifier_concated (call (attribute (identifier_tf) identifier_tf (identifier_stack) identifier_stack )attribute (argument_list (list (identifier_batch_size) identifier_batch_size (identifier_num_classes) identifier_num_classes )list )argument_list )call (float_1.0) float_1.0 (float_0.0) float_0.0 )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_onehot_labels) identifier_onehot_labels (identifier_set_shape) identifier_set_shape )attribute (argument_list (list (identifier_batch_size) identifier_batch_size (identifier_num_classes) identifier_num_classes )list )argument_list )call )expression_statement (return_statement (identifier_onehot_labels) identifier_onehot_labels )return_statement )block )with_statement )block )function_definition )module
Transform numeric labels into onehot_labels. Args: labels: [batch_size] target labels. num_classes: total number of classes. scope: Optional scope for name_scope. Returns: one hot encoding of the labels.
(module (function_definition (function_name__unpad) function_name__unpad (parameters (identifier_self) identifier_self (identifier_a) identifier_a (identifier_axis) identifier_axis (identifier_out) identifier_out )parameters (block (assert_statement (comparison_operator (subscript (attribute (identifier_a) identifier_a (identifier_shape) identifier_shape )attribute (identifier_axis) identifier_axis )subscript (attribute (identifier_self) identifier_self (identifier_N) identifier_N )attribute )comparison_operator )assert_statement (expression_statement (assignment (identifier_Npad) identifier_Npad (binary_operator (attribute (identifier_self) identifier_self (identifier_N) identifier_N )attribute (attribute (identifier_self) identifier_self (identifier_Nin) identifier_Nin )attribute )binary_operator )assignment )expression_statement (if_statement (identifier_out) identifier_out (block (expression_statement (assignment (pattern_list (identifier__Npad) identifier__Npad (identifier_Npad_) identifier_Npad_ )pattern_list (expression_list (binary_operator (identifier_Npad) identifier_Npad (binary_operator (identifier_Npad) identifier_Npad (integer_2) integer_2 )binary_operator )binary_operator (binary_operator (identifier_Npad) identifier_Npad (integer_2) integer_2 )binary_operator )expression_list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (pattern_list (identifier__Npad) identifier__Npad (identifier_Npad_) identifier_Npad_ )pattern_list (expression_list (binary_operator (identifier_Npad) identifier_Npad (integer_2) integer_2 )binary_operator (binary_operator (identifier_Npad) identifier_Npad (binary_operator (identifier_Npad) identifier_Npad (integer_2) integer_2 )binary_operator )binary_operator )expression_list )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (attribute (identifier_np) identifier_np (identifier_take) identifier_take )attribute (argument_list (identifier_a) identifier_a (call (identifier_range) identifier_range (argument_list (identifier__Npad) identifier__Npad (binary_operator (attribute (identifier_self) identifier_self (identifier_N) identifier_N )attribute (identifier_Npad_) identifier_Npad_ )binary_operator )argument_list )call (keyword_argument (identifier_axis) identifier_axis (identifier_axis) identifier_axis )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Undo padding in an array. Parameters ---------- a : (..., N, ...) ndarray array to be trimmed to size `Nin` axis : int axis along which to unpad out : bool trim the output if True, otherwise the input; the two cases have their left and right pad sizes reversed
(module (function_definition (function_name_invalidate) function_name_invalidate (parameters (identifier_self) identifier_self (identifier_assoc_handle) identifier_assoc_handle (identifier_dumb) identifier_dumb )parameters (block (if_statement (identifier_dumb) identifier_dumb (block (expression_statement (assignment (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier__dumb_key) identifier__dumb_key )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier__normal_key) identifier__normal_key )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_store) identifier_store )attribute (identifier_removeAssociation) identifier_removeAssociation )attribute (argument_list (identifier_key) identifier_key (identifier_assoc_handle) identifier_assoc_handle )argument_list )call )expression_statement )block )function_definition )module
Invalidates the association with the given handle. @type assoc_handle: str @param dumb: Is this association used with dumb mode? @type dumb: bool
(module (function_definition (function_name_getOldestRequestTime) function_name_getOldestRequestTime (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_bldrid) identifier_bldrid (yield (call (attribute (identifier_self) identifier_self (identifier_getBuilderId) identifier_getBuilderId )attribute (argument_list )argument_list )call )yield )assignment )expression_statement (expression_statement (assignment (identifier_unclaimed) identifier_unclaimed (yield (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_master) identifier_master )attribute (identifier_data) identifier_data )attribute (identifier_get) identifier_get )attribute (argument_list (tuple (string_'builders') string_'builders' (identifier_bldrid) identifier_bldrid (string_'buildrequests') string_'buildrequests' )tuple (list (call (attribute (identifier_resultspec) identifier_resultspec (identifier_Filter) identifier_Filter )attribute (argument_list (string_'claimed') string_'claimed' (string_'eq') string_'eq' (list (False) False )list )argument_list )call )list (keyword_argument (identifier_order) identifier_order (list (string_'submitted_at') string_'submitted_at' )list )keyword_argument (keyword_argument (identifier_limit) identifier_limit (integer_1) integer_1 )keyword_argument )argument_list )call )yield )assignment )expression_statement (if_statement (identifier_unclaimed) identifier_unclaimed (block (return_statement (subscript (subscript (identifier_unclaimed) identifier_unclaimed (integer_0) integer_0 )subscript (string_'submitted_at') string_'submitted_at' )subscript )return_statement )block )if_statement )block )function_definition )module
Returns the submitted_at of the oldest unclaimed build request for this builder, or None if there are no build requests. @returns: datetime instance or None, via Deferred
(module (function_definition (function_name_parse_json_feed_file) function_name_parse_json_feed_file (parameters (typed_parameter (identifier_filename) identifier_filename (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_JSONFeed) identifier_JSONFeed )type (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (try_statement (block (expression_statement (assignment (identifier_root) identifier_root (call (attribute (identifier_json) identifier_json (identifier_load) identifier_load )attribute (argument_list (identifier_f) identifier_f )argument_list )call )assignment )expression_statement )block (except_clause (attribute (attribute (identifier_json) identifier_json (identifier_decoder) identifier_decoder )attribute (identifier_JSONDecodeError) identifier_JSONDecodeError )attribute (block (raise_statement (call (identifier_FeedJSONError) identifier_FeedJSONError (argument_list (string_'Not a valid JSON document') string_'Not a valid JSON document' )argument_list )call )raise_statement )block )except_clause )try_statement )block )with_statement (return_statement (call (identifier_parse_json_feed) identifier_parse_json_feed (argument_list (identifier_root) identifier_root )argument_list )call )return_statement )block )function_definition )module
Parse a JSON feed from a local json file.
(module (function_definition (function_name_autodiscover) function_name_autodiscover (parameters )parameters (block (expression_statement (assignment (identifier_url_conf) identifier_url_conf (call (identifier_getattr) identifier_getattr (argument_list (identifier_settings) identifier_settings (string_'ROOT_URLCONF') string_'ROOT_URLCONF' (tuple )tuple )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_resolver) identifier_resolver (call (attribute (identifier_urlresolvers) identifier_urlresolvers (identifier_get_resolver) identifier_get_resolver )attribute (argument_list (identifier_url_conf) identifier_url_conf )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_urlpatterns) identifier_urlpatterns (attribute (identifier_resolver) identifier_resolver (identifier_url_patterns) identifier_url_patterns )attribute )assignment )expression_statement (expression_statement (assignment (identifier_permissions) identifier_permissions (call (identifier_generate_permissions) identifier_generate_permissions (argument_list (identifier_urlpatterns) identifier_urlpatterns )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_refresh_permissions) identifier_refresh_permissions (argument_list (identifier_permissions) identifier_permissions )argument_list )call )expression_statement )block )function_definition )module
Autodiscover for urls.py
(module (function_definition (function_name_evaluate_emb) function_name_evaluate_emb (parameters (identifier_emb) identifier_emb (identifier_labels) identifier_labels )parameters (block (expression_statement (assignment (identifier_d_mat) identifier_d_mat (call (identifier_get_distance_matrix) identifier_get_distance_matrix (argument_list (identifier_emb) identifier_emb )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_d_mat) identifier_d_mat (call (attribute (identifier_d_mat) identifier_d_mat (identifier_asnumpy) identifier_asnumpy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_labels) identifier_labels (call (attribute (identifier_labels) identifier_labels (identifier_asnumpy) identifier_asnumpy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_names) identifier_names (list )list )assignment )expression_statement (expression_statement (assignment (identifier_accs) identifier_accs (list )list )assignment )expression_statement (for_statement (identifier_k) identifier_k (list (integer_1) integer_1 (integer_2) integer_2 (integer_4) integer_4 (integer_8) integer_8 (integer_16) integer_16 )list (block (expression_statement (call (attribute (identifier_names) identifier_names (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_'Recall@%d') string_'Recall@%d' (identifier_k) identifier_k )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_correct) identifier_correct (identifier_cnt) identifier_cnt )pattern_list (expression_list (float_0.0) float_0.0 (float_0.0) float_0.0 )expression_list )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (subscript (attribute (identifier_emb) identifier_emb (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )argument_list )call (block (expression_statement (assignment (subscript (identifier_d_mat) identifier_d_mat (identifier_i) identifier_i (identifier_i) identifier_i )subscript (float_1e10) float_1e10 )assignment )expression_statement (expression_statement (assignment (identifier_nns) identifier_nns (subscript (call (identifier_argpartition) identifier_argpartition (argument_list (subscript (identifier_d_mat) identifier_d_mat (identifier_i) identifier_i )subscript (identifier_k) identifier_k )argument_list )call (slice (colon) colon (identifier_k) identifier_k )slice )subscript )assignment )expression_statement (if_statement (call (identifier_any) identifier_any (generator_expression (comparison_operator (subscript (identifier_labels) identifier_labels (identifier_i) identifier_i )subscript (subscript (identifier_labels) identifier_labels (identifier_nn) identifier_nn )subscript )comparison_operator (for_in_clause (identifier_nn) identifier_nn (identifier_nns) identifier_nns )for_in_clause )generator_expression )call (block (expression_statement (augmented_assignment (identifier_correct) identifier_correct (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement (expression_statement (augmented_assignment (identifier_cnt) identifier_cnt (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_accs) identifier_accs (identifier_append) identifier_append )attribute (argument_list (binary_operator (identifier_correct) identifier_correct (identifier_cnt) identifier_cnt )binary_operator )argument_list )call )expression_statement )block )for_statement (return_statement (expression_list (identifier_names) identifier_names (identifier_accs) identifier_accs )expression_list )return_statement )block )function_definition )module
Evaluate embeddings based on Recall@k.
(module (function_definition (function_name_set_project_dir) function_name_set_project_dir (parameters (identifier_self) identifier_self (identifier_directory) identifier_directory )parameters (block (if_statement (comparison_operator (identifier_directory) identifier_directory (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_treewidget) identifier_treewidget )attribute (identifier_set_root_path) identifier_set_root_path )attribute (argument_list (call (attribute (identifier_osp) identifier_osp (identifier_dirname) identifier_dirname )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_treewidget) identifier_treewidget )attribute (identifier_set_folder_names) identifier_set_folder_names )attribute (argument_list (list (call (attribute (identifier_osp) identifier_osp (identifier_basename) identifier_basename )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_treewidget) identifier_treewidget )attribute (identifier_setup_project_view) identifier_setup_project_view )attribute (argument_list )argument_list )call )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_treewidget) identifier_treewidget )attribute (identifier_setExpanded) identifier_setExpanded )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_treewidget) identifier_treewidget )attribute (identifier_get_index) identifier_get_index )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call (True) True )argument_list )call )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )function_definition )module
Set the project directory
(module (function_definition (function_name_configure_environ) function_name_configure_environ (parameters (default_parameter (identifier_dsn_env_name) identifier_dsn_env_name (string_'PROM_DSN') string_'PROM_DSN' )default_parameter (default_parameter (identifier_connection_class) identifier_connection_class (identifier_DsnConnection) identifier_DsnConnection )default_parameter )parameters (block (expression_statement (assignment (identifier_inters) identifier_inters (list )list )assignment )expression_statement (expression_statement (assignment (identifier_cs) identifier_cs (call (attribute (identifier_dsnparse) identifier_dsnparse (identifier_parse_environs) identifier_parse_environs )attribute (argument_list (identifier_dsn_env_name) identifier_dsn_env_name (keyword_argument (identifier_parse_class) identifier_parse_class (identifier_connection_class) identifier_connection_class )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_c) identifier_c (identifier_cs) identifier_cs (block (expression_statement (assignment (identifier_inter) identifier_inter (attribute (identifier_c) identifier_c (identifier_interface) identifier_interface )attribute )assignment )expression_statement (expression_statement (call (identifier_set_interface) identifier_set_interface (argument_list (identifier_inter) identifier_inter (attribute (identifier_c) identifier_c (identifier_name) identifier_name )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_inters) identifier_inters (identifier_append) identifier_append )attribute (argument_list (identifier_inter) identifier_inter )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_inters) identifier_inters )return_statement )block )function_definition )module
configure interfaces based on environment variables by default, when prom is imported, it will look for PROM_DSN, and PROM_DSN_N (where N is 1 through infinity) in the environment, if it finds them, it will assume they are dsn urls that prom understands and will configure db connections with them. If you don't want this behavior (ie, you want to configure prom manually) then just make sure you don't have any environment variables with matching names The num checks (eg PROM_DSN_1, PROM_DSN_2) go in order, so you can't do PROM_DSN_1, PROM_DSN_3, because it will fail on _2 and move on, so make sure your num dsns are in order (eg, 1, 2, 3, ...) example -- export PROM_DSN_1=some.Interface://host:port/dbname#i1 export PROM_DSN_2=some.Interface://host2:port/dbname2#i2 $ python >>> import prom >>> print prom.interfaces # prints a dict with interfaces i1 and i2 keys :param dsn_env_name: string, the name of the environment variables
(module (function_definition (function_name__get_full_path) function_name__get_full_path (parameters (identifier_self) identifier_self (identifier_path) identifier_path (identifier_environ) identifier_environ )parameters (block (if_statement (call (attribute (identifier_path) identifier_path (identifier_startswith) identifier_startswith )attribute (argument_list (string_'/') string_'/' )argument_list )call (block (expression_statement (assignment (identifier_path) identifier_path (binary_operator (call (attribute (identifier_environ) identifier_environ (identifier_get) identifier_get )attribute (argument_list (string_'SCRIPT_NAME') string_'SCRIPT_NAME' (string_'') string_'' )argument_list )call (identifier_path) identifier_path )binary_operator )assignment )expression_statement )block )if_statement (return_statement (identifier_path) identifier_path )return_statement )block )function_definition )module
Return the full path to ``path`` by prepending the SCRIPT_NAME. If ``path`` is a URL, do nothing.
(module (function_definition (function_name_GetFeeds) function_name_GetFeeds (parameters (identifier_client) identifier_client )parameters (block (expression_statement (assignment (identifier_feed_service) identifier_feed_service (call (attribute (identifier_client) identifier_client (identifier_GetService) identifier_GetService )attribute (argument_list (string_'FeedService') string_'FeedService' (string_'v201809') string_'v201809' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_feeds) identifier_feeds (list )list )assignment )expression_statement (expression_statement (assignment (identifier_more_pages) identifier_more_pages (True) True )assignment )expression_statement (expression_statement (assignment (identifier_selector) identifier_selector (dictionary (pair (string_'fields') string_'fields' (list (string_'Id') string_'Id' (string_'Name') string_'Name' (string_'Attributes') string_'Attributes' )list )pair (pair (string_'predicates') string_'predicates' (list (dictionary (pair (string_'field') string_'field' (string_'Origin') string_'Origin' )pair (pair (string_'operator') string_'operator' (string_'EQUALS') string_'EQUALS' )pair (pair (string_'values') string_'values' (list (string_'USER') string_'USER' )list )pair )dictionary (dictionary (pair (string_'field') string_'field' (string_'FeedStatus') string_'FeedStatus' )pair (pair (string_'operator') string_'operator' (string_'EQUALS') string_'EQUALS' )pair (pair (string_'values') string_'values' (list (string_'ENABLED') string_'ENABLED' )list )pair )dictionary )list )pair (pair (string_'paging') string_'paging' (dictionary (pair (string_'startIndex') string_'startIndex' (integer_0) integer_0 )pair (pair (string_'numberResults') string_'numberResults' (identifier_PAGE_SIZE) identifier_PAGE_SIZE )pair )dictionary )pair )dictionary )assignment )expression_statement (while_statement (identifier_more_pages) identifier_more_pages (block (expression_statement (assignment (identifier_page) identifier_page (call (attribute (identifier_feed_service) identifier_feed_service (identifier_get) identifier_get )attribute (argument_list (identifier_selector) identifier_selector )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'entries') string_'entries' (identifier_page) identifier_page )comparison_operator (block (expression_statement (call (attribute (identifier_feeds) identifier_feeds (identifier_extend) identifier_extend )attribute (argument_list (subscript (identifier_page) identifier_page (string_'entries') string_'entries' )subscript )argument_list )call )expression_statement )block )if_statement (expression_statement (augmented_assignment (subscript (subscript (identifier_selector) identifier_selector (string_'paging') string_'paging' )subscript (string_'startIndex') string_'startIndex' )subscript (identifier_PAGE_SIZE) identifier_PAGE_SIZE )augmented_assignment )expression_statement (expression_statement (assignment (identifier_more_pages) identifier_more_pages (comparison_operator (subscript (subscript (identifier_selector) identifier_selector (string_'paging') string_'paging' )subscript (string_'startIndex') string_'startIndex' )subscript (call (identifier_int) identifier_int (argument_list (subscript (identifier_page) identifier_page (string_'totalNumEntries') string_'totalNumEntries' )subscript )argument_list )call )comparison_operator )assignment )expression_statement )block )while_statement (return_statement (identifier_feeds) identifier_feeds )return_statement )block )function_definition )module
Returns a list of all enabled Feeds. Args: client: an AdWordsClient instance. Returns: A list containing all enabled Feeds.
(module (function_definition (function_name_update_volume) function_name_update_volume (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (string_'config') string_'config' )subscript (string_'volume') string_'volume' )subscript (subscript (identifier_data) identifier_data (string_'volume') string_'volume' )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier__LOGGER) identifier__LOGGER (identifier_info) identifier_info )attribute (argument_list (string_'updated volume on %s') string_'updated volume on %s' (attribute (identifier_self) identifier_self (identifier_friendly_name) identifier_friendly_name )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__server) identifier__server )attribute (identifier_group) identifier_group )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_group) identifier_group )attribute (identifier_identifier) identifier_identifier )attribute )argument_list )call (identifier_callback) identifier_callback )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_callback) identifier_callback )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Update volume.
(module (function_definition (function_name_getResponse) function_name_getResponse (parameters (identifier_self) identifier_self (identifier_http_request) identifier_http_request (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_remoting) identifier_remoting (identifier_Envelope) identifier_Envelope )attribute (argument_list (attribute (identifier_request) identifier_request (identifier_amfVersion) identifier_amfVersion )attribute )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_name) identifier_name (identifier_message) identifier_message )pattern_list (identifier_request) identifier_request (block (expression_statement (assignment (attribute (identifier_http_request) identifier_http_request (identifier_amf_request) identifier_amf_request )attribute (identifier_message) identifier_message )assignment )expression_statement (expression_statement (assignment (identifier_processor) identifier_processor (call (attribute (identifier_self) identifier_self (identifier_getProcessor) identifier_getProcessor )attribute (argument_list (identifier_message) identifier_message )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_response) identifier_response (identifier_name) identifier_name )subscript (call (identifier_processor) identifier_processor (argument_list (identifier_message) identifier_message (keyword_argument (identifier_http_request) identifier_http_request (identifier_http_request) identifier_http_request )keyword_argument )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_response) identifier_response )return_statement )block )function_definition )module
Processes the AMF request, returning an AMF response. @param http_request: The underlying HTTP Request. @type http_request: U{HTTPRequest<http://docs.djangoproject.com /en/dev/ref/request-response/#httprequest-objects>} @param request: The AMF Request. @type request: L{Envelope<pyamf.remoting.Envelope>} @rtype: L{Envelope<pyamf.remoting.Envelope>}
(module (function_definition (function_name_sayHello) function_name_sayHello (parameters (identifier_self) identifier_self (default_parameter (identifier_name) identifier_name (string_"Not given") string_"Not given" )default_parameter (default_parameter (identifier_message) identifier_message (string_"nothing") string_"nothing" )default_parameter )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (concatenated_string (string_"Python.sayHello called by: {0} ") string_"Python.sayHello called by: {0} " (string_"with message: '{1}'") string_"with message: '{1}'" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name (identifier_message) identifier_message )argument_list )call )argument_list )call )expression_statement (return_statement (parenthesized_expression (call (attribute (concatenated_string (string_"PythonSync says: Howdy {0} ") string_"PythonSync says: Howdy {0} " (string_"that's a nice runtime you got there") string_"that's a nice runtime you got there" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )parenthesized_expression )return_statement )block )function_definition )module
Synchronous implementation of IHello.sayHello synchronous method. The remote calling thread will be blocked until this is executed and responds.
(module (function_definition (function_name__consolidate) function_name__consolidate (parameters (identifier_blocks) identifier_blocks )parameters (block (expression_statement (assignment (identifier_gkey) identifier_gkey (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (attribute (identifier_x) identifier_x (identifier__consolidate_key) identifier__consolidate_key )attribute )lambda )assignment )expression_statement (expression_statement (assignment (identifier_grouper) identifier_grouper (call (attribute (identifier_itertools) identifier_itertools (identifier_groupby) identifier_groupby )attribute (argument_list (call (identifier_sorted) identifier_sorted (argument_list (identifier_blocks) identifier_blocks (keyword_argument (identifier_key) identifier_key (identifier_gkey) identifier_gkey )keyword_argument )argument_list )call (identifier_gkey) identifier_gkey )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_new_blocks) identifier_new_blocks (list )list )assignment )expression_statement (for_statement (pattern_list (tuple_pattern (identifier__can_consolidate) identifier__can_consolidate (identifier_dtype) identifier_dtype )tuple_pattern (identifier_group_blocks) identifier_group_blocks )pattern_list (identifier_grouper) identifier_grouper (block (expression_statement (assignment (identifier_merged_blocks) identifier_merged_blocks (call (identifier__merge_blocks) identifier__merge_blocks (argument_list (call (identifier_list) identifier_list (argument_list (identifier_group_blocks) identifier_group_blocks )argument_list )call (keyword_argument (identifier_dtype) identifier_dtype (identifier_dtype) identifier_dtype )keyword_argument (keyword_argument (identifier__can_consolidate) identifier__can_consolidate (identifier__can_consolidate) identifier__can_consolidate )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_new_blocks) identifier_new_blocks (call (identifier__extend_blocks) identifier__extend_blocks (argument_list (identifier_merged_blocks) identifier_merged_blocks (identifier_new_blocks) identifier_new_blocks )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_new_blocks) identifier_new_blocks )return_statement )block )function_definition )module
Merge blocks having same dtype, exclude non-consolidating blocks
(module (function_definition (function_name_add_state_machine) function_name_add_state_machine (parameters (identifier_widget) identifier_widget (default_parameter (identifier_event) identifier_event (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"Creating new state-machine...") string_"Creating new state-machine..." )argument_list )call )expression_statement (expression_statement (assignment (identifier_root_state) identifier_root_state (call (identifier_HierarchyState) identifier_HierarchyState (argument_list (string_"new root state") string_"new root state" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_state_machine) identifier_state_machine (call (identifier_StateMachine) identifier_StateMachine (argument_list (identifier_root_state) identifier_root_state )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (attribute (attribute (identifier_rafcon) identifier_rafcon (identifier_core) identifier_core )attribute (identifier_singleton) identifier_singleton )attribute (identifier_state_machine_manager) identifier_state_machine_manager )attribute (identifier_add_state_machine) identifier_add_state_machine )attribute (argument_list (identifier_state_machine) identifier_state_machine )argument_list )call )expression_statement )block )function_definition )module
Create a new state-machine when the user clicks on the '+' next to the tabs
(module (function_definition (function_name__get_ipv6addrs) function_name__get_ipv6addrs (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_addrs) identifier_addrs (call (attribute (identifier_self) identifier_self (identifier__get_addrs) identifier__get_addrs )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ipv6addrs) identifier_ipv6addrs (call (attribute (identifier_addrs) identifier_addrs (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_netifaces) identifier_netifaces (identifier_AF_INET6) identifier_AF_INET6 )attribute )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_ipv6addrs) identifier_ipv6addrs )not_operator (block (return_statement (dictionary )dictionary )return_statement )block )if_statement (return_statement (subscript (identifier_ipv6addrs) identifier_ipv6addrs (integer_0) integer_0 )subscript )return_statement )block )function_definition )module
Returns the IPv6 addresses associated with this NIC. If no IPv6 addresses are used, empty dict is returned.
(module (function_definition (function_name_peek_pointers_in_registers) function_name_peek_pointers_in_registers (parameters (identifier_self) identifier_self (default_parameter (identifier_peekSize) identifier_peekSize (integer_16) integer_16 )default_parameter (default_parameter (identifier_context) identifier_context (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_peekable_registers) identifier_peekable_registers (tuple (string_'Eax') string_'Eax' (string_'Ebx') string_'Ebx' (string_'Ecx') string_'Ecx' (string_'Edx') string_'Edx' (string_'Esi') string_'Esi' (string_'Edi') string_'Edi' (string_'Ebp') string_'Ebp' )tuple )assignment )expression_statement (if_statement (not_operator (identifier_context) identifier_context )not_operator (block (expression_statement (assignment (identifier_context) identifier_context (call (attribute (identifier_self) identifier_self (identifier_get_context) identifier_get_context )attribute (argument_list (binary_operator (attribute (identifier_win32) identifier_win32 (identifier_CONTEXT_CONTROL) identifier_CONTEXT_CONTROL )attribute (line_continuation_\) line_continuation_\ (attribute (identifier_win32) identifier_win32 (identifier_CONTEXT_INTEGER) identifier_CONTEXT_INTEGER )attribute )binary_operator )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_aProcess) identifier_aProcess (call (attribute (identifier_self) identifier_self (identifier_get_process) identifier_get_process )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (for_statement (tuple_pattern (identifier_reg_name) identifier_reg_name (identifier_reg_value) identifier_reg_value )tuple_pattern (call (attribute (identifier_compat) identifier_compat (identifier_iteritems) identifier_iteritems )attribute (argument_list (identifier_context) identifier_context )argument_list )call (block (if_statement (comparison_operator (identifier_reg_name) identifier_reg_name (identifier_peekable_registers) identifier_peekable_registers )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_reg_data) identifier_reg_data (call (attribute (identifier_aProcess) identifier_aProcess (identifier_peek) identifier_peek )attribute (argument_list (identifier_reg_value) identifier_reg_value (identifier_peekSize) identifier_peekSize )argument_list )call )assignment )expression_statement (if_statement (identifier_reg_data) identifier_reg_data (block (expression_statement (assignment (subscript (identifier_data) identifier_data (identifier_reg_name) identifier_reg_name )subscript (identifier_reg_data) identifier_reg_data )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Tries to guess which values in the registers are valid pointers, and reads some data from them. @type peekSize: int @param peekSize: Number of bytes to read from each pointer found. @type context: dict( str S{->} int ) @param context: (Optional) Dictionary mapping register names to their values. If not given, the current thread context will be used. @rtype: dict( str S{->} str ) @return: Dictionary mapping register names to the data they point to.
(module (function_definition (function_name_get_form_kwargs) function_name_get_form_kwargs (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_kwargs) identifier_kwargs (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_ClassRegistrationView) identifier_ClassRegistrationView (identifier_self) identifier_self )argument_list )call (identifier_get_form_kwargs) identifier_get_form_kwargs )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'user') string_'user' )subscript (conditional_expression (attribute (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (identifier_user) identifier_user )attribute (call (identifier_hasattr) identifier_hasattr (argument_list (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (string_'user') string_'user' )argument_list )call (None) None )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_listing) identifier_listing (call (attribute (identifier_self) identifier_self (identifier_get_listing) identifier_get_listing )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (string_'openEvents') string_'openEvents' (subscript (identifier_listing) identifier_listing (string_'openEvents') string_'openEvents' )subscript )pair (pair (string_'closedEvents') string_'closedEvents' (subscript (identifier_listing) identifier_listing (string_'closedEvents') string_'closedEvents' )subscript )pair )dictionary )argument_list )call )expression_statement (return_statement (identifier_kwargs) identifier_kwargs )return_statement )block )function_definition )module
Tell the form which fields to render
(module (function_definition (function_name_add_node) function_name_add_node (parameters (identifier_self) identifier_self (identifier_id) identifier_id (default_parameter (identifier_label) identifier_label (None) None )default_parameter (default_parameter (identifier_type) identifier_type (string_'CLASS') string_'CLASS' )default_parameter (default_parameter (identifier_meta) identifier_meta (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_g) identifier_g (call (attribute (identifier_self) identifier_self (identifier_get_graph) identifier_get_graph )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_meta) identifier_meta (None) None )comparison_operator (block (expression_statement (assignment (identifier_meta) identifier_meta (dictionary )dictionary )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_g) identifier_g (identifier_add_node) identifier_add_node )attribute (argument_list (identifier_id) identifier_id (keyword_argument (identifier_label) identifier_label (identifier_label) identifier_label )keyword_argument (keyword_argument (identifier_type) identifier_type (identifier_type) identifier_type )keyword_argument (keyword_argument (identifier_meta) identifier_meta (identifier_meta) identifier_meta )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Add a new node to the ontology
(module (function_definition (function_name__serialize) function_name__serialize (parameters (identifier_self) identifier_self (identifier_value) identifier_value (identifier_attr) identifier_attr (identifier_obj) identifier_obj )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (attribute (attribute (identifier_arrow) identifier_arrow (identifier_arrow) identifier_arrow )attribute (identifier_Arrow) identifier_Arrow )attribute )argument_list )call (block (expression_statement (assignment (identifier_value) identifier_value (attribute (identifier_value) identifier_value (identifier_datetime) identifier_datetime )attribute )assignment )expression_statement )block )if_statement (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_ArrowField) identifier_ArrowField (identifier_self) identifier_self )argument_list )call (identifier__serialize) identifier__serialize )attribute (argument_list (identifier_value) identifier_value (identifier_attr) identifier_attr (identifier_obj) identifier_obj )argument_list )call )return_statement )block )function_definition )module
Convert the Arrow object into a string.
(module (function_definition (function_name_GET_account_record) function_name_GET_account_record (parameters (identifier_self) identifier_self (identifier_path_info) identifier_path_info (identifier_account_addr) identifier_account_addr (identifier_token_type) identifier_token_type )parameters (block (if_statement (not_operator (call (identifier_check_account_address) identifier_check_account_address (argument_list (identifier_account_addr) identifier_account_addr )argument_list )call )not_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__reply_json) identifier__reply_json )attribute (argument_list (dictionary (pair (string_'error') string_'error' (string_'Invalid address') string_'Invalid address' )pair )dictionary (keyword_argument (identifier_status_code) identifier_status_code (integer_400) integer_400 )keyword_argument )argument_list )call )return_statement )block )if_statement (if_statement (not_operator (call (identifier_check_token_type) identifier_check_token_type (argument_list (identifier_token_type) identifier_token_type )argument_list )call )not_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__reply_json) identifier__reply_json )attribute (argument_list (dictionary (pair (string_'error') string_'error' (string_'Invalid token type') string_'Invalid token type' )pair )dictionary (keyword_argument (identifier_status_code) identifier_status_code (integer_400) integer_400 )keyword_argument )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_blockstackd_url) identifier_blockstackd_url (call (identifier_get_blockstackd_url) identifier_get_blockstackd_url (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_blockstackd_client) identifier_blockstackd_client (identifier_get_account_record) identifier_get_account_record )attribute (argument_list (identifier_account_addr) identifier_account_addr (identifier_token_type) identifier_token_type (keyword_argument (identifier_hostport) identifier_hostport (identifier_blockstackd_url) identifier_blockstackd_url )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (call (identifier_json_is_error) identifier_json_is_error (argument_list (identifier_res) identifier_res )argument_list )call (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_error) identifier_error )attribute (argument_list (call (attribute (string_"Failed to get account state for {} {}: {}") string_"Failed to get account state for {} {}: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_account_addr) identifier_account_addr (identifier_token_type) identifier_token_type (subscript (identifier_res) identifier_res (string_'error') string_'error' )subscript )argument_list )call )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__reply_json) identifier__reply_json )attribute (argument_list (dictionary (pair (string_'error') string_'error' (call (attribute (string_'Failed to get account record for {} {}: {}') string_'Failed to get account record for {} {}: {}' (identifier_format) identifier_format )attribute (argument_list (identifier_token_type) identifier_token_type (identifier_account_addr) identifier_account_addr (subscript (identifier_res) identifier_res (string_'error') string_'error' )subscript )argument_list )call )pair )dictionary (keyword_argument (identifier_status_code) identifier_status_code (call (attribute (identifier_res) identifier_res (identifier_get) identifier_get )attribute (argument_list (string_'http_status') string_'http_status' (integer_500) integer_500 )argument_list )call )keyword_argument )argument_list )call )return_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__reply_json) identifier__reply_json )attribute (argument_list (identifier_res) identifier_res )argument_list )call )expression_statement (return_statement )return_statement )block )function_definition )module
Get the state of a particular token account Returns the account
(module (function_definition (function_name_run) function_name_run (parameters (identifier_files) identifier_files (identifier_temp_folder) identifier_temp_folder )parameters (block (expression_statement (string_"Check flake8 errors in the code base.") string_"Check flake8 errors in the code base." )expression_statement (try_statement (block (import_statement (dotted_name (identifier_flake8) identifier_flake8 )dotted_name )import_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (return_statement (identifier_NO_FLAKE_MSG) identifier_NO_FLAKE_MSG )return_statement )block )except_clause )try_statement (try_statement (block (import_from_statement (dotted_name (identifier_flake8) identifier_flake8 (identifier_engine) identifier_engine )dotted_name (dotted_name (identifier_get_style_guide) identifier_get_style_guide )dotted_name )import_from_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (import_from_statement (dotted_name (identifier_flake8) identifier_flake8 (identifier_api) identifier_api (identifier_legacy) identifier_legacy )dotted_name (dotted_name (identifier_get_style_guide) identifier_get_style_guide )dotted_name )import_from_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_py_files) identifier_py_files (call (identifier_filter_python_files) identifier_filter_python_files (argument_list (identifier_files) identifier_files )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_py_files) identifier_py_files )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_DEFAULT_CONFIG) identifier_DEFAULT_CONFIG (call (identifier_join) identifier_join (argument_list (identifier_temp_folder) identifier_temp_folder (call (identifier_get_config_file) identifier_get_config_file (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (call (identifier_change_folder) identifier_change_folder (argument_list (identifier_temp_folder) identifier_temp_folder )argument_list )call )with_item )with_clause (block (expression_statement (assignment (identifier_flake8_style) identifier_flake8_style (call (identifier_get_style_guide) identifier_get_style_guide (argument_list (keyword_argument (identifier_config_file) identifier_config_file (identifier_DEFAULT_CONFIG) identifier_DEFAULT_CONFIG )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_out) identifier_out (identifier_err) identifier_err )pattern_list (expression_list (call (identifier_StringIO) identifier_StringIO (argument_list )argument_list )call (call (identifier_StringIO) identifier_StringIO (argument_list )argument_list )call )expression_list )assignment )expression_statement (with_statement (with_clause (with_item (call (identifier_redirected) identifier_redirected (argument_list (identifier_out) identifier_out (identifier_err) identifier_err )argument_list )call )with_item )with_clause (block (expression_statement (call (attribute (identifier_flake8_style) identifier_flake8_style (identifier_check_files) identifier_check_files )attribute (argument_list (identifier_py_files) identifier_py_files )argument_list )call )expression_statement )block )with_statement )block )with_statement (return_statement (binary_operator (call (attribute (call (attribute (identifier_out) identifier_out (identifier_getvalue) identifier_getvalue )attribute (argument_list )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (call (attribute (call (attribute (identifier_err) identifier_err (identifier_getvalue) identifier_getvalue )attribute (argument_list )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )binary_operator )return_statement )block )function_definition )module
Check flake8 errors in the code base.
(module (function_definition (function_name_write_bit) function_name_write_bit (parameters (identifier_self) identifier_self (identifier_registeraddress) identifier_registeraddress (identifier_value) identifier_value (default_parameter (identifier_functioncode) identifier_functioncode (integer_5) integer_5 )default_parameter )parameters (block (expression_statement (call (identifier__checkFunctioncode) identifier__checkFunctioncode (argument_list (identifier_functioncode) identifier_functioncode (list (integer_5) integer_5 (integer_15) integer_15 )list )argument_list )call )expression_statement (expression_statement (call (identifier__checkInt) identifier__checkInt (argument_list (identifier_value) identifier_value (keyword_argument (identifier_minvalue) identifier_minvalue (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_maxvalue) identifier_maxvalue (integer_1) integer_1 )keyword_argument (keyword_argument (identifier_description) identifier_description (string_'input value') string_'input value' )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__genericCommand) identifier__genericCommand )attribute (argument_list (identifier_functioncode) identifier_functioncode (identifier_registeraddress) identifier_registeraddress (identifier_value) identifier_value )argument_list )call )expression_statement )block )function_definition )module
Write one bit to the slave. Args: * registeraddress (int): The slave register address (use decimal numbers, not hex). * value (int): 0 or 1 * functioncode (int): Modbus function code. Can be 5 or 15. Returns: None Raises: ValueError, TypeError, IOError