sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_delete_s3_bucket) function_name_delete_s3_bucket (parameters (identifier_client) identifier_client (identifier_resource) identifier_resource )parameters (block (if_statement (call (attribute (identifier_dbconfig) identifier_dbconfig (identifier_get) identifier_get )attribute (argument_list (string_'enable_delete_s3_buckets') string_'enable_delete_s3_buckets' (identifier_NS_AUDITOR_REQUIRED_TAGS) identifier_NS_AUDITOR_REQUIRED_TAGS (False) False )argument_list )call (block (expression_statement (call (attribute (identifier_client) identifier_client (identifier_delete_bucket) identifier_delete_bucket )attribute (argument_list (keyword_argument (identifier_Bucket) identifier_Bucket (attribute (identifier_resource) identifier_resource (identifier_id) identifier_id )attribute )keyword_argument )argument_list )call )expression_statement )block )if_statement (return_statement (expression_list (attribute (identifier_ActionStatus) identifier_ActionStatus (identifier_SUCCEED) identifier_SUCCEED )attribute (call (attribute (identifier_resource) identifier_resource (identifier_metrics) identifier_metrics )attribute (argument_list )argument_list )call )expression_list )return_statement )block )function_definition )module
Delete an S3 bucket This function will try to delete an S3 bucket Args: client (:obj:`boto3.session.Session.client`): A boto3 client object resource (:obj:`Resource`): The resource object to terminate Returns: `ActionStatus`
(module (function_definition (function_name_get_time_server) function_name_get_time_server (parameters )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_mac_utils) identifier_mac_utils )attribute (identifier_execute_return_result) identifier_execute_return_result )attribute (argument_list (string_'systemsetup -getnetworktimeserver') string_'systemsetup -getnetworktimeserver' )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_mac_utils) identifier_mac_utils )attribute (identifier_parse_return) identifier_parse_return )attribute (argument_list (identifier_ret) identifier_ret )argument_list )call )return_statement )block )function_definition )module
Display the currently set network time server. :return: the network time server :rtype: str CLI Example: .. code-block:: bash salt '*' timezone.get_time_server
(module (function_definition (function_name_to_json) function_name_to_json (parameters (identifier_value) identifier_value (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_HasProperties) identifier_HasProperties )argument_list )call (block (return_statement (call (attribute (identifier_value) identifier_value (identifier_serialize) identifier_serialize )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )if_statement (try_statement (block (return_statement (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )return_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (concatenated_string (string_"Cannot convert type {} to JSON without calling 'serialize' ") string_"Cannot convert type {} to JSON without calling 'serialize' " (string_"on an instance of Instance Property and registering a custom ") string_"on an instance of Instance Property and registering a custom " (string_"serializer") string_"serializer" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_value) identifier_value (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Convert instance to JSON
(module (function_definition (function_name__CheckIsFile) function_name__CheckIsFile (parameters (identifier_self) identifier_self (identifier_file_entry) identifier_file_entry )parameters (block (if_statement (comparison_operator (attribute (identifier_definitions) identifier_definitions (identifier_FILE_ENTRY_TYPE_FILE) identifier_FILE_ENTRY_TYPE_FILE )attribute (attribute (identifier_self) identifier_self (identifier__file_entry_types) identifier__file_entry_types )attribute )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (return_statement (call (attribute (identifier_file_entry) identifier_file_entry (identifier_IsFile) identifier_IsFile )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Checks the is_file find specification. Args: file_entry (FileEntry): file entry. Returns: bool: True if the file entry matches the find specification, False if not.
(module (function_definition (function_name_stop_periodic_snapshots) function_name_stop_periodic_snapshots (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier__periodic_thread) identifier__periodic_thread )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__periodic_thread) identifier__periodic_thread )attribute (identifier_isAlive) identifier_isAlive )attribute (argument_list )argument_list )call )boolean_operator (block (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier__periodic_thread) identifier__periodic_thread )attribute (identifier_stop) identifier_stop )attribute (True) True )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__periodic_thread) identifier__periodic_thread )attribute (identifier_join) identifier_join )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__periodic_thread) identifier__periodic_thread )attribute (None) None )assignment )expression_statement )block )if_statement )block )function_definition )module
Post a stop signal to the thread that takes the periodic snapshots. The function waits for the thread to terminate which can take some time depending on the configured interval.
(module (function_definition (function_name__expected_condition_find_element) function_name__expected_condition_find_element (parameters (identifier_self) identifier_self (identifier_element) identifier_element )parameters (block (import_from_statement (dotted_name (identifier_toolium) identifier_toolium (identifier_pageelements) identifier_pageelements (identifier_page_element) identifier_page_element )dotted_name (dotted_name (identifier_PageElement) identifier_PageElement )dotted_name )import_from_statement (expression_statement (assignment (identifier_web_element) identifier_web_element (False) False )assignment )expression_statement (try_statement (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_element) identifier_element (identifier_PageElement) identifier_PageElement )argument_list )call (block (expression_statement (assignment (attribute (identifier_element) identifier_element (identifier__web_element) identifier__web_element )attribute (None) None )assignment )expression_statement (expression_statement (call (attribute (identifier_element) identifier_element (identifier__find_web_element) identifier__find_web_element )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_web_element) identifier_web_element (attribute (identifier_element) identifier_element (identifier__web_element) identifier__web_element )attribute )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_element) identifier_element (identifier_tuple) identifier_tuple )argument_list )call (block (expression_statement (assignment (identifier_web_element) identifier_web_element (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_driver_wrapper) identifier_driver_wrapper )attribute (identifier_driver) identifier_driver )attribute (identifier_find_element) identifier_find_element )attribute (argument_list (list_splat (identifier_element) identifier_element )list_splat )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement )block (except_clause (identifier_NoSuchElementException) identifier_NoSuchElementException (block (pass_statement )pass_statement )block )except_clause )try_statement (return_statement (identifier_web_element) identifier_web_element )return_statement )block )function_definition )module
Tries to find the element, but does not thrown an exception if the element is not found :param element: PageElement or element locator as a tuple (locator_type, locator_value) to be found :returns: the web element if it has been found or False :rtype: selenium.webdriver.remote.webelement.WebElement or appium.webdriver.webelement.WebElement
(module (function_definition (function_name_get_project) function_name_get_project (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_uri) identifier_uri (call (attribute (string_'{base}/{project}') string_'{base}/{project}' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_base) identifier_base (attribute (identifier_self) identifier_self (identifier_BASE_URI) identifier_BASE_URI )attribute )keyword_argument (keyword_argument (identifier_project) identifier_project (identifier_name) identifier_name )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_uri) identifier_uri (keyword_argument (identifier_model) identifier_model (attribute (identifier_models) identifier_models (identifier_Project) identifier_Project )attribute )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_resp) identifier_resp )return_statement )block )function_definition )module
Retrives project information by name :param name: The formal project name in string form.
(module (function_definition (function_name_hook_up) function_name_hook_up (parameters (identifier_self) identifier_self (typed_parameter (identifier_router) identifier_router (type (identifier_UrlDispatcher) identifier_UrlDispatcher )type )typed_parameter )parameters (block (expression_statement (call (attribute (identifier_router) identifier_router (identifier_add_get) identifier_add_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_webhook_path) identifier_webhook_path )attribute (attribute (identifier_self) identifier_self (identifier_check_hook) identifier_check_hook )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_router) identifier_router (identifier_add_post) identifier_add_post )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_webhook_path) identifier_webhook_path )attribute (attribute (identifier_self) identifier_self (identifier_receive_events) identifier_receive_events )attribute )argument_list )call )expression_statement )block )function_definition )module
Dynamically hooks the right webhook paths
(module (function_definition (function_name_new_status) function_name_new_status (parameters (identifier_self) identifier_self (identifier_new_status) identifier_new_status )parameters (block (expression_statement (assignment (identifier_allowed_values) identifier_allowed_values (list (string_"NEW") string_"NEW" (string_"DONE") string_"DONE" (string_"REJECTED") string_"REJECTED" )list )assignment )expression_statement (if_statement (comparison_operator (identifier_new_status) identifier_new_status (identifier_allowed_values) identifier_allowed_values )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Invalid value for `new_status` ({0}), must be one of {1}") string_"Invalid value for `new_status` ({0}), must be one of {1}" (identifier_format) identifier_format )attribute (argument_list (identifier_new_status) identifier_new_status (identifier_allowed_values) identifier_allowed_values )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__new_status) identifier__new_status )attribute (identifier_new_status) identifier_new_status )assignment )expression_statement )block )function_definition )module
Sets the new_status of this BuildSetStatusChangedEvent. :param new_status: The new_status of this BuildSetStatusChangedEvent. :type: str
(module (function_definition (function_name_statusEnquiry) function_name_statusEnquiry (parameters )parameters (block (expression_statement (assignment (identifier_a) identifier_a (call (identifier_TpPd) identifier_TpPd (argument_list (keyword_argument (identifier_pd) identifier_pd (integer_0x3) integer_0x3 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_b) identifier_b (call (identifier_MessageType) identifier_MessageType (argument_list (keyword_argument (identifier_mesType) identifier_mesType (integer_0x34) integer_0x34 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_packet) identifier_packet (binary_operator (identifier_a) identifier_a (identifier_b) identifier_b )binary_operator )assignment )expression_statement (return_statement (identifier_packet) identifier_packet )return_statement )block )function_definition )module
STATUS ENQUIRY Section 9.3.28
(module (function_definition (function_name_swap_columns) function_name_swap_columns (parameters (identifier_self) identifier_self (identifier_column_name_1) identifier_column_name_1 (identifier_column_name_2) identifier_column_name_2 (default_parameter (identifier_inplace) identifier_inplace (False) False )default_parameter )parameters (block (if_statement (identifier_inplace) identifier_inplace (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___is_dirty__) identifier___is_dirty__ )attribute (True) True )assignment )expression_statement (with_statement (with_clause (with_item (call (identifier_cython_context) identifier_cython_context (argument_list )argument_list )call )with_item )with_clause (block (if_statement (call (attribute (identifier_self) identifier_self (identifier__is_vertex_frame) identifier__is_vertex_frame )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_graph_proxy) identifier_graph_proxy (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier___graph__) identifier___graph__ )attribute (identifier___proxy__) identifier___proxy__ )attribute (identifier_swap_vertex_fields) identifier_swap_vertex_fields )attribute (argument_list (identifier_column_name_1) identifier_column_name_1 (identifier_column_name_2) identifier_column_name_2 )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier___graph__) identifier___graph__ )attribute (identifier___proxy__) identifier___proxy__ )attribute (identifier_graph_proxy) identifier_graph_proxy )assignment )expression_statement )block (elif_clause (call (attribute (identifier_self) identifier_self (identifier__is_edge_frame) identifier__is_edge_frame )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_graph_proxy) identifier_graph_proxy (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier___graph__) identifier___graph__ )attribute (identifier___proxy__) identifier___proxy__ )attribute (identifier_swap_edge_fields) identifier_swap_edge_fields )attribute (argument_list (identifier_column_name_1) identifier_column_name_1 (identifier_column_name_2) identifier_column_name_2 )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier___graph__) identifier___graph__ )attribute (identifier___proxy__) identifier___proxy__ )attribute (identifier_graph_proxy) identifier_graph_proxy )assignment )expression_statement )block )elif_clause )if_statement )block )with_statement (return_statement (identifier_self) identifier_self )return_statement )block (else_clause (block (return_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_GFrame) identifier_GFrame (identifier_self) identifier_self )argument_list )call (identifier_swap_columns) identifier_swap_columns )attribute (argument_list (identifier_column_name_1) identifier_column_name_1 (identifier_column_name_2) identifier_column_name_2 (keyword_argument (identifier_inplace) identifier_inplace (identifier_inplace) identifier_inplace )keyword_argument )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Swaps the columns with the given names. If inplace == False (default) this operation does not modify the current SFrame, returning a new SFrame. If inplace == True, this operation modifies the current SFrame, returning self. Parameters ---------- column_name_1 : string Name of column to swap column_name_2 : string Name of other column to swap inplace : bool, optional. Defaults to False. Whether the SFrame is modified in place.
(module (function_definition (function_name_convert) function_name_convert (parameters (identifier_self) identifier_self (identifier_destination_units) identifier_destination_units (keyword_separator )keyword_separator (default_parameter (identifier_convert_variables) identifier_convert_variables (False) False )default_parameter )parameters (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier_units) identifier_units )attribute (None) None )comparison_operator (parenthesized_expression (boolean_operator (comparison_operator (identifier_destination_units) identifier_destination_units (None) None )comparison_operator (comparison_operator (identifier_destination_units) identifier_destination_units (string_"None") string_"None" )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (block (return_statement )return_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_wt_units) identifier_wt_units (identifier_is_valid_conversion) identifier_is_valid_conversion )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_units) identifier_units )attribute (identifier_destination_units) identifier_destination_units )argument_list )call )not_operator (block (expression_statement (assignment (identifier_valid) identifier_valid (call (attribute (identifier_wt_units) identifier_wt_units (identifier_get_valid_conversions) identifier_get_valid_conversions )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_units) identifier_units )attribute )argument_list )call )assignment )expression_statement (raise_statement (call (attribute (identifier_wt_exceptions) identifier_wt_exceptions (identifier_UnitsError) identifier_UnitsError )attribute (argument_list (identifier_valid) identifier_valid (identifier_destination_units) identifier_destination_units )argument_list )call )raise_statement )block )if_statement (if_statement (identifier_convert_variables) identifier_convert_variables (block (for_statement (identifier_v) identifier_v (attribute (identifier_self) identifier_self (identifier_variables) identifier_variables )attribute (block (expression_statement (call (attribute (identifier_v) identifier_v (identifier_convert) identifier_convert )attribute (argument_list (identifier_destination_units) identifier_destination_units )argument_list )call )expression_statement )block )for_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_units) identifier_units )attribute (identifier_destination_units) identifier_destination_units )assignment )expression_statement )block )function_definition )module
Convert axis to destination_units. Parameters ---------- destination_units : string Destination units. convert_variables : boolean (optional) Toggle conversion of stored arrays. Default is False.
(module (function_definition (function_name_example_lab_to_rgb) function_name_example_lab_to_rgb (parameters )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_"=== RGB Example: Lab->RGB ===") string_"=== RGB Example: Lab->RGB ===" )argument_list )call )expression_statement (expression_statement (assignment (identifier_lab) identifier_lab (call (identifier_LabColor) identifier_LabColor (argument_list (float_0.903) float_0.903 (float_16.296) float_16.296 (unary_operator (float_2.217) float_2.217 )unary_operator )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_lab) identifier_lab )argument_list )call )expression_statement (expression_statement (assignment (identifier_rgb) identifier_rgb (call (identifier_convert_color) identifier_convert_color (argument_list (identifier_lab) identifier_lab (identifier_sRGBColor) identifier_sRGBColor )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_rgb) identifier_rgb )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"=== End Example ===\n") string_"=== End Example ===\n" )argument_list )call )expression_statement )block )function_definition )module
Conversions to RGB are a little more complex mathematically. There are also several kinds of RGB color spaces. When converting from a device-independent color space to RGB, sRGB is assumed unless otherwise specified with the target_rgb keyword arg.
(module (function_definition (function_name_check_ups_alarms_present) function_name_check_ups_alarms_present (parameters (identifier_the_session) identifier_the_session (identifier_the_helper) identifier_the_helper (identifier_the_snmp_value) identifier_the_snmp_value )parameters (block (if_statement (comparison_operator (identifier_the_snmp_value) identifier_the_snmp_value (string_'0') string_'0' )comparison_operator (block (expression_statement (call (attribute (identifier_the_helper) identifier_the_helper (identifier_add_status) identifier_add_status )attribute (argument_list (attribute (attribute (identifier_pynag) identifier_pynag (identifier_Plugins) identifier_Plugins )attribute (identifier_critical) identifier_critical )attribute )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_the_helper) identifier_the_helper (identifier_add_status) identifier_add_status )attribute (argument_list (attribute (attribute (identifier_pynag) identifier_pynag (identifier_Plugins) identifier_Plugins )attribute (identifier_ok) identifier_ok )attribute )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_the_helper) identifier_the_helper (identifier_set_summary) identifier_set_summary )attribute (argument_list (call (attribute (string_"{} active alarms ") string_"{} active alarms " (identifier_format) identifier_format )attribute (argument_list (identifier_the_snmp_value) identifier_the_snmp_value )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
OID .1.3.6.1.2.1.33.1.6.1.0 MIB excerpt The present number of active alarm conditions.
(module (function_definition (function_name_publish) function_name_publish (parameters (identifier_branch) identifier_branch (default_parameter (identifier_full_force) identifier_full_force (False) False )default_parameter )parameters (block (expression_statement (call (identifier_checkout) identifier_checkout (argument_list (identifier_branch) identifier_branch )argument_list )call )expression_statement (try_statement (block (expression_statement (call (identifier_push) identifier_push (argument_list (string_'--force --set-upstream origin') string_'--force --set-upstream origin' (identifier_branch) identifier_branch )argument_list )call )expression_statement )block (except_clause (identifier_ExistingReference) identifier_ExistingReference (block (if_statement (identifier_full_force) identifier_full_force (block (expression_statement (call (identifier_push) identifier_push (argument_list (string_'origin --delete') string_'origin --delete' (identifier_branch) identifier_branch )argument_list )call )expression_statement (expression_statement (call (identifier_push) identifier_push (argument_list (string_'--force --set-upstream origin') string_'--force --set-upstream origin' (identifier_branch) identifier_branch )argument_list )call )expression_statement )block )if_statement )block )except_clause )try_statement )block )function_definition )module
Publish that branch, i.e. push it to origin
(module (function_definition (function_name__load) function_name__load (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_dbfile) identifier_dbfile )attribute (None) None )comparison_operator (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (attribute (identifier_self) identifier_self (identifier_dbfile) identifier_dbfile )attribute (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__db) identifier__db )attribute (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )with_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__db) identifier__db )attribute (dictionary )dictionary )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Load the database from its ``dbfile`` if it has one
(module (function_definition (function_name_keyword_hookup) function_name_keyword_hookup (parameters (identifier_self) identifier_self (identifier_noteId) identifier_noteId (identifier_keywords) identifier_keywords )parameters (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_cur) identifier_cur )attribute (identifier_execute) identifier_execute )attribute (argument_list (string_"DELETE FROM notekeyword WHERE noteid=?") string_"DELETE FROM notekeyword WHERE noteid=?" (list (identifier_noteId) identifier_noteId )list )argument_list )call )expression_statement )block (except_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_error) identifier_error )attribute (argument_list (string_"ERROR: cannot unhook previous keywords") string_"ERROR: cannot unhook previous keywords" )argument_list )call )expression_statement )block )except_clause )try_statement (for_statement (identifier_keyword) identifier_keyword (identifier_keywords) identifier_keywords (block (expression_statement (assignment (identifier_keyword) identifier_keyword (call (attribute (identifier_keyword) identifier_keyword (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_fyi) identifier_fyi )attribute (argument_list (string_" inserting keyword:") string_" inserting keyword:" (identifier_keyword) identifier_keyword )argument_list )call )expression_statement (expression_statement (assignment (identifier_keywordId) identifier_keywordId (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_con) identifier_con )attribute (identifier_execute) identifier_execute )attribute (argument_list (string_"SELECT keywordId FROM keyword WHERE keyword = ?;") string_"SELECT keywordId FROM keyword WHERE keyword = ?;" (list (identifier_keyword) identifier_keyword )list )argument_list )call (identifier_fetchone) identifier_fetchone )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (if_statement (identifier_keywordId) identifier_keywordId (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_fyi) identifier_fyi )attribute (argument_list (binary_operator (string_" (existing keyword with id: %s)") string_" (existing keyword with id: %s)" (identifier_keywordId) identifier_keywordId )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (identifier_keywordId) identifier_keywordId (subscript (identifier_keywordId) identifier_keywordId (integer_0) integer_0 )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_fyi) identifier_fyi )attribute (argument_list (string_" (new keyword)") string_" (new keyword)" )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_cur) identifier_cur )attribute (identifier_execute) identifier_execute )attribute (argument_list (string_"INSERT INTO keyword(keyword) VALUES (?);") string_"INSERT INTO keyword(keyword) VALUES (?);" (list (identifier_keyword) identifier_keyword )list )argument_list )call )expression_statement (expression_statement (assignment (identifier_keywordId) identifier_keywordId (attribute (attribute (identifier_self) identifier_self (identifier_cur) identifier_cur )attribute (identifier_lastrowid) identifier_lastrowid )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_con) identifier_con )attribute (identifier_execute) identifier_execute )attribute (argument_list (string_"INSERT INTO notekeyword(noteId, keywordID) VALUES(?, ?)") string_"INSERT INTO notekeyword(noteId, keywordID) VALUES(?, ?)" (list (identifier_noteId) identifier_noteId (identifier_keywordId) identifier_keywordId )list )argument_list )call )expression_statement )block (except_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_error) identifier_error )attribute (argument_list (binary_operator (string_"error hooking up keyword '%s'") string_"error hooking up keyword '%s'" (identifier_keyword) identifier_keyword )binary_operator )argument_list )call )expression_statement )block )except_clause )try_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_con) identifier_con )attribute (identifier_commit) identifier_commit )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Unhook existing cross-linking entries.
(module (function_definition (function_name__get_wcs_request) function_name__get_wcs_request (parameters (identifier_self) identifier_self (identifier_bbox) identifier_bbox (identifier_time_interval) identifier_time_interval (identifier_size_x) identifier_size_x (identifier_size_y) identifier_size_y (identifier_maxcc) identifier_maxcc (identifier_time_difference) identifier_time_difference (identifier_custom_url_params) identifier_custom_url_params )parameters (block (return_statement (call (identifier_WcsRequest) identifier_WcsRequest (argument_list (keyword_argument (identifier_layer) identifier_layer (attribute (identifier_self) identifier_self (identifier_data_feature) identifier_data_feature )attribute )keyword_argument (keyword_argument (identifier_bbox) identifier_bbox (identifier_bbox) identifier_bbox )keyword_argument (keyword_argument (identifier_time) identifier_time (identifier_time_interval) identifier_time_interval )keyword_argument (keyword_argument (identifier_resx) identifier_resx (identifier_size_x) identifier_size_x )keyword_argument (keyword_argument (identifier_resy) identifier_resy (identifier_size_y) identifier_size_y )keyword_argument (keyword_argument (identifier_maxcc) identifier_maxcc (identifier_maxcc) identifier_maxcc )keyword_argument (keyword_argument (identifier_custom_url_params) identifier_custom_url_params (identifier_custom_url_params) identifier_custom_url_params )keyword_argument (keyword_argument (identifier_time_difference) identifier_time_difference (identifier_time_difference) identifier_time_difference )keyword_argument (keyword_argument (identifier_image_format) identifier_image_format (attribute (identifier_self) identifier_self (identifier_image_format) identifier_image_format )attribute )keyword_argument (keyword_argument (identifier_data_source) identifier_data_source (attribute (identifier_self) identifier_self (identifier_data_source) identifier_data_source )attribute )keyword_argument (keyword_argument (identifier_instance_id) identifier_instance_id (attribute (identifier_self) identifier_self (identifier_instance_id) identifier_instance_id )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Returns WCS request.
(module (function_definition (function_name_get_username) function_name_get_username (parameters (identifier_identifier) identifier_identifier )parameters (block (expression_statement (assignment (identifier_pattern) identifier_pattern (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (string_'.+@\w+\..+') string_'.+@\w+\..+' )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_pattern) identifier_pattern (identifier_match) identifier_match )attribute (argument_list (identifier_identifier) identifier_identifier )argument_list )call (block (try_statement (block (expression_statement (assignment (identifier_user) identifier_user (call (attribute (attribute (identifier_User) identifier_User (identifier_objects) identifier_objects )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_email) identifier_email (identifier_identifier) identifier_identifier )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (block (raise_statement (identifier_Http404) identifier_Http404 )raise_statement )block )except_clause (else_clause (block (return_statement (attribute (identifier_user) identifier_user (identifier_username) identifier_username )attribute )return_statement )block )else_clause )try_statement )block (else_clause (block (return_statement (identifier_identifier) identifier_identifier )return_statement )block )else_clause )if_statement )block )function_definition )module
Checks if a string is a email adress or not.
(module (function_definition (function_name_do_set_log_level) function_name_do_set_log_level (parameters (identifier_self) identifier_self (identifier_arg) identifier_arg )parameters (block (if_statement (comparison_operator (identifier_arg) identifier_arg (list (string_'i') string_'i' (string_'v') string_'v' )list )comparison_operator (block (expression_statement (call (attribute (identifier__LOGGING) identifier__LOGGING (identifier_info) identifier_info )attribute (argument_list (string_'Setting log level to %s') string_'Setting log level to %s' (identifier_arg) identifier_arg )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_arg) identifier_arg (string_'i') string_'i' )comparison_operator (block (expression_statement (call (attribute (identifier__LOGGING) identifier__LOGGING (identifier_setLevel) identifier_setLevel )attribute (argument_list (attribute (identifier_logging) identifier_logging (identifier_INFO) identifier_INFO )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier__INSTEONPLM_LOGGING) identifier__INSTEONPLM_LOGGING (identifier_setLevel) identifier_setLevel )attribute (argument_list (attribute (identifier_logging) identifier_logging (identifier_INFO) identifier_INFO )attribute )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier__LOGGING) identifier__LOGGING (identifier_setLevel) identifier_setLevel )attribute (argument_list (attribute (identifier_logging) identifier_logging (identifier_DEBUG) identifier_DEBUG )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier__INSTEONPLM_LOGGING) identifier__INSTEONPLM_LOGGING (identifier_setLevel) identifier_setLevel )attribute (argument_list (attribute (identifier_logging) identifier_logging (identifier_DEBUG) identifier_DEBUG )attribute )argument_list )call )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (call (attribute (identifier__LOGGING) identifier__LOGGING (identifier_error) identifier_error )attribute (argument_list (string_'Log level value error.') string_'Log level value error.' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_do_help) identifier_do_help )attribute (argument_list (string_'set_log_level') string_'set_log_level' )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Set the log level. Usage: set_log_level i|v Parameters: log_level: i - info | v - verbose
(module (function_definition (function_name_build_endpoint_name) function_name_build_endpoint_name (parameters (identifier_cls) identifier_cls (identifier_name) identifier_name (default_parameter (identifier_endpoint_prefix) identifier_endpoint_prefix (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_endpoint_prefix) identifier_endpoint_prefix (None) None )comparison_operator (block (expression_statement (assignment (identifier_endpoint_prefix) identifier_endpoint_prefix (call (attribute (string_'api_{}') string_'api_{}' (identifier_format) identifier_format )attribute (argument_list (call (attribute (call (attribute (attribute (identifier_cls) identifier_cls (identifier___name__) identifier___name__ )attribute (identifier_replace) identifier_replace )attribute (argument_list (string_'Resource') string_'Resource' (string_'') string_'' )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_endpoint_prefix) identifier_endpoint_prefix (call (attribute (identifier_endpoint_prefix) identifier_endpoint_prefix (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_'_') string_'_' )argument_list )call )assignment )expression_statement (return_statement (call (attribute (string_'_') string_'_' (identifier_join) identifier_join )attribute (argument_list (list (identifier_endpoint_prefix) identifier_endpoint_prefix (identifier_name) identifier_name )list )argument_list )call )return_statement )block )function_definition )module
Given a ``name`` & an optional ``endpoint_prefix``, this generates a name for a URL. :param name: The name for the URL (ex. 'detail') :type name: string :param endpoint_prefix: (Optional) A prefix for the URL's name (for resolving). The default is ``None``, which will autocreate a prefix based on the class name. Ex: ``BlogPostResource`` -> ``api_blogpost_list`` :type endpoint_prefix: string :returns: The final name :rtype: string
(module (function_definition (function_name_addToPrePrepares) function_name_addToPrePrepares (parameters (identifier_self) identifier_self (typed_parameter (identifier_pp) identifier_pp (type (identifier_PrePrepare) identifier_PrePrepare )type )typed_parameter )parameters (type (None) None )type (block (expression_statement (assignment (identifier_key) identifier_key (tuple (attribute (identifier_pp) identifier_pp (identifier_viewNo) identifier_viewNo )attribute (attribute (identifier_pp) identifier_pp (identifier_ppSeqNo) identifier_ppSeqNo )attribute )tuple )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_prePrepares) identifier_prePrepares )attribute (identifier_key) identifier_key )subscript (identifier_pp) identifier_pp )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_lastPrePrepareSeqNo) identifier_lastPrePrepareSeqNo )attribute (attribute (identifier_pp) identifier_pp (identifier_ppSeqNo) identifier_ppSeqNo )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_last_accepted_pre_prepare_time) identifier_last_accepted_pre_prepare_time )attribute (attribute (identifier_pp) identifier_pp (identifier_ppTime) identifier_ppTime )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_dequeue_prepares) identifier_dequeue_prepares )attribute (argument_list (list_splat (identifier_key) identifier_key )list_splat )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_dequeue_commits) identifier_dequeue_commits )attribute (argument_list (list_splat (identifier_key) identifier_key )list_splat )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_stats) identifier_stats )attribute (identifier_inc) identifier_inc )attribute (argument_list (attribute (identifier_TPCStat) identifier_TPCStat (identifier_PrePrepareRcvd) identifier_PrePrepareRcvd )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_tryPrepare) identifier_tryPrepare )attribute (argument_list (identifier_pp) identifier_pp )argument_list )call )expression_statement )block )function_definition )module
Add the specified PRE-PREPARE to this replica's list of received PRE-PREPAREs and try sending PREPARE :param pp: the PRE-PREPARE to add to the list
(module (function_definition (function_name_rnormal) function_name_rnormal (parameters (identifier_mu) identifier_mu (identifier_tau) identifier_tau (default_parameter (identifier_size) identifier_size (None) None )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_np) identifier_np (identifier_random) identifier_random )attribute (identifier_normal) identifier_normal )attribute (argument_list (identifier_mu) identifier_mu (binary_operator (float_1.) float_1. (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (identifier_tau) identifier_tau )argument_list )call )binary_operator (identifier_size) identifier_size )argument_list )call )return_statement )block )function_definition )module
Random normal variates.
(module (function_definition (function_name_xyz) function_name_xyz (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_children) identifier_children )attribute )not_operator (block (expression_statement (assignment (identifier_pos) identifier_pos (call (attribute (identifier_np) identifier_np (identifier_expand_dims) identifier_expand_dims )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__pos) identifier__pos )attribute (keyword_argument (identifier_axis) identifier_axis (integer_0) integer_0 )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_arr) identifier_arr (call (attribute (identifier_np) identifier_np (identifier_fromiter) identifier_fromiter )attribute (argument_list (call (attribute (attribute (identifier_itertools) identifier_itertools (identifier_chain) identifier_chain )attribute (identifier_from_iterable) identifier_from_iterable )attribute (generator_expression (attribute (identifier_particle) identifier_particle (identifier_pos) identifier_pos )attribute (for_in_clause (identifier_particle) identifier_particle (call (attribute (identifier_self) identifier_self (identifier_particles) identifier_particles )attribute (argument_list )argument_list )call )for_in_clause )generator_expression )call (keyword_argument (identifier_dtype) identifier_dtype (identifier_float) identifier_float )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pos) identifier_pos (call (attribute (identifier_arr) identifier_arr (identifier_reshape) identifier_reshape )attribute (argument_list (tuple (unary_operator (integer_1) integer_1 )unary_operator (integer_3) integer_3 )tuple )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_pos) identifier_pos )return_statement )block )function_definition )module
Return all particle coordinates in this compound. Returns ------- pos : np.ndarray, shape=(n, 3), dtype=float Array with the positions of all particles.
(module (function_definition (function_name_ping) function_name_ping (parameters (identifier_host) identifier_host (default_parameter (identifier_timeout) identifier_timeout (False) False )default_parameter (default_parameter (identifier_return_boolean) identifier_return_boolean (False) False )default_parameter )parameters (block (if_statement (identifier_timeout) identifier_timeout (block (expression_statement (assignment (identifier_timeout) identifier_timeout (binary_operator (binary_operator (call (identifier_int) identifier_int (argument_list (identifier_timeout) identifier_timeout )argument_list )call (integer_1000) integer_1000 )binary_operator (integer_4) integer_4 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (list (string_'ping') string_'ping' (string_'-n') string_'-n' (string_'4') string_'4' (string_'-w') string_'-w' (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_timeout) identifier_timeout )argument_list )call (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_network) identifier_network )attribute (identifier_sanitize_host) identifier_sanitize_host )attribute (argument_list (identifier_host) identifier_host )argument_list )call )list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_cmd) identifier_cmd (list (string_'ping') string_'ping' (string_'-n') string_'-n' (string_'4') string_'4' (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_network) identifier_network )attribute (identifier_sanitize_host) identifier_sanitize_host )attribute (argument_list (identifier_host) identifier_host )argument_list )call )list )assignment )expression_statement )block )else_clause )if_statement (if_statement (identifier_return_boolean) identifier_return_boolean (block (expression_statement (assignment (identifier_ret) identifier_ret (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run_all') string_'cmd.run_all' )subscript (argument_list (identifier_cmd) identifier_cmd (keyword_argument (identifier_python_shell) identifier_python_shell (False) False )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (subscript (identifier_ret) identifier_ret (string_'retcode') string_'retcode' )subscript (integer_0) integer_0 )comparison_operator (block (return_statement (False) False )return_statement )block (else_clause (block (return_statement (True) True )return_statement )block )else_clause )if_statement )block (else_clause (block (return_statement (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run') string_'cmd.run' )subscript (argument_list (identifier_cmd) identifier_cmd (keyword_argument (identifier_python_shell) identifier_python_shell (False) False )keyword_argument )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Performs a ping to a host CLI Example: .. code-block:: bash salt '*' network.ping archlinux.org .. versionadded:: 2016.11.0 Return a True or False instead of ping output. .. code-block:: bash salt '*' network.ping archlinux.org return_boolean=True Set the time to wait for a response in seconds. .. code-block:: bash salt '*' network.ping archlinux.org timeout=3
(module (function_definition (function_name_home_abbreviation) function_name_home_abbreviation (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_abbr) identifier_abbr (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_r'.*/teams/') string_r'.*/teams/' (string_'') string_'' (call (identifier_str) identifier_str (argument_list (attribute (identifier_self) identifier_self (identifier__home_name) identifier__home_name )attribute )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_abbr) identifier_abbr (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_r'/.*') string_r'/.*' (string_'') string_'' (identifier_abbr) identifier_abbr )argument_list )call )assignment )expression_statement (return_statement (identifier_abbr) identifier_abbr )return_statement )block )function_definition )module
Returns a ``string`` of the home team's abbreviation, such as 'KAN'.
(module (function_definition (function_name_members) function_name_members (parameters (identifier_self) identifier_self )parameters (block (with_statement (with_clause (with_item (attribute (identifier_self) identifier_self (identifier__mutex) identifier__mutex )attribute )with_item )with_clause (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__members) identifier__members )attribute )not_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__members) identifier__members )attribute (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_o) identifier_o (attribute (identifier_self) identifier_self (identifier_organisations) identifier_organisations )attribute (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__members) identifier__members )attribute (attribute (identifier_o) identifier_o (identifier_org_id) identifier_org_id )attribute )subscript (call (attribute (attribute (identifier_o) identifier_o (identifier_obj) identifier_obj )attribute (identifier_get_members) identifier_get_members )attribute (argument_list )argument_list )call )assignment )expression_statement )block )for_statement )block )if_statement )block )with_statement (return_statement (attribute (identifier_self) identifier_self (identifier__members) identifier__members )attribute )return_statement )block )function_definition )module
Member components if this component is composite.
(module (function_definition (function_name_get_term_freq) function_name_get_term_freq (parameters (identifier_self) identifier_self (identifier_go_id) identifier_go_id )parameters (block (expression_statement (assignment (identifier_num_ns) identifier_num_ns (call (identifier_float) identifier_float (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_total_count) identifier_get_total_count )attribute (argument_list (attribute (subscript (attribute (identifier_self) identifier_self (identifier_go2obj) identifier_go2obj )attribute (identifier_go_id) identifier_go_id )subscript (identifier_namespace) identifier_namespace )attribute )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (binary_operator (call (identifier_float) identifier_float (argument_list (call (attribute (identifier_self) identifier_self (identifier_get_count) identifier_get_count )attribute (argument_list (identifier_go_id) identifier_go_id )argument_list )call )argument_list )call (identifier_num_ns) identifier_num_ns )binary_operator (comparison_operator (identifier_num_ns) identifier_num_ns (integer_0) integer_0 )comparison_operator (integer_0) integer_0 )conditional_expression )return_statement )block )function_definition )module
Returns the frequency at which a particular GO term has been observed in the annotations.
(module (function_definition (function_name_show_profiles) function_name_show_profiles (parameters (identifier_self) identifier_self )parameters (block (for_statement (pattern_list (identifier_i) identifier_i (tuple_pattern (identifier_id) identifier_id (identifier_profiler) identifier_profiler (identifier_showed) identifier_showed )tuple_pattern )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (attribute (identifier_self) identifier_self (identifier_profilers) identifier_profilers )attribute )argument_list )call (block (if_statement (boolean_operator (not_operator (identifier_showed) identifier_showed )not_operator (identifier_profiler) identifier_profiler )boolean_operator (block (expression_statement (call (attribute (identifier_profiler) identifier_profiler (identifier_show) identifier_show )attribute (argument_list (identifier_id) identifier_id )argument_list )call )expression_statement (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier_profilers) identifier_profilers )attribute (identifier_i) identifier_i )subscript (integer_2) integer_2 )subscript (True) True )assignment )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Print the profile stats to stdout
(module (function_definition (function_name_setup_files) function_name_setup_files (parameters (identifier_class_dir) identifier_class_dir (identifier_seed) identifier_seed )parameters (block (expression_statement (call (attribute (identifier_random) identifier_random (identifier_seed) identifier_seed )attribute (argument_list (identifier_seed) identifier_seed )argument_list )call )expression_statement (expression_statement (assignment (identifier_files) identifier_files (call (identifier_list_files) identifier_list_files (argument_list (identifier_class_dir) identifier_class_dir )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_files) identifier_files (identifier_sort) identifier_sort )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_random) identifier_random (identifier_shuffle) identifier_shuffle )attribute (argument_list (identifier_files) identifier_files )argument_list )call )expression_statement (return_statement (identifier_files) identifier_files )return_statement )block )function_definition )module
Returns shuffled files
(module (function_definition (function_name_get_html) function_name_get_html (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier___htmltree) identifier___htmltree )attribute (None) None )comparison_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier___htmltree) identifier___htmltree )attribute )return_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier___make_tree) identifier___make_tree )attribute (argument_list )argument_list )call )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier___htmltree) identifier___htmltree )attribute )return_statement )block )else_clause )if_statement )block )function_definition )module
Generates if need be and returns a simpler html document with text
(module (function_definition (function_name_start_component) function_name_start_component (parameters (typed_parameter (identifier_workload) identifier_workload (type (generic_type (identifier_CoroutineFunction) identifier_CoroutineFunction (type_parameter (type (identifier_T) identifier_T )type )type_parameter )generic_type )type )typed_parameter (typed_parameter (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (type (identifier_Any) identifier_Any )type )typed_parameter (typed_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern (type (identifier_Any) identifier_Any )type )typed_parameter )parameters (type (generic_type (identifier_Component) identifier_Component (type_parameter (type (identifier_T) identifier_T )type )type_parameter )generic_type )type (block (expression_statement (assignment (pattern_list (identifier_commands_a) identifier_commands_a (identifier_commands_b) identifier_commands_b )pattern_list (call (identifier_pipe) identifier_pipe (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_events_a) identifier_events_a (identifier_events_b) identifier_events_b )pattern_list (call (identifier_pipe) identifier_pipe (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_task) identifier_task (call (attribute (identifier_asyncio) identifier_asyncio (identifier_create_task) identifier_create_task )attribute (argument_list (call (identifier_workload) identifier_workload (argument_list (list_splat (identifier_args) identifier_args )list_splat (keyword_argument (identifier_commands) identifier_commands (identifier_commands_b) identifier_commands_b )keyword_argument (keyword_argument (identifier_events) identifier_events (identifier_events_b) identifier_events_b )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_component) identifier_component (call (subscript (identifier_Component) identifier_Component (identifier_T) identifier_T )subscript (argument_list (identifier_commands_a) identifier_commands_a (identifier_events_a) identifier_events_a (identifier_task) identifier_task )argument_list )call )assignment )expression_statement (expression_statement (await (call (attribute (identifier_component) identifier_component (identifier_wait_for_start) identifier_wait_for_start )attribute (argument_list )argument_list )call )await )expression_statement (return_statement (identifier_component) identifier_component )return_statement )block )function_definition )module
\ Starts the passed `workload` with additional `commands` and `events` pipes. The workload will be executed as a task. A simple example. Note that here, the component is exclusively reacting to commands, and the owner waits for acknowledgements to its commands, making the order of outputs predictable. >>> @component_workload ... async def component(msg, *, commands, events): ... # do any startup tasks here ... print("> component starting up...") ... await events.send(Component.EVENT_START) ... ... count = 0 ... while True: ... command = await commands.recv() ... if command == Component.COMMAND_STOP: ... # honor stop commands ... break ... elif command == 'ECHO': ... print(f"> {msg}") ... count += 1 ... # acknowledge the command was serviced completely ... await commands.send(None) ... else: ... # unknown command; terminate ... # by closing the commands pipe, ... # the caller (if waiting for a reply) will receive an EOFError ... await commands.send(eof=True) ... raise ValueError ... ... # do any cleanup tasks here, probably in a finally block ... print("> component cleaning up...") ... return count ... >>> async def example(): ... print("call start") ... comp = await start_component(component, "Hello World") ... print("done") ... ... print("send command") ... await comp.request('ECHO') ... print("done") ... ... print("call stop") ... count = await comp.stop() ... print("done") ... ... print(count) ... >>> asyncio.run(example()) call start > component starting up... done send command > Hello World done call stop > component cleaning up... done 1
(module (function_definition (function_name_svg2str) function_name_svg2str (parameters (identifier_display_object) identifier_display_object (default_parameter (identifier_dpi) identifier_dpi (integer_300) integer_300 )default_parameter )parameters (block (import_from_statement (dotted_name (identifier_io) identifier_io )dotted_name (dotted_name (identifier_StringIO) identifier_StringIO )dotted_name )import_from_statement (expression_statement (assignment (identifier_image_buf) identifier_image_buf (call (identifier_StringIO) identifier_StringIO (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_display_object) identifier_display_object (identifier_frame_axes) identifier_frame_axes )attribute (identifier_figure) identifier_figure )attribute (identifier_savefig) identifier_savefig )attribute (argument_list (identifier_image_buf) identifier_image_buf (keyword_argument (identifier_dpi) identifier_dpi (identifier_dpi) identifier_dpi )keyword_argument (keyword_argument (identifier_format) identifier_format (string_'svg') string_'svg' )keyword_argument (keyword_argument (identifier_facecolor) identifier_facecolor (string_'k') string_'k' )keyword_argument (keyword_argument (identifier_edgecolor) identifier_edgecolor (string_'k') string_'k' )keyword_argument )argument_list )call )expression_statement (return_statement (call (attribute (identifier_image_buf) identifier_image_buf (identifier_getvalue) identifier_getvalue )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Serializes a nilearn display object as a string
(module (function_definition (function_name_check_elasticsearch) function_name_check_elasticsearch (parameters (identifier_record) identifier_record (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (function_definition (function_name_can) function_name_can (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_search) identifier_search (call (attribute (attribute (identifier_request) identifier_request (identifier__methodview) identifier__methodview )attribute (identifier_search_class) identifier_search_class )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_search) identifier_search (call (attribute (identifier_search) identifier_search (identifier_get_record) identifier_get_record )attribute (argument_list (call (identifier_str) identifier_str (argument_list (attribute (identifier_record) identifier_record (identifier_id) identifier_id )attribute )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (comparison_operator (call (attribute (identifier_search) identifier_search (identifier_count) identifier_count )attribute (argument_list )argument_list )call (integer_1) integer_1 )comparison_operator )return_statement )block )function_definition (return_statement (call (call (identifier_type) identifier_type (argument_list (string_'CheckES') string_'CheckES' (tuple )tuple (dictionary (pair (string_'can') string_'can' (identifier_can) identifier_can )pair )dictionary )argument_list )call (argument_list )argument_list )call )return_statement )block )function_definition )module
Return permission that check if the record exists in ES index. :params record: A record object. :returns: A object instance with a ``can()`` method.
(module (function_definition (function_name_add_configuration) function_name_add_configuration (parameters (identifier_self) identifier_self (identifier_configuration) identifier_configuration (identifier_collect_another_source) identifier_collect_another_source (identifier_done) identifier_done (identifier_result) identifier_result (identifier_src) identifier_src )parameters (block (if_statement (comparison_operator (string_"includes") string_"includes" (identifier_result) identifier_result )comparison_operator (block (for_statement (identifier_include) identifier_include (subscript (identifier_result) identifier_result (string_"includes") string_"includes" )subscript (block (expression_statement (call (identifier_collect_another_source) identifier_collect_another_source (argument_list (identifier_include) identifier_include )argument_list )call )expression_statement )block )for_statement )block )if_statement (expression_statement (call (attribute (identifier_configuration) identifier_configuration (identifier_update) identifier_update )attribute (argument_list (identifier_result) identifier_result (keyword_argument (identifier_source) identifier_source (identifier_src) identifier_src )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Used to add a file to the configuration, result here is the yaml.load of the src
(module (function_definition (function_name_load_parent_implems) function_name_load_parent_implems (parameters (identifier_self) identifier_self (identifier_parent_implems) identifier_parent_implems )parameters (block (for_statement (pattern_list (identifier_trname) identifier_trname (identifier_attr) identifier_attr (identifier_implem) identifier_implem )pattern_list (call (attribute (identifier_parent_implems) identifier_parent_implems (identifier_get_custom_implementations) identifier_get_custom_implementations )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_implementations) identifier_implementations )attribute (identifier_trname) identifier_trname )subscript (call (attribute (identifier_implem) identifier_implem (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_transitions_at) identifier_transitions_at )attribute (identifier_trname) identifier_trname )subscript (identifier_attr) identifier_attr )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_custom_implems) identifier_custom_implems )attribute (identifier_add) identifier_add )attribute (argument_list (identifier_trname) identifier_trname )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Import previously defined implementations. Args: parent_implems (ImplementationList): List of implementations defined in a parent class.
(module (function_definition (function_name_removeAllEntitlements) function_name_removeAllEntitlements (parameters (identifier_self) identifier_self (identifier_appId) identifier_appId )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_"f") string_"f" (string_"json") string_"json" )pair (pair (string_"appId") string_"appId" (identifier_appId) identifier_appId )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier__url) identifier__url )attribute (string_"/licenses/removeAllEntitlements") string_"/licenses/removeAllEntitlements" )binary_operator )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__post) identifier__post )attribute (argument_list (keyword_argument (identifier_url) identifier_url (identifier_url) identifier_url )keyword_argument (keyword_argument (identifier_param_dict) identifier_param_dict (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_proxy_url) identifier_proxy_url (attribute (identifier_self) identifier_self (identifier__proxy_url) identifier__proxy_url )attribute )keyword_argument (keyword_argument (identifier_proxy_port) identifier_proxy_port (attribute (identifier_self) identifier_self (identifier__proxy_port) identifier__proxy_port )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
This operation removes all entitlements from the portal for ArcGIS Pro or additional products such as Navigator for ArcGIS and revokes all entitlements assigned to users for the specified product. The portal is no longer a licensing portal for that product. License assignments are retained on disk. Therefore, if you decide to configure this portal as a licensing portal for the product again in the future, all licensing assignments will be available in the website. Parameters: appId - The identifier for the application for which the entitlements are being removed.
(module (function_definition (function_name_make_butterworth_bandpass_b_a) function_name_make_butterworth_bandpass_b_a (parameters (identifier_CenterFreq) identifier_CenterFreq (identifier_bandwidth) identifier_bandwidth (identifier_SampleFreq) identifier_SampleFreq (default_parameter (identifier_order) identifier_order (integer_5) integer_5 )default_parameter (default_parameter (identifier_btype) identifier_btype (string_'band') string_'band' )default_parameter )parameters (block (expression_statement (assignment (identifier_lowcut) identifier_lowcut (binary_operator (identifier_CenterFreq) identifier_CenterFreq (binary_operator (identifier_bandwidth) identifier_bandwidth (integer_2) integer_2 )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_highcut) identifier_highcut (binary_operator (identifier_CenterFreq) identifier_CenterFreq (binary_operator (identifier_bandwidth) identifier_bandwidth (integer_2) integer_2 )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_b) identifier_b (identifier_a) identifier_a )pattern_list (call (identifier_make_butterworth_b_a) identifier_make_butterworth_b_a (argument_list (identifier_lowcut) identifier_lowcut (identifier_highcut) identifier_highcut (identifier_SampleFreq) identifier_SampleFreq (identifier_order) identifier_order (identifier_btype) identifier_btype )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_b) identifier_b (identifier_a) identifier_a )expression_list )return_statement )block )function_definition )module
Generates the b and a coefficients for a butterworth bandpass IIR filter. Parameters ---------- CenterFreq : float central frequency of bandpass bandwidth : float width of the bandpass from centre to edge SampleFreq : float Sample frequency of filter order : int, optional order of IIR filter. Is 5 by default btype : string, optional type of filter to make e.g. (band, low, high) Returns ------- b : ndarray coefficients multiplying the current and past inputs (feedforward coefficients) a : ndarray coefficients multiplying the past outputs (feedback coefficients)
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (default_parameter (identifier_using) identifier_using (None) None )default_parameter )parameters (block (import_from_statement (dotted_name (identifier_organizations) identifier_organizations (identifier_exceptions) identifier_exceptions )dotted_name (dotted_name (identifier_OwnershipRequired) identifier_OwnershipRequired )dotted_name )import_from_statement (try_statement (block (if_statement (comparison_operator (attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_organization) identifier_organization )attribute (identifier_owner) identifier_owner )attribute (identifier_organization_user) identifier_organization_user )attribute (identifier_pk) identifier_pk )attribute (attribute (identifier_self) identifier_self (identifier_pk) identifier_pk )attribute )comparison_operator (block (raise_statement (call (identifier_OwnershipRequired) identifier_OwnershipRequired (argument_list (call (identifier__) identifier__ (argument_list (concatenated_string (string_"Cannot delete organization owner ") string_"Cannot delete organization owner " (string_"before organization or transferring ownership.") string_"before organization or transferring ownership." )concatenated_string )argument_list )call )argument_list )call )raise_statement )block )if_statement )block (except_clause (attribute (attribute (identifier_self) identifier_self (identifier__org_owner_model) identifier__org_owner_model )attribute (identifier_DoesNotExist) identifier_DoesNotExist )attribute (block (pass_statement )pass_statement )block )except_clause )try_statement (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_AbstractBaseOrganizationUser) identifier_AbstractBaseOrganizationUser (identifier_self) identifier_self )argument_list )call (identifier_delete) identifier_delete )attribute (argument_list (keyword_argument (identifier_using) identifier_using (identifier_using) identifier_using )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
If the organization user is also the owner, this should not be deleted unless it's part of a cascade from the Organization. If there is no owner then the deletion should proceed.
(module (function_definition (function_name_storage_class) function_name_storage_class (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (if_statement (comparison_operator (identifier_value) identifier_value (attribute (identifier_self) identifier_self (identifier__STORAGE_CLASSES) identifier__STORAGE_CLASSES )attribute )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"Invalid storage class: %s") string_"Invalid storage class: %s" (tuple (identifier_value) identifier_value )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__patch_property) identifier__patch_property )attribute (argument_list (string_"storageClass") string_"storageClass" (identifier_value) identifier_value )argument_list )call )expression_statement )block )function_definition )module
Set the storage class for the bucket. See https://cloud.google.com/storage/docs/storage-classes :type value: str :param value: one of "MULTI_REGIONAL", "REGIONAL", "NEARLINE", "COLDLINE", "STANDARD", or "DURABLE_REDUCED_AVAILABILITY"
(module (function_definition (function_name_run) function_name_run (parameters (identifier_self) identifier_self (default_parameter (identifier_order) identifier_order (None) None )default_parameter )parameters (block (for_statement (identifier_event) identifier_event (call (attribute (attribute (identifier_self) identifier_self (identifier_runner) identifier_runner )attribute (identifier_run) identifier_run )attribute (argument_list (keyword_argument (identifier_order) identifier_order (identifier_order) identifier_order )keyword_argument )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_receive) identifier_receive )attribute (argument_list (identifier_event) identifier_event )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
self.runner must be present
(module (function_definition (function_name_normalise_key) function_name_normalise_key (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (expression_statement (assignment (identifier_key) identifier_key (call (attribute (identifier_key) identifier_key (identifier_replace) identifier_replace )attribute (argument_list (string_'-') string_'-' (string_'_') string_'_' )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_key) identifier_key (identifier_startswith) identifier_startswith )attribute (argument_list (string_"noy_") string_"noy_" )argument_list )call (block (expression_statement (assignment (identifier_key) identifier_key (subscript (identifier_key) identifier_key (slice (integer_4) integer_4 (colon) colon )slice )subscript )assignment )expression_statement )block )if_statement (return_statement (identifier_key) identifier_key )return_statement )block )function_definition )module
Make sure key is a valid python attribute
(module (function_definition (function_name_endswith_strip) function_name_endswith_strip (parameters (identifier_s) identifier_s (default_parameter (identifier_endswith) identifier_endswith (string_'.txt') string_'.txt' )default_parameter (default_parameter (identifier_ignorecase) identifier_ignorecase (True) True )default_parameter )parameters (block (if_statement (identifier_ignorecase) identifier_ignorecase (block (if_statement (call (attribute (call (attribute (identifier_s) identifier_s (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (identifier_endswith) identifier_endswith )attribute (argument_list (call (attribute (identifier_endswith) identifier_endswith (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )argument_list )call (block (return_statement (subscript (identifier_s) identifier_s (slice (colon) colon (unary_operator (call (identifier_len) identifier_len (argument_list (identifier_endswith) identifier_endswith )argument_list )call )unary_operator )slice )subscript )return_statement )block )if_statement )block (else_clause (block (if_statement (call (attribute (identifier_s) identifier_s (identifier_endswith) identifier_endswith )attribute (argument_list (identifier_endswith) identifier_endswith )argument_list )call (block (return_statement (subscript (identifier_s) identifier_s (slice (colon) colon (unary_operator (call (identifier_len) identifier_len (argument_list (identifier_endswith) identifier_endswith )argument_list )call )unary_operator )slice )subscript )return_statement )block )if_statement )block )else_clause )if_statement (return_statement (identifier_s) identifier_s )return_statement )block )function_definition )module
Strip a suffix from the end of a string >>> endswith_strip('http://TotalGood.com', '.COM') 'http://TotalGood' >>> endswith_strip('http://TotalGood.com', endswith='.COM', ignorecase=False) 'http://TotalGood.com'
(module (function_definition (function_name__compile_files) function_name__compile_files (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_f) identifier_f (call (attribute (identifier_glob) identifier_glob (identifier_glob) identifier_glob )attribute (argument_list (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_dir_path) identifier_dir_path )attribute (string_'*.py') string_'*.py' )argument_list )call )argument_list )call (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (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_dir_path) identifier_dir_path )attribute (binary_operator (identifier_f) identifier_f (string_'c') string_'c' )binary_operator )argument_list )call )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_compileall) identifier_compileall (identifier_compile_dir) identifier_compile_dir )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_dir_path) identifier_dir_path )attribute (keyword_argument (identifier_quiet) identifier_quiet (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (string_'Compiled plugins as a new plugin has been added.') string_'Compiled plugins as a new plugin has been added.' )argument_list )call )expression_statement (return_statement )return_statement )block (elif_clause (comparison_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_getmtime) identifier_getmtime )attribute (argument_list (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_dir_path) identifier_dir_path )attribute (identifier_f) identifier_f )argument_list )call )argument_list )call (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_getmtime) identifier_getmtime )attribute (argument_list (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_dir_path) identifier_dir_path )attribute (binary_operator (identifier_f) identifier_f (string_'c') string_'c' )binary_operator )argument_list )call )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_compileall) identifier_compileall (identifier_compile_dir) identifier_compile_dir )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_dir_path) identifier_dir_path )attribute (keyword_argument (identifier_quiet) identifier_quiet (True) True )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (string_'Compiled plugins as a plugin has been changed.') string_'Compiled plugins as a plugin has been changed.' )argument_list )call )expression_statement (return_statement )return_statement )block )elif_clause )if_statement )block )for_statement )block )function_definition )module
Compiles python plugin files in order to be processed by the loader. It compiles the plugins if they have been updated or haven't yet been compiled.
(module (function_definition (function_name_rename) function_name_rename (parameters (identifier_name) identifier_name (identifier_new_name) identifier_new_name (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_flags) identifier_flags (list )list )assignment )expression_statement (expression_statement (assignment (identifier_target) identifier_target (list )list )assignment )expression_statement (if_statement (call (subscript (identifier___utils__) identifier___utils__ (string_'zfs.is_snapshot') string_'zfs.is_snapshot' )subscript (argument_list (identifier_name) identifier_name )argument_list )call (block (if_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'create_parent') string_'create_parent' (False) False )argument_list )call (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warning) identifier_warning )attribute (argument_list (string_'zfs.rename - create_parent=True cannot be used with snapshots.') string_'zfs.rename - create_parent=True cannot be used with snapshots.' )argument_list )call )expression_statement )block )if_statement (if_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'force') string_'force' (False) False )argument_list )call (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warning) identifier_warning )attribute (argument_list (string_'zfs.rename - force=True cannot be used with snapshots.') string_'zfs.rename - force=True cannot be used with snapshots.' )argument_list )call )expression_statement )block )if_statement (if_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'recursive') string_'recursive' (False) False )argument_list )call (block (expression_statement (call (attribute (identifier_flags) identifier_flags (identifier_append) identifier_append )attribute (argument_list (string_'-r') string_'-r' )argument_list )call )expression_statement )block )if_statement )block (else_clause (block (if_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'create_parent') string_'create_parent' (False) False )argument_list )call (block (expression_statement (call (attribute (identifier_flags) identifier_flags (identifier_append) identifier_append )attribute (argument_list (string_'-p') string_'-p' )argument_list )call )expression_statement )block )if_statement (if_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'force') string_'force' (False) False )argument_list )call (block (expression_statement (call (attribute (identifier_flags) identifier_flags (identifier_append) identifier_append )attribute (argument_list (string_'-f') string_'-f' )argument_list )call )expression_statement )block )if_statement (if_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'recursive') string_'recursive' (False) False )argument_list )call (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warning) identifier_warning )attribute (argument_list (string_'zfs.rename - recursive=True can only be used with snapshots.') string_'zfs.rename - recursive=True can only be used with snapshots.' )argument_list )call )expression_statement )block )if_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_target) identifier_target (identifier_append) identifier_append )attribute (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_target) identifier_target (identifier_append) identifier_append )attribute (argument_list (identifier_new_name) identifier_new_name )argument_list )call )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (subscript (identifier___salt__) identifier___salt__ (string_'cmd.run_all') string_'cmd.run_all' )subscript (argument_list (call (subscript (identifier___utils__) identifier___utils__ (string_'zfs.zfs_command') string_'zfs.zfs_command' )subscript (argument_list (keyword_argument (identifier_command) identifier_command (string_'rename') string_'rename' )keyword_argument (keyword_argument (identifier_flags) identifier_flags (identifier_flags) identifier_flags )keyword_argument (keyword_argument (identifier_target) identifier_target (identifier_target) identifier_target )keyword_argument )argument_list )call (keyword_argument (identifier_python_shell) identifier_python_shell (False) False )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (subscript (identifier___utils__) identifier___utils__ (string_'zfs.parse_command_result') string_'zfs.parse_command_result' )subscript (argument_list (identifier_res) identifier_res (string_'renamed') string_'renamed' )argument_list )call )return_statement )block )function_definition )module
Rename or Relocate a ZFS File System. name : string name of dataset, volume, or snapshot new_name : string new name of dataset, volume, or snapshot force : boolean force unmount any filesystems that need to be unmounted in the process. create_parent : boolean creates all the nonexistent parent datasets. Datasets created in this manner are automatically mounted according to the mountpoint property inherited from their parent. recursive : boolean recursively rename the snapshots of all descendent datasets. snapshots are the only dataset that can be renamed recursively. .. versionadded:: 2015.5.0 CLI Example: .. code-block:: bash salt '*' zfs.rename myzpool/mydataset myzpool/renameddataset
(module (function_definition (function_name__mark_dirty) function_name__mark_dirty (parameters (identifier_self) identifier_self (identifier_xblock) identifier_xblock (identifier_value) identifier_value )parameters (block (if_statement (comparison_operator (identifier_self) identifier_self (attribute (identifier_xblock) identifier_xblock (identifier__dirty_fields) identifier__dirty_fields )attribute )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_xblock) identifier_xblock (identifier__dirty_fields) identifier__dirty_fields )attribute (identifier_self) identifier_self )subscript (call (attribute (identifier_copy) identifier_copy (identifier_deepcopy) identifier_deepcopy )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block )if_statement )block )function_definition )module
Set this field to dirty on the xblock.
(module (function_definition (function_name_get_all_vpcs) function_name_get_all_vpcs (parameters (identifier_self) identifier_self (default_parameter (identifier_vpc_ids) identifier_vpc_ids (None) None )default_parameter (default_parameter (identifier_filters) identifier_filters (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (if_statement (identifier_vpc_ids) identifier_vpc_ids (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_build_list_params) identifier_build_list_params )attribute (argument_list (identifier_params) identifier_params (identifier_vpc_ids) identifier_vpc_ids (string_'VpcId') string_'VpcId' )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_filters) identifier_filters (block (expression_statement (assignment (identifier_i) identifier_i (integer_1) integer_1 )assignment )expression_statement (for_statement (identifier_filter) identifier_filter (identifier_filters) identifier_filters (block (expression_statement (assignment (subscript (identifier_params) identifier_params (parenthesized_expression (binary_operator (string_'Filter.%d.Name') string_'Filter.%d.Name' (identifier_i) identifier_i )binary_operator )parenthesized_expression )subscript (subscript (identifier_filter) identifier_filter (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_params) identifier_params (parenthesized_expression (binary_operator (string_'Filter.%d.Value.1') string_'Filter.%d.Value.1' (identifier_i) identifier_i )binary_operator )parenthesized_expression )subscript (subscript (identifier_filter) identifier_filter (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (augmented_assignment (identifier_i) identifier_i (integer_1) integer_1 )augmented_assignment )expression_statement )block )for_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_get_list) identifier_get_list )attribute (argument_list (string_'DescribeVpcs') string_'DescribeVpcs' (identifier_params) identifier_params (list (tuple (string_'item') string_'item' (identifier_VPC) identifier_VPC )tuple )list )argument_list )call )return_statement )block )function_definition )module
Retrieve information about your VPCs. You can filter results to return information only about those VPCs that match your search parameters. Otherwise, all VPCs associated with your account are returned. :type vpc_ids: list :param vpc_ids: A list of strings with the desired VPC ID's :type filters: list of tuples :param filters: A list of tuples containing filters. Each tuple consists of a filter key and a filter value. Possible filter keys are: - *state*, the state of the VPC (pending or available) - *cidrBlock*, CIDR block of the VPC - *dhcpOptionsId*, the ID of a set of DHCP options :rtype: list :return: A list of :class:`boto.vpc.vpc.VPC`
(module (function_definition (function_name_get_lattice_type) function_name_get_lattice_type (parameters (identifier_cryst) identifier_cryst )parameters (block (expression_statement (assignment (identifier_lattice_types) identifier_lattice_types (list (list (integer_3) integer_3 (string_"Triclinic") string_"Triclinic" )list (list (integer_16) integer_16 (string_"Monoclinic") string_"Monoclinic" )list (list (integer_75) integer_75 (string_"Orthorombic") string_"Orthorombic" )list (list (integer_143) integer_143 (string_"Tetragonal") string_"Tetragonal" )list (list (integer_168) integer_168 (string_"Trigonal") string_"Trigonal" )list (list (integer_195) integer_195 (string_"Hexagonal") string_"Hexagonal" )list (list (integer_231) integer_231 (string_"Cubic") string_"Cubic" )list )list )assignment )expression_statement (expression_statement (assignment (identifier_sg) identifier_sg (call (attribute (identifier_spg) identifier_spg (identifier_get_spacegroup) identifier_get_spacegroup )attribute (argument_list (identifier_cryst) identifier_cryst )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (string_r'([A-Z].*\b)\s*\(([0-9]*)\)') string_r'([A-Z].*\b)\s*\(([0-9]*)\)' (identifier_sg) identifier_sg )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sg_name) identifier_sg_name (call (attribute (identifier_m) identifier_m (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sg_nr) identifier_sg_nr (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_m) identifier_m (identifier_group) identifier_group )attribute (argument_list (integer_2) integer_2 )argument_list )call )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_n) identifier_n (identifier_l) identifier_l )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_lattice_types) identifier_lattice_types )argument_list )call (block (if_statement (comparison_operator (identifier_sg_nr) identifier_sg_nr (subscript (identifier_l) identifier_l (integer_0) integer_0 )subscript )comparison_operator (block (expression_statement (assignment (identifier_bravais) identifier_bravais (subscript (identifier_l) identifier_l (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_lattype) identifier_lattype (binary_operator (identifier_n) identifier_n (integer_1) integer_1 )binary_operator )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement (return_statement (expression_list (identifier_lattype) identifier_lattype (identifier_bravais) identifier_bravais (identifier_sg_name) identifier_sg_name (identifier_sg_nr) identifier_sg_nr )expression_list )return_statement )block )function_definition )module
Find the symmetry of the crystal using spglib symmetry finder. Derive name of the space group and its number extracted from the result. Based on the group number identify also the lattice type and the Bravais lattice of the crystal. The lattice type numbers are (the numbering starts from 1): Triclinic (1), Monoclinic (2), Orthorombic (3), Tetragonal (4), Trigonal (5), Hexagonal (6), Cubic (7) :param cryst: ASE Atoms object :returns: tuple (lattice type number (1-7), lattice name, space group name, space group number)
(module (function_definition (function_name_nx_all_nodes_between) function_name_nx_all_nodes_between (parameters (identifier_graph) identifier_graph (identifier_source) identifier_source (identifier_target) identifier_target (default_parameter (identifier_data) identifier_data (False) False )default_parameter )parameters (block (import_statement (aliased_import (dotted_name (identifier_utool) identifier_utool )dotted_name (identifier_ut) identifier_ut )aliased_import )import_statement (if_statement (comparison_operator (identifier_source) identifier_source (None) None )comparison_operator (block (expression_statement (assignment (identifier_sources) identifier_sources (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_ut) identifier_ut (identifier_nx_source_nodes) identifier_nx_source_nodes )attribute (argument_list (identifier_graph) identifier_graph )argument_list )call )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_sources) identifier_sources )argument_list )call (integer_1) integer_1 )comparison_operator (parenthesized_expression (string_'specify source if there is not only one') string_'specify source if there is not only one' )parenthesized_expression )assert_statement (expression_statement (assignment (identifier_source) identifier_source (subscript (identifier_sources) identifier_sources (integer_0) integer_0 )subscript )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_target) identifier_target (None) None )comparison_operator (block (expression_statement (assignment (identifier_sinks) identifier_sinks (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_ut) identifier_ut (identifier_nx_sink_nodes) identifier_nx_sink_nodes )attribute (argument_list (identifier_graph) identifier_graph )argument_list )call )argument_list )call )assignment )expression_statement (assert_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_sinks) identifier_sinks )argument_list )call (integer_1) integer_1 )comparison_operator (parenthesized_expression (string_'specify sink if there is not only one') string_'specify sink if there is not only one' )parenthesized_expression )assert_statement (expression_statement (assignment (identifier_target) identifier_target (subscript (identifier_sinks) identifier_sinks (integer_0) integer_0 )subscript )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_all_simple_paths) identifier_all_simple_paths (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_nx) identifier_nx (identifier_all_simple_paths) identifier_all_simple_paths )attribute (argument_list (identifier_graph) identifier_graph (identifier_source) identifier_source (identifier_target) identifier_target )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_nodes) identifier_nodes (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (identifier_set) identifier_set (identifier_union) identifier_union )attribute (argument_list (list_splat (call (identifier_map) identifier_map (argument_list (identifier_set) identifier_set (identifier_all_simple_paths) identifier_all_simple_paths )argument_list )call )list_splat )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (identifier_nodes) identifier_nodes )return_statement )block )function_definition )module
Find all nodes with on paths between source and target.
(module (function_definition (function_name_UTCFromGps) function_name_UTCFromGps (parameters (identifier_gpsWeek) identifier_gpsWeek (identifier_SOW) identifier_SOW (default_parameter (identifier_leapSecs) identifier_leapSecs (integer_14) integer_14 )default_parameter )parameters (block (expression_statement (assignment (identifier_secFract) identifier_secFract (binary_operator (identifier_SOW) identifier_SOW (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_epochTuple) identifier_epochTuple (binary_operator (identifier_gpsEpoch) identifier_gpsEpoch (tuple (unary_operator (integer_1) integer_1 )unary_operator (unary_operator (integer_1) integer_1 )unary_operator (integer_0) integer_0 )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_t0) identifier_t0 (binary_operator (call (attribute (identifier_time) identifier_time (identifier_mktime) identifier_mktime )attribute (argument_list (identifier_epochTuple) identifier_epochTuple )argument_list )call (attribute (identifier_time) identifier_time (identifier_timezone) identifier_timezone )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_tdiff) identifier_tdiff (binary_operator (binary_operator (parenthesized_expression (binary_operator (identifier_gpsWeek) identifier_gpsWeek (identifier_secsInWeek) identifier_secsInWeek )binary_operator )parenthesized_expression (identifier_SOW) identifier_SOW )binary_operator (identifier_leapSecs) identifier_leapSecs )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_t) identifier_t (binary_operator (identifier_t0) identifier_t0 (identifier_tdiff) identifier_tdiff )binary_operator )assignment )expression_statement (expression_statement (assignment (tuple_pattern (identifier_year) identifier_year (identifier_month) identifier_month (identifier_day) identifier_day (identifier_hh) identifier_hh (identifier_mm) identifier_mm (identifier_ss) identifier_ss (identifier_dayOfWeek) identifier_dayOfWeek (identifier_julianDay) identifier_julianDay (identifier_daylightsaving) identifier_daylightsaving )tuple_pattern (call (attribute (identifier_time) identifier_time (identifier_gmtime) identifier_gmtime )attribute (argument_list (identifier_t) identifier_t )argument_list )call )assignment )expression_statement (return_statement (tuple (identifier_year) identifier_year (identifier_month) identifier_month (identifier_day) identifier_day (identifier_hh) identifier_hh (identifier_mm) identifier_mm (binary_operator (identifier_ss) identifier_ss (identifier_secFract) identifier_secFract )binary_operator )tuple )return_statement )block )function_definition )module
converts gps week and seconds to UTC see comments of inverse function! SOW = seconds of week gpsWeek is the full number (not modulo 1024)
(module (function_definition (function_name_on_widget_created) function_name_on_widget_created (parameters (identifier_self) identifier_self (identifier_ref) identifier_ref )parameters (block (expression_statement (assignment (identifier_d) identifier_d (attribute (identifier_self) identifier_self (identifier_declaration) identifier_declaration )attribute )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_widget) identifier_widget )attribute (call (identifier_Snackbar) identifier_Snackbar (argument_list (keyword_argument (identifier___id__) identifier___id__ (identifier_ref) identifier_ref )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_init_widget) identifier_init_widget )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Using Snackbar.make returns async so we have to initialize it later.
(module (function_definition (function_name_to_array) function_name_to_array (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_array) identifier_array (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_Animation) identifier_Animation (identifier_self) identifier_self )argument_list )call (identifier_to_array) identifier_to_array )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_array) identifier_array (string_'file_id') string_'file_id' )subscript (call (identifier_u) identifier_u (argument_list (attribute (identifier_self) identifier_self (identifier_file_id) identifier_file_id )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_array) identifier_array (string_'width') string_'width' )subscript (call (identifier_int) identifier_int (argument_list (attribute (identifier_self) identifier_self (identifier_width) identifier_width )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_array) identifier_array (string_'height') string_'height' )subscript (call (identifier_int) identifier_int (argument_list (attribute (identifier_self) identifier_self (identifier_height) identifier_height )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_array) identifier_array (string_'duration') string_'duration' )subscript (call (identifier_int) identifier_int (argument_list (attribute (identifier_self) identifier_self (identifier_duration) identifier_duration )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_thumb) identifier_thumb )attribute (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_array) identifier_array (string_'thumb') string_'thumb' )subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_thumb) identifier_thumb )attribute (identifier_to_array) identifier_to_array )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_file_name) identifier_file_name )attribute (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_array) identifier_array (string_'file_name') string_'file_name' )subscript (call (identifier_u) identifier_u (argument_list (attribute (identifier_self) identifier_self (identifier_file_name) identifier_file_name )attribute )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_mime_type) identifier_mime_type )attribute (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_array) identifier_array (string_'mime_type') string_'mime_type' )subscript (call (identifier_u) identifier_u (argument_list (attribute (identifier_self) identifier_self (identifier_mime_type) identifier_mime_type )attribute )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_file_size) identifier_file_size )attribute (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_array) identifier_array (string_'file_size') string_'file_size' )subscript (call (identifier_int) identifier_int (argument_list (attribute (identifier_self) identifier_self (identifier_file_size) identifier_file_size )attribute )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_array) identifier_array )return_statement )block )function_definition )module
Serializes this Animation to a dictionary. :return: dictionary representation of this object. :rtype: dict
(module (function_definition (function_name__execCommand) function_name__execCommand (parameters (identifier_Argv) identifier_Argv (identifier_collect_missing) identifier_collect_missing )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (not_operator (identifier_Argv) identifier_Argv )not_operator (block (raise_statement (call (identifier_HandledException) identifier_HandledException (argument_list (string_'Please specify a command!') string_'Please specify a command!' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_RouteParts) identifier_RouteParts (call (attribute (subscript (identifier_Argv) identifier_Argv (integer_0) integer_0 )subscript (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_Args) identifier_Args (identifier_KwArgs) identifier_KwArgs )pattern_list (call (identifier_getDigestableArgs) identifier_getDigestableArgs (argument_list (subscript (identifier_Argv) identifier_Argv (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ResolvedMember) identifier_ResolvedMember (call (identifier_getDescendant) identifier_getDescendant (argument_list (identifier_BaseGroup) identifier_BaseGroup (subscript (identifier_RouteParts) identifier_RouteParts (slice (colon) colon )slice )subscript )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_ResolvedMember) identifier_ResolvedMember (identifier_Group) identifier_Group )argument_list )call (block (raise_statement (call (identifier_HandledException) identifier_HandledException (argument_list (string_'Please specify a task.') string_'Please specify a task.' (keyword_argument (identifier_Member) identifier_Member (identifier_ResolvedMember) identifier_ResolvedMember )keyword_argument )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_ResolvedMember) identifier_ResolvedMember (identifier_Task) identifier_Task )argument_list )call )not_operator (block (raise_statement (call (identifier_HandledException) identifier_HandledException (argument_list (string_'No such task.') string_'No such task.' (keyword_argument (identifier_Member) identifier_Member (identifier_BaseGroup) identifier_BaseGroup )keyword_argument )argument_list )call )raise_statement )block )if_statement (return_statement (conditional_expression (call (attribute (identifier_ResolvedMember) identifier_ResolvedMember (identifier___collect_n_call__) identifier___collect_n_call__ )attribute (argument_list (list_splat (identifier_Args) identifier_Args )list_splat (dictionary_splat (identifier_KwArgs) identifier_KwArgs )dictionary_splat )argument_list )call (identifier_collect_missing) identifier_collect_missing (call (identifier_ResolvedMember) identifier_ResolvedMember (argument_list (list_splat (identifier_Args) identifier_Args )list_splat (dictionary_splat (identifier_KwArgs) identifier_KwArgs )dictionary_splat )argument_list )call )conditional_expression )return_statement )block )function_definition )module
r"""Worker of execCommand.
(module (function_definition (function_name_delete_api_method_response) function_name_delete_api_method_response (parameters (identifier_restApiId) identifier_restApiId (identifier_resourcePath) identifier_resourcePath (identifier_httpMethod) identifier_httpMethod (identifier_statusCode) identifier_statusCode (default_parameter (identifier_region) identifier_region (None) None )default_parameter (default_parameter (identifier_key) identifier_key (None) None )default_parameter (default_parameter (identifier_keyid) identifier_keyid (None) None )default_parameter (default_parameter (identifier_profile) identifier_profile (None) None )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_resource) identifier_resource (call (attribute (call (identifier_describe_api_resource) identifier_describe_api_resource (argument_list (identifier_restApiId) identifier_restApiId (identifier_resourcePath) identifier_resourcePath (keyword_argument (identifier_region) identifier_region (identifier_region) identifier_region )keyword_argument (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_keyid) identifier_keyid (identifier_keyid) identifier_keyid )keyword_argument (keyword_argument (identifier_profile) identifier_profile (identifier_profile) identifier_profile )keyword_argument )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'resource') string_'resource' )argument_list )call )assignment )expression_statement (if_statement (identifier_resource) identifier_resource (block (expression_statement (assignment (identifier_conn) identifier_conn (call (identifier__get_conn) identifier__get_conn (argument_list (keyword_argument (identifier_region) identifier_region (identifier_region) identifier_region )keyword_argument (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_keyid) identifier_keyid (identifier_keyid) identifier_keyid )keyword_argument (keyword_argument (identifier_profile) identifier_profile (identifier_profile) identifier_profile )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_conn) identifier_conn (identifier_delete_method_response) identifier_delete_method_response )attribute (argument_list (keyword_argument (identifier_restApiId) identifier_restApiId (identifier_restApiId) identifier_restApiId )keyword_argument (keyword_argument (identifier_resourceId) identifier_resourceId (subscript (identifier_resource) identifier_resource (string_'id') string_'id' )subscript )keyword_argument (keyword_argument (identifier_httpMethod) identifier_httpMethod (identifier_httpMethod) identifier_httpMethod )keyword_argument (keyword_argument (identifier_statusCode) identifier_statusCode (call (identifier_str) identifier_str (argument_list (identifier_statusCode) identifier_statusCode )argument_list )call )keyword_argument )argument_list )call )expression_statement (return_statement (dictionary (pair (string_'deleted') string_'deleted' (True) True )pair )dictionary )return_statement )block )if_statement (return_statement (dictionary (pair (string_'deleted') string_'deleted' (False) False )pair (pair (string_'error') string_'error' (string_'no such resource') string_'no such resource' )pair )dictionary )return_statement )block (except_clause (as_pattern (identifier_ClientError) identifier_ClientError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (return_statement (dictionary (pair (string_'deleted') string_'deleted' (False) False )pair (pair (string_'error') string_'error' (call (subscript (identifier___utils__) identifier___utils__ (string_'boto3.get_error') string_'boto3.get_error' )subscript (argument_list (identifier_e) identifier_e )argument_list )call )pair )dictionary )return_statement )block )except_clause )try_statement )block )function_definition )module
Delete API method response for a resource in the given API CLI Example: .. code-block:: bash salt myminion boto_apigateway.delete_api_method_response restApiId resourcePath httpMethod statusCode
(module (function_definition (function_name_apply_effect) function_name_apply_effect (parameters (identifier_layer) identifier_layer (identifier_image) identifier_image )parameters (block (for_statement (identifier_effect) identifier_effect (attribute (identifier_layer) identifier_layer (identifier_effects) identifier_effects )attribute (block (if_statement (comparison_operator (attribute (attribute (identifier_effect) identifier_effect (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute (string_'PatternOverlay') string_'PatternOverlay' )comparison_operator (block (expression_statement (call (identifier_draw_pattern_fill) identifier_draw_pattern_fill (argument_list (identifier_image) identifier_image (attribute (identifier_layer) identifier_layer (identifier__psd) identifier__psd )attribute (attribute (identifier_effect) identifier_effect (identifier_value) identifier_value )attribute )argument_list )call )expression_statement )block )if_statement )block )for_statement (for_statement (identifier_effect) identifier_effect (attribute (identifier_layer) identifier_layer (identifier_effects) identifier_effects )attribute (block (if_statement (comparison_operator (attribute (attribute (identifier_effect) identifier_effect (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute (string_'GradientOverlay') string_'GradientOverlay' )comparison_operator (block (expression_statement (call (identifier_draw_gradient_fill) identifier_draw_gradient_fill (argument_list (identifier_image) identifier_image (attribute (identifier_effect) identifier_effect (identifier_value) identifier_value )attribute )argument_list )call )expression_statement )block )if_statement )block )for_statement (for_statement (identifier_effect) identifier_effect (attribute (identifier_layer) identifier_layer (identifier_effects) identifier_effects )attribute (block (if_statement (comparison_operator (attribute (attribute (identifier_effect) identifier_effect (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute (string_'ColorOverlay') string_'ColorOverlay' )comparison_operator (block (expression_statement (call (identifier_draw_solid_color_fill) identifier_draw_solid_color_fill (argument_list (identifier_image) identifier_image (attribute (identifier_effect) identifier_effect (identifier_value) identifier_value )attribute )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Apply effect to the image. ..note: Correct effect order is the following. All the effects are first applied to the original image then blended together. * dropshadow * outerglow * (original) * patternoverlay * gradientoverlay * coloroverlay * innershadow * innerglow * bevelemboss * satin * stroke
(module (function_definition (function_name_is_model_factory) function_name_is_model_factory (parameters (identifier_node) identifier_node )parameters (block (try_statement (block (expression_statement (assignment (identifier_parent_classes) identifier_parent_classes (call (attribute (attribute (identifier_node) identifier_node (identifier_expr) identifier_expr )attribute (identifier_inferred) identifier_inferred )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (block (return_statement (False) False )return_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_parents) identifier_parents (tuple (string_'factory.declarations.LazyFunction') string_'factory.declarations.LazyFunction' (string_'factory.declarations.SubFactory') string_'factory.declarations.SubFactory' (string_'factory.django.DjangoModelFactory') string_'factory.django.DjangoModelFactory' )tuple )assignment )expression_statement (for_statement (identifier_parent_class) identifier_parent_class (identifier_parent_classes) identifier_parent_classes (block (try_statement (block (if_statement (comparison_operator (call (attribute (identifier_parent_class) identifier_parent_class (identifier_qname) identifier_qname )attribute (argument_list )argument_list )call (identifier_parents) identifier_parents )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (call (identifier_node_is_subclass) identifier_node_is_subclass (argument_list (identifier_parent_class) identifier_parent_class (list_splat (identifier_parents) identifier_parents )list_splat )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (continue_statement )continue_statement )block )except_clause )try_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Checks that node is derivative of DjangoModelFactory or SubFactory class.
(module (function_definition (function_name_load_styles) function_name_load_styles (parameters (identifier_path_or_doc) identifier_path_or_doc )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_path_or_doc) identifier_path_or_doc (identifier_string_types) identifier_string_types )argument_list )call (block (expression_statement (assignment (identifier_doc) identifier_doc (call (identifier_load) identifier_load (argument_list (identifier_path_or_doc) identifier_path_or_doc )argument_list )call )assignment )expression_statement )block (else_clause (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_path_or_doc) identifier_path_or_doc (identifier_ODFDocument) identifier_ODFDocument )argument_list )call (block (expression_statement (assignment (identifier_doc) identifier_doc (attribute (identifier_path_or_doc) identifier_path_or_doc (identifier__doc) identifier__doc )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_doc) identifier_doc (identifier_path_or_doc) identifier_path_or_doc )assignment )expression_statement )block )else_clause )if_statement (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_doc) identifier_doc (identifier_OpenDocument) identifier_OpenDocument )argument_list )call (identifier_doc) identifier_doc )assert_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_styles) identifier_styles (dictionary_comprehension (pair (call (identifier__style_name) identifier__style_name (argument_list (identifier_style) identifier_style )argument_list )call (identifier_style) identifier_style )pair (for_in_clause (identifier_style) identifier_style (attribute (attribute (identifier_doc) identifier_doc (identifier_styles) identifier_styles )attribute (identifier_childNodes) identifier_childNodes )attribute )for_in_clause )dictionary_comprehension )assignment )expression_statement (return_statement (identifier_styles) identifier_styles )return_statement )block )function_definition )module
Return a dictionary of all styles contained in an ODF document.
(module (function_definition (function_name_get_major_minor) function_name_get_major_minor (parameters (identifier_ilo_ver_str) identifier_ilo_ver_str )parameters (block (if_statement (not_operator (identifier_ilo_ver_str) identifier_ilo_ver_str )not_operator (block (return_statement (None) None )return_statement )block )if_statement (try_statement (block (expression_statement (assignment (identifier_pattern) identifier_pattern (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (identifier_ILO_VER_STR_PATTERN) identifier_ILO_VER_STR_PATTERN (identifier_ilo_ver_str) identifier_ilo_ver_str )argument_list )call )assignment )expression_statement (if_statement (identifier_pattern) identifier_pattern (block (expression_statement (assignment (identifier_matched) identifier_matched (call (attribute (identifier_pattern) identifier_pattern (identifier_group) identifier_group )attribute (argument_list (integer_0) integer_0 )argument_list )call )assignment )expression_statement (if_statement (identifier_matched) identifier_matched (block (return_statement (identifier_matched) identifier_matched )return_statement )block )if_statement (return_statement (None) None )return_statement )block )if_statement )block (except_clause (identifier_Exception) identifier_Exception (block (return_statement (None) None )return_statement )block )except_clause )try_statement )block )function_definition )module
Extract the major and minor number from the passed string :param ilo_ver_str: the string that contains the version information :returns: String of the form "<major>.<minor>" or None
(module (function_definition (function_name_runtime_values_changed) function_name_runtime_values_changed (parameters (identifier_self) identifier_self (identifier_model) identifier_model (identifier_prop_name) identifier_prop_name (identifier_info) identifier_info )parameters (block (if_statement (boolean_operator (parenthesized_expression (boolean_operator (comparison_operator (string_"_input_runtime_value") string_"_input_runtime_value" (attribute (identifier_info) identifier_info (identifier_method_name) identifier_method_name )attribute )comparison_operator (comparison_operator (attribute (identifier_info) identifier_info (identifier_method_name) identifier_method_name )attribute (list (string_'use_runtime_value_input_data_ports') string_'use_runtime_value_input_data_ports' (string_'input_data_port_runtime_values') string_'input_data_port_runtime_values' )list )comparison_operator )boolean_operator )parenthesized_expression (line_continuation_\) line_continuation_\ (comparison_operator (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (identifier_model) identifier_model )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__data_ports_changed) identifier__data_ports_changed )attribute (argument_list (identifier_model) identifier_model )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Handle cases for the library runtime values
(module (function_definition (function_name_StatsToCSV) function_name_StatsToCSV (parameters (identifier_campaign) identifier_campaign (default_parameter (identifier_model) identifier_model (string_'nPLD') string_'nPLD' )default_parameter )parameters (block (expression_statement (assignment (identifier_statsfile) identifier_statsfile (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_EVEREST_SRC) identifier_EVEREST_SRC (string_'missions') string_'missions' (string_'k2') string_'k2' (string_'tables') string_'tables' (binary_operator (string_'c%02d_%s.cdpp') string_'c%02d_%s.cdpp' (tuple (identifier_campaign) identifier_campaign (identifier_model) identifier_model )tuple )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_csvfile) identifier_csvfile (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier_EVEREST_SRC) identifier_EVEREST_SRC )argument_list )call (string_'docs') string_'docs' (binary_operator (string_'c%02d.csv') string_'c%02d.csv' (identifier_campaign) identifier_campaign )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_epic) identifier_epic (identifier_kp) identifier_kp (identifier_cdpp6r) identifier_cdpp6r (identifier_cdpp6) identifier_cdpp6 (identifier__) identifier__ (identifier__) identifier__ (identifier__) identifier__ (identifier__) identifier__ (identifier_saturated) identifier_saturated )pattern_list (line_continuation_\) line_continuation_\ (call (attribute (identifier_np) identifier_np (identifier_loadtxt) identifier_loadtxt )attribute (argument_list (identifier_statsfile) identifier_statsfile (keyword_argument (identifier_unpack) identifier_unpack (True) True )keyword_argument (keyword_argument (identifier_skiprows) identifier_skiprows (integer_2) integer_2 )keyword_argument )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_csvfile) identifier_csvfile (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_'c%02d') string_'c%02d' (identifier_campaign) identifier_campaign )binary_operator (keyword_argument (identifier_file) identifier_file (identifier_f) identifier_f )keyword_argument )argument_list )call )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_epic) identifier_epic )argument_list )call )argument_list )call (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_'%09d,%.3f,%.3f,%.3f,%d') string_'%09d,%.3f,%.3f,%.3f,%d' (tuple (subscript (identifier_epic) identifier_epic (identifier_i) identifier_i )subscript (subscript (identifier_kp) identifier_kp (identifier_i) identifier_i )subscript (subscript (identifier_cdpp6r) identifier_cdpp6r (identifier_i) identifier_i )subscript (subscript (identifier_cdpp6) identifier_cdpp6 (identifier_i) identifier_i )subscript (call (identifier_int) identifier_int (argument_list (subscript (identifier_saturated) identifier_saturated (identifier_i) identifier_i )subscript )argument_list )call )tuple )binary_operator (keyword_argument (identifier_file) identifier_file (identifier_f) identifier_f )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )with_statement )block )function_definition )module
Generate the CSV file used in the search database for the documentation.
(module (function_definition (function_name_localize_shapefile) function_name_localize_shapefile (parameters (identifier_shp_href) identifier_shp_href (identifier_dirs) identifier_dirs )parameters (block (expression_statement (assignment (identifier_mapnik_requires_absolute_paths) identifier_mapnik_requires_absolute_paths (parenthesized_expression (comparison_operator (identifier_MAPNIK_VERSION) identifier_MAPNIK_VERSION (integer_601) integer_601 )comparison_operator )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_shp_href) identifier_shp_href (call (identifier_urljoin) identifier_urljoin (argument_list (binary_operator (call (attribute (attribute (identifier_dirs) identifier_dirs (identifier_source) identifier_source )attribute (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_'/') string_'/' )argument_list )call (string_'/') string_'/' )binary_operator (identifier_shp_href) identifier_shp_href )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_scheme) identifier_scheme (identifier_host) identifier_host (identifier_path) identifier_path (identifier_p) identifier_p (identifier_q) identifier_q (identifier_f) identifier_f )pattern_list (call (identifier_urlparse) identifier_urlparse (argument_list (identifier_shp_href) identifier_shp_href )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_scheme) identifier_scheme (tuple (string_'http') string_'http' (string_'https') string_'https' )tuple )comparison_operator (block (expression_statement (call (identifier_msg) identifier_msg (argument_list (binary_operator (string_'%s | %s') string_'%s | %s' (tuple (identifier_shp_href) identifier_shp_href (attribute (identifier_dirs) identifier_dirs (identifier_cache) identifier_cache )attribute )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_scheme) identifier_scheme (identifier_path) identifier_path )pattern_list (expression_list (string_'') string_'' (call (identifier_locally_cache_remote_file) identifier_locally_cache_remote_file (argument_list (identifier_shp_href) identifier_shp_href (attribute (identifier_dirs) identifier_dirs (identifier_cache) identifier_cache )attribute )argument_list )call )expression_list )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_host) identifier_host (None) None )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (identifier_to_posix) identifier_to_posix (argument_list (call (attribute (identifier_systempath) identifier_systempath (identifier_realpath) identifier_realpath )attribute (argument_list (identifier_path) identifier_path )argument_list )call )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_scheme) identifier_scheme (tuple (string_'file') string_'file' (string_'') string_'' )tuple )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (binary_operator (string_"Shapefile needs to be local, not %s") string_"Shapefile needs to be local, not %s" (identifier_shp_href) identifier_shp_href )binary_operator )argument_list )call )raise_statement )block )if_statement (if_statement (identifier_mapnik_requires_absolute_paths) identifier_mapnik_requires_absolute_paths (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (identifier_posixpath) identifier_posixpath (identifier_realpath) identifier_realpath )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_original) identifier_original (identifier_path) identifier_path )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (identifier_dirs) identifier_dirs (identifier_output_path) identifier_output_path )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_path) identifier_path (identifier_endswith) identifier_endswith )attribute (argument_list (string_'.zip') string_'.zip' )argument_list )call (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (identifier_posixpath) identifier_posixpath (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_dirs) identifier_dirs (identifier_output) identifier_output )attribute (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (call (identifier_unzip_shapefile_into) identifier_unzip_shapefile_into (argument_list (identifier_path) identifier_path (attribute (identifier_dirs) identifier_dirs (identifier_cache) identifier_cache )attribute (identifier_host) identifier_host )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_dirs) identifier_dirs (identifier_output_path) identifier_output_path )attribute (argument_list (identifier_path) identifier_path )argument_list )call )return_statement )block )function_definition )module
Given a shapefile href and a set of directories, modify the shapefile name so it's correct with respect to the output and cache directories.
(module (function_definition (function_name_reference) function_name_reference (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_total_enabled) identifier_total_enabled (call (attribute (string_", ") string_", " (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_selected) identifier_selected )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_total_enabled) identifier_total_enabled )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_total_enabled) identifier_total_enabled (parenthesized_expression (call (attribute (concatenated_string (string_"{0}Are you crazy? This is a package ") string_"{0}Are you crazy? This is a package " (string_"manager for packages :p{1}") string_"manager for packages :p{1}" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (subscript (attribute (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (identifier_color) identifier_color )attribute (string_"RED") string_"RED" )subscript (subscript (attribute (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (identifier_color) identifier_color )attribute (string_"ENDC") string_"ENDC" )subscript )argument_list )call )parenthesized_expression )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_msg) identifier_msg )attribute (identifier_template) identifier_template )attribute (argument_list (integer_78) integer_78 )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"| Enabled repositories:") string_"| Enabled repositories:" )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_msg) identifier_msg )attribute (identifier_template) identifier_template )attribute (argument_list (integer_78) integer_78 )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"| {0}") string_"| {0}" (identifier_format) identifier_format )attribute (argument_list (identifier_total_enabled) identifier_total_enabled )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_msg) identifier_msg )attribute (identifier_template) identifier_template )attribute (argument_list (integer_78) integer_78 )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"{0}Total {1}/{2} repositories enabled.{3}\n") string_"{0}Total {1}/{2} repositories enabled.{3}\n" (identifier_format) identifier_format )attribute (argument_list (subscript (attribute (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (identifier_color) identifier_color )attribute (string_"GREY") string_"GREY" )subscript (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_selected) identifier_selected )attribute )argument_list )call (call (identifier_len) identifier_len (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_enabled) identifier_enabled )attribute (attribute (identifier_self) identifier_self (identifier_disabled) identifier_disabled )attribute )binary_operator )argument_list )call (subscript (attribute (attribute (identifier_self) identifier_self (identifier_meta) identifier_meta )attribute (identifier_color) identifier_color )attribute (string_"ENDC") string_"ENDC" )subscript )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Reference enable repositories
(module (function_definition (function_name_avglosses_data_transfer) function_name_avglosses_data_transfer (parameters (identifier_token) identifier_token (identifier_dstore) identifier_dstore )parameters (block (expression_statement (assignment (identifier_oq) identifier_oq (subscript (identifier_dstore) identifier_dstore (string_'oqparam') string_'oqparam' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_N) identifier_N (call (identifier_len) identifier_len (argument_list (subscript (identifier_dstore) identifier_dstore (string_'assetcol') string_'assetcol' )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_R) identifier_R (call (attribute (subscript (identifier_dstore) identifier_dstore (string_'csm_info') string_'csm_info' )subscript (identifier_get_num_rlzs) identifier_get_num_rlzs )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_L) identifier_L (call (identifier_len) identifier_len (argument_list (call (attribute (identifier_dstore) identifier_dstore (identifier_get_attr) identifier_get_attr )attribute (argument_list (string_'risk_model') string_'risk_model' (string_'loss_types') string_'loss_types' )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ct) identifier_ct (attribute (identifier_oq) identifier_oq (identifier_concurrent_tasks) identifier_concurrent_tasks )attribute )assignment )expression_statement (expression_statement (assignment (identifier_size_bytes) identifier_size_bytes (binary_operator (binary_operator (binary_operator (binary_operator (identifier_N) identifier_N (identifier_R) identifier_R )binary_operator (identifier_L) identifier_L )binary_operator (integer_8) integer_8 )binary_operator (identifier_ct) identifier_ct )binary_operator )assignment )expression_statement (return_statement (parenthesized_expression (binary_operator (concatenated_string (string_'%d asset(s) x %d realization(s) x %d loss type(s) losses x ') string_'%d asset(s) x %d realization(s) x %d loss type(s) losses x ' (string_'8 bytes x %d tasks = %s') string_'8 bytes x %d tasks = %s' )concatenated_string (tuple (identifier_N) identifier_N (identifier_R) identifier_R (identifier_L) identifier_L (identifier_ct) identifier_ct (call (identifier_humansize) identifier_humansize (argument_list (identifier_size_bytes) identifier_size_bytes )argument_list )call )tuple )binary_operator )parenthesized_expression )return_statement )block )function_definition )module
Determine the amount of average losses transferred from the workers to the controller node in a risk calculation.
(module (function_definition (function_name_fromStructTime) function_name_fromStructTime (parameters (identifier_klass) identifier_klass (identifier_structTime) identifier_structTime (default_parameter (identifier_tzinfo) identifier_tzinfo (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_dtime) identifier_dtime (call (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (argument_list (keyword_argument (identifier_tzinfo) identifier_tzinfo (identifier_tzinfo) identifier_tzinfo )keyword_argument (list_splat (subscript (identifier_structTime) identifier_structTime (slice (colon) colon (integer_6) integer_6 )slice )subscript )list_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_self) identifier_self (call (attribute (identifier_klass) identifier_klass (identifier_fromDatetime) identifier_fromDatetime )attribute (argument_list (identifier_dtime) identifier_dtime )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_resolution) identifier_resolution )attribute (call (attribute (identifier_datetime) identifier_datetime (identifier_timedelta) identifier_timedelta )attribute (argument_list (keyword_argument (identifier_seconds) identifier_seconds (integer_1) integer_1 )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Return a new Time instance from a time.struct_time. If tzinfo is None, structTime is in UTC. Otherwise, tzinfo is a datetime.tzinfo instance coresponding to the timezone in which structTime is. Many of the functions in the standard time module return these things. This will also work with a plain 9-tuple, for parity with the time module. The last three elements, or tm_wday, tm_yday, and tm_isdst are ignored.
(module (function_definition (function_name_is_tomodir) function_name_is_tomodir (parameters (identifier_subdirectories) identifier_subdirectories )parameters (block (expression_statement (assignment (identifier_required) identifier_required (tuple (string_'exe') string_'exe' (string_'config') string_'config' (string_'rho') string_'rho' (string_'mod') string_'mod' (string_'inv') string_'inv' )tuple )assignment )expression_statement (expression_statement (assignment (identifier_is_tomodir) identifier_is_tomodir (True) True )assignment )expression_statement (for_statement (identifier_subdir) identifier_subdir (identifier_required) identifier_required (block (if_statement (comparison_operator (identifier_subdir) identifier_subdir (identifier_subdirectories) identifier_subdirectories )comparison_operator (block (expression_statement (assignment (identifier_is_tomodir) identifier_is_tomodir (False) False )assignment )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_is_tomodir) identifier_is_tomodir )return_statement )block )function_definition )module
provided with the subdirectories of a given directory, check if this is a tomodir
(module (function_definition (function_name_group_comments_by_round) function_name_group_comments_by_round (parameters (identifier_comments) identifier_comments (default_parameter (identifier_ranking) identifier_ranking (integer_0) integer_0 )default_parameter )parameters (block (expression_statement (assignment (identifier_comment_rounds) identifier_comment_rounds (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_ordered_comment_round_names) identifier_ordered_comment_round_names (list )list )assignment )expression_statement (for_statement (identifier_comment) identifier_comment (identifier_comments) identifier_comments (block (expression_statement (assignment (identifier_comment_round_name) identifier_comment_round_name (boolean_operator (boolean_operator (identifier_ranking) identifier_ranking (subscript (identifier_comment) identifier_comment (integer_11) integer_11 )subscript )boolean_operator (subscript (identifier_comment) identifier_comment (integer_7) integer_7 )subscript )boolean_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_comment_round_name) identifier_comment_round_name (identifier_comment_rounds) identifier_comment_rounds )comparison_operator (block (expression_statement (assignment (subscript (identifier_comment_rounds) identifier_comment_rounds (identifier_comment_round_name) identifier_comment_round_name )subscript (list )list )assignment )expression_statement (expression_statement (call (attribute (identifier_ordered_comment_round_names) identifier_ordered_comment_round_names (identifier_append) identifier_append )attribute (argument_list (identifier_comment_round_name) identifier_comment_round_name )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (subscript (identifier_comment_rounds) identifier_comment_rounds (identifier_comment_round_name) identifier_comment_round_name )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_comment) identifier_comment )argument_list )call )expression_statement )block )for_statement (return_statement (list_comprehension (tuple (identifier_comment_round_name) identifier_comment_round_name (subscript (identifier_comment_rounds) identifier_comment_rounds (identifier_comment_round_name) identifier_comment_round_name )subscript )tuple (for_in_clause (identifier_comment_round_name) identifier_comment_round_name (identifier_ordered_comment_round_names) identifier_ordered_comment_round_names )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Group comments by the round to which they belong
(module (function_definition (function_name_get_cv_accuracy) function_name_get_cv_accuracy (parameters (identifier_res) identifier_res )parameters (block (expression_statement (assignment (identifier_ac_list) identifier_ac_list (list_comprehension (tuple (subscript (identifier_accuracy) identifier_accuracy (string_"train_acc_final") string_"train_acc_final" )subscript (subscript (identifier_accuracy) identifier_accuracy (string_"test_acc_final") string_"test_acc_final" )subscript )tuple (for_in_clause (pattern_list (identifier_accuracy) identifier_accuracy (identifier_weights) identifier_weights )pattern_list (identifier_res) identifier_res )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_ac) identifier_ac (call (attribute (identifier_np) identifier_np (identifier_array) identifier_array )attribute (argument_list (identifier_ac_list) identifier_ac_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_perf) identifier_perf (dictionary (pair (string_"mean_train_acc") string_"mean_train_acc" (call (attribute (identifier_np) identifier_np (identifier_mean) identifier_mean )attribute (argument_list (subscript (identifier_ac) identifier_ac (slice (colon) colon )slice (integer_0) integer_0 )subscript )argument_list )call )pair (pair (string_"std_train_acc") string_"std_train_acc" (call (attribute (identifier_np) identifier_np (identifier_std) identifier_std )attribute (argument_list (subscript (identifier_ac) identifier_ac (slice (colon) colon )slice (integer_0) integer_0 )subscript )argument_list )call )pair (pair (string_"mean_test_acc") string_"mean_test_acc" (call (attribute (identifier_np) identifier_np (identifier_mean) identifier_mean )attribute (argument_list (subscript (identifier_ac) identifier_ac (slice (colon) colon )slice (integer_1) integer_1 )subscript )argument_list )call )pair (pair (string_"std_test_acc") string_"std_test_acc" (call (attribute (identifier_np) identifier_np (identifier_std) identifier_std )attribute (argument_list (subscript (identifier_ac) identifier_ac (slice (colon) colon )slice (integer_1) integer_1 )subscript )argument_list )call )pair )dictionary )assignment )expression_statement (return_statement (identifier_perf) identifier_perf )return_statement )block )function_definition )module
Extract the cv accuracy from the model
(module (function_definition (function_name_from_buffer) function_name_from_buffer (parameters (identifier_buffer) identifier_buffer (default_parameter (identifier_mime) identifier_mime (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_m) identifier_m (call (identifier__get_magic_type) identifier__get_magic_type (argument_list (identifier_mime) identifier_mime )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_m) identifier_m (identifier_from_buffer) identifier_from_buffer )attribute (argument_list (identifier_buffer) identifier_buffer )argument_list )call )return_statement )block )function_definition )module
Accepts a binary string and returns the detected filetype. Return value is the mimetype if mime=True, otherwise a human readable name. >>> magic.from_buffer(open("testdata/test.pdf").read(1024)) 'PDF document, version 1.2'
(module (function_definition (function_name_info) function_name_info (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_descriptions) identifier_descriptions )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_choice_list) identifier_choice_list (list_comprehension (call (attribute (string_'"{}"') string_'"{}"' (identifier_format) identifier_format )attribute (argument_list (identifier_choice) identifier_choice )argument_list )call (for_in_clause (identifier_choice) identifier_choice (attribute (identifier_self) identifier_self (identifier_choices) identifier_choices )attribute )for_in_clause )list_comprehension )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_choice_list) identifier_choice_list (list_comprehension (call (attribute (string_'"{}" ({})') string_'"{}" ({})' (identifier_format) identifier_format )attribute (argument_list (identifier_choice) identifier_choice (subscript (attribute (identifier_self) identifier_self (identifier_descriptions) identifier_descriptions )attribute (identifier_choice) identifier_choice )subscript )argument_list )call (for_in_clause (identifier_choice) identifier_choice (attribute (identifier_self) identifier_self (identifier_choices) identifier_choices )attribute )for_in_clause )list_comprehension )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_choices) identifier_choices )attribute )argument_list )call (integer_2) integer_2 )comparison_operator (block (return_statement (call (attribute (string_'either {} or {}') string_'either {} or {}' (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_choice_list) identifier_choice_list (integer_0) integer_0 )subscript (subscript (identifier_choice_list) identifier_choice_list (integer_1) integer_1 )subscript )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (string_'any of {}') string_'any of {}' (identifier_format) identifier_format )attribute (argument_list (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (identifier_choice_list) identifier_choice_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Formatted string to display the available choices
(module (function_definition (function_name_acknowledge_alarm) function_name_acknowledge_alarm (parameters (identifier_self) identifier_self (identifier_alarm) identifier_alarm (default_parameter (identifier_comment) identifier_comment (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (string_'/processors/{}/{}/parameters{}/alarms/{}') string_'/processors/{}/{}/parameters{}/alarms/{}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__instance) identifier__instance )attribute (attribute (identifier_self) identifier_self (identifier__processor) identifier__processor )attribute (attribute (identifier_alarm) identifier_alarm (identifier_name) identifier_name )attribute (attribute (identifier_alarm) identifier_alarm (identifier_sequence_number) identifier_sequence_number )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_req) identifier_req (call (attribute (identifier_rest_pb2) identifier_rest_pb2 (identifier_EditAlarmRequest) identifier_EditAlarmRequest )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_req) identifier_req (identifier_state) identifier_state )attribute (string_'acknowledged') string_'acknowledged' )assignment )expression_statement (if_statement (comparison_operator (identifier_comment) identifier_comment (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_req) identifier_req (identifier_comment) identifier_comment )attribute (identifier_comment) identifier_comment )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__client) identifier__client )attribute (identifier_put_proto) identifier_put_proto )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_data) identifier_data (call (attribute (identifier_req) identifier_req (identifier_SerializeToString) identifier_SerializeToString )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Acknowledges a specific alarm associated with a parameter. :param alarm: Alarm instance :type alarm: :class:`.Alarm` :param str comment: Optional comment to associate with the state change.
(module (function_definition (function_name_set_ddns_config) function_name_set_ddns_config (parameters (identifier_self) identifier_self (identifier_isenable) identifier_isenable (identifier_hostname) identifier_hostname (identifier_ddnsserver) identifier_ddnsserver (identifier_user) identifier_user (identifier_password) identifier_password (default_parameter (identifier_callback) identifier_callback (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'isEnable') string_'isEnable' (identifier_isenable) identifier_isenable )pair (pair (string_'hostName') string_'hostName' (identifier_hostname) identifier_hostname )pair (pair (string_'ddnsServer') string_'ddnsServer' (identifier_ddnsserver) identifier_ddnsserver )pair (pair (string_'user') string_'user' (identifier_user) identifier_user )pair (pair (string_'password') string_'password' (identifier_password) identifier_password )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_execute_command) identifier_execute_command )attribute (argument_list (string_'setDDNSConfig') string_'setDDNSConfig' (identifier_params) identifier_params (keyword_argument (identifier_callback) identifier_callback (identifier_callback) identifier_callback )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Set DDNS config.
(module (function_definition (function_name_save) function_name_save (parameters (identifier_self) identifier_self )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (attribute (identifier_self) identifier_self (identifier__user_config_file) identifier__user_config_file )attribute (string_'w') string_'w' (keyword_argument (identifier_encoding) identifier_encoding (string_'utf-8') string_'utf-8' )keyword_argument )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (identifier_f) identifier_f )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Write data to user config file.
(module (function_definition (function_name_mark_offer_as_win) function_name_mark_offer_as_win (parameters (identifier_self) identifier_self (identifier_offer_id) identifier_offer_id )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__create_put_request) identifier__create_put_request )attribute (argument_list (keyword_argument (identifier_resource) identifier_resource (identifier_OFFERS) identifier_OFFERS )keyword_argument (keyword_argument (identifier_billomat_id) identifier_billomat_id (identifier_offer_id) identifier_offer_id )keyword_argument (keyword_argument (identifier_command) identifier_command (identifier_WIN) identifier_WIN )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Mark offer as win :param offer_id: the offer id :return Response
(module (function_definition (function_name_stop) function_name_stop (parameters (identifier_self) identifier_self (default_parameter (identifier_timeout) identifier_timeout (integer_15) integer_15 )default_parameter )parameters (block (expression_statement (assignment (identifier_pp) identifier_pp (attribute (identifier_self) identifier_self (identifier_pid) identifier_pid )attribute )assignment )expression_statement (if_statement (identifier_pp) identifier_pp (block (try_statement (block (expression_statement (call (identifier_kill_process_nicely) identifier_kill_process_nicely (argument_list (identifier_pp) identifier_pp (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )expression_statement )block (except_clause (attribute (identifier_psutil) identifier_psutil (identifier_NoSuchProcess) identifier_NoSuchProcess )attribute (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement )block )function_definition )module
Stop the subprocess. Keyword Arguments **timeout** Time in seconds to wait for a process and its children to exit.
(module (function_definition (function_name_output) function_name_output (parameters (identifier_self) identifier_self (identifier_args) identifier_args )parameters (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"SensuPlugin: {}") string_"SensuPlugin: {}" (identifier_format) identifier_format )attribute (argument_list (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (generator_expression (call (identifier_str) identifier_str (argument_list (identifier_a) identifier_a )argument_list )call (for_in_clause (identifier_a) identifier_a (identifier_args) identifier_args )for_in_clause )generator_expression )call )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Print the output message.
(module (function_definition (function_name_create_repository) function_name_create_repository (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_repo) identifier_repo (call (attribute (identifier_repository) identifier_repository (identifier_Repository) identifier_Repository )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_repository_config) identifier_repository_config )attribute (string_'repository') string_'repository' )subscript (attribute (identifier_self) identifier_self (identifier_username) identifier_username )attribute (attribute (identifier_self) identifier_self (identifier_password) identifier_password )attribute (attribute (identifier_self) identifier_self (identifier_disable_progress_bar) identifier_disable_progress_bar )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_repo) identifier_repo (identifier_set_certificate_authority) identifier_set_certificate_authority )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_cacert) identifier_cacert )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_repo) identifier_repo (identifier_set_client_certificate) identifier_set_client_certificate )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_client_cert) identifier_client_cert )attribute )argument_list )call )expression_statement (return_statement (identifier_repo) identifier_repo )return_statement )block )function_definition )module
Create a new repository for uploading.
(module (function_definition (function_name__fetch_xml) function_name__fetch_xml (parameters (identifier_self) identifier_self (identifier_url) identifier_url )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_contextlib) identifier_contextlib (identifier_closing) identifier_closing )attribute (argument_list (call (identifier_urlopen) identifier_urlopen (argument_list (identifier_url) identifier_url )argument_list )call )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (return_statement (call (attribute (call (attribute (attribute (attribute (identifier_xml) identifier_xml (identifier_etree) identifier_etree )attribute (identifier_ElementTree) identifier_ElementTree )attribute (identifier_parse) identifier_parse )attribute (argument_list (identifier_f) identifier_f )argument_list )call (identifier_getroot) identifier_getroot )attribute (argument_list )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Fetch a url and parse the document's XML.
(module (function_definition (function_name__build_function) function_name__build_function (parameters (identifier_self) identifier_self (identifier_function_name) identifier_function_name (identifier_codeuri) identifier_codeuri (identifier_runtime) identifier_runtime )parameters (block (expression_statement (assignment (identifier_code_dir) identifier_code_dir (call (identifier_str) identifier_str (argument_list (call (attribute (call (attribute (identifier_pathlib) identifier_pathlib (identifier_Path) identifier_Path )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__base_dir) identifier__base_dir )attribute (identifier_codeuri) identifier_codeuri )argument_list )call (identifier_resolve) identifier_resolve )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_config) identifier_config (call (identifier_get_workflow_config) identifier_get_workflow_config (argument_list (identifier_runtime) identifier_runtime (identifier_code_dir) identifier_code_dir (attribute (identifier_self) identifier_self (identifier__base_dir) identifier__base_dir )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_artifacts_dir) identifier_artifacts_dir (call (identifier_str) identifier_str (argument_list (call (attribute (identifier_pathlib) identifier_pathlib (identifier_Path) identifier_Path )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__build_dir) identifier__build_dir )attribute (identifier_function_name) identifier_function_name )argument_list )call )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_osutils) identifier_osutils (identifier_mkdir_temp) identifier_mkdir_temp )attribute (argument_list )argument_list )call (as_pattern_target (identifier_scratch_dir) identifier_scratch_dir )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_manifest_path) identifier_manifest_path (boolean_operator (attribute (identifier_self) identifier_self (identifier__manifest_path_override) identifier__manifest_path_override )attribute (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_code_dir) identifier_code_dir (attribute (identifier_config) identifier_config (identifier_manifest_name) identifier_manifest_name )attribute )argument_list )call )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_build_method) identifier_build_method (attribute (identifier_self) identifier_self (identifier__build_function_in_process) identifier__build_function_in_process )attribute )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier__container_manager) identifier__container_manager )attribute (block (expression_statement (assignment (identifier_build_method) identifier_build_method (attribute (identifier_self) identifier_self (identifier__build_function_on_container) identifier__build_function_on_container )attribute )assignment )expression_statement )block )if_statement (return_statement (call (identifier_build_method) identifier_build_method (argument_list (identifier_config) identifier_config (identifier_code_dir) identifier_code_dir (identifier_artifacts_dir) identifier_artifacts_dir (identifier_scratch_dir) identifier_scratch_dir (identifier_manifest_path) identifier_manifest_path (identifier_runtime) identifier_runtime )argument_list )call )return_statement )block )with_statement )block )function_definition )module
Given the function information, this method will build the Lambda function. Depending on the configuration it will either build the function in process or by spinning up a Docker container. Parameters ---------- function_name : str Name or LogicalId of the function codeuri : str Path to where the code lives runtime : str AWS Lambda function runtime Returns ------- str Path to the location where built artifacts are available
(module (function_definition (function_name_uses_na_format) function_name_uses_na_format (parameters (typed_parameter (identifier_station) identifier_station (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_bool) identifier_bool )type (block (if_statement (comparison_operator (subscript (identifier_station) identifier_station (integer_0) integer_0 )subscript (identifier_NA_REGIONS) identifier_NA_REGIONS )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_station) identifier_station (integer_0) integer_0 )subscript (identifier_IN_REGIONS) identifier_IN_REGIONS )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_station) identifier_station (slice (colon) colon (integer_2) integer_2 )slice )subscript (identifier_M_NA_REGIONS) identifier_M_NA_REGIONS )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (comparison_operator (subscript (identifier_station) identifier_station (slice (colon) colon (integer_2) integer_2 )slice )subscript (identifier_M_IN_REGIONS) identifier_M_IN_REGIONS )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (raise_statement (call (identifier_BadStation) identifier_BadStation (argument_list (string_"Station doesn't start with a recognized character set") string_"Station doesn't start with a recognized character set" )argument_list )call )raise_statement )block )function_definition )module
Returns True if the station uses the North American format, False if the International format
(module (function_definition (function_name_schedule) function_name_schedule (parameters (identifier_self) identifier_self )parameters (block (assert_statement (attribute (identifier_self) identifier_self (identifier_collection_is_completed) identifier_collection_is_completed )attribute )assert_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_collection) identifier_collection )attribute (None) None )comparison_operator (block (for_statement (identifier_node) identifier_node (attribute (identifier_self) identifier_self (identifier_nodes) identifier_nodes )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_check_schedule) identifier_check_schedule )attribute (argument_list (identifier_node) identifier_node )argument_list )call )expression_statement )block )for_statement (return_statement )return_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier__check_nodes_have_same_collection) identifier__check_nodes_have_same_collection )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (argument_list (string_"**Different tests collected, aborting run**") string_"**Different tests collected, aborting run**" )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_collection) identifier_collection )attribute (subscript (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_node2collection) identifier_node2collection )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_pending) identifier_pending )attribute (slice (colon) colon )slice )subscript (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_collection) identifier_collection )attribute )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_collection) identifier_collection )attribute )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_initial_batch) identifier_initial_batch (call (identifier_max) identifier_max (argument_list (binary_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_pending) identifier_pending )attribute )argument_list )call (integer_4) integer_4 )binary_operator (binary_operator (integer_2) integer_2 (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_nodes) identifier_nodes )attribute )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_nodes) identifier_nodes (call (identifier_cycle) identifier_cycle (argument_list (attribute (identifier_self) identifier_self (identifier_nodes) identifier_nodes )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_initial_batch) identifier_initial_batch )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__send_tests) identifier__send_tests )attribute (argument_list (call (identifier_next) identifier_next (argument_list (identifier_nodes) identifier_nodes )argument_list )call (integer_1) integer_1 )argument_list )call )expression_statement )block )for_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_pending) identifier_pending )attribute )not_operator (block (for_statement (identifier_node) identifier_node (attribute (identifier_self) identifier_self (identifier_nodes) identifier_nodes )attribute (block (expression_statement (call (attribute (identifier_node) identifier_node (identifier_shutdown) identifier_shutdown )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block )if_statement )block )function_definition )module
Initiate distribution of the test collection Initiate scheduling of the items across the nodes. If this gets called again later it behaves the same as calling ``.check_schedule()`` on all nodes so that newly added nodes will start to be used. This is called by the ``DSession.worker_collectionfinish`` hook if ``.collection_is_completed`` is True.
(module (function_definition (function_name_ekacei) function_name_ekacei (parameters (identifier_handle) identifier_handle (identifier_segno) identifier_segno (identifier_recno) identifier_recno (identifier_column) identifier_column (identifier_nvals) identifier_nvals (identifier_ivals) identifier_ivals (identifier_isnull) identifier_isnull )parameters (block (expression_statement (assignment (identifier_handle) identifier_handle (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list (identifier_handle) identifier_handle )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_segno) identifier_segno (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list (identifier_segno) identifier_segno )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_recno) identifier_recno (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list (identifier_recno) identifier_recno )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_column) identifier_column (call (attribute (identifier_stypes) identifier_stypes (identifier_stringToCharP) identifier_stringToCharP )attribute (argument_list (identifier_column) identifier_column )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_nvals) identifier_nvals (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list (identifier_nvals) identifier_nvals )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ivals) identifier_ivals (call (attribute (identifier_stypes) identifier_stypes (identifier_toIntVector) identifier_toIntVector )attribute (argument_list (identifier_ivals) identifier_ivals )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_isnull) identifier_isnull (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_int) identifier_c_int )attribute (argument_list (identifier_isnull) identifier_isnull )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_libspice) identifier_libspice (identifier_ekacei_c) identifier_ekacei_c )attribute (argument_list (identifier_handle) identifier_handle (identifier_segno) identifier_segno (identifier_recno) identifier_recno (identifier_column) identifier_column (identifier_nvals) identifier_nvals (identifier_ivals) identifier_ivals (identifier_isnull) identifier_isnull )argument_list )call )expression_statement )block )function_definition )module
Add data to an integer column in a specified EK record. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/ekacei_c.html :param handle: EK file handle. :type handle: int :param segno: Index of segment containing record. :type segno: int :param recno: Record to which data is to be added. :type recno: int :param column: Column name. :type column: str :param nvals: Number of values to add to column. :type nvals: int :param ivals: Integer values to add to column. :type ivals: Array of ints :param isnull: Flag indicating whether column entry is null. :type isnull: bool
(module (function_definition (function_name_Mux) function_name_Mux (parameters (identifier_fs) identifier_fs (identifier_sel) identifier_sel (default_parameter (identifier_simplify) identifier_simplify (True) True )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_sel) identifier_sel (identifier_Expression) identifier_Expression )argument_list )call (block (expression_statement (assignment (identifier_sel) identifier_sel (list (identifier_sel) identifier_sel )list )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_sel) identifier_sel )argument_list )call (call (identifier_clog2) identifier_clog2 (argument_list (call (identifier_len) identifier_len (argument_list (identifier_fs) identifier_fs )argument_list )call )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_fstr) identifier_fstr (string_"expected at least {} select bits, got {}") string_"expected at least {} select bits, got {}" )assignment )expression_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (identifier_fstr) identifier_fstr (identifier_format) identifier_format )attribute (argument_list (call (identifier_clog2) identifier_clog2 (argument_list (call (identifier_len) identifier_len (argument_list (identifier_fs) identifier_fs )argument_list )call )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_sel) identifier_sel )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_it) identifier_it (call (attribute (identifier_boolfunc) identifier_boolfunc (identifier_iter_terms) identifier_iter_terms )attribute (argument_list (identifier_sel) identifier_sel )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_y) identifier_y (call (attribute (identifier_exprnode) identifier_exprnode (identifier_or_) identifier_or_ )attribute (argument_list (list_splat (list_comprehension (call (attribute (identifier_exprnode) identifier_exprnode (identifier_and_) identifier_and_ )attribute (argument_list (attribute (identifier_f) identifier_f (identifier_node) identifier_node )attribute (list_splat (list_comprehension (attribute (identifier_lit) identifier_lit (identifier_node) identifier_node )attribute (for_in_clause (identifier_lit) identifier_lit (call (identifier_next) identifier_next (argument_list (identifier_it) identifier_it )argument_list )call )for_in_clause )list_comprehension )list_splat )argument_list )call (for_in_clause (identifier_f) identifier_f (identifier_fs) identifier_fs )for_in_clause )list_comprehension )list_splat )argument_list )call )assignment )expression_statement (if_statement (identifier_simplify) identifier_simplify (block (expression_statement (assignment (identifier_y) identifier_y (call (attribute (identifier_y) identifier_y (identifier_simplify) identifier_simplify )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (identifier__expr) identifier__expr (argument_list (identifier_y) identifier_y )argument_list )call )return_statement )block )function_definition )module
Return an expression that multiplexes a sequence of input functions over a sequence of select functions.
(module (function_definition (function_name_get_object_url) function_name_get_object_url (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_bundle) identifier_bundle )attribute (identifier_get_view_url) identifier_get_view_url )attribute (argument_list (string_'edit') string_'edit' (attribute (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (identifier_user) identifier_user )attribute (dictionary )dictionary (attribute (identifier_self) identifier_self (identifier_kwargs) identifier_kwargs )attribute )argument_list )call )return_statement )block )function_definition )module
Returns the url to link to the object The get_view_url will be called on the current bundle using 'edit` as the view name.
(module (function_definition (function_name_remove) function_name_remove (parameters (identifier_cls) identifier_cls (identifier_target) identifier_target (default_parameter (identifier_exclude) identifier_exclude (None) None )default_parameter (default_parameter (identifier_ctx) identifier_ctx (None) None )default_parameter (default_parameter (identifier_select) identifier_select (lambda (lambda_parameters (list_splat_pattern (identifier_p) identifier_p )list_splat_pattern )lambda_parameters (True) True )lambda )default_parameter )parameters (block (expression_statement (assignment (identifier_exclude) identifier_exclude (conditional_expression (tuple )tuple (comparison_operator (identifier_exclude) identifier_exclude (None) None )comparison_operator (identifier_exclude) identifier_exclude )conditional_expression )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_local_annotations) identifier_local_annotations (call (identifier_get_local_property) identifier_get_local_property (argument_list (identifier_target) identifier_target (attribute (identifier_Annotation) identifier_Annotation (identifier___ANNOTATIONS_KEY__) identifier___ANNOTATIONS_KEY__ )attribute )argument_list )call )assignment )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (string_'target {0} must be hashable') string_'target {0} must be hashable' (identifier_format) identifier_format )attribute (argument_list (identifier_target) identifier_target )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_local_annotations) identifier_local_annotations (None) None )comparison_operator (block (expression_statement (assignment (identifier_annotations_to_remove) identifier_annotations_to_remove (list_comprehension (identifier_annotation) identifier_annotation (for_in_clause (identifier_annotation) identifier_annotation (identifier_local_annotations) identifier_local_annotations )for_in_clause (if_clause (parenthesized_expression (boolean_operator (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_annotation) identifier_annotation (identifier_cls) identifier_cls )argument_list )call (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_annotation) identifier_annotation (identifier_exclude) identifier_exclude )argument_list )call )not_operator )boolean_operator (call (identifier_select) identifier_select (argument_list (identifier_target) identifier_target (identifier_ctx) identifier_ctx (identifier_annotation) identifier_annotation )argument_list )call )boolean_operator )parenthesized_expression )if_clause )list_comprehension )assignment )expression_statement (for_statement (identifier_annotation_to_remove) identifier_annotation_to_remove (identifier_annotations_to_remove) identifier_annotations_to_remove (block (expression_statement (call (attribute (identifier_annotation_to_remove) identifier_annotation_to_remove (identifier_remove_from) identifier_remove_from )attribute (argument_list (identifier_target) identifier_target )argument_list )call )expression_statement )block )for_statement )block )if_statement )block )function_definition )module
Remove from target annotations which inherit from cls. :param target: target from where remove annotations which inherits from cls. :param tuple/type exclude: annotation types to exclude from selection. :param ctx: target ctx. :param select: annotation selection function which takes in parameters a target, a ctx and an annotation and return True if the annotation has to be removed.
(module (function_definition (function_name_softmax) function_name_softmax (parameters (identifier_input_) identifier_input_ (default_parameter (identifier_labels) identifier_labels (None) None )default_parameter (default_parameter (identifier_name) identifier_name (identifier_PROVIDED) identifier_PROVIDED )default_parameter (default_parameter (identifier_loss_weight) identifier_loss_weight (None) None )default_parameter (default_parameter (identifier_per_example_weights) identifier_per_example_weights (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_labels) identifier_labels (None) None )comparison_operator (block (expression_statement (assignment (identifier_full) identifier_full (call (attribute (identifier_input_) identifier_input_ (identifier_as_layer) identifier_as_layer )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (identifier_SoftmaxResult) identifier_SoftmaxResult (argument_list (call (attribute (identifier_input_) identifier_input_ (identifier_softmax_activation) identifier_softmax_activation )attribute (argument_list )argument_list )call (call (attribute (identifier_full) identifier_full (identifier_cross_entropy) identifier_cross_entropy )attribute (argument_list (identifier_labels) identifier_labels (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_loss_weight) identifier_loss_weight (identifier_loss_weight) identifier_loss_weight )keyword_argument (keyword_argument (identifier_per_example_weights) identifier_per_example_weights (identifier_per_example_weights) identifier_per_example_weights )keyword_argument )argument_list )call )argument_list )call )return_statement )block (else_clause (block (return_statement (call (identifier_SoftmaxResult) identifier_SoftmaxResult (argument_list (call (attribute (identifier_input_) identifier_input_ (identifier_softmax_activation) identifier_softmax_activation )attribute (argument_list )argument_list )call (None) None )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Applies softmax and if labels is not None, then it also adds a loss. Args: input_: A rank 2 Tensor or a Pretty Tensor holding the logits. labels: The target labels to learn as a float tensor. Use None to not include a training loss. name: The optional name. loss_weight: A scalar multiplier for the loss. per_example_weights: A Tensor with a weight per example. Returns: A tuple of the a handle to softmax and a handle to the loss tensor. Raises: ValueError: If the datatype is wrong.
(module (function_definition (function_name_listAttachments) function_name_listAttachments (parameters (identifier_self) identifier_self (identifier_oid) identifier_oid )parameters (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier__url) identifier__url )attribute (binary_operator (string_"/%s/attachments") string_"/%s/attachments" (identifier_oid) identifier_oid )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_"f") string_"f" (string_"json") string_"json" )pair )dictionary )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (identifier_url) identifier_url (identifier_params) identifier_params (keyword_argument (identifier_securityHandler) identifier_securityHandler (attribute (identifier_self) identifier_self (identifier__securityHandler) identifier__securityHandler )attribute )keyword_argument (keyword_argument (identifier_proxy_port) identifier_proxy_port (attribute (identifier_self) identifier_self (identifier__proxy_port) identifier__proxy_port )attribute )keyword_argument (keyword_argument (identifier_proxy_url) identifier_proxy_url (attribute (identifier_self) identifier_self (identifier__proxy_url) identifier__proxy_url )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
list attachements for a given OBJECT ID
(module (function_definition (function_name_distance_correlation_af_inv_sqr) function_name_distance_correlation_af_inv_sqr (parameters (identifier_x) identifier_x (identifier_y) identifier_y )parameters (block (expression_statement (assignment (identifier_x) identifier_x (call (identifier__af_inv_scaled) identifier__af_inv_scaled (argument_list (identifier_x) identifier_x )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_y) identifier_y (call (identifier__af_inv_scaled) identifier__af_inv_scaled (argument_list (identifier_y) identifier_y )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_correlation) identifier_correlation (call (identifier_distance_correlation_sqr) identifier_distance_correlation_sqr (argument_list (identifier_x) identifier_x (identifier_y) identifier_y )argument_list )call )assignment )expression_statement (return_statement (conditional_expression (integer_0) integer_0 (call (attribute (identifier_np) identifier_np (identifier_isnan) identifier_isnan )attribute (argument_list (identifier_correlation) identifier_correlation )argument_list )call (identifier_correlation) identifier_correlation )conditional_expression )return_statement )block )function_definition )module
Square of the affinely invariant distance correlation. Computes the estimator for the square of the affinely invariant distance correlation between two random vectors. .. warning:: The return value of this function is undefined when the covariance matrix of :math:`x` or :math:`y` is singular. Parameters ---------- x: array_like First random vector. The columns correspond with the individual random variables while the rows are individual instances of the random vector. y: array_like Second random vector. The columns correspond with the individual random variables while the rows are individual instances of the random vector. Returns ------- numpy scalar Value of the estimator of the squared affinely invariant distance correlation. See Also -------- distance_correlation u_distance_correlation Examples -------- >>> import numpy as np >>> import dcor >>> a = np.array([[1, 3, 2, 5], ... [5, 7, 6, 8], ... [9, 10, 11, 12], ... [13, 15, 15, 16]]) >>> b = np.array([[1], [0], [0], [1]]) >>> dcor.distance_correlation_af_inv_sqr(a, a) 1.0 >>> dcor.distance_correlation_af_inv_sqr(a, b) # doctest: +ELLIPSIS 0.5773502... >>> dcor.distance_correlation_af_inv_sqr(b, b) 1.0
(module (function_definition (function_name_repo_tools) function_name_repo_tools (parameters (identifier_self) identifier_self (identifier_branch) identifier_branch )parameters (block (expression_statement (assignment (identifier_tools) identifier_tools (list )list )assignment )expression_statement (expression_statement (assignment (identifier_m_helper) identifier_m_helper (call (identifier_Tools) identifier_Tools (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_repo) identifier_repo (subscript (attribute (attribute (identifier_self) identifier_self (identifier_parentApp) identifier_parentApp )attribute (identifier_repo_value) identifier_repo_value )attribute (string_'repo') string_'repo' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_version) identifier_version (subscript (subscript (attribute (attribute (identifier_self) identifier_self (identifier_parentApp) identifier_parentApp )attribute (identifier_repo_value) identifier_repo_value )attribute (string_'versions') string_'versions' )subscript (identifier_branch) identifier_branch )subscript )assignment )expression_statement (expression_statement (assignment (identifier_status) identifier_status (call (attribute (identifier_m_helper) identifier_m_helper (identifier_repo_tools) identifier_repo_tools )attribute (argument_list (identifier_repo) identifier_repo (identifier_branch) identifier_branch (identifier_version) identifier_version )argument_list )call )assignment )expression_statement (if_statement (subscript (identifier_status) identifier_status (integer_0) integer_0 )subscript (block (expression_statement (assignment (identifier_r_tools) identifier_r_tools (subscript (identifier_status) identifier_status (integer_1) integer_1 )subscript )assignment )expression_statement (for_statement (identifier_tool) identifier_tool (identifier_r_tools) identifier_r_tools (block (expression_statement (call (attribute (identifier_tools) identifier_tools (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_tool) identifier_tool (integer_0) integer_0 )subscript )argument_list )call )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_tools) identifier_tools )return_statement )block )function_definition )module
Set the appropriate repo dir and get the tools available of it
(module (function_definition (function_name_set_context) function_name_set_context (parameters (identifier_pid_file) identifier_pid_file (identifier_context_info) identifier_context_info )parameters (block (assert_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_context_info) identifier_context_info )argument_list )call (identifier_dict) identifier_dict )comparison_operator )assert_statement (expression_statement (assignment (identifier_port_file) identifier_port_file (call (identifier_get_context_file_name) identifier_get_context_file_name (argument_list (identifier_pid_file) identifier_pid_file )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_port_file) identifier_port_file (string_"wt") string_"wt" )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_context_info) identifier_context_info )argument_list )call )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Set context of running notebook. :param context_info: dict of extra context parameters, see comm.py comments
(module (function_definition (function_name_message) function_name_message (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_info) identifier_info )attribute (argument_list (call (attribute (string_'Driver sends framework message {}') string_'Driver sends framework message {}' (identifier_format) identifier_format )attribute (argument_list (identifier_data) identifier_data )argument_list )call )argument_list )call )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_driver) identifier_driver )attribute (identifier_sendFrameworkMessage) identifier_sendFrameworkMessage )attribute (argument_list (identifier_data) identifier_data )argument_list )call )return_statement )block )function_definition )module
Sends a message to the framework scheduler. These messages are best effort; do not expect a framework message to be retransmitted in any reliable fashion.
(module (function_definition (function_name_get_token_from_header) function_name_get_token_from_header (parameters (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_token) identifier_token (None) None )assignment )expression_statement (if_statement (comparison_operator (string_'Authorization') string_'Authorization' (attribute (identifier_request) identifier_request (identifier_headers) identifier_headers )attribute )comparison_operator (block (expression_statement (assignment (identifier_split_header) identifier_split_header (call (attribute (call (attribute (attribute (identifier_request) identifier_request (identifier_headers) identifier_headers )attribute (identifier_get) identifier_get )attribute (argument_list (string_'Authorization') string_'Authorization' )argument_list )call (identifier_split) identifier_split )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_split_header) identifier_split_header )argument_list )call (integer_2) integer_2 )comparison_operator (comparison_operator (subscript (identifier_split_header) identifier_split_header (integer_0) integer_0 )subscript (string_'Bearer') string_'Bearer' )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_token) identifier_token (subscript (identifier_split_header) identifier_split_header (integer_1) integer_1 )subscript )assignment )expression_statement )block )if_statement )block (else_clause (block (expression_statement (assignment (identifier_token) identifier_token (attribute (identifier_request) identifier_request (identifier_access_token) identifier_access_token )attribute )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_token) identifier_token )return_statement )block )function_definition )module
Helper function to extract a token from the request header. :param request: OAuthlib request. :type request: oauthlib.common.Request :return: Return the token or None if the Authorization header is malformed.
(module (function_definition (function_name_templatesCollector) function_name_templatesCollector (parameters (identifier_text) identifier_text (identifier_open) identifier_open (identifier_close) identifier_close )parameters (block (expression_statement (assignment (identifier_others) identifier_others (list )list )assignment )expression_statement (expression_statement (assignment (identifier_spans) identifier_spans (list_comprehension (identifier_i) identifier_i (for_in_clause (identifier_i) identifier_i (call (identifier_findBalanced) identifier_findBalanced (argument_list (identifier_text) identifier_text (identifier_open) identifier_open (identifier_close) identifier_close )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_spanscopy) identifier_spanscopy (call (identifier_copy) identifier_copy (argument_list (identifier_spans) identifier_spans )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_spans) identifier_spans )argument_list )call )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_start) identifier_start (identifier_end) identifier_end )pattern_list (subscript (identifier_spans) identifier_spans (identifier_i) identifier_i )subscript )assignment )expression_statement (expression_statement (assignment (identifier_o) identifier_o (subscript (identifier_text) identifier_text (slice (identifier_start) identifier_start (colon) colon (identifier_end) identifier_end )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_ol) identifier_ol (call (attribute (identifier_o) identifier_o (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (string_'vaata|') string_'vaata|' (identifier_ol) identifier_ol )comparison_operator (comparison_operator (string_'wikitable') string_'wikitable' (identifier_ol) identifier_ol )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_spanscopy) identifier_spanscopy (identifier_remove) identifier_remove )attribute (argument_list (subscript (identifier_spans) identifier_spans (identifier_i) identifier_i )subscript )argument_list )call )expression_statement (continue_statement )continue_statement )block )if_statement (expression_statement (call (attribute (identifier_others) identifier_others (identifier_append) identifier_append )attribute (argument_list (identifier_o) identifier_o )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_text) identifier_text (call (identifier_dropSpans) identifier_dropSpans (argument_list (identifier_spanscopy) identifier_spanscopy (identifier_text) identifier_text )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_text) identifier_text (identifier_others) identifier_others )expression_list )return_statement )block )function_definition )module
leaves related articles and wikitables in place
(module (function_definition (function_name_hazard_notes) function_name_hazard_notes (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_notes) identifier_notes (list )list )assignment )expression_statement (expression_statement (assignment (identifier_hazard) identifier_hazard (call (identifier_definition) identifier_definition (argument_list (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_hazard) identifier_hazard )attribute (identifier_keywords) identifier_keywords )attribute (identifier_get) identifier_get )attribute (argument_list (string_'hazard') string_'hazard' )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'notes') string_'notes' (identifier_hazard) identifier_hazard )comparison_operator (block (expression_statement (augmented_assignment (identifier_notes) identifier_notes (subscript (identifier_hazard) identifier_hazard (string_'notes') string_'notes' )subscript )augmented_assignment )expression_statement )block )if_statement (if_statement (comparison_operator (subscript (attribute (attribute (identifier_self) identifier_self (identifier_hazard) identifier_hazard )attribute (identifier_keywords) identifier_keywords )attribute (string_'layer_mode') string_'layer_mode' )subscript (string_'classified') string_'classified' )comparison_operator (block (if_statement (comparison_operator (string_'classified_notes') string_'classified_notes' (identifier_hazard) identifier_hazard )comparison_operator (block (expression_statement (augmented_assignment (identifier_notes) identifier_notes (subscript (identifier_hazard) identifier_hazard (string_'classified_notes') string_'classified_notes' )subscript )augmented_assignment )expression_statement )block )if_statement )block )if_statement (if_statement (comparison_operator (subscript (attribute (attribute (identifier_self) identifier_self (identifier_hazard) identifier_hazard )attribute (identifier_keywords) identifier_keywords )attribute (string_'layer_mode') string_'layer_mode' )subscript (string_'continuous') string_'continuous' )comparison_operator (block (if_statement (comparison_operator (string_'continuous_notes') string_'continuous_notes' (identifier_hazard) identifier_hazard )comparison_operator (block (expression_statement (augmented_assignment (identifier_notes) identifier_notes (subscript (identifier_hazard) identifier_hazard (string_'continuous_notes') string_'continuous_notes' )subscript )augmented_assignment )expression_statement )block )if_statement )block )if_statement (if_statement (comparison_operator (subscript (attribute (attribute (identifier_self) identifier_self (identifier_hazard) identifier_hazard )attribute (identifier_keywords) identifier_keywords )attribute (string_'hazard_category') string_'hazard_category' )subscript (string_'single_event') string_'single_event' )comparison_operator (block (if_statement (comparison_operator (string_'single_event_notes') string_'single_event_notes' (identifier_hazard) identifier_hazard )comparison_operator (block (expression_statement (augmented_assignment (identifier_notes) identifier_notes (subscript (identifier_hazard) identifier_hazard (string_'single_event_notes') string_'single_event_notes' )subscript )augmented_assignment )expression_statement )block )if_statement )block )if_statement (if_statement (comparison_operator (subscript (attribute (attribute (identifier_self) identifier_self (identifier_hazard) identifier_hazard )attribute (identifier_keywords) identifier_keywords )attribute (string_'hazard_category') string_'hazard_category' )subscript (string_'multiple_event') string_'multiple_event' )comparison_operator (block (if_statement (comparison_operator (string_'multi_event_notes') string_'multi_event_notes' (identifier_hazard) identifier_hazard )comparison_operator (block (expression_statement (augmented_assignment (identifier_notes) identifier_notes (subscript (identifier_hazard) identifier_hazard (string_'multi_event_notes') string_'multi_event_notes' )subscript )augmented_assignment )expression_statement )block )if_statement )block )if_statement (return_statement (identifier_notes) identifier_notes )return_statement )block )function_definition )module
Get the hazard specific notes defined in definitions. This method will do a lookup in definitions and return the hazard definition specific notes dictionary. This is a helper function to make it easy to get hazard specific notes from the definitions metadata. .. versionadded:: 3.5 :returns: A list like e.g. safe.definitions.hazard_land_cover[ 'notes'] :rtype: list, None
(module (function_definition (function_name_get_service_name) function_name_get_service_name (parameters (identifier_wrapped) identifier_wrapped (identifier_instance) identifier_instance (identifier_args) identifier_args (identifier_kwargs) identifier_kwargs )parameters (block (if_statement (comparison_operator (string_'serviceAbbreviation') string_'serviceAbbreviation' (attribute (attribute (identifier_instance) identifier_instance (identifier__service_model) identifier__service_model )attribute (identifier_metadata) identifier_metadata )attribute )comparison_operator (block (return_statement (subscript (attribute (attribute (identifier_instance) identifier_instance (identifier__service_model) identifier__service_model )attribute (identifier_metadata) identifier_metadata )attribute (string_'endpointPrefix') string_'endpointPrefix' )subscript )return_statement )block )if_statement (return_statement (subscript (attribute (attribute (identifier_instance) identifier_instance (identifier__service_model) identifier__service_model )attribute (identifier_metadata) identifier_metadata )attribute (string_'serviceAbbreviation') string_'serviceAbbreviation' )subscript )return_statement )block )function_definition )module
Return the AWS service name the client is communicating with.
(module (function_definition (function_name__write_related_m2m_relations) function_name__write_related_m2m_relations (parameters (identifier_self) identifier_self (identifier_obj) identifier_obj (identifier_many_to_many_relationships) identifier_many_to_many_relationships )parameters (block (for_statement (pattern_list (identifier_fieldname) identifier_fieldname (identifier_related_objs) identifier_related_objs )pattern_list (call (attribute (identifier_many_to_many_relationships) identifier_many_to_many_relationships (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_obj) identifier_obj (identifier_fieldname) identifier_fieldname (identifier_related_objs) identifier_related_objs )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
For the given `many_to_many_relationships` dict mapping field names to a list of object instances, apply the instance listing to the `obj`s named many-to-many relationship field.
(module (function_definition (function_name__rewrite_col) function_name__rewrite_col (parameters (identifier_self) identifier_self (identifier_col) identifier_col )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_col) identifier_col (identifier_Col) identifier_Col )argument_list )call (block (expression_statement (assignment (identifier_new_name) identifier_new_name (call (identifier_rewrite_lookup_key) identifier_rewrite_lookup_key (argument_list (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (attribute (attribute (identifier_col) identifier_col (identifier_target) identifier_target )attribute (identifier_name) identifier_name )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (attribute (identifier_col) identifier_col (identifier_target) identifier_target )attribute (identifier_name) identifier_name )attribute (identifier_new_name) identifier_new_name )comparison_operator (block (expression_statement (assignment (identifier_new_field) identifier_new_field (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (identifier__meta) identifier__meta )attribute (identifier_get_field) identifier_get_field )attribute (argument_list (identifier_new_name) identifier_new_name )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_col) identifier_col (identifier_target) identifier_target )attribute (attribute (identifier_col) identifier_col (identifier_source) identifier_source )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_col) identifier_col (identifier_source) identifier_source )attribute (identifier_new_field) identifier_new_field )assignment )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_col) identifier_col (identifier_target) identifier_target )attribute (identifier_new_field) identifier_new_field )assignment )expression_statement )block )if_statement )block (elif_clause (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_col) identifier_col (string_'col') string_'col' )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__rewrite_col) identifier__rewrite_col )attribute (argument_list (attribute (identifier_col) identifier_col (identifier_col) identifier_col )attribute )argument_list )call )expression_statement )block )elif_clause (elif_clause (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_col) identifier_col (string_'lhs') string_'lhs' )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__rewrite_col) identifier__rewrite_col )attribute (argument_list (attribute (identifier_col) identifier_col (identifier_lhs) identifier_lhs )attribute )argument_list )call )expression_statement )block )elif_clause )if_statement )block )function_definition )module
Django >= 1.7 column name rewriting
(module (function_definition (function_name_phi_components_normalized) function_name_phi_components_normalized (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_phi_components_normalized) identifier_phi_components_normalized (dictionary_comprehension (pair (identifier_i) identifier_i (binary_operator (subscript (attribute (identifier_self) identifier_self (identifier_phi_components) identifier_phi_components )attribute (identifier_i) identifier_i )subscript (attribute (identifier_self) identifier_self (identifier_phi) identifier_phi )attribute )binary_operator )pair (for_in_clause (identifier_i) identifier_i (attribute (identifier_self) identifier_self (identifier_phi_components) identifier_phi_components )attribute )for_in_clause )dictionary_comprehension )assignment )expression_statement (return_statement (identifier_phi_components_normalized) identifier_phi_components_normalized )return_statement )block )function_definition )module
get the individual components of the total objective function normalized to the total PHI being 1.0 Returns ------- dict : dict dictionary of observation group, normalized contribution to total phi Raises ------ Assertion error if self.observation_data groups don't match self.res groups
(module (function_definition (function_name_renumber) function_name_renumber (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_num) identifier_num (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_cell) identifier_cell (attribute (identifier_self) identifier_self (identifier_cells) identifier_cells )attribute (block (expression_statement (assignment (identifier_cell_split) identifier_cell_split (call (attribute (identifier_cell) identifier_cell (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_cell_split) identifier_cell_split )argument_list )call (integer_2) integer_2 )comparison_operator (block (expression_statement (augmented_assignment (identifier_num) identifier_num (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (assignment (subscript (identifier_cell_split) identifier_cell_split (integer_0) integer_0 )subscript (call (identifier_str) identifier_str (argument_list (identifier_num) identifier_num )argument_list )call )assignment )expression_statement (expression_statement (yield (call (attribute (string_'\n') string_'\n' (identifier_join) identifier_join )attribute (argument_list (identifier_cell_split) identifier_cell_split )argument_list )call )yield )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Re-number cells.
(module (function_definition (function_name__rest_patch) function_name__rest_patch (parameters (identifier_self) identifier_self (identifier_suburi) identifier_suburi (identifier_request_headers) identifier_request_headers (identifier_request_body) identifier_request_body )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__rest_op) identifier__rest_op )attribute (argument_list (string_'PATCH') string_'PATCH' (identifier_suburi) identifier_suburi (identifier_request_headers) identifier_request_headers (identifier_request_body) identifier_request_body )argument_list )call )return_statement )block )function_definition )module
REST PATCH operation. HTTP response codes could be 500, 404, 202 etc.
(module (function_definition (function_name_get_sdb_secret_version_paths) function_name_get_sdb_secret_version_paths (parameters (identifier_self) identifier_self (identifier_sdb_id) identifier_sdb_id )parameters (block (expression_statement (assignment (identifier_sdb_resp) identifier_sdb_resp (call (identifier_get_with_retry) identifier_get_with_retry (argument_list (call (attribute (identifier_str) identifier_str (identifier_join) identifier_join )attribute (argument_list (string_'') string_'' (list (attribute (identifier_self) identifier_self (identifier_cerberus_url) identifier_cerberus_url )attribute (string_'/v1/sdb-secret-version-paths/') string_'/v1/sdb-secret-version-paths/' (identifier_sdb_id) identifier_sdb_id )list )argument_list )call (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_sdb_resp) identifier_sdb_resp )argument_list )call )expression_statement (return_statement (call (attribute (identifier_sdb_resp) identifier_sdb_resp (identifier_json) identifier_json )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Get SDB secret version paths. This function takes the sdb_id