sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_detectTierTablet) function_name_detectTierTablet (parameters (identifier_self) identifier_self )parameters (block (return_statement (boolean_operator (boolean_operator (boolean_operator (boolean_operator (boolean_operator (call (attribute (identifier_self) identifier_self (identifier_detectIpad) identifier_detectIpad )attribute (argument_list )argument_list )call (line_continuation_\) line_continuation_\ (call (attribute (identifier_self) identifier_self (identifier_detectAndroidTablet) identifier_detectAndroidTablet )attribute (argument_list )argument_list )call )boolean_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_self) identifier_self (identifier_detectBlackBerryTablet) identifier_detectBlackBerryTablet )attribute (argument_list )argument_list )call )boolean_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_self) identifier_self (identifier_detectFirefoxOSTablet) identifier_detectFirefoxOSTablet )attribute (argument_list )argument_list )call )boolean_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_self) identifier_self (identifier_detectUbuntuTablet) identifier_detectUbuntuTablet )attribute (argument_list )argument_list )call )boolean_operator (line_continuation_\) line_continuation_\ (call (attribute (identifier_self) identifier_self (identifier_detectWebOSTablet) identifier_detectWebOSTablet )attribute (argument_list )argument_list )call )boolean_operator )return_statement )block )function_definition )module
Return detection of any device in the Tablet Tier The quick way to detect for a tier of devices. This method detects for the new generation of HTML 5 capable, larger screen tablets. Includes iPad, Android (e.g., Xoom), BB Playbook, WebOS, etc.
(module (function_definition (function_name___get_line_profile_data) function_name___get_line_profile_data (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_line_profiler) identifier_line_profiler )attribute (None) None )comparison_operator (block (return_statement (dictionary )dictionary )return_statement )block )if_statement (return_statement (attribute (subscript (subscript (attribute (attribute (identifier_self) identifier_self (identifier_line_profiler) identifier_line_profiler )attribute (identifier_file_dict) identifier_file_dict )attribute (attribute (attribute (identifier_self) identifier_self (identifier_pyfile) identifier_pyfile )attribute (identifier_path) identifier_path )attribute )subscript (integer_0) integer_0 )subscript (identifier_line_dict) identifier_line_dict )attribute )return_statement )block )function_definition )module
Method to procure line profiles. @return: Line profiles if the file has been profiles else empty dictionary.
(module (function_definition (function_name__check_graph) function_name__check_graph (parameters (identifier_self) identifier_self (identifier_graph) identifier_graph )parameters (block (if_statement (comparison_operator (attribute (identifier_graph) identifier_graph (identifier_num_vertices) identifier_num_vertices )attribute (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute )comparison_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (concatenated_string (string_"The number of vertices in the graph does not ") string_"The number of vertices in the graph does not " (string_"match the length of the atomic numbers array.") string_"match the length of the atomic numbers array." )concatenated_string )argument_list )call )raise_statement )block )if_statement (if_statement (call (attribute (parenthesized_expression (comparison_operator (attribute (identifier_self) identifier_self (identifier_numbers) identifier_numbers )attribute (attribute (identifier_graph) identifier_graph (identifier_numbers) identifier_numbers )attribute )comparison_operator )parenthesized_expression (identifier_any) identifier_any )attribute (argument_list )argument_list )call (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (concatenated_string (string_"The atomic numbers in the graph do not match the ") string_"The atomic numbers in the graph do not match the " (string_"atomic numbers in the molecule.") string_"atomic numbers in the molecule." )concatenated_string )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
the atomic numbers must match
(module (function_definition (function_name_right) function_name_right (parameters (identifier_self) identifier_self )parameters (block (return_statement (conditional_expression (subscript (attribute (attribute (identifier_self) identifier_self (identifier_source) identifier_source )attribute (identifier_directory) identifier_directory )attribute (attribute (identifier_self) identifier_self (identifier_right_sibling_id) identifier_right_sibling_id )attribute )subscript (line_continuation_\) line_continuation_\ (comparison_operator (attribute (identifier_self) identifier_self (identifier_right_sibling_id) identifier_right_sibling_id )attribute (identifier_NOSTREAM) identifier_NOSTREAM )comparison_operator (None) None )conditional_expression )return_statement )block )function_definition )module
Entry is right sibling of current directory entry
(module (function_definition (function_name_mkdir) function_name_mkdir (parameters (identifier_self) identifier_self (identifier_path) identifier_path )parameters (block (if_statement (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_path) identifier_path )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_path) identifier_path )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
create a directory if it does not exist.
(module (function_definition (function_name_read_config) function_name_read_config (parameters (identifier_self) identifier_self (identifier_correlation_id) identifier_correlation_id (identifier_parameters) identifier_parameters )parameters (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_self) identifier_self (identifier__read_object) identifier__read_object )attribute (argument_list (identifier_correlation_id) identifier_correlation_id (identifier_parameters) identifier_parameters )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_ConfigParams) identifier_ConfigParams (identifier_from_value) identifier_from_value )attribute (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block )function_definition )module
Reads configuration and parameterize it with given values. :param correlation_id: (optional) transaction id to trace execution through call chain. :param parameters: values to parameters the configuration or null to skip parameterization. :return: ConfigParams configuration.
(module (function_definition (function_name_tile_bbox) function_name_tile_bbox (parameters (identifier_self) identifier_self (identifier_tile_indices) identifier_tile_indices )parameters (block (expression_statement (assignment (tuple_pattern (identifier_z) identifier_z (identifier_x) identifier_x (identifier_y) identifier_y )tuple_pattern (identifier_tile_indices) identifier_tile_indices )assignment )expression_statement (expression_statement (assignment (identifier_topleft) identifier_topleft (tuple (binary_operator (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_tilesize) identifier_tilesize )attribute )binary_operator (binary_operator (parenthesized_expression (binary_operator (identifier_y) identifier_y (integer_1) integer_1 )binary_operator )parenthesized_expression (attribute (identifier_self) identifier_self (identifier_tilesize) identifier_tilesize )attribute )binary_operator )tuple )assignment )expression_statement (expression_statement (assignment (identifier_bottomright) identifier_bottomright (tuple (binary_operator (parenthesized_expression (binary_operator (identifier_x) identifier_x (integer_1) integer_1 )binary_operator )parenthesized_expression (attribute (identifier_self) identifier_self (identifier_tilesize) identifier_tilesize )attribute )binary_operator (binary_operator (identifier_y) identifier_y (attribute (identifier_self) identifier_self (identifier_tilesize) identifier_tilesize )attribute )binary_operator )tuple )assignment )expression_statement (expression_statement (assignment (identifier_nw) identifier_nw (call (attribute (identifier_self) identifier_self (identifier_unproject_pixels) identifier_unproject_pixels )attribute (argument_list (identifier_topleft) identifier_topleft (identifier_z) identifier_z )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_se) identifier_se (call (attribute (identifier_self) identifier_self (identifier_unproject_pixels) identifier_unproject_pixels )attribute (argument_list (identifier_bottomright) identifier_bottomright (identifier_z) identifier_z )argument_list )call )assignment )expression_statement (return_statement (binary_operator (identifier_nw) identifier_nw (identifier_se) identifier_se )binary_operator )return_statement )block )function_definition )module
Returns the WGS84 bbox of the specified tile
(module (function_definition (function_name_spacing) function_name_spacing (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_libfn) identifier_libfn (call (attribute (identifier_utils) identifier_utils (identifier_get_lib_fn) identifier_get_lib_fn )attribute (argument_list (binary_operator (string_'getSpacing%s') string_'getSpacing%s' (attribute (identifier_self) identifier_self (identifier__libsuffix) identifier__libsuffix )attribute )binary_operator )argument_list )call )assignment )expression_statement (return_statement (call (identifier_libfn) identifier_libfn (argument_list (attribute (identifier_self) identifier_self (identifier_pointer) identifier_pointer )attribute )argument_list )call )return_statement )block )function_definition )module
Get image spacing Returns ------- tuple
(module (function_definition (function_name_upload_package) function_name_upload_package (parameters (identifier_context) identifier_context )parameters (block (if_statement (boolean_operator (not_operator (attribute (identifier_context) identifier_context (identifier_dry_run) identifier_dry_run )attribute )not_operator (call (identifier_build_distributions) identifier_build_distributions (argument_list (identifier_context) identifier_context )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_upload_args) identifier_upload_args (string_'twine upload ') string_'twine upload ' )assignment )expression_statement (expression_statement (augmented_assignment (identifier_upload_args) identifier_upload_args (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (call (attribute (call (identifier_Path) identifier_Path (argument_list (string_'dist') string_'dist' )argument_list )call (identifier_files) identifier_files )attribute (argument_list )argument_list )call )argument_list )call )augmented_assignment )expression_statement (if_statement (attribute (identifier_context) identifier_context (identifier_pypi) identifier_pypi )attribute (block (expression_statement (augmented_assignment (identifier_upload_args) identifier_upload_args (binary_operator (string_' -r %s') string_' -r %s' (attribute (identifier_context) identifier_context (identifier_pypi) identifier_pypi )attribute )binary_operator )augmented_assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_upload_result) identifier_upload_result (call (attribute (identifier_shell) identifier_shell (identifier_dry_run) identifier_dry_run )attribute (argument_list (identifier_upload_args) identifier_upload_args (attribute (identifier_context) identifier_context (identifier_dry_run) identifier_dry_run )attribute )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (attribute (identifier_context) identifier_context (identifier_dry_run) identifier_dry_run )attribute )not_operator (not_operator (identifier_upload_result) identifier_upload_result )not_operator )boolean_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (binary_operator (string_'Error uploading: %s') string_'Error uploading: %s' (identifier_upload_result) identifier_upload_result )binary_operator )argument_list )call )raise_statement )block (else_clause (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'Successfully uploaded %s:%s') string_'Successfully uploaded %s:%s' (attribute (identifier_context) identifier_context (identifier_module_name) identifier_module_name )attribute (attribute (identifier_context) identifier_context (identifier_new_version) identifier_new_version )attribute )argument_list )call )expression_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'Dry run, skipping package upload') string_'Dry run, skipping package upload' )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Uploads your project packages to pypi with twine.
(module (function_definition (function_name_printdir) function_name_printdir (parameters (identifier_self) identifier_self )parameters (block (print_statement (binary_operator (string_"%-46s %19s %12s") string_"%-46s %19s %12s" (tuple (string_"File Name") string_"File Name" (string_"Modified ") string_"Modified " (string_"Size") string_"Size" )tuple )binary_operator )print_statement (for_statement (identifier_zinfo) identifier_zinfo (attribute (identifier_self) identifier_self (identifier_filelist) identifier_filelist )attribute (block (expression_statement (assignment (identifier_date) identifier_date (binary_operator (string_"%d-%02d-%02d %02d:%02d:%02d") string_"%d-%02d-%02d %02d:%02d:%02d" (subscript (attribute (identifier_zinfo) identifier_zinfo (identifier_date_time) identifier_date_time )attribute (slice (colon) colon (integer_6) integer_6 )slice )subscript )binary_operator )assignment )expression_statement (print_statement (binary_operator (string_"%-46s %s %12d") string_"%-46s %s %12d" (tuple (attribute (identifier_zinfo) identifier_zinfo (identifier_filename) identifier_filename )attribute (identifier_date) identifier_date (attribute (identifier_zinfo) identifier_zinfo (identifier_file_size) identifier_file_size )attribute )tuple )binary_operator )print_statement )block )for_statement )block )function_definition )module
Print a table of contents for the zip file.
(module (function_definition (function_name__update_record) function_name__update_record (parameters (identifier_self) identifier_self (identifier_record_id) identifier_record_id (identifier_name) identifier_name (identifier_address) identifier_address (identifier_ttl) identifier_ttl )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (dictionary (pair (string_'record') string_'record' (dictionary (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'content') string_'content' (identifier_address) identifier_address )pair (pair (string_'ttl') string_'ttl' (identifier_ttl) identifier_ttl )pair )dictionary )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_headers) identifier_headers (dictionary (pair (string_'Content-Type') string_'Content-Type' (string_'application/json') string_'application/json' )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_request) identifier_request (call (attribute (attribute (identifier_self) identifier_self (identifier__session) identifier__session )attribute (identifier_put) identifier_put )attribute (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier__baseurl) identifier__baseurl )attribute (binary_operator (string_'/%d') string_'/%d' (identifier_record_id) identifier_record_id )binary_operator )binary_operator (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_headers) identifier_headers (identifier_headers) identifier_headers )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (attribute (identifier_request) identifier_request (identifier_ok) identifier_ok )attribute )not_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_'Failed to update record: %s - %s') string_'Failed to update record: %s - %s' (tuple (call (attribute (identifier_self) identifier_self (identifier__format_hostname) identifier__format_hostname )attribute (argument_list (identifier_name) identifier_name )argument_list )call (call (attribute (identifier_request) identifier_request (identifier_json) identifier_json )attribute (argument_list )argument_list )call )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_record) identifier_record (call (attribute (identifier_request) identifier_request (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (string_'record') string_'record' (identifier_record) identifier_record )comparison_operator (comparison_operator (string_'id') string_'id' (subscript (identifier_record) identifier_record (string_'record') string_'record' )subscript )comparison_operator )boolean_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_'Invalid record JSON format: %s - %s') string_'Invalid record JSON format: %s - %s' (tuple (call (attribute (identifier_self) identifier_self (identifier__format_hostname) identifier__format_hostname )attribute (argument_list (identifier_name) identifier_name )argument_list )call (call (attribute (identifier_request) identifier_request (identifier_json) identifier_json )attribute (argument_list )argument_list )call )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (subscript (identifier_record) identifier_record (string_'record') string_'record' )subscript )return_statement )block )function_definition )module
Updates an existing record.
(module (function_definition (function_name_record) function_name_record (parameters (identifier_self) identifier_self (identifier_partition) identifier_partition (identifier_num_bytes) identifier_num_bytes (identifier_num_records) identifier_num_records )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_unrecorded_partitions) identifier_unrecorded_partitions )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_partition) identifier_partition )argument_list )call )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_total_bytes) identifier_total_bytes )attribute (identifier_num_bytes) identifier_num_bytes )augmented_assignment )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_total_records) identifier_total_records )attribute (identifier_num_records) identifier_num_records )augmented_assignment )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_unrecorded_partitions) identifier_unrecorded_partitions )attribute )not_operator (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_sensors) identifier_sensors )attribute (identifier_bytes_fetched) identifier_bytes_fetched )attribute (identifier_record) identifier_record )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_total_bytes) identifier_total_bytes )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_sensors) identifier_sensors )attribute (identifier_records_fetched) identifier_records_fetched )attribute (identifier_record) identifier_record )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_total_records) identifier_total_records )attribute )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
After each partition is parsed, we update the current metric totals with the total bytes and number of records parsed. After all partitions have reported, we write the metric.
(module (function_definition (function_name_on_raw_317) function_name_on_raw_317 (parameters (identifier_self) identifier_self (identifier_message) identifier_message )parameters (block (expression_statement (assignment (pattern_list (identifier_target) identifier_target (identifier_nickname) identifier_nickname (identifier_idle_time) identifier_idle_time )pattern_list (subscript (attribute (identifier_message) identifier_message (identifier_params) identifier_params )attribute (slice (colon) colon (integer_3) integer_3 )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_info) identifier_info (dictionary (pair (string_'idle') string_'idle' (call (identifier_int) identifier_int (argument_list (identifier_idle_time) identifier_idle_time )argument_list )call )pair )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_nickname) identifier_nickname (subscript (attribute (identifier_self) identifier_self (identifier__pending) identifier__pending )attribute (string_'whois') string_'whois' )subscript )comparison_operator (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__whois_info) identifier__whois_info )attribute (identifier_nickname) identifier_nickname )subscript (identifier_update) identifier_update )attribute (argument_list (identifier_info) identifier_info )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
WHOIS idle time.
(module (function_definition (function_name_groups) function_name_groups (parameters (identifier_self) identifier_self (default_parameter (identifier_query) identifier_query (None) None )default_parameter (default_parameter (identifier_exclude) identifier_exclude (None) None )default_parameter (default_parameter (identifier_maxResults) identifier_maxResults (integer_9999) integer_9999 )default_parameter )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_groups) identifier_groups (list )list )assignment )expression_statement (if_statement (comparison_operator (identifier_query) identifier_query (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'query') string_'query' )subscript (identifier_query) identifier_query )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_exclude) identifier_exclude (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'exclude') string_'exclude' )subscript (identifier_exclude) identifier_exclude )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_maxResults) identifier_maxResults (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'maxResults') string_'maxResults' )subscript (identifier_maxResults) identifier_maxResults )assignment )expression_statement )block )if_statement (for_statement (identifier_group) identifier_group (subscript (call (attribute (identifier_self) identifier_self (identifier__get_json) identifier__get_json )attribute (argument_list (string_'groups/picker') string_'groups/picker' (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call (string_'groups') string_'groups' )subscript (block (expression_statement (call (attribute (identifier_groups) identifier_groups (identifier_append) identifier_append )attribute (argument_list (subscript (identifier_group) identifier_group (string_'name') string_'name' )subscript )argument_list )call )expression_statement )block )for_statement (return_statement (call (identifier_sorted) identifier_sorted (argument_list (identifier_groups) identifier_groups )argument_list )call )return_statement )block )function_definition )module
Return a list of groups matching the specified criteria. :param query: filter groups by name with this string :type query: Optional[str] :param exclude: filter out groups by name with this string :type exclude: Optional[Any] :param maxResults: maximum results to return. (Default: 9999) :type maxResults: int :rtype: List[str]
(module (function_definition (function_name_create_todo_item) function_name_create_todo_item (parameters (identifier_self) identifier_self (identifier_list_id) identifier_list_id (identifier_content) identifier_content (default_parameter (identifier_party_id) identifier_party_id (None) None )default_parameter (default_parameter (identifier_notify) identifier_notify (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_path) identifier_path (binary_operator (string_'/todos/create_item/%u') string_'/todos/create_item/%u' (identifier_list_id) identifier_list_id )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_req) identifier_req (call (attribute (identifier_ET) identifier_ET (identifier_Element) identifier_Element )attribute (argument_list (string_'request') string_'request' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (call (attribute (identifier_ET) identifier_ET (identifier_SubElement) identifier_SubElement )attribute (argument_list (identifier_req) identifier_req (string_'content') string_'content' )argument_list )call (identifier_text) identifier_text )attribute (call (identifier_str) identifier_str (argument_list (identifier_content) identifier_content )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_party_id) identifier_party_id (None) None )comparison_operator (block (expression_statement (assignment (attribute (call (attribute (identifier_ET) identifier_ET (identifier_SubElement) identifier_SubElement )attribute (argument_list (identifier_req) identifier_req (string_'responsible-party') string_'responsible-party' )argument_list )call (identifier_text) identifier_text )attribute (call (identifier_str) identifier_str (argument_list (identifier_party_id) identifier_party_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (call (attribute (identifier_ET) identifier_ET (identifier_SubElement) identifier_SubElement )attribute (argument_list (identifier_req) identifier_req (string_'notify') string_'notify' )argument_list )call (identifier_text) identifier_text )attribute (call (attribute (call (identifier_str) identifier_str (argument_list (call (identifier_bool) identifier_bool (argument_list (identifier_notify) identifier_notify )argument_list )call )argument_list )call (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__request) identifier__request )attribute (argument_list (identifier_path) identifier_path (identifier_req) identifier_req )argument_list )call )return_statement )block )function_definition )module
This call lets you add an item to an existing list. The item is added to the bottom of the list. If a person is responsible for the item, give their id as the party_id value. If a company is responsible, prefix their company id with a 'c' and use that as the party_id value. If the item has a person as the responsible party, you can use the notify key to indicate whether an email should be sent to that person to tell them about the assignment.
(module (function_definition (function_name__list_keys) function_name__list_keys (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_req) identifier_req (call (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_uri) identifier_uri )attribute (string_'/keys') string_'/keys' )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_keys) identifier_keys (call (attribute (call (attribute (identifier_req) identifier_req (identifier_get) identifier_get )attribute (argument_list )argument_list )call (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_keys) identifier_keys (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__keys) identifier__keys )attribute (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_keys) identifier_keys (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__keys) identifier__keys )attribute (subscript (identifier_key) identifier_key (string_'id') string_'id' )subscript )subscript (call (identifier_Key) identifier_Key (argument_list (identifier_key) identifier_key (identifier_self) identifier_self )argument_list )call )assignment )expression_statement )block )for_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__keys) identifier__keys )attribute (dictionary )dictionary )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Retrieves a list of all added Keys and populates the self._keys dict with Key instances :returns: A list of Keys instances
(module (function_definition (function_name__fetch_all_as_dict) function_name__fetch_all_as_dict (parameters (identifier_self) identifier_self (identifier_cursor) identifier_cursor )parameters (block (expression_statement (assignment (identifier_desc) identifier_desc (attribute (identifier_cursor) identifier_cursor (identifier_description) identifier_description )attribute )assignment )expression_statement (return_statement (list_comprehension (call (identifier_dict) identifier_dict (argument_list (call (identifier_zip) identifier_zip (argument_list (list_comprehension (subscript (identifier_col) identifier_col (integer_0) integer_0 )subscript (for_in_clause (identifier_col) identifier_col (identifier_desc) identifier_desc )for_in_clause )list_comprehension (identifier_row) identifier_row )argument_list )call )argument_list )call (for_in_clause (identifier_row) identifier_row (call (attribute (identifier_cursor) identifier_cursor (identifier_fetchall) identifier_fetchall )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Iterates over the result set and converts each row to a dictionary :return: A list of dictionaries where each row is a dictionary :rtype: list of dict
(module (function_definition (function_name_combine) function_name_combine (parameters (identifier_self) identifier_self (identifier_expert_out) identifier_expert_out (default_parameter (identifier_multiply_by_gates) identifier_multiply_by_gates (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_stitched) identifier_stitched (call (attribute (identifier_common_layers) identifier_common_layers (identifier_convert_gradient_to_tensor) identifier_convert_gradient_to_tensor )attribute (argument_list (call (attribute (identifier_tf) identifier_tf (identifier_concat) identifier_concat )attribute (argument_list (identifier_expert_out) identifier_expert_out (integer_0) integer_0 )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (identifier_multiply_by_gates) identifier_multiply_by_gates (block (expression_statement (augmented_assignment (identifier_stitched) identifier_stitched (call (attribute (identifier_tf) identifier_tf (identifier_expand_dims) identifier_expand_dims )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__nonzero_gates) identifier__nonzero_gates )attribute (integer_1) integer_1 )argument_list )call )augmented_assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_combined) identifier_combined (call (attribute (identifier_tf) identifier_tf (identifier_unsorted_segment_sum) identifier_unsorted_segment_sum )attribute (argument_list (identifier_stitched) identifier_stitched (attribute (identifier_self) identifier_self (identifier__batch_index) identifier__batch_index )attribute (subscript (call (attribute (identifier_tf) identifier_tf (identifier_shape) identifier_shape )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__gates) identifier__gates )attribute )argument_list )call (integer_0) integer_0 )subscript )argument_list )call )assignment )expression_statement (return_statement (identifier_combined) identifier_combined )return_statement )block )function_definition )module
Sum together the expert output, weighted by the gates. The slice corresponding to a particular batch element `b` is computed as the sum over all experts `i` of the expert output, weighted by the corresponding gate values. If `multiply_by_gates` is set to False, the gate values are ignored. Args: expert_out: a list of `num_experts` `Tensor`s, each with shape `[expert_batch_size_i, <extra_output_dims>]`. multiply_by_gates: a boolean Returns: a `Tensor` with shape `[batch_size, <extra_output_dims>]`.
(module (function_definition (function_name_annotate_intervals) function_name_annotate_intervals (parameters (identifier_target_file) identifier_target_file (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_out_file) identifier_out_file (binary_operator (string_"%s-gcannotated.tsv") string_"%s-gcannotated.tsv" (subscript (call (attribute (identifier_utils) identifier_utils (identifier_splitext_plus) identifier_splitext_plus )attribute (argument_list (identifier_target_file) identifier_target_file )argument_list )call (integer_0) integer_0 )subscript )binary_operator )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_utils) identifier_utils (identifier_file_uptodate) identifier_file_uptodate )attribute (argument_list (identifier_out_file) identifier_out_file (identifier_target_file) identifier_target_file )argument_list )call )not_operator (block (with_statement (with_clause (with_item (as_pattern (call (identifier_file_transaction) identifier_file_transaction (argument_list (identifier_data) identifier_data (identifier_out_file) identifier_out_file )argument_list )call (as_pattern_target (identifier_tx_out_file) identifier_tx_out_file )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_params) identifier_params (list (string_"-T") string_"-T" (string_"AnnotateIntervals") string_"AnnotateIntervals" (string_"-R") string_"-R" (call (attribute (identifier_dd) identifier_dd (identifier_get_ref_file) identifier_get_ref_file )attribute (argument_list (identifier_data) identifier_data )argument_list )call (string_"-L") string_"-L" (identifier_target_file) identifier_target_file (string_"--interval-merging-rule") string_"--interval-merging-rule" (string_"OVERLAPPING_ONLY") string_"OVERLAPPING_ONLY" (string_"-O") string_"-O" (identifier_tx_out_file) identifier_tx_out_file )list )assignment )expression_statement (expression_statement (call (identifier__run_with_memory_scaling) identifier__run_with_memory_scaling (argument_list (identifier_params) identifier_params (identifier_tx_out_file) identifier_tx_out_file (identifier_data) identifier_data )argument_list )call )expression_statement )block )with_statement )block )if_statement (return_statement (identifier_out_file) identifier_out_file )return_statement )block )function_definition )module
Provide GC annotated intervals for error correction during panels and denoising. TODO: include mappability and segmentation duplication inputs
(module (function_definition (function_name_make_request_validator) function_name_make_request_validator (parameters (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_verb) identifier_verb (call (attribute (attribute (identifier_request) identifier_request (identifier_values) identifier_values )attribute (identifier_get) identifier_get )attribute (argument_list (string_'verb') string_'verb' (string_'') string_'' (keyword_argument (identifier_type) identifier_type (identifier_str) identifier_str )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_resumption_token) identifier_resumption_token (call (attribute (attribute (identifier_request) identifier_request (identifier_values) identifier_values )attribute (identifier_get) identifier_get )attribute (argument_list (string_'resumptionToken') string_'resumptionToken' (None) None )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_schema) identifier_schema (conditional_expression (identifier_Verbs) identifier_Verbs (comparison_operator (identifier_resumption_token) identifier_resumption_token (None) None )comparison_operator (identifier_ResumptionVerbs) identifier_ResumptionVerbs )conditional_expression )assignment )expression_statement (return_statement (call (call (identifier_getattr) identifier_getattr (argument_list (identifier_schema) identifier_schema (identifier_verb) identifier_verb (identifier_OAISchema) identifier_OAISchema )argument_list )call (argument_list (keyword_argument (identifier_partial) identifier_partial (False) False )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Validate arguments in incomming request.
(module (function_definition (function_name__radial_distance) function_name__radial_distance (parameters (identifier_shape) identifier_shape )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_shape) identifier_shape )argument_list )call (integer_2) integer_2 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'shape must have only 2 elements') string_'shape must have only 2 elements' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_position) identifier_position (binary_operator (parenthesized_expression (binary_operator (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (identifier_shape) identifier_shape )argument_list )call (integer_1) integer_1 )binary_operator )parenthesized_expression (float_2.) float_2. )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_x) identifier_x (binary_operator (call (attribute (identifier_np) identifier_np (identifier_arange) identifier_arange )attribute (argument_list (subscript (identifier_shape) identifier_shape (integer_1) integer_1 )subscript )argument_list )call (subscript (identifier_position) identifier_position (integer_1) integer_1 )subscript )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_y) identifier_y (binary_operator (call (attribute (identifier_np) identifier_np (identifier_arange) identifier_arange )attribute (argument_list (subscript (identifier_shape) identifier_shape (integer_0) integer_0 )subscript )argument_list )call (subscript (identifier_position) identifier_position (integer_0) integer_0 )subscript )binary_operator )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_xx) identifier_xx (identifier_yy) identifier_yy )pattern_list (call (attribute (identifier_np) identifier_np (identifier_meshgrid) identifier_meshgrid )attribute (argument_list (identifier_x) identifier_x (identifier_y) identifier_y )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (binary_operator (binary_operator (identifier_xx) identifier_xx (integer_2) integer_2 )binary_operator (binary_operator (identifier_yy) identifier_yy (integer_2) integer_2 )binary_operator )binary_operator )argument_list )call )return_statement )block )function_definition )module
Return an array where each value is the Euclidean distance from the array center. Parameters ---------- shape : tuple of int The size of the output array along each axis. Returns ------- result : `~numpy.ndarray` An array containing the Euclidian radial distances from the array center.
(module (function_definition (function_name_fetch) function_name_fetch (parameters (identifier_self) identifier_self (typed_default_parameter (identifier_limit) identifier_limit (type (identifier_int) identifier_int )type (None) None )typed_default_parameter )parameters (type (generic_type (identifier_Sequence) identifier_Sequence (type_parameter (type (identifier_StorageRecord) identifier_StorageRecord )type )type_parameter )generic_type )type (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'StorageRecordSearch.fetch >>> limit: %s') string_'StorageRecordSearch.fetch >>> limit: %s' (identifier_limit) identifier_limit )argument_list )call )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_opened) identifier_opened )attribute )not_operator (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'StorageRecordSearch.fetch <!< Storage record search is closed') string_'StorageRecordSearch.fetch <!< Storage record search is closed' )argument_list )call )expression_statement (raise_statement (call (identifier_BadSearch) identifier_BadSearch (argument_list (string_'Storage record search is closed') string_'Storage record search is closed' )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (attribute (attribute (identifier_self) identifier_self (identifier__wallet) identifier__wallet )attribute (identifier_opened) identifier_opened )attribute )not_operator (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'StorageRecordSearch.fetch <!< Wallet %s is closed') string_'StorageRecordSearch.fetch <!< Wallet %s is closed' (attribute (attribute (identifier_self) identifier_self (identifier__wallet) identifier__wallet )attribute (identifier_name) identifier_name )attribute )argument_list )call )expression_statement (raise_statement (call (identifier_WalletState) identifier_WalletState (argument_list (call (attribute (string_'Wallet {} is closed') string_'Wallet {} is closed' (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier__wallet) identifier__wallet )attribute (identifier_name) identifier_name )attribute )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_records) identifier_records (boolean_operator (subscript (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (await (call (attribute (identifier_non_secrets) identifier_non_secrets (identifier_fetch_wallet_search_next_records) identifier_fetch_wallet_search_next_records )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier__wallet) identifier__wallet )attribute (identifier_handle) identifier_handle )attribute (attribute (identifier_self) identifier_self (identifier_handle) identifier_handle )attribute (boolean_operator (identifier_limit) identifier_limit (attribute (identifier_Wallet) identifier_Wallet (identifier_DEFAULT_CHUNK) identifier_DEFAULT_CHUNK )attribute )boolean_operator )argument_list )call )await )argument_list )call (string_'records') string_'records' )subscript (list )list )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_rv) identifier_rv (list_comprehension (call (identifier_StorageRecord) identifier_StorageRecord (argument_list (keyword_argument (identifier_typ) identifier_typ (subscript (identifier_rec) identifier_rec (string_'type') string_'type' )subscript )keyword_argument (keyword_argument (identifier_value) identifier_value (subscript (identifier_rec) identifier_rec (string_'value') string_'value' )subscript )keyword_argument (keyword_argument (identifier_tags) identifier_tags (subscript (identifier_rec) identifier_rec (string_'tags') string_'tags' )subscript )keyword_argument (keyword_argument (identifier_ident) identifier_ident (subscript (identifier_rec) identifier_rec (string_'id') string_'id' )subscript )keyword_argument )argument_list )call (for_in_clause (identifier_rec) identifier_rec (identifier_records) identifier_records )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'StorageRecordSearch.fetch <<< %s') string_'StorageRecordSearch.fetch <<< %s' (identifier_rv) identifier_rv )argument_list )call )expression_statement (return_statement (identifier_rv) identifier_rv )return_statement )block )function_definition )module
Fetch next batch of search results. Raise BadSearch if search is closed, WalletState if wallet is closed. :param limit: maximum number of records to return (default value Wallet.DEFAULT_CHUNK) :return: next batch of records found
(module (function_definition (function_name__check_metrics) function_name__check_metrics (parameters (identifier_cls) identifier_cls (identifier_schema) identifier_schema (identifier_metrics) identifier_metrics )parameters (block (for_statement (pattern_list (identifier_name) identifier_name (identifier_value) identifier_value )pattern_list (call (attribute (identifier_metrics) identifier_metrics (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_metric) identifier_metric (call (attribute (identifier_schema) identifier_schema (identifier_get) identifier_get )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_metric) identifier_metric )not_operator (block (expression_statement (assignment (identifier_message) identifier_message (call (attribute (string_"Unexpected metric '{}' returned") string_"Unexpected metric '{}' returned" (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (identifier_message) identifier_message )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_cls) identifier_cls (identifier__check_metric) identifier__check_metric )attribute (argument_list (identifier_schema) identifier_schema (identifier_metric) identifier_metric (identifier_name) identifier_name (identifier_value) identifier_value )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Ensure that returned metrics are properly exposed
(module (function_definition (function_name_purge_queues) function_name_purge_queues (parameters (identifier_self) identifier_self (identifier_queues) identifier_queues )parameters (block (for_statement (pattern_list (identifier_name) identifier_name (identifier_vhost) identifier_vhost )pattern_list (identifier_queues) identifier_queues (block (expression_statement (assignment (identifier_vhost) identifier_vhost (call (identifier_quote) identifier_quote (argument_list (identifier_vhost) identifier_vhost (string_'') string_'' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_name) identifier_name (call (identifier_quote) identifier_quote (argument_list (identifier_name) identifier_name (string_'') string_'' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (binary_operator (subscript (attribute (identifier_Client) identifier_Client (identifier_urls) identifier_urls )attribute (string_'purge_queue') string_'purge_queue' )subscript (tuple (identifier_vhost) identifier_vhost (identifier_name) identifier_name )tuple )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__call) identifier__call )attribute (argument_list (identifier_path) identifier_path (string_'DELETE') string_'DELETE' )argument_list )call )expression_statement )block )for_statement (return_statement (True) True )return_statement )block )function_definition )module
Purge all messages from one or more queues. :param list queues: A list of ('qname', 'vhost') tuples. :returns: True on success
(module (function_definition (function_name_hash_data) function_name_hash_data (parameters (identifier_data) identifier_data (default_parameter (identifier_hashlen) identifier_hashlen (None) None )default_parameter (default_parameter (identifier_alphabet) identifier_alphabet (None) None )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (comparison_operator (identifier_alphabet) identifier_alphabet (None) None )comparison_operator (block (expression_statement (assignment (identifier_alphabet) identifier_alphabet (identifier_ALPHABET_27) identifier_ALPHABET_27 )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_hashlen) identifier_hashlen (None) None )comparison_operator (block (expression_statement (assignment (identifier_hashlen) identifier_hashlen (identifier_HASH_LEN2) identifier_HASH_LEN2 )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (identifier_stringlike) identifier_stringlike )argument_list )call (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call (integer_0) integer_0 )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_text) identifier_text (parenthesized_expression (binary_operator (subscript (identifier_alphabet) identifier_alphabet (integer_0) integer_0 )subscript (identifier_hashlen) identifier_hashlen )binary_operator )parenthesized_expression )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_hasher) identifier_hasher (call (attribute (identifier_hashlib) identifier_hashlib (identifier_sha512) identifier_sha512 )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier__update_hasher) identifier__update_hasher (argument_list (identifier_hasher) identifier_hasher (identifier_data) identifier_data )argument_list )call )expression_statement (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_hasher) identifier_hasher (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_hashstr2) identifier_hashstr2 (call (identifier_convert_hexstr_to_bigbase) identifier_convert_hexstr_to_bigbase (argument_list (identifier_text) identifier_text (identifier_alphabet) identifier_alphabet (keyword_argument (identifier_bigbase) identifier_bigbase (call (identifier_len) identifier_len (argument_list (identifier_alphabet) identifier_alphabet )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_text) identifier_text (subscript (identifier_hashstr2) identifier_hashstr2 (slice (colon) colon (identifier_hashlen) identifier_hashlen )slice )subscript )assignment )expression_statement (return_statement (identifier_text) identifier_text )return_statement )block )else_clause )if_statement )block )function_definition )module
r""" Get a unique hash depending on the state of the data. Args: data (object): any sort of loosely organized data hashlen (None): (default = None) alphabet (None): (default = None) Returns: str: text - hash string CommandLine: python -m utool.util_hash hash_data Example: >>> # ENABLE_DOCTEST >>> from utool.util_hash import * # NOQA >>> import utool as ut >>> counter = [0] >>> failed = [] >>> def check_hash(input_, want=None): >>> count = counter[0] = counter[0] + 1 >>> got = ut.hash_data(input_) >>> print('({}) {}'.format(count, got)) >>> if want is not None and not got.startswith(want): >>> failed.append((got, input_, count, want)) >>> check_hash('1', 'wuvrng') >>> check_hash(['1'], 'dekbfpby') >>> check_hash(tuple(['1']), 'dekbfpby') >>> check_hash(b'12', 'marreflbv') >>> check_hash([b'1', b'2'], 'nwfs') >>> check_hash(['1', '2', '3'], 'arfrp') >>> check_hash(['1', np.array([1,2,3]), '3'], 'uyqwcq') >>> check_hash('123', 'ehkgxk') >>> check_hash(zip([1, 2, 3], [4, 5, 6]), 'mjcpwa') >>> import numpy as np >>> rng = np.random.RandomState(0) >>> check_hash(rng.rand(100000), 'bdwosuey') >>> for got, input_, count, want in failed: >>> print('failed {} on {}'.format(count, input_)) >>> print('got={}, want={}'.format(got, want)) >>> assert not failed
(module (function_definition (function_name_user_info) function_name_user_info (parameters (identifier_self) identifier_self (default_parameter (identifier_params) identifier_params (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_params) identifier_params (boolean_operator (identifier_params) identifier_params (dictionary )dictionary )boolean_operator )assignment )expression_statement (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'fields') string_'fields' )subscript (concatenated_string (string_'id,email,first_name,last_name,name,link,locale,') string_'id,email,first_name,last_name,name,link,locale,' (string_'gender,location') string_'gender,location' )concatenated_string )assignment )expression_statement (return_statement (await (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_FacebookClient) identifier_FacebookClient (identifier_self) identifier_self )argument_list )call (identifier_user_info) identifier_user_info )attribute (argument_list (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )await )return_statement )block )function_definition )module
Facebook required fields-param.
(module (function_definition (function_name_load_sources) function_name_load_sources (parameters (identifier_self) identifier_self (identifier_sources) identifier_sources )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (for_statement (identifier_s) identifier_s (identifier_sources) identifier_sources (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_s) identifier_s (identifier_dict) identifier_dict )argument_list )call (block (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_Model) identifier_Model (identifier_create_from_dict) identifier_create_from_dict )attribute (argument_list (identifier_s) identifier_s )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_load_source) identifier_load_source )attribute (argument_list (identifier_s) identifier_s (keyword_argument (identifier_build_index) identifier_build_index (False) False )keyword_argument )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__build_src_index) identifier__build_src_index )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Delete all sources in the ROI and load the input source list.
(module (function_definition (function_name_delete_nic) function_name_delete_nic (parameters (identifier_self) identifier_self (identifier_instance_id) identifier_instance_id (identifier_port_id) identifier_port_id )parameters (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_servers) identifier_servers )attribute (identifier_interface_detach) identifier_interface_detach )attribute (argument_list (identifier_instance_id) identifier_instance_id (identifier_port_id) identifier_port_id )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Delete a Network Interface Controller
(module (function_definition (function_name_issuperset) function_name_issuperset (parameters (identifier_self) identifier_self (identifier_items) identifier_items )parameters (block (return_statement (call (identifier_all) identifier_all (argument_list (call (attribute (identifier__compat) identifier__compat (identifier_map) identifier_map )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier__seen) identifier__seen )attribute (identifier___contains__) identifier___contains__ )attribute (identifier_items) identifier_items )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Return whether this collection contains all items. >>> Unique(['spam', 'eggs']).issuperset(['spam', 'spam', 'spam']) True
(module (function_definition (function_name_where_before_entry) function_name_where_before_entry (parameters (identifier_query) identifier_query (identifier_ref) identifier_ref )parameters (block (return_statement (call (attribute (identifier_orm) identifier_orm (identifier_select) identifier_select )attribute (generator_expression (identifier_e) identifier_e (for_in_clause (identifier_e) identifier_e (identifier_query) identifier_query )for_in_clause (if_clause (boolean_operator (comparison_operator (attribute (identifier_e) identifier_e (identifier_local_date) identifier_local_date )attribute (attribute (identifier_ref) identifier_ref (identifier_local_date) identifier_local_date )attribute )comparison_operator (parenthesized_expression (boolean_operator (comparison_operator (attribute (identifier_e) identifier_e (identifier_local_date) identifier_local_date )attribute (attribute (identifier_ref) identifier_ref (identifier_local_date) identifier_local_date )attribute )comparison_operator (comparison_operator (attribute (identifier_e) identifier_e (identifier_id) identifier_id )attribute (attribute (identifier_ref) identifier_ref (identifier_id) identifier_id )attribute )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator )if_clause )generator_expression )call )return_statement )block )function_definition )module
Generate a where clause for prior entries ref -- The entry of reference
(module (function_definition (function_name_Describe) function_name_Describe (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_result) identifier_result (list (binary_operator (string_"\nUsername: %s") string_"\nUsername: %s" (call (attribute (attribute (identifier_self) identifier_self (identifier_urn) identifier_urn )attribute (identifier_Basename) identifier_Basename )attribute (argument_list )argument_list )call )binary_operator )list )assignment )expression_statement (expression_statement (assignment (identifier_labels) identifier_labels (list_comprehension (attribute (identifier_l) identifier_l (identifier_name) identifier_name )attribute (for_in_clause (identifier_l) identifier_l (call (attribute (identifier_self) identifier_self (identifier_GetLabels) identifier_GetLabels )attribute (argument_list )argument_list )call )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_"Labels: %s") string_"Labels: %s" (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (identifier_labels) identifier_labels )argument_list )call )binary_operator )argument_list )call )expression_statement (if_statement (comparison_operator (call (attribute (identifier_self) identifier_self (identifier_Get) identifier_Get )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_Schema) identifier_Schema )attribute (identifier_PASSWORD) identifier_PASSWORD )attribute )argument_list )call (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (string_"Password: not set") string_"Password: not set" )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (string_"Password: set") string_"Password: set" )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (call (attribute (string_"\n") string_"\n" (identifier_join) identifier_join )attribute (argument_list (identifier_result) identifier_result )argument_list )call )return_statement )block )function_definition )module
Return a description of this user.
(module (function_definition (function_name__uninstall_signal_handlers) function_name__uninstall_signal_handlers (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_signal) identifier_signal (identifier_signal) identifier_signal )attribute (argument_list (attribute (identifier_signal) identifier_signal (identifier_SIGINT) identifier_SIGINT )attribute (attribute (identifier_signal) identifier_signal (identifier_SIG_DFL) identifier_SIG_DFL )attribute )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_signal) identifier_signal (identifier_signal) identifier_signal )attribute (argument_list (attribute (identifier_signal) identifier_signal (identifier_SIGTERM) identifier_SIGTERM )attribute (attribute (identifier_signal) identifier_signal (identifier_SIG_DFL) identifier_SIG_DFL )attribute )argument_list )call )expression_statement )block )function_definition )module
Restores default signal handlers.
(module (function_definition (function_name__insert_row) function_name__insert_row (parameters (identifier_self) identifier_self (identifier_i) identifier_i (identifier_index) identifier_index )parameters (block (if_statement (comparison_operator (identifier_i) identifier_i (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__index) identifier__index )attribute )argument_list )call )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_row) identifier__add_row )attribute (argument_list (identifier_index) identifier_index )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__index) identifier__index )attribute (identifier_insert) identifier_insert )attribute (argument_list (identifier_i) identifier_i (identifier_index) identifier_index )argument_list )call )expression_statement (for_statement (identifier_c) identifier_c (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__columns) identifier__columns )attribute )argument_list )call )argument_list )call (block (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__data) identifier__data )attribute (identifier_c) identifier_c )subscript (identifier_insert) identifier_insert )attribute (argument_list (identifier_i) identifier_i (None) None )argument_list )call )expression_statement )block )for_statement )block )else_clause )if_statement )block )function_definition )module
Insert a new row in the DataFrame. :param i: index location to insert :param index: index value to insert into the index list :return: nothing
(module (function_definition (function_name__parse_subnet) function_name__parse_subnet (parameters (identifier_self) identifier_self (identifier_subnet_dict) identifier_subnet_dict )parameters (block (if_statement (not_operator (identifier_subnet_dict) identifier_subnet_dict )not_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_alloc_pool) identifier_alloc_pool (call (attribute (identifier_subnet_dict) identifier_subnet_dict (identifier_get) identifier_get )attribute (argument_list (string_'allocation_pools') string_'allocation_pools' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cidr) identifier_cidr (call (attribute (identifier_subnet_dict) identifier_subnet_dict (identifier_get) identifier_get )attribute (argument_list (string_'cidr') string_'cidr' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_subnet) identifier_subnet (subscript (call (attribute (identifier_cidr) identifier_cidr (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_start) identifier_start (call (attribute (subscript (identifier_alloc_pool) identifier_alloc_pool (integer_0) integer_0 )subscript (identifier_get) identifier_get )attribute (argument_list (string_'start') string_'start' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_end) identifier_end (call (attribute (subscript (identifier_alloc_pool) identifier_alloc_pool (integer_0) integer_0 )subscript (identifier_get) identifier_get )attribute (argument_list (string_'end') string_'end' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_gateway) identifier_gateway (call (attribute (identifier_subnet_dict) identifier_subnet_dict (identifier_get) identifier_get )attribute (argument_list (string_'gateway_ip') string_'gateway_ip' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sec_gateway) identifier_sec_gateway (call (attribute (identifier_subnet_dict) identifier_subnet_dict (identifier_get) identifier_get )attribute (argument_list (string_'secondary_gw') string_'secondary_gw' )argument_list )call )assignment )expression_statement (return_statement (dictionary (pair (string_'subnet') string_'subnet' (identifier_subnet) identifier_subnet )pair (pair (string_'start') string_'start' (identifier_start) identifier_start )pair (pair (string_'end') string_'end' (identifier_end) identifier_end )pair (pair (string_'gateway') string_'gateway' (identifier_gateway) identifier_gateway )pair (pair (string_'sec_gateway') string_'sec_gateway' (identifier_sec_gateway) identifier_sec_gateway )pair )dictionary )return_statement )block )function_definition )module
Return the subnet, start, end, gateway of a subnet.
(module (function_definition (function_name_relation_factory) function_name_relation_factory (parameters (identifier_relation_name) identifier_relation_name )parameters (block (expression_statement (assignment (pattern_list (identifier_role) identifier_role (identifier_interface) identifier_interface )pattern_list (call (attribute (identifier_hookenv) identifier_hookenv (identifier_relation_to_role_and_interface) identifier_relation_to_role_and_interface )attribute (argument_list (identifier_relation_name) identifier_relation_name )argument_list )call )assignment )expression_statement (if_statement (not_operator (parenthesized_expression (boolean_operator (identifier_role) identifier_role (identifier_interface) identifier_interface )boolean_operator )parenthesized_expression )not_operator (block (expression_statement (call (attribute (identifier_hookenv) identifier_hookenv (identifier_log) identifier_log )attribute (argument_list (call (attribute (concatenated_string (string_'Unable to determine role and interface for relation ') string_'Unable to determine role and interface for relation ' (string_'{}') string_'{}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_relation_name) identifier_relation_name )argument_list )call (attribute (identifier_hookenv) identifier_hookenv (identifier_ERROR) identifier_ERROR )attribute )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )if_statement (return_statement (call (identifier__find_relation_factory) identifier__find_relation_factory (argument_list (call (identifier__relation_module) identifier__relation_module (argument_list (identifier_role) identifier_role (identifier_interface) identifier_interface )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Get the RelationFactory for the given relation name. Looks for a RelationFactory in the first file matching: ``$CHARM_DIR/hooks/relations/{interface}/{provides,requires,peer}.py``
(module (function_definition (function_name_mapValues) function_name_mapValues (parameters (identifier_self) identifier_self (identifier_f) identifier_f )parameters (block (expression_statement (assignment (identifier_map_values_fn) identifier_map_values_fn (lambda (lambda_parameters (identifier_kv) identifier_kv )lambda_parameters (tuple (subscript (identifier_kv) identifier_kv (integer_0) integer_0 )subscript (call (identifier_f) identifier_f (argument_list (subscript (identifier_kv) identifier_kv (integer_1) integer_1 )subscript )argument_list )call )tuple )lambda )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_map) identifier_map )attribute (argument_list (identifier_map_values_fn) identifier_map_values_fn (keyword_argument (identifier_preservesPartitioning) identifier_preservesPartitioning (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Pass each value in the key-value pair RDD through a map function without changing the keys; this also retains the original RDD's partitioning. >>> x = sc.parallelize([("a", ["apple", "banana", "lemon"]), ("b", ["grapes"])]) >>> def f(x): return len(x) >>> x.mapValues(f).collect() [('a', 3), ('b', 1)]
(module (function_definition (function_name_get_linked_metadata) function_name_get_linked_metadata (parameters (identifier_obj) identifier_obj (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_context) identifier_context (None) None )default_parameter (default_parameter (identifier_site) identifier_site (None) None )default_parameter (default_parameter (identifier_language) identifier_language (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_Metadata) identifier_Metadata (call (identifier__get_metadata_model) identifier__get_metadata_model (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_InstanceMetadata) identifier_InstanceMetadata (call (attribute (attribute (identifier_Metadata) identifier_Metadata (identifier__meta) identifier__meta )attribute (identifier_get_model) identifier_get_model )attribute (argument_list (string_'modelinstance') string_'modelinstance' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ModelMetadata) identifier_ModelMetadata (call (attribute (attribute (identifier_Metadata) identifier_Metadata (identifier__meta) identifier__meta )attribute (identifier_get_model) identifier_get_model )attribute (argument_list (string_'model') string_'model' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_content_type) identifier_content_type (call (attribute (attribute (identifier_ContentType) identifier_ContentType (identifier_objects) identifier_objects )attribute (identifier_get_for_model) identifier_get_for_model )attribute (argument_list (identifier_obj) identifier_obj )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_instances) identifier_instances (list )list )assignment )expression_statement (if_statement (comparison_operator (identifier_InstanceMetadata) identifier_InstanceMetadata (None) None )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_instance_md) identifier_instance_md (call (attribute (attribute (identifier_InstanceMetadata) identifier_InstanceMetadata (identifier_objects) identifier_objects )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier__content_type) identifier__content_type (identifier_content_type) identifier_content_type )keyword_argument (keyword_argument (identifier__object_id) identifier__object_id (attribute (identifier_obj) identifier_obj (identifier_pk) identifier_pk )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (attribute (identifier_InstanceMetadata) identifier_InstanceMetadata (identifier_DoesNotExist) identifier_DoesNotExist )attribute (block (expression_statement (assignment (identifier_instance_md) identifier_instance_md (call (identifier_InstanceMetadata) identifier_InstanceMetadata (argument_list (keyword_argument (identifier__content_object) identifier__content_object (identifier_obj) identifier_obj )keyword_argument )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_instances) identifier_instances (identifier_append) identifier_append )attribute (argument_list (identifier_instance_md) identifier_instance_md )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_ModelMetadata) identifier_ModelMetadata (None) None )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_model_md) identifier_model_md (call (attribute (attribute (identifier_ModelMetadata) identifier_ModelMetadata (identifier_objects) identifier_objects )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier__content_type) identifier__content_type (identifier_content_type) identifier_content_type )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (attribute (identifier_ModelMetadata) identifier_ModelMetadata (identifier_DoesNotExist) identifier_DoesNotExist )attribute (block (expression_statement (assignment (identifier_model_md) identifier_model_md (call (identifier_ModelMetadata) identifier_ModelMetadata (argument_list (keyword_argument (identifier__content_type) identifier__content_type (identifier_content_type) identifier_content_type )keyword_argument )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (expression_statement (call (attribute (identifier_instances) identifier_instances (identifier_append) identifier_append )attribute (argument_list (identifier_model_md) identifier_model_md )argument_list )call )expression_statement )block )if_statement (return_statement (call (identifier_FormattedMetadata) identifier_FormattedMetadata (argument_list (identifier_Metadata) identifier_Metadata (identifier_instances) identifier_instances (string_'') string_'' (identifier_site) identifier_site (identifier_language) identifier_language )argument_list )call )return_statement )block )function_definition )module
Gets metadata linked from the given object.
(module (function_definition (function_name_FilterFnTable) function_name_FilterFnTable (parameters (identifier_fn_table) identifier_fn_table (identifier_symbol) identifier_symbol )parameters (block (expression_statement (assignment (identifier_new_table) identifier_new_table (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_entry) identifier_entry (identifier_fn_table) identifier_fn_table (block (if_statement (comparison_operator (subscript (identifier_entry) identifier_entry (integer_0) integer_0 )subscript (identifier_symbol) identifier_symbol )comparison_operator (block (expression_statement (call (attribute (identifier_new_table) identifier_new_table (identifier_append) identifier_append )attribute (argument_list (identifier_entry) identifier_entry )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_new_table) identifier_new_table )return_statement )block )function_definition )module
Remove a specific symbol from a fn_table.
(module (function_definition (function_name_map_legend_attributes) function_name_map_legend_attributes (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (string_'InaSAFE Map getMapLegendAttributes called') string_'InaSAFE Map getMapLegendAttributes called' )argument_list )call )expression_statement (expression_statement (assignment (identifier_legend_attribute_list) identifier_legend_attribute_list (list (string_'legend_notes') string_'legend_notes' (string_'legend_units') string_'legend_units' (string_'legend_title') string_'legend_title' )list )assignment )expression_statement (expression_statement (assignment (identifier_legend_attribute_dict) identifier_legend_attribute_dict (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_legend_attribute) identifier_legend_attribute (identifier_legend_attribute_list) identifier_legend_attribute_list (block (try_statement (block (expression_statement (assignment (subscript (identifier_legend_attribute_dict) identifier_legend_attribute_dict (identifier_legend_attribute) identifier_legend_attribute )subscript (line_continuation_\) line_continuation_\ (call (attribute (attribute (identifier_self) identifier_self (identifier__keyword_io) identifier__keyword_io )attribute (identifier_read_keywords) identifier_read_keywords )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_impact) identifier_impact )attribute (identifier_legend_attribute) identifier_legend_attribute )argument_list )call )assignment )expression_statement )block (except_clause (identifier_KeywordNotFoundError) identifier_KeywordNotFoundError (block (pass_statement )pass_statement )block )except_clause (except_clause (identifier_Exception) identifier_Exception (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (return_statement (identifier_legend_attribute_dict) identifier_legend_attribute_dict )return_statement )block )function_definition )module
Get the map legend attribute from the layer keywords if possible. :returns: None on error, otherwise the attributes (notes and units). :rtype: None, str
(module (function_definition (function_name_write_to_path) function_name_write_to_path (parameters (identifier_self) identifier_self (default_parameter (identifier_path) identifier_path (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_path) identifier_path (None) None )comparison_operator (block (expression_statement (assignment (identifier_path) identifier_path (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_f) identifier_f (call (identifier_GitFile) identifier_GitFile (argument_list (identifier_path) identifier_path (string_'wb') string_'wb' )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write_to_file) identifier_write_to_file )attribute (argument_list (identifier_f) identifier_f )argument_list )call )expression_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Write configuration to a file on disk.
(module (function_definition (function_name_get_languages) function_name_get_languages (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_languages) identifier_languages (list (string_'python') string_'python' )list )assignment )expression_statement (expression_statement (assignment (identifier_all_options) identifier_all_options (call (attribute (identifier_CONF) identifier_CONF (identifier_options) identifier_options )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_CONF_SECTION) identifier_CONF_SECTION )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_option) identifier_option (identifier_all_options) identifier_all_options (block (if_statement (comparison_operator (identifier_option) identifier_option (list_comprehension (call (attribute (identifier_l) identifier_l (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call (for_in_clause (identifier_l) identifier_l (identifier_LSP_LANGUAGES) identifier_LSP_LANGUAGES )for_in_clause )list_comprehension )comparison_operator (block (expression_statement (call (attribute (identifier_languages) identifier_languages (identifier_append) identifier_append )attribute (argument_list (identifier_option) identifier_option )argument_list )call )expression_statement )block )if_statement )block )for_statement (return_statement (identifier_languages) identifier_languages )return_statement )block )function_definition )module
Get the list of languages we need to start servers and create clients for.
(module (function_definition (function_name_make_error_redirect) function_name_make_error_redirect (parameters (identifier_self) identifier_self (default_parameter (identifier_authorization_error) identifier_authorization_error (None) None )default_parameter )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_redirect_uri) identifier_redirect_uri )attribute )not_operator (block (return_statement (call (identifier_HttpResponseRedirect) identifier_HttpResponseRedirect (argument_list (attribute (identifier_self) identifier_self (identifier_missing_redirect_uri) identifier_missing_redirect_uri )attribute )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_authorization_error) identifier_authorization_error (parenthesized_expression (boolean_operator (identifier_authorization_error) identifier_authorization_error (call (identifier_AccessDenied) identifier_AccessDenied (argument_list (string_'user denied the request') string_'user denied the request' )argument_list )call )boolean_operator )parenthesized_expression )assignment )expression_statement (expression_statement (assignment (identifier_response_params) identifier_response_params (call (identifier_get_error_details) identifier_get_error_details (argument_list (identifier_authorization_error) identifier_authorization_error )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_response_params) identifier_response_params (string_'state') string_'state' )subscript (attribute (identifier_self) identifier_self (identifier_state) identifier_state )attribute )assignment )expression_statement )block )if_statement (return_statement (call (identifier_HttpResponseRedirect) identifier_HttpResponseRedirect (argument_list (call (identifier_update_parameters) identifier_update_parameters (argument_list (attribute (identifier_self) identifier_self (identifier_redirect_uri) identifier_redirect_uri )attribute (identifier_response_params) identifier_response_params )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Return a Django ``HttpResponseRedirect`` describing the request failure. If the :py:meth:`validate` method raises an error, the authorization endpoint should return the result of calling this method like so: >>> auth_code_generator = ( >>> AuthorizationCodeGenerator('/oauth2/missing_redirect_uri/')) >>> try: >>> auth_code_generator.validate(request) >>> except AuthorizationError as authorization_error: >>> return auth_code_generator.make_error_redirect(authorization_error) If there is no known Client ``redirect_uri`` (because it is malformed, or the Client is invalid, or if the supplied ``redirect_uri`` does not match the regsitered value, or some other request failure) then the response will redirect to the ``missing_redirect_uri`` passed to the :py:meth:`__init__` method. Also used to signify user denial; call this method without passing in the optional ``authorization_error`` argument to return a generic :py:class:`AccessDenied` message. >>> if not user_accepted_request: >>> return auth_code_generator.make_error_redirect()
(module (function_definition (function_name_get_image_uri) function_name_get_image_uri (parameters (identifier_region_name) identifier_region_name (identifier_repo_name) identifier_repo_name (default_parameter (identifier_repo_version) identifier_repo_version (integer_1) integer_1 )default_parameter )parameters (block (expression_statement (assignment (identifier_repo) identifier_repo (call (attribute (string_'{}:{}') string_'{}:{}' (identifier_format) identifier_format )attribute (argument_list (identifier_repo_name) identifier_repo_name (identifier_repo_version) identifier_repo_version )argument_list )call )assignment )expression_statement (return_statement (call (attribute (string_'{}/{}') string_'{}/{}' (identifier_format) identifier_format )attribute (argument_list (call (identifier_registry) identifier_registry (argument_list (identifier_region_name) identifier_region_name (identifier_repo_name) identifier_repo_name )argument_list )call (identifier_repo) identifier_repo )argument_list )call )return_statement )block )function_definition )module
Return algorithm image URI for the given AWS region, repository name, and repository version
(module (function_definition (function_name__pick_lead_item) function_name__pick_lead_item (parameters (identifier_items) identifier_items )parameters (block (expression_statement (assignment (identifier_paired) identifier_paired (call (attribute (identifier_vcfutils) identifier_vcfutils (identifier_get_paired) identifier_get_paired )attribute (argument_list (identifier_items) identifier_items )argument_list )call )assignment )expression_statement (if_statement (identifier_paired) identifier_paired (block (return_statement (attribute (identifier_paired) identifier_paired (identifier_tumor_data) identifier_tumor_data )attribute )return_statement )block (else_clause (block (return_statement (subscript (call (identifier_list) identifier_list (argument_list (identifier_items) identifier_items )argument_list )call (integer_0) integer_0 )subscript )return_statement )block )else_clause )if_statement )block )function_definition )module
Choose lead item for a set of samples. Picks tumors for tumor/normal pairs and first sample for batch groups.
(module (function_definition (function_name_get_hierarchy_form) function_name_get_hierarchy_form (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_args) identifier_args (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_list) identifier_list )argument_list )call (comparison_operator (string_'hierarchy_record_types') string_'hierarchy_record_types' (identifier_kwargs) identifier_kwargs )comparison_operator )boolean_operator (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_get_hierarchy_form_for_create) identifier_get_hierarchy_form_for_create )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_get_hierarchy_form_for_update) identifier_get_hierarchy_form_for_update )attribute (argument_list (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Pass through to provider HierarchyAdminSession.get_hierarchy_form_for_update
(module (function_definition (function_name_cache_set) function_name_cache_set (parameters (identifier_key) identifier_key (identifier_value) identifier_value (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter (default_parameter (identifier_refreshed) identifier_refreshed (False) False )default_parameter )parameters (block (if_statement (comparison_operator (identifier_timeout) identifier_timeout (None) None )comparison_operator (block (expression_statement (assignment (identifier_timeout) identifier_timeout (attribute (identifier_settings) identifier_settings (identifier_CACHE_MIDDLEWARE_SECONDS) identifier_CACHE_MIDDLEWARE_SECONDS )attribute )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_refresh_time) identifier_refresh_time (binary_operator (identifier_timeout) identifier_timeout (call (identifier_time) identifier_time (argument_list )argument_list )call )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_real_timeout) identifier_real_timeout (binary_operator (identifier_timeout) identifier_timeout (attribute (identifier_settings) identifier_settings (identifier_CACHE_SET_DELAY_SECONDS) identifier_CACHE_SET_DELAY_SECONDS )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_packed) identifier_packed (tuple (identifier_value) identifier_value (identifier_refresh_time) identifier_refresh_time (identifier_refreshed) identifier_refreshed )tuple )assignment )expression_statement (return_statement (call (attribute (identifier_cache) identifier_cache (identifier_set) identifier_set )attribute (argument_list (call (identifier__hashed_key) identifier__hashed_key (argument_list (identifier_key) identifier_key )argument_list )call (identifier_packed) identifier_packed (identifier_real_timeout) identifier_real_timeout )argument_list )call )return_statement )block )function_definition )module
Wrapper for ``cache.set``. Stores the cache entry packed with the desired cache expiry time. When the entry is retrieved from cache, the packed expiry time is also checked, and if past, the stale cache entry is stored again with an expiry that has ``CACHE_SET_DELAY_SECONDS`` added to it. In this case the entry is not returned, so that a cache miss occurs and the entry should be set by the caller, but all other callers will still get the stale entry, so no real cache misses ever occur.
(module (function_definition (function_name_columns_formatter) function_name_columns_formatter (parameters (identifier_cls) identifier_cls (identifier_colname) identifier_colname )parameters (block (function_definition (function_name_wrapper) function_name_wrapper (parameters (identifier_func) identifier_func )parameters (block (expression_statement (assignment (subscript (attribute (identifier_cls) identifier_cls (identifier_columns_formatters) identifier_columns_formatters )attribute (identifier_colname) identifier_colname )subscript (identifier_func) identifier_func )assignment )expression_statement (return_statement (identifier_func) identifier_func )return_statement )block )function_definition (return_statement (identifier_wrapper) identifier_wrapper )return_statement )block )function_definition )module
Decorator to mark a function as columns formatter.
(module (function_definition (function_name_vector) function_name_vector (parameters (identifier_self) identifier_self )parameters (type (subscript (attribute (identifier_typing) identifier_typing (identifier_Tuple) identifier_Tuple )attribute (subscript (attribute (identifier_typing) identifier_typing (identifier_Tuple) identifier_Tuple )attribute (identifier_float) identifier_float (identifier_float) identifier_float )subscript (subscript (attribute (identifier_typing) identifier_typing (identifier_Tuple) identifier_Tuple )attribute (identifier_float) identifier_float (identifier_float) identifier_float )subscript )subscript )type (block (expression_statement (ellipsis_...) ellipsis_... )expression_statement )block )function_definition )module
Return the vector property in relative coordinates. Vector will be a tuple of tuples ((y_start, x_start), (y_end, x_end)).
(module (function_definition (function_name_inject_settings) function_name_inject_settings (parameters (typed_parameter (identifier_mixed) identifier_mixed (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_str) identifier_str )type (type (identifier_Settings) identifier_Settings )type )type_parameter )generic_type )type )typed_parameter (typed_parameter (identifier_context) identifier_context (type (generic_type (identifier_MutableMapping) identifier_MutableMapping (type_parameter (type (identifier_str) identifier_str )type (type (identifier_Any) identifier_Any )type )type_parameter )generic_type )type )typed_parameter (typed_default_parameter (identifier_fail_silently) identifier_fail_silently (type (identifier_bool) identifier_bool )type (False) False )typed_default_parameter )parameters (type (None) None )type (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_mixed) identifier_mixed (identifier_str) identifier_str )argument_list )call (block (try_statement (block (expression_statement (assignment (identifier_mixed) identifier_mixed (call (identifier_import_module) identifier_import_module (argument_list (identifier_mixed) identifier_mixed )argument_list )call )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (if_statement (identifier_fail_silently) identifier_fail_silently (block (return_statement )return_statement )block )if_statement (raise_statement )raise_statement )block )except_clause )try_statement )block )if_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (identifier_iter_settings) identifier_iter_settings (argument_list (identifier_mixed) identifier_mixed )argument_list )call (block (expression_statement (assignment (subscript (identifier_context) identifier_context (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )for_statement )block )function_definition )module
Inject settings values to given context. :param mixed: Settings can be a string (that it will be read from Python path), Python module or dict-like instance. :param context: Context to assign settings key values. It should support dict-like item assingment. :param fail_silently: When enabled and reading settings from Python path ignore errors if given Python path couldn't be loaded.
(module (function_definition (function_name_validate_signed_elements) function_name_validate_signed_elements (parameters (identifier_self) identifier_self (identifier_signed_elements) identifier_signed_elements )parameters (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_signed_elements) identifier_signed_elements )argument_list )call (integer_2) integer_2 )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_response_tag) identifier_response_tag (binary_operator (string_'{%s}Response') string_'{%s}Response' (attribute (identifier_OneLogin_Saml2_Constants) identifier_OneLogin_Saml2_Constants (identifier_NS_SAMLP) identifier_NS_SAMLP )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_assertion_tag) identifier_assertion_tag (binary_operator (string_'{%s}Assertion') string_'{%s}Assertion' (attribute (identifier_OneLogin_Saml2_Constants) identifier_OneLogin_Saml2_Constants (identifier_NS_SAML) identifier_NS_SAML )attribute )binary_operator )assignment )expression_statement (if_statement (boolean_operator (boolean_operator (parenthesized_expression (boolean_operator (comparison_operator (identifier_response_tag) identifier_response_tag (identifier_signed_elements) identifier_signed_elements )comparison_operator (comparison_operator (call (attribute (identifier_signed_elements) identifier_signed_elements (identifier_count) identifier_count )attribute (argument_list (identifier_response_tag) identifier_response_tag )argument_list )call (integer_1) integer_1 )comparison_operator )boolean_operator )parenthesized_expression (line_continuation_\) line_continuation_\ (parenthesized_expression (boolean_operator (comparison_operator (identifier_assertion_tag) identifier_assertion_tag (identifier_signed_elements) identifier_signed_elements )comparison_operator (comparison_operator (call (attribute (identifier_signed_elements) identifier_signed_elements (identifier_count) identifier_count )attribute (argument_list (identifier_assertion_tag) identifier_assertion_tag )argument_list )call (integer_1) integer_1 )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (line_continuation_\) line_continuation_\ (parenthesized_expression (boolean_operator (comparison_operator (identifier_response_tag) identifier_response_tag (identifier_signed_elements) identifier_signed_elements )comparison_operator (comparison_operator (identifier_assertion_tag) identifier_assertion_tag (identifier_signed_elements) identifier_signed_elements )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (comparison_operator (identifier_response_tag) identifier_response_tag (identifier_signed_elements) identifier_signed_elements )comparison_operator (block (expression_statement (assignment (identifier_expected_signature_nodes) identifier_expected_signature_nodes (call (attribute (identifier_OneLogin_Saml2_Utils) identifier_OneLogin_Saml2_Utils (identifier_query) identifier_query )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_document) identifier_document )attribute (attribute (identifier_OneLogin_Saml2_Utils) identifier_OneLogin_Saml2_Utils (identifier_RESPONSE_SIGNATURE_XPATH) identifier_RESPONSE_SIGNATURE_XPATH )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_expected_signature_nodes) identifier_expected_signature_nodes )argument_list )call (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_OneLogin_Saml2_ValidationError) identifier_OneLogin_Saml2_ValidationError (argument_list (string_'Unexpected number of Response signatures found. SAML Response rejected.') string_'Unexpected number of Response signatures found. SAML Response rejected.' (attribute (identifier_OneLogin_Saml2_ValidationError) identifier_OneLogin_Saml2_ValidationError (identifier_WRONG_NUMBER_OF_SIGNATURES_IN_RESPONSE) identifier_WRONG_NUMBER_OF_SIGNATURES_IN_RESPONSE )attribute )argument_list )call )raise_statement )block )if_statement )block )if_statement (if_statement (comparison_operator (identifier_assertion_tag) identifier_assertion_tag (identifier_signed_elements) identifier_signed_elements )comparison_operator (block (expression_statement (assignment (identifier_expected_signature_nodes) identifier_expected_signature_nodes (call (attribute (identifier_self) identifier_self (identifier___query) identifier___query )attribute (argument_list (attribute (identifier_OneLogin_Saml2_Utils) identifier_OneLogin_Saml2_Utils (identifier_ASSERTION_SIGNATURE_XPATH) identifier_ASSERTION_SIGNATURE_XPATH )attribute )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_expected_signature_nodes) identifier_expected_signature_nodes )argument_list )call (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_OneLogin_Saml2_ValidationError) identifier_OneLogin_Saml2_ValidationError (argument_list (string_'Unexpected number of Assertion signatures found. SAML Response rejected.') string_'Unexpected number of Assertion signatures found. SAML Response rejected.' (attribute (identifier_OneLogin_Saml2_ValidationError) identifier_OneLogin_Saml2_ValidationError (identifier_WRONG_NUMBER_OF_SIGNATURES_IN_ASSERTION) identifier_WRONG_NUMBER_OF_SIGNATURES_IN_ASSERTION )attribute )argument_list )call )raise_statement )block )if_statement )block )if_statement (return_statement (True) True )return_statement )block )function_definition )module
Verifies that the document has the expected signed nodes. :param signed_elements: The signed elements to be checked :type signed_elements: list :param raise_exceptions: Whether to return false on failure or raise an exception :type raise_exceptions: Boolean
(module (function_definition (function_name_print_object_attributes) function_name_print_object_attributes (parameters (identifier_thing) identifier_thing (default_parameter (identifier_heading) identifier_heading (None) None )default_parameter (default_parameter (identifier_file) identifier_file (None) None )default_parameter )parameters (block (if_statement (identifier_heading) identifier_heading (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'==') string_'==' (identifier_heading) identifier_heading (string_'==') string_'==' (keyword_argument (identifier_file) identifier_file (identifier_file) identifier_file )keyword_argument )argument_list )call )expression_statement )block )if_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_'\n') string_'\n' (identifier_join) identifier_join )attribute (argument_list (call (identifier_object_attributes) identifier_object_attributes (argument_list (identifier_thing) identifier_thing )argument_list )call )argument_list )call (keyword_argument (identifier_file) identifier_file (identifier_file) identifier_file )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Print the attribute names in thing vertically
(module (function_definition (function_name_execute) function_name_execute (parameters (identifier_self) identifier_self (default_parameter (identifier_limit) identifier_limit (string_'default') string_'default' )default_parameter (default_parameter (identifier_params) identifier_params (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (import_from_statement (dotted_name (identifier_ibis) identifier_ibis (identifier_client) identifier_client )dotted_name (dotted_name (identifier_execute) identifier_execute )dotted_name )import_from_statement (return_statement (call (identifier_execute) identifier_execute (argument_list (identifier_self) identifier_self (keyword_argument (identifier_limit) identifier_limit (identifier_limit) identifier_limit )keyword_argument (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
If this expression is based on physical tables in a database backend, execute it against that backend. Parameters ---------- limit : integer or None, default 'default' Pass an integer to effect a specific row limit. limit=None means "no limit". The default is whatever is in ibis.options. Returns ------- result : expression-dependent Result of compiling expression and executing in backend
(module (function_definition (function_name_call) function_name_call (parameters (identifier_args) identifier_args (default_parameter (identifier_stdout) identifier_stdout (identifier_PIPE) identifier_PIPE )default_parameter (default_parameter (identifier_stderr) identifier_stderr (identifier_PIPE) identifier_PIPE )default_parameter )parameters (block (expression_statement (assignment (identifier_p) identifier_p (call (identifier_Popen) identifier_Popen (argument_list (identifier_args) identifier_args (keyword_argument (identifier_stdout) identifier_stdout (identifier_stdout) identifier_stdout )keyword_argument (keyword_argument (identifier_stderr) identifier_stderr (identifier_stderr) identifier_stderr )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_out) identifier_out (identifier_err) identifier_err )pattern_list (call (attribute (identifier_p) identifier_p (identifier_communicate) identifier_communicate )attribute (argument_list )argument_list )call )assignment )expression_statement (try_statement (block (return_statement (expression_list (call (attribute (identifier_out) identifier_out (identifier_decode) identifier_decode )attribute (argument_list (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_encoding) identifier_encoding )attribute )argument_list )call (call (attribute (identifier_err) identifier_err (identifier_decode) identifier_decode )attribute (argument_list (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_encoding) identifier_encoding )attribute )argument_list )call )expression_list )return_statement )block (except_clause (identifier_Exception) identifier_Exception (block (return_statement (expression_list (identifier_out) identifier_out (identifier_err) identifier_err )expression_list )return_statement )block )except_clause )try_statement )block )function_definition )module
Calls the given arguments in a seperate process and returns the contents of standard out.
(module (function_definition (function_name_computePCs) function_name_computePCs (parameters (identifier_plink_path) identifier_plink_path (identifier_k) identifier_k (identifier_bfile) identifier_bfile (identifier_ffile) identifier_ffile )parameters (block (try_statement (block (expression_statement (assignment (identifier_output) identifier_output (call (attribute (identifier_subprocess) identifier_subprocess (identifier_check_output) identifier_check_output )attribute (argument_list (binary_operator (string_'%s --version --noweb') string_'%s --version --noweb' (identifier_plink_path) identifier_plink_path )binary_operator (keyword_argument (identifier_shell) identifier_shell (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_use_plink) identifier_use_plink (comparison_operator (call (identifier_float) identifier_float (argument_list (subscript (subscript (call (attribute (identifier_output) identifier_output (identifier_split) identifier_split )attribute (argument_list (string_' ') string_' ' )argument_list )call (integer_1) integer_1 )subscript (slice (integer_1) integer_1 (colon) colon (unary_operator (integer_3) integer_3 )unary_operator )slice )subscript )argument_list )call (float_1.9) float_1.9 )comparison_operator )assignment )expression_statement )block (except_clause (block (expression_statement (assignment (identifier_use_plink) identifier_use_plink (False) False )assignment )expression_statement )block )except_clause )try_statement (assert_statement (comparison_operator (identifier_bfile) identifier_bfile (None) None )comparison_operator (string_'Path to bed-file is missing.') string_'Path to bed-file is missing.' )assert_statement (assert_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (binary_operator (identifier_bfile) identifier_bfile (string_'.bed') string_'.bed' )binary_operator )argument_list )call (binary_operator (string_'%s.bed is missing.') string_'%s.bed is missing.' (identifier_bfile) identifier_bfile )binary_operator )assert_statement (assert_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (binary_operator (identifier_bfile) identifier_bfile (string_'.bim') string_'.bim' )binary_operator )argument_list )call (binary_operator (string_'%s.bim is missing.') string_'%s.bim is missing.' (identifier_bfile) identifier_bfile )binary_operator )assert_statement (assert_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (binary_operator (identifier_bfile) identifier_bfile (string_'.fam') string_'.fam' )binary_operator )argument_list )call (binary_operator (string_'%s.fam is missing.') string_'%s.fam is missing.' (identifier_bfile) identifier_bfile )binary_operator )assert_statement (expression_statement (assignment (identifier_out_dir) identifier_out_dir (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (identifier_ffile) identifier_ffile )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_out_dir) identifier_out_dir (string_'') string_'' )comparison_operator (parenthesized_expression (not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_out_dir) identifier_out_dir )argument_list )call )not_operator )parenthesized_expression )boolean_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_makedirs) identifier_makedirs )attribute (argument_list (identifier_out_dir) identifier_out_dir )argument_list )call )expression_statement )block )if_statement (if_statement (identifier_use_plink) identifier_use_plink (block (expression_statement (call (identifier_computePCsPlink) identifier_computePCsPlink (argument_list (identifier_plink_path) identifier_plink_path (identifier_k) identifier_k (identifier_out_dir) identifier_out_dir (identifier_bfile) identifier_bfile (identifier_ffile) identifier_ffile )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_computePCsPython) identifier_computePCsPython (argument_list (identifier_out_dir) identifier_out_dir (identifier_k) identifier_k (identifier_bfile) identifier_bfile (identifier_ffile) identifier_ffile )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
compute the first k principal components Input: k : number of principal components plink_path : plink path bfile : binary bed file (bfile.bed, bfile.bim and bfile.fam are required) ffile : name of output file
(module (function_definition (function_name_rescan_file) function_name_rescan_file (parameters (identifier_self) identifier_self (identifier_filename) identifier_filename (identifier_sha256hash) identifier_sha256hash (identifier_apikey) identifier_apikey )parameters (block (expression_statement (assignment (identifier_url) identifier_url (binary_operator (attribute (identifier_self) identifier_self (identifier_base_url) identifier_base_url )attribute (string_"file/rescan") string_"file/rescan" )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'apikey') string_'apikey' (identifier_apikey) identifier_apikey )pair (pair (string_'resource') string_'resource' (identifier_sha256hash) identifier_sha256hash )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_rate_limit_clear) identifier_rate_limit_clear (call (attribute (identifier_self) identifier_self (identifier_rate_limit) identifier_rate_limit )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_rate_limit_clear) identifier_rate_limit_clear (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_requests) identifier_requests (identifier_post) identifier_post )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute (attribute (identifier_self) identifier_self (identifier_HTTP_OK) identifier_HTTP_OK )attribute )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_info) identifier_info )attribute (argument_list (string_"sent: %s, HTTP: %d, content: %s") string_"sent: %s, HTTP: %d, content: %s" (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute (attribute (identifier_response) identifier_response (identifier_text) identifier_text )attribute )argument_list )call )expression_statement )block (elif_clause (comparison_operator (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute (attribute (identifier_self) identifier_self (identifier_HTTP_RATE_EXCEEDED) identifier_HTTP_RATE_EXCEEDED )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (integer_20) integer_20 )argument_list )call )expression_statement )block )elif_clause (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_error) identifier_error )attribute (argument_list (string_"sent: %s, HTTP: %d") string_"sent: %s, HTTP: %d" (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call (attribute (identifier_response) identifier_response (identifier_status_code) identifier_status_code )attribute )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (identifier_response) identifier_response )return_statement )block )if_statement )block )function_definition )module
just send the hash, check the date
(module (function_definition (function_name_create_logger) function_name_create_logger (parameters (identifier_log_file) identifier_log_file (default_parameter (identifier_name) identifier_name (string_'logger') string_'logger' )default_parameter (default_parameter (identifier_cmd) identifier_cmd (True) True )default_parameter )parameters (block (import_statement (dotted_name (identifier_logging) identifier_logging )dotted_name )import_statement (expression_statement (assignment (identifier_logger) identifier_logger (call (attribute (identifier_logging) identifier_logging (identifier_getLogger) identifier_getLogger )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_setLevel) identifier_setLevel )attribute (argument_list (attribute (identifier_logging) identifier_logging (identifier_DEBUG) identifier_DEBUG )attribute )argument_list )call )expression_statement (expression_statement (assignment (identifier_formatter) identifier_formatter (call (attribute (identifier_logging) identifier_logging (identifier_Formatter) identifier_Formatter )attribute (argument_list (string_'%(asctime)s | %(name)s | %(levelname)s | %(message)s') string_'%(asctime)s | %(name)s | %(levelname)s | %(message)s' (keyword_argument (identifier_datefmt) identifier_datefmt (string_'%Y-%m-%d %H:%M:%S') string_'%Y-%m-%d %H:%M:%S' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_fh) identifier_fh (call (attribute (identifier_logging) identifier_logging (identifier_FileHandler) identifier_FileHandler )attribute (argument_list (identifier_log_file) identifier_log_file )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_fh) identifier_fh (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_fh) identifier_fh (identifier_setFormatter) identifier_setFormatter )attribute (argument_list (identifier_formatter) identifier_formatter )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_addHandler) identifier_addHandler )attribute (argument_list (identifier_fh) identifier_fh )argument_list )call )expression_statement (if_statement (identifier_cmd) identifier_cmd (block (expression_statement (assignment (identifier_ch) identifier_ch (call (attribute (identifier_logging) identifier_logging (identifier_StreamHandler) identifier_StreamHandler )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_ch) identifier_ch (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_ch) identifier_ch (identifier_setFormatter) identifier_setFormatter )attribute (argument_list (identifier_formatter) identifier_formatter )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_addHandler) identifier_addHandler )attribute (argument_list (identifier_ch) identifier_ch )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_logger) identifier_logger )return_statement )block )function_definition )module
define a logger for your program parameters ------------ log_file file name of log name name of logger example ------------ logger = create_logger('example.log',name='logger',) logger.info('This is an example!') logger.warning('This is a warn!')
(module (function_definition (function_name_greedy_max_inden_setcover) function_name_greedy_max_inden_setcover (parameters (identifier_candidate_sets_dict) identifier_candidate_sets_dict (identifier_items) identifier_items (default_parameter (identifier_max_covers) identifier_max_covers (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_uncovered_set) identifier_uncovered_set (call (identifier_set) identifier_set (argument_list (identifier_items) identifier_items )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_rejected_keys) identifier_rejected_keys (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_accepted_keys) identifier_accepted_keys (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_covered_items_list) identifier_covered_items_list (list )list )assignment )expression_statement (while_statement (True) True (block (if_statement (boolean_operator (comparison_operator (identifier_max_covers) identifier_max_covers (None) None )comparison_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_covered_items_list) identifier_covered_items_list )argument_list )call (identifier_max_covers) identifier_max_covers )comparison_operator )boolean_operator (block (break_statement )break_statement )block )if_statement (expression_statement (assignment (identifier_maxkey) identifier_maxkey (None) None )assignment )expression_statement (expression_statement (assignment (identifier_maxlen) identifier_maxlen (unary_operator (integer_1) integer_1 )unary_operator )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_candidate_items) identifier_candidate_items )pattern_list (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (identifier_candidate_sets_dict) identifier_candidate_sets_dict )argument_list )call (block (if_statement (boolean_operator (comparison_operator (identifier_key) identifier_key (identifier_rejected_keys) identifier_rejected_keys )comparison_operator (comparison_operator (identifier_key) identifier_key (identifier_accepted_keys) identifier_accepted_keys )comparison_operator )boolean_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_lenval) identifier_lenval (call (identifier_len) identifier_len (argument_list (identifier_candidate_items) identifier_candidate_items )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_uncovered_set) identifier_uncovered_set (identifier_issuperset) identifier_issuperset )attribute (argument_list (identifier_candidate_items) identifier_candidate_items )argument_list )call (block (if_statement (comparison_operator (identifier_lenval) identifier_lenval (identifier_maxlen) identifier_maxlen )comparison_operator (block (expression_statement (assignment (identifier_maxkey) identifier_maxkey (identifier_key) identifier_key )assignment )expression_statement (expression_statement (assignment (identifier_maxlen) identifier_maxlen (identifier_lenval) identifier_lenval )assignment )expression_statement )block )if_statement )block (else_clause (block (expression_statement (call (attribute (identifier_rejected_keys) identifier_rejected_keys (identifier_add) identifier_add )attribute (argument_list (identifier_key) identifier_key )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (if_statement (comparison_operator (identifier_maxkey) identifier_maxkey (None) None )comparison_operator (block (break_statement )break_statement )block )if_statement (expression_statement (assignment (identifier_maxval) identifier_maxval (subscript (identifier_candidate_sets_dict) identifier_candidate_sets_dict (identifier_maxkey) identifier_maxkey )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_accepted_keys) identifier_accepted_keys (identifier_add) identifier_add )attribute (argument_list (identifier_maxkey) identifier_maxkey )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_covered_items_list) identifier_covered_items_list (identifier_append) identifier_append )attribute (argument_list (call (identifier_list) identifier_list (argument_list (identifier_maxval) identifier_maxval )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_uncovered_set) identifier_uncovered_set (identifier_difference_update) identifier_difference_update )attribute (argument_list (identifier_maxval) identifier_maxval )argument_list )call )expression_statement )block )while_statement (expression_statement (assignment (identifier_uncovered_items) identifier_uncovered_items (call (identifier_list) identifier_list (argument_list (identifier_uncovered_set) identifier_uncovered_set )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_covertup) identifier_covertup (expression_list (identifier_uncovered_items) identifier_uncovered_items (identifier_covered_items_list) identifier_covered_items_list (identifier_accepted_keys) identifier_accepted_keys )expression_list )assignment )expression_statement (return_statement (identifier_covertup) identifier_covertup )return_statement )block )function_definition )module
greedy algorithm for maximum independent set cover Covers items with sets from candidate sets. Could be made faster. CommandLine: python -m utool.util_alg --test-greedy_max_inden_setcover Example0: >>> # ENABLE_DOCTEST >>> from utool.util_alg import * # NOQA >>> import utool as ut >>> candidate_sets_dict = {'a': [5, 3], 'b': [2, 3, 5], ... 'c': [4, 8], 'd': [7, 6, 2, 1]} >>> items = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> max_covers = None >>> tup = greedy_max_inden_setcover(candidate_sets_dict, items, max_covers) >>> (uncovered_items, covered_items_list, accepted_keys) = tup >>> result = ut.repr4((uncovered_items, sorted(list(accepted_keys))), nl=False) >>> print(result) ([0, 9], ['a', 'c', 'd']) Example1: >>> # ENABLE_DOCTEST >>> from utool.util_alg import * # NOQA >>> import utool as ut >>> candidate_sets_dict = {'a': [5, 3], 'b': [2, 3, 5], ... 'c': [4, 8], 'd': [7, 6, 2, 1]} >>> items = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> max_covers = 1 >>> tup = greedy_max_inden_setcover(candidate_sets_dict, items, max_covers) >>> (uncovered_items, covered_items_list, accepted_keys) = tup >>> result = ut.repr4((uncovered_items, sorted(list(accepted_keys))), nl=False) >>> print(result) ([0, 3, 4, 5, 8, 9], ['d'])
(module (function_definition (function_name_update_state_machine_tab_label) function_name_update_state_machine_tab_label (parameters (identifier_self) identifier_self (identifier_state_machine_m) identifier_state_machine_m )parameters (block (expression_statement (assignment (identifier_sm_id) identifier_sm_id (attribute (attribute (identifier_state_machine_m) identifier_state_machine_m (identifier_state_machine) identifier_state_machine )attribute (identifier_state_machine_id) identifier_state_machine_id )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_sm_id) identifier_sm_id (attribute (identifier_self) identifier_self (identifier_tabs) identifier_tabs )attribute )comparison_operator (block (expression_statement (assignment (identifier_sm) identifier_sm (attribute (identifier_state_machine_m) identifier_state_machine_m (identifier_state_machine) identifier_state_machine )attribute )assignment )expression_statement (if_statement (boolean_operator (boolean_operator (not_operator (comparison_operator (subscript (subscript (attribute (identifier_self) identifier_self (identifier_tabs) identifier_tabs )attribute (identifier_sm_id) identifier_sm_id )subscript (string_'marked_dirty') string_'marked_dirty' )subscript (attribute (identifier_sm) identifier_sm (identifier_marked_dirty) identifier_marked_dirty )attribute )comparison_operator )not_operator (line_continuation_\) line_continuation_\ (not_operator (comparison_operator (subscript (subscript (attribute (identifier_self) identifier_self (identifier_tabs) identifier_tabs )attribute (identifier_sm_id) identifier_sm_id )subscript (string_'file_system_path') string_'file_system_path' )subscript (attribute (identifier_sm) identifier_sm (identifier_file_system_path) identifier_file_system_path )attribute )comparison_operator )not_operator )boolean_operator (line_continuation_\) line_continuation_\ (not_operator (comparison_operator (subscript (subscript (attribute (identifier_self) identifier_self (identifier_tabs) identifier_tabs )attribute (identifier_sm_id) identifier_sm_id )subscript (string_'root_state_name') string_'root_state_name' )subscript (attribute (attribute (identifier_sm) identifier_sm (identifier_root_state) identifier_root_state )attribute (identifier_name) identifier_name )attribute )comparison_operator )not_operator )boolean_operator (block (expression_statement (assignment (identifier_label) identifier_label (subscript (call (attribute (call (attribute (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_view) identifier_view )attribute (string_"notebook") string_"notebook" )subscript (identifier_get_tab_label) identifier_get_tab_label )attribute (argument_list (subscript (subscript (attribute (identifier_self) identifier_self (identifier_tabs) identifier_tabs )attribute (identifier_sm_id) identifier_sm_id )subscript (string_"page") string_"page" )subscript )argument_list )call (identifier_get_child) identifier_get_child )attribute (argument_list )argument_list )call (identifier_get_children) identifier_get_children )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (call (identifier_set_tab_label_texts) identifier_set_tab_label_texts (argument_list (identifier_label) identifier_label (identifier_state_machine_m) identifier_state_machine_m (keyword_argument (identifier_unsaved_changes) identifier_unsaved_changes (attribute (identifier_sm) identifier_sm (identifier_marked_dirty) identifier_marked_dirty )attribute )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier_tabs) identifier_tabs )attribute (identifier_sm_id) identifier_sm_id )subscript (string_'file_system_path') string_'file_system_path' )subscript (attribute (identifier_sm) identifier_sm (identifier_file_system_path) identifier_file_system_path )attribute )assignment )expression_statement (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier_tabs) identifier_tabs )attribute (identifier_sm_id) identifier_sm_id )subscript (string_'marked_dirty') string_'marked_dirty' )subscript (attribute (identifier_sm) identifier_sm (identifier_marked_dirty) identifier_marked_dirty )attribute )assignment )expression_statement (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier_tabs) identifier_tabs )attribute (identifier_sm_id) identifier_sm_id )subscript (string_'root_state_name') string_'root_state_name' )subscript (attribute (attribute (identifier_sm) identifier_sm (identifier_root_state) identifier_root_state )attribute (identifier_name) identifier_name )attribute )assignment )expression_statement )block )if_statement )block (else_clause (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (call (attribute (string_"State machine '{0}' tab label can not be updated there is no tab.") string_"State machine '{0}' tab label can not be updated there is no tab." (identifier_format) identifier_format )attribute (argument_list (identifier_sm_id) identifier_sm_id )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Updates tab label if needed because system path, root state name or marked_dirty flag changed :param StateMachineModel state_machine_m: State machine model that has changed :return:
(module (function_definition (function_name_focus_down) function_name_focus_down (parameters (identifier_pymux) identifier_pymux )parameters (block (expression_statement (string_" Move focus down. ") string_" Move focus down. " )expression_statement (expression_statement (call (identifier__move_focus) identifier__move_focus (argument_list (identifier_pymux) identifier_pymux (lambda (lambda_parameters (identifier_wp) identifier_wp )lambda_parameters (attribute (identifier_wp) identifier_wp (identifier_xpos) identifier_xpos )attribute )lambda (lambda (lambda_parameters (identifier_wp) identifier_wp )lambda_parameters (binary_operator (binary_operator (attribute (identifier_wp) identifier_wp (identifier_ypos) identifier_ypos )attribute (attribute (identifier_wp) identifier_wp (identifier_height) identifier_height )attribute )binary_operator (integer_2) integer_2 )binary_operator )lambda )argument_list )call )expression_statement )block )function_definition )module
Move focus down.
(module (function_definition (function_name_widget_from_single_value) function_name_widget_from_single_value (parameters (identifier_o) identifier_o )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_o) identifier_o (identifier_string_types) identifier_string_types )argument_list )call (block (return_statement (call (identifier_Text) identifier_Text (argument_list (keyword_argument (identifier_value) identifier_value (call (identifier_unicode_type) identifier_unicode_type (argument_list (identifier_o) identifier_o )argument_list )call )keyword_argument )argument_list )call )return_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_o) identifier_o (identifier_bool) identifier_bool )argument_list )call (block (return_statement (call (identifier_Checkbox) identifier_Checkbox (argument_list (keyword_argument (identifier_value) identifier_value (identifier_o) identifier_o )keyword_argument )argument_list )call )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_o) identifier_o (identifier_Integral) identifier_Integral )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_min) identifier_min (identifier_max) identifier_max (identifier_value) identifier_value )pattern_list (call (identifier__get_min_max_value) identifier__get_min_max_value (argument_list (None) None (None) None (identifier_o) identifier_o )argument_list )call )assignment )expression_statement (return_statement (call (identifier_IntSlider) identifier_IntSlider (argument_list (keyword_argument (identifier_value) identifier_value (identifier_o) identifier_o )keyword_argument (keyword_argument (identifier_min) identifier_min (identifier_min) identifier_min )keyword_argument (keyword_argument (identifier_max) identifier_max (identifier_max) identifier_max )keyword_argument )argument_list )call )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_o) identifier_o (identifier_Real) identifier_Real )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_min) identifier_min (identifier_max) identifier_max (identifier_value) identifier_value )pattern_list (call (identifier__get_min_max_value) identifier__get_min_max_value (argument_list (None) None (None) None (identifier_o) identifier_o )argument_list )call )assignment )expression_statement (return_statement (call (identifier_FloatSlider) identifier_FloatSlider (argument_list (keyword_argument (identifier_value) identifier_value (identifier_o) identifier_o )keyword_argument (keyword_argument (identifier_min) identifier_min (identifier_min) identifier_min )keyword_argument (keyword_argument (identifier_max) identifier_max (identifier_max) identifier_max )keyword_argument )argument_list )call )return_statement )block )elif_clause (else_clause (block (return_statement (None) None )return_statement )block )else_clause )if_statement )block )function_definition )module
Make widgets from single values, which can be used as parameter defaults.
(module (function_definition (function_name_churn) function_name_churn (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_canceled) identifier_canceled (call (attribute (call (attribute (identifier_self) identifier_self (identifier_canceled) identifier_canceled )attribute (argument_list )argument_list )call (identifier_count) identifier_count )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_active) identifier_active (call (attribute (call (attribute (identifier_self) identifier_self (identifier_active) identifier_active )attribute (argument_list )argument_list )call (identifier_count) identifier_count )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (binary_operator (call (attribute (identifier_decimal) identifier_decimal (identifier_Decimal) identifier_Decimal )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_canceled) identifier_canceled )argument_list )call )argument_list )call (call (attribute (identifier_decimal) identifier_decimal (identifier_Decimal) identifier_Decimal )attribute (argument_list (call (identifier_str) identifier_str (argument_list (identifier_active) identifier_active )argument_list )call )argument_list )call )binary_operator )return_statement )block )function_definition )module
Return number of canceled Subscriptions divided by active Subscriptions.
(module (function_definition (function_name_get_group_for_col) function_name_get_group_for_col (parameters (identifier_self) identifier_self (identifier_table_name) identifier_table_name (identifier_col_name) identifier_col_name )parameters (block (expression_statement (assignment (identifier_df) identifier_df (subscript (attribute (identifier_self) identifier_self (identifier_dm) identifier_dm )attribute (identifier_table_name) identifier_table_name )subscript )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_group_name) identifier_group_name (subscript (attribute (identifier_df) identifier_df (identifier_loc) identifier_loc )attribute (identifier_col_name) identifier_col_name (string_'group') string_'group' )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (return_statement (string_'') string_'' )return_statement )block )except_clause )try_statement (return_statement (identifier_group_name) identifier_group_name )return_statement )block )function_definition )module
Check data model to find group name for a given column header Parameters ---------- table_name: str col_name: str Returns --------- group_name: str
(module (function_definition (function_name__set_hyperparameters) function_name__set_hyperparameters (parameters (identifier_self) identifier_self (identifier_parameters) identifier_parameters )parameters (block (for_statement (pattern_list (identifier_name) identifier_name (identifier_value) identifier_value )pattern_list (call (attribute (identifier_parameters) identifier_parameters (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call (block (try_statement (block (expression_statement (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (identifier_name) identifier_name )argument_list )call )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_'Each parameter in parameters must be an attribute. ') string_'Each parameter in parameters must be an attribute. ' (string_'{} is not.') string_'{} is not.' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (identifier_name) identifier_name (identifier_value) identifier_value )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Set internal optimization parameters.
(module (function_definition (function_name_create_backend) function_name_create_backend (parameters (identifier_self) identifier_self (identifier_service_id) identifier_service_id (identifier_version_number) identifier_version_number (identifier_name) identifier_name (identifier_address) identifier_address (default_parameter (identifier_use_ssl) identifier_use_ssl (False) False )default_parameter (default_parameter (identifier_port) identifier_port (integer_80) integer_80 )default_parameter (default_parameter (identifier_connect_timeout) identifier_connect_timeout (integer_1000) integer_1000 )default_parameter (default_parameter (identifier_first_byte_timeout) identifier_first_byte_timeout (integer_15000) integer_15000 )default_parameter (default_parameter (identifier_between_bytes_timeout) identifier_between_bytes_timeout (integer_10000) integer_10000 )default_parameter (default_parameter (identifier_error_threshold) identifier_error_threshold (integer_0) integer_0 )default_parameter (default_parameter (identifier_max_conn) identifier_max_conn (integer_20) integer_20 )default_parameter (default_parameter (identifier_weight) identifier_weight (integer_100) integer_100 )default_parameter (default_parameter (identifier_auto_loadbalance) identifier_auto_loadbalance (False) False )default_parameter (default_parameter (identifier_shield) identifier_shield (None) None )default_parameter (default_parameter (identifier_request_condition) identifier_request_condition (None) None )default_parameter (default_parameter (identifier_healthcheck) identifier_healthcheck (None) None )default_parameter (default_parameter (identifier_comment) identifier_comment (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_body) identifier_body (call (attribute (identifier_self) identifier_self (identifier__formdata) identifier__formdata )attribute (argument_list (dictionary (pair (string_"name") string_"name" (identifier_name) identifier_name )pair (pair (string_"address") string_"address" (identifier_address) identifier_address )pair (pair (string_"use_ssl") string_"use_ssl" (identifier_use_ssl) identifier_use_ssl )pair (pair (string_"port") string_"port" (identifier_port) identifier_port )pair (pair (string_"connect_timeout") string_"connect_timeout" (identifier_connect_timeout) identifier_connect_timeout )pair (pair (string_"first_byte_timeout") string_"first_byte_timeout" (identifier_first_byte_timeout) identifier_first_byte_timeout )pair (pair (string_"between_bytes_timeout") string_"between_bytes_timeout" (identifier_between_bytes_timeout) identifier_between_bytes_timeout )pair (pair (string_"error_threshold") string_"error_threshold" (identifier_error_threshold) identifier_error_threshold )pair (pair (string_"max_conn") string_"max_conn" (identifier_max_conn) identifier_max_conn )pair (pair (string_"weight") string_"weight" (identifier_weight) identifier_weight )pair (pair (string_"auto_loadbalance") string_"auto_loadbalance" (identifier_auto_loadbalance) identifier_auto_loadbalance )pair (pair (string_"shield") string_"shield" (identifier_shield) identifier_shield )pair (pair (string_"request_condition") string_"request_condition" (identifier_request_condition) identifier_request_condition )pair (pair (string_"healthcheck") string_"healthcheck" (identifier_healthcheck) identifier_healthcheck )pair (pair (string_"comment") string_"comment" (identifier_comment) identifier_comment )pair )dictionary (attribute (identifier_FastlyBackend) identifier_FastlyBackend (identifier_FIELDS) identifier_FIELDS )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_content) identifier_content (call (attribute (identifier_self) identifier_self (identifier__fetch) identifier__fetch )attribute (argument_list (binary_operator (string_"/service/%s/version/%d/backend") string_"/service/%s/version/%d/backend" (tuple (identifier_service_id) identifier_service_id (identifier_version_number) identifier_version_number )tuple )binary_operator (keyword_argument (identifier_method) identifier_method (string_"POST") string_"POST" )keyword_argument (keyword_argument (identifier_body) identifier_body (identifier_body) identifier_body )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_FastlyBackend) identifier_FastlyBackend (argument_list (identifier_self) identifier_self (identifier_content) identifier_content )argument_list )call )return_statement )block )function_definition )module
Create a backend for a particular service and version.
(module (function_definition (function_name_prox_soft_plus) function_name_prox_soft_plus (parameters (identifier_X) identifier_X (identifier_step) identifier_step (default_parameter (identifier_thresh) identifier_thresh (integer_0) integer_0 )default_parameter )parameters (block (return_statement (call (identifier_prox_plus) identifier_prox_plus (argument_list (call (identifier_prox_soft) identifier_prox_soft (argument_list (identifier_X) identifier_X (identifier_step) identifier_step (keyword_argument (identifier_thresh) identifier_thresh (identifier_thresh) identifier_thresh )keyword_argument )argument_list )call (identifier_step) identifier_step )argument_list )call )return_statement )block )function_definition )module
Soft thresholding with projection onto non-negative numbers
(module (function_definition (function_name_exclude_chars) function_name_exclude_chars (parameters (identifier_text) identifier_text (default_parameter (identifier_exclusion) identifier_exclusion (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_exclusion) identifier_exclusion (conditional_expression (list )list (comparison_operator (identifier_exclusion) identifier_exclusion (None) None )comparison_operator (identifier_exclusion) identifier_exclusion )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_regexp) identifier_regexp (boolean_operator (call (attribute (string_r"|") string_r"|" (identifier_join) identifier_join )attribute (argument_list (list_comprehension (call (identifier_select_regexp_char) identifier_select_regexp_char (argument_list (identifier_x) identifier_x )argument_list )call (for_in_clause (identifier_x) identifier_x (identifier_exclusion) identifier_exclusion )for_in_clause )list_comprehension )argument_list )call (string_r'') string_r'' )boolean_operator )assignment )expression_statement (return_statement (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (identifier_regexp) identifier_regexp (string_'') string_'' (identifier_text) identifier_text )argument_list )call )return_statement )block )function_definition )module
Clean text string of simbols in exclusion list.
(module (function_definition (function_name_handle_unset_command) function_name_handle_unset_command (parameters (identifier_self) identifier_self (typed_parameter (identifier_line) identifier_line (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_position) identifier_position (type (identifier_int) identifier_int )type )typed_parameter (typed_parameter (identifier_tokens) identifier_tokens (type (identifier_ParseResults) identifier_ParseResults )type )typed_parameter )parameters (type (identifier_ParseResults) identifier_ParseResults )type (block (expression_statement (assignment (identifier_key) identifier_key (subscript (identifier_tokens) identifier_tokens (string_'key') string_'key' )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_validate_unset_command) identifier_validate_unset_command )attribute (argument_list (identifier_line) identifier_line (identifier_position) identifier_position (identifier_key) identifier_key )argument_list )call )expression_statement (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier_annotations) identifier_annotations )attribute (identifier_key) identifier_key )subscript )delete_statement (return_statement (identifier_tokens) identifier_tokens )return_statement )block )function_definition )module
Handle an ``UNSET X`` statement or raises an exception if it is not already set. :raises: MissingAnnotationKeyWarning
(module (function_definition (function_name__fetch) function_name__fetch (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (string_'uri') string_'uri' (attribute (identifier_self) identifier_self (identifier__meta_data) identifier__meta_data )attribute )comparison_operator (block (expression_statement (assignment (identifier_error) identifier_error (binary_operator (concatenated_string (string_"There was an attempt to assign a new uri to this ") string_"There was an attempt to assign a new uri to this " (string_"resource, the _meta_data['uri'] is %s and it should") string_"resource, the _meta_data['uri'] is %s and it should" (string_" not be changed.") string_" not be changed." )concatenated_string (parenthesized_expression (subscript (attribute (identifier_self) identifier_self (identifier__meta_data) identifier__meta_data )attribute (string_'uri') string_'uri' )subscript )parenthesized_expression )binary_operator )assignment )expression_statement (raise_statement (call (identifier_URICreationCollision) identifier_URICreationCollision (argument_list (identifier_error) identifier_error )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier__create_uri) identifier__create_uri (subscript (attribute (subscript (attribute (identifier_self) identifier_self (identifier__meta_data) identifier__meta_data )attribute (string_'container') string_'container' )subscript (identifier__meta_data) identifier__meta_data )attribute (string_'uri') string_'uri' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_session) identifier_session (subscript (attribute (subscript (attribute (identifier_self) identifier_self (identifier__meta_data) identifier__meta_data )attribute (string_'bigip') string_'bigip' )subscript (identifier__meta_data) identifier__meta_data )attribute (string_'icr_session') string_'icr_session' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_session) identifier_session (identifier_post) identifier_post )attribute (argument_list (identifier__create_uri) identifier__create_uri (keyword_argument (identifier_json) identifier_json (dictionary )dictionary )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__produce_instance) identifier__produce_instance )attribute (argument_list (identifier_response) identifier_response )argument_list )call )return_statement )block )function_definition )module
wrapped by `fetch` override that in subclasses to customize
(module (function_definition (function_name_paint_agent_trail) function_name_paint_agent_trail (parameters (identifier_self) identifier_self (identifier_y) identifier_y (identifier_x) identifier_x (identifier_val) identifier_val )parameters (block (for_statement (identifier_j) identifier_j (call (identifier_range) identifier_range (argument_list (integer_1) integer_1 (binary_operator (attribute (identifier_self) identifier_self (identifier_cell_height) identifier_cell_height )attribute (integer_1) integer_1 )binary_operator )argument_list )call (block (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_1) integer_1 (binary_operator (attribute (identifier_self) identifier_self (identifier_cell_width) identifier_cell_width )attribute (integer_1) integer_1 )binary_operator )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_img) identifier_img )attribute (identifier_put) identifier_put )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_agent_color) identifier_agent_color )attribute (argument_list (identifier_val) identifier_val )argument_list )call (tuple (binary_operator (binary_operator (identifier_x) identifier_x (attribute (identifier_self) identifier_self (identifier_cell_width) identifier_cell_width )attribute )binary_operator (identifier_i) identifier_i )binary_operator (binary_operator (binary_operator (identifier_y) identifier_y (attribute (identifier_self) identifier_self (identifier_cell_height) identifier_cell_height )attribute )binary_operator (identifier_j) identifier_j )binary_operator )tuple )argument_list )call )expression_statement )block )for_statement )block )for_statement )block )function_definition )module
paint an agent trail as ONE pixel to allow for multiple agent trails to be seen in the same cell
(module (function_definition (function_name_standardize_input_data) function_name_standardize_input_data (parameters (identifier_data) identifier_data )parameters (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_data) identifier_data )argument_list )call (identifier_bytes) identifier_bytes )comparison_operator (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_data) identifier_data (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_data) identifier_data )argument_list )call (identifier_list) identifier_list )comparison_operator (block (expression_statement (assignment (identifier_data) identifier_data (list_comprehension (conditional_expression (call (attribute (identifier_el) identifier_el (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_data) identifier_data )argument_list )call (identifier_bytes) identifier_bytes )comparison_operator (identifier_el) identifier_el )conditional_expression (for_in_clause (identifier_el) identifier_el (identifier_data) identifier_data )for_in_clause )list_comprehension )assignment )expression_statement )block )if_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Ensure utf-8 encoded strings are passed to the indico API
(module (function_definition (function_name_is_successful) function_name_is_successful (parameters (identifier_self) identifier_self (default_parameter (identifier_retry) identifier_retry (False) False )default_parameter )parameters (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_is_terminated) identifier_is_terminated )attribute (argument_list (keyword_argument (identifier_retry) identifier_retry (identifier_retry) identifier_retry )keyword_argument )argument_list )call )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_retry_num) identifier_retry_num (attribute (identifier_options) identifier_options (identifier_retry_times) identifier_retry_times )attribute )assignment )expression_statement (while_statement (comparison_operator (identifier_retry_num) identifier_retry_num (integer_0) integer_0 )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_statuses) identifier_statuses (call (attribute (identifier_self) identifier_self (identifier_get_task_statuses) identifier_get_task_statuses )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (identifier_all) identifier_all (generator_expression (comparison_operator (attribute (identifier_task) identifier_task (identifier_status) identifier_status )attribute (attribute (attribute (attribute (identifier_Instance) identifier_Instance (identifier_Task) identifier_Task )attribute (identifier_TaskStatus) identifier_TaskStatus )attribute (identifier_SUCCESS) identifier_SUCCESS )attribute )comparison_operator (for_in_clause (identifier_task) identifier_task (call (attribute (identifier_statuses) identifier_statuses (identifier_values) identifier_values )attribute (argument_list )argument_list )call )for_in_clause )generator_expression )call )return_statement )block (except_clause (tuple (attribute (identifier_errors) identifier_errors (identifier_InternalServerError) identifier_InternalServerError )attribute (attribute (identifier_errors) identifier_errors (identifier_RequestTimeTooSkewed) identifier_RequestTimeTooSkewed )attribute )tuple (block (expression_statement (augmented_assignment (identifier_retry_num) identifier_retry_num (integer_1) integer_1 )augmented_assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_retry) identifier_retry )not_operator (comparison_operator (identifier_retry_num) identifier_retry_num (integer_0) integer_0 )comparison_operator )boolean_operator (block (raise_statement )raise_statement )block )if_statement )block )except_clause )try_statement )block )while_statement )block )function_definition )module
If the instance runs successfully. :return: True if successful else False :rtype: bool
(module (function_definition (function_name_load) function_name_load (parameters (identifier_fp) identifier_fp (default_parameter (identifier_class_) identifier_class_ (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (identifier_loado) identifier_loado (argument_list (call (attribute (identifier_json) identifier_json (identifier_load) identifier_load )attribute (argument_list (identifier_fp) identifier_fp (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (keyword_argument (identifier_class_) identifier_class_ (identifier_class_) identifier_class_ )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Convert content in a JSON-encoded text file to a Physical Information Object or a list of such objects. :param fp: File-like object supporting .read() method to deserialize from. :param class_: Subclass of :class:`.Pio` to produce, if not unambiguous :param kwargs: Any options available to json.load(). :return: Single object derived from :class:`.Pio` or a list of such object.
(module (function_definition (function_name__related_field_data) function_name__related_field_data (parameters (identifier_field) identifier_field (identifier_obj) identifier_obj )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (identifier__basic_field_data) identifier__basic_field_data (argument_list (identifier_field) identifier_field (identifier_obj) identifier_obj )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_relation_info) identifier_relation_info (dictionary (pair (attribute (identifier_Field) identifier_Field (identifier_REL_DB_TABLE) identifier_REL_DB_TABLE )attribute (attribute (attribute (attribute (attribute (identifier_field) identifier_field (identifier_rel) identifier_rel )attribute (identifier_to) identifier_to )attribute (identifier__meta) identifier__meta )attribute (identifier_db_table) identifier_db_table )attribute )pair (pair (attribute (identifier_Field) identifier_Field (identifier_REL_APP) identifier_REL_APP )attribute (attribute (attribute (attribute (attribute (identifier_field) identifier_field (identifier_rel) identifier_rel )attribute (identifier_to) identifier_to )attribute (identifier__meta) identifier__meta )attribute (identifier_app_label) identifier_app_label )attribute )pair (pair (attribute (identifier_Field) identifier_Field (identifier_REL_MODEL) identifier_REL_MODEL )attribute (attribute (attribute (attribute (identifier_field) identifier_field (identifier_rel) identifier_rel )attribute (identifier_to) identifier_to )attribute (identifier___name__) identifier___name__ )attribute )pair )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (attribute (identifier_Field) identifier_Field (identifier_TYPE) identifier_TYPE )attribute )subscript (attribute (identifier_FieldType) identifier_FieldType (identifier_REL) identifier_REL )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_data) identifier_data (attribute (identifier_Field) identifier_Field (identifier_REL) identifier_REL )attribute )subscript (identifier_relation_info) identifier_relation_info )assignment )expression_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Returns relation ``field`` as a dict. Dict contains related pk info and some meta information for reconstructing objects.
(module (function_definition (function_name_make_ioc) function_name_make_ioc (parameters (default_parameter (identifier_name) identifier_name (None) None )default_parameter (default_parameter (identifier_description) identifier_description (string_'Automatically generated IOC') string_'Automatically generated IOC' )default_parameter (default_parameter (identifier_author) identifier_author (string_'IOC_api') string_'IOC_api' )default_parameter (default_parameter (identifier_links) identifier_links (None) None )default_parameter (default_parameter (identifier_keywords) identifier_keywords (None) None )default_parameter (default_parameter (identifier_iocid) identifier_iocid (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_root) identifier_root (call (attribute (identifier_ioc_et) identifier_ioc_et (identifier_make_ioc_root) identifier_make_ioc_root )attribute (argument_list (identifier_iocid) identifier_iocid )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_root) identifier_root (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_ioc_et) identifier_ioc_et (identifier_make_metadata_node) identifier_make_metadata_node )attribute (argument_list (identifier_name) identifier_name (identifier_description) identifier_description (identifier_author) identifier_author (identifier_links) identifier_links (identifier_keywords) identifier_keywords )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_metadata_node) identifier_metadata_node (call (attribute (identifier_root) identifier_root (identifier_find) identifier_find )attribute (argument_list (string_'metadata') string_'metadata' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_top_level_indicator) identifier_top_level_indicator (call (identifier_make_indicator_node) identifier_make_indicator_node (argument_list (string_'OR') string_'OR' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_parameters_node) identifier_parameters_node (parenthesized_expression (call (attribute (identifier_ioc_et) identifier_ioc_et (identifier_make_parameters_node) identifier_make_parameters_node )attribute (argument_list )argument_list )call )parenthesized_expression )assignment )expression_statement (expression_statement (call (attribute (identifier_root) identifier_root (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_ioc_et) identifier_ioc_et (identifier_make_criteria_node) identifier_make_criteria_node )attribute (argument_list (identifier_top_level_indicator) identifier_top_level_indicator )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_root) identifier_root (identifier_append) identifier_append )attribute (argument_list (identifier_parameters_node) identifier_parameters_node )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_ioc_et) identifier_ioc_et (identifier_set_root_lastmodified) identifier_set_root_lastmodified )attribute (argument_list (identifier_root) identifier_root )argument_list )call )expression_statement (return_statement (expression_list (identifier_root) identifier_root (identifier_metadata_node) identifier_metadata_node (identifier_top_level_indicator) identifier_top_level_indicator (identifier_parameters_node) identifier_parameters_node )expression_list )return_statement )block )function_definition )module
This generates all parts of an IOC, but without any definition. This is a helper function used by __init__. :param name: string, Name of the ioc :param description: string, description of the ioc :param author: string, author name/email address :param links: ist of tuples. Each tuple should be in the form (rel, href, value). :param keywords: string. This is normally a space delimited string of values that may be used as keywords :param iocid: GUID for the IOC. This should not be specified under normal circumstances. :return: a tuple containing three elementTree Element objects The first element, the root, contains the entire IOC itself. The second element, the top level OR indicator, allows the user to add additional IndicatorItem or Indicator nodes to the IOC easily. The third element, the parameters node, allows the user to quickly parse the parameters.
(module (function_definition (function_name_escape_unicode_string) function_name_escape_unicode_string (parameters (identifier_u) identifier_u )parameters (block (function_definition (function_name_replacer) function_name_replacer (parameters (identifier_matchobj) identifier_matchobj )parameters (block (if_statement (comparison_operator (call (identifier_ord) identifier_ord (argument_list (call (attribute (identifier_matchobj) identifier_matchobj (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )argument_list )call (integer_127) integer_127 )comparison_operator (block (return_statement (string_"\\x7f") string_"\\x7f" )return_statement )block )if_statement (if_statement (comparison_operator (call (identifier_ord) identifier_ord (argument_list (call (attribute (identifier_matchobj) identifier_matchobj (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )argument_list )call (integer_92) integer_92 )comparison_operator (block (return_statement (string_"\\\\") string_"\\\\" )return_statement )block )if_statement (return_statement (subscript (identifier_REPLACEMENT_TABLE) identifier_REPLACEMENT_TABLE (call (identifier_ord) identifier_ord (argument_list (call (attribute (identifier_matchobj) identifier_matchobj (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )argument_list )call )subscript )return_statement )block )function_definition (return_statement (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_"([\\000-\\037\\134\\177])") string_"([\\000-\\037\\134\\177])" (identifier_replacer) identifier_replacer (identifier_u) identifier_u )argument_list )call )return_statement )block )function_definition )module
Escapes the nonprintable chars 0-31 and 127, and backslash; preferably with a friendly equivalent such as '\n' if available, but otherwise with a Python-style backslashed hex escape.
(module (function_definition (function_name_escape_shell_arg) function_name_escape_shell_arg (parameters (identifier_shell_arg) identifier_shell_arg )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_shell_arg) identifier_shell_arg (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute )argument_list )call (block (expression_statement (assignment (identifier_msg) identifier_msg (binary_operator (concatenated_string (string_"ERROR: escape_shell_arg() expected string argument but ") string_"ERROR: escape_shell_arg() expected string argument but " (string_"got '%s' of type '%s'.") string_"got '%s' of type '%s'." )concatenated_string (tuple (call (identifier_repr) identifier_repr (argument_list (identifier_shell_arg) identifier_shell_arg )argument_list )call (call (identifier_type) identifier_type (argument_list (identifier_shell_arg) identifier_shell_arg )argument_list )call )tuple )binary_operator )assignment )expression_statement (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )if_statement (return_statement (binary_operator (string_"'%s'") string_"'%s'" (call (attribute (identifier_shell_arg) identifier_shell_arg (identifier_replace) identifier_replace )attribute (argument_list (string_"'") string_"'" (string_r"'\''") string_r"'\''" )argument_list )call )binary_operator )return_statement )block )function_definition )module
Escape shell argument shell_arg by placing it within single-quotes. Any single quotes found within the shell argument string will be escaped. @param shell_arg: The shell argument to be escaped. @type shell_arg: string @return: The single-quote-escaped value of the shell argument. @rtype: string @raise TypeError: if shell_arg is not a string. @see: U{http://mail.python.org/pipermail/python-list/2005-October/346957.html}
(module (function_definition (function_name_get_customjs) function_name_get_customjs (parameters (identifier_self) identifier_self (identifier_references) identifier_references (default_parameter (identifier_plot_id) identifier_plot_id (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_plot_id) identifier_plot_id (None) None )comparison_operator (block (expression_statement (assignment (identifier_plot_id) identifier_plot_id (boolean_operator (attribute (attribute (identifier_self) identifier_self (identifier_plot) identifier_plot )attribute (identifier_id) identifier_id )attribute (string_'PLACEHOLDER_PLOT_ID') string_'PLACEHOLDER_PLOT_ID' )boolean_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_self_callback) identifier_self_callback (call (attribute (attribute (identifier_self) identifier_self (identifier_js_callback) identifier_js_callback )attribute (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_comm_id) identifier_comm_id (attribute (attribute (identifier_self) identifier_self (identifier_comm) identifier_comm )attribute (identifier_id) identifier_id )attribute )keyword_argument (keyword_argument (identifier_timeout) identifier_timeout (attribute (identifier_self) identifier_self (identifier_timeout) identifier_timeout )attribute )keyword_argument (keyword_argument (identifier_debounce) identifier_debounce (attribute (identifier_self) identifier_self (identifier_debounce) identifier_debounce )attribute )keyword_argument (keyword_argument (identifier_plot_id) identifier_plot_id (identifier_plot_id) identifier_plot_id )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_attributes) identifier_attributes (call (attribute (identifier_self) identifier_self (identifier_attributes_js) identifier_attributes_js )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_attributes) identifier_attributes )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_conditions) identifier_conditions (list_comprehension (binary_operator (string_"%s") string_"%s" (identifier_cond) identifier_cond )binary_operator (for_in_clause (identifier_cond) identifier_cond (attribute (identifier_self) identifier_self (identifier_skip) identifier_skip )attribute )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_conditional) identifier_conditional (string_'') string_'' )assignment )expression_statement (if_statement (identifier_conditions) identifier_conditions (block (expression_statement (assignment (identifier_conditional) identifier_conditional (binary_operator (string_'if (%s) { return };\n') string_'if (%s) { return };\n' (parenthesized_expression (call (attribute (string_' || ') string_' || ' (identifier_join) identifier_join )attribute (argument_list (identifier_conditions) identifier_conditions )argument_list )call )parenthesized_expression )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (string_"var data = {};\n") string_"var data = {};\n" )assignment )expression_statement (expression_statement (assignment (identifier_code) identifier_code (binary_operator (binary_operator (binary_operator (binary_operator (identifier_conditional) identifier_conditional (identifier_data) identifier_data )binary_operator (identifier_attributes) identifier_attributes )binary_operator (attribute (identifier_self) identifier_self (identifier_code) identifier_code )attribute )binary_operator (identifier_self_callback) identifier_self_callback )binary_operator )assignment )expression_statement (return_statement (call (identifier_CustomJS) identifier_CustomJS (argument_list (keyword_argument (identifier_args) identifier_args (identifier_references) identifier_references )keyword_argument (keyword_argument (identifier_code) identifier_code (identifier_code) identifier_code )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Creates a CustomJS callback that will send the requested attributes back to python.
(module (function_definition (function_name_merge_urls_data_to) function_name_merge_urls_data_to (parameters (identifier_to) identifier_to (default_parameter (identifier_food) identifier_food (dictionary )dictionary )default_parameter )parameters (block (if_statement (not_operator (identifier_to) identifier_to )not_operator (block (expression_statement (call (attribute (identifier_to) identifier_to (identifier_update) identifier_update )attribute (argument_list (identifier_food) identifier_food )argument_list )call )expression_statement )block )if_statement (for_statement (pattern_list (identifier_url) identifier_url (identifier_data) identifier_data )pattern_list (call (attribute (identifier_food) identifier_food (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_url) identifier_url (identifier_to) identifier_to )comparison_operator (block (expression_statement (assignment (subscript (identifier_to) identifier_to (identifier_url) identifier_url )subscript (identifier_data) identifier_data )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_to) identifier_to (identifier_url) identifier_url )subscript (call (attribute (subscript (identifier_to) identifier_to (identifier_url) identifier_url )subscript (identifier_merge_with) identifier_merge_with )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )for_statement )block )function_definition )module
Merge urls data
(module (function_definition (function_name___make_footprint) function_name___make_footprint (parameters (identifier_input) identifier_input (identifier_size) identifier_size (identifier_footprint) identifier_footprint )parameters (block (expression_statement (string_"Creates a standard footprint element ala scipy.ndimage.") string_"Creates a standard footprint element ala scipy.ndimage." )expression_statement (if_statement (comparison_operator (identifier_footprint) identifier_footprint (None) None )comparison_operator (block (if_statement (comparison_operator (identifier_size) identifier_size (None) None )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_"no footprint or filter size provided") string_"no footprint or filter size provided" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_sizes) identifier_sizes (call (attribute (identifier__ni_support) identifier__ni_support (identifier__normalize_sequence) identifier__normalize_sequence )attribute (argument_list (identifier_size) identifier_size (attribute (identifier_input) identifier_input (identifier_ndim) identifier_ndim )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_footprint) identifier_footprint (call (attribute (identifier_numpy) identifier_numpy (identifier_ones) identifier_ones )attribute (argument_list (identifier_sizes) identifier_sizes (keyword_argument (identifier_dtype) identifier_dtype (identifier_bool) identifier_bool )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_footprint) identifier_footprint (call (attribute (identifier_numpy) identifier_numpy (identifier_asarray) identifier_asarray )attribute (argument_list (identifier_footprint) identifier_footprint (keyword_argument (identifier_dtype) identifier_dtype (identifier_bool) identifier_bool )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_footprint) identifier_footprint )return_statement )block )function_definition )module
Creates a standard footprint element ala scipy.ndimage.
(module (function_definition (function_name_next_img) function_name_next_img (parameters (identifier_self) identifier_self (default_parameter (identifier_loop) identifier_loop (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_channel) identifier_channel (call (attribute (identifier_self) identifier_self (identifier_get_current_channel) identifier_get_current_channel )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_channel) identifier_channel (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_show_error) identifier_show_error )attribute (argument_list (string_"Please create a channel.") string_"Please create a channel." (keyword_argument (identifier_raisetab) identifier_raisetab (True) True )keyword_argument )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (identifier_channel) identifier_channel (identifier_next_image) identifier_next_image )attribute (argument_list )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Go to the next image in the channel.
(module (function_definition (function_name__onWhat) function_name__onWhat (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_line) identifier_line (identifier_pos) identifier_pos (identifier_absPosition) identifier_absPosition )parameters (block (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier___lastImport) identifier___lastImport )attribute (identifier_what) identifier_what )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_ImportWhat) identifier_ImportWhat (argument_list (identifier_name) identifier_name (identifier_line) identifier_line (identifier_pos) identifier_pos (identifier_absPosition) identifier_absPosition )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Memorizes an imported item
(module (function_definition (function_name_make_fasta_url) function_name_make_fasta_url (parameters (identifier_ensembl_release) identifier_ensembl_release (identifier_species) identifier_species (identifier_sequence_type) identifier_sequence_type (default_parameter (identifier_server) identifier_server (identifier_ENSEMBL_FTP_SERVER) identifier_ENSEMBL_FTP_SERVER )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_ensembl_release) identifier_ensembl_release (identifier_species) identifier_species (identifier_reference_name) identifier_reference_name )pattern_list (call (identifier_normalize_release_properties) identifier_normalize_release_properties (argument_list (identifier_ensembl_release) identifier_ensembl_release (identifier_species) identifier_species )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_subdir) identifier_subdir (call (identifier__species_subdir) identifier__species_subdir (argument_list (identifier_ensembl_release) identifier_ensembl_release (keyword_argument (identifier_species) identifier_species (identifier_species) identifier_species )keyword_argument (keyword_argument (identifier_filetype) identifier_filetype (string_"fasta") string_"fasta" )keyword_argument (keyword_argument (identifier_server) identifier_server (identifier_server) identifier_server )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_server_subdir) identifier_server_subdir (call (attribute (identifier_urllib_parse) identifier_urllib_parse (identifier_urljoin) identifier_urljoin )attribute (argument_list (identifier_server) identifier_server (identifier_subdir) identifier_subdir )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_server_sequence_subdir) identifier_server_sequence_subdir (call (identifier_join) identifier_join (argument_list (identifier_server_subdir) identifier_server_subdir (identifier_sequence_type) identifier_sequence_type )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_filename) identifier_filename (call (identifier_make_fasta_filename) identifier_make_fasta_filename (argument_list (keyword_argument (identifier_ensembl_release) identifier_ensembl_release (identifier_ensembl_release) identifier_ensembl_release )keyword_argument (keyword_argument (identifier_species) identifier_species (identifier_species) identifier_species )keyword_argument (keyword_argument (identifier_sequence_type) identifier_sequence_type (identifier_sequence_type) identifier_sequence_type )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_join) identifier_join (argument_list (identifier_server_sequence_subdir) identifier_server_sequence_subdir (identifier_filename) identifier_filename )argument_list )call )return_statement )block )function_definition )module
Construct URL to FASTA file with cDNA transcript or protein sequences Parameter examples: ensembl_release = 75 species = "Homo_sapiens" sequence_type = "cdna" (other option: "pep")
(module (function_definition (function_name_delete_thing_shadow) function_name_delete_thing_shadow (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_thing_name) identifier_thing_name (call (attribute (identifier_self) identifier_self (identifier__get_required_parameter) identifier__get_required_parameter )attribute (argument_list (string_'thingName') string_'thingName' (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_payload) identifier_payload (string_b'') string_b'' )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__shadow_op) identifier__shadow_op )attribute (argument_list (string_'delete') string_'delete' (identifier_thing_name) identifier_thing_name (identifier_payload) identifier_payload )argument_list )call )return_statement )block )function_definition )module
r""" Deletes the thing shadow for the specified thing. :Keyword Arguments: * *thingName* (``string``) -- [REQUIRED] The name of the thing. :returns: (``dict``) -- The output from the DeleteThingShadow operation * *payload* (``bytes``) -- The state information, in JSON format.
(module (function_definition (function_name_national) function_name_national (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__national) identifier__national )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__national) identifier__national )attribute (call (identifier_NationalList) identifier_NationalList (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (keyword_argument (identifier_account_sid) identifier_account_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'account_sid') string_'account_sid' )subscript )keyword_argument (keyword_argument (identifier_country_code) identifier_country_code (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'country_code') string_'country_code' )subscript )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__national) identifier__national )attribute )return_statement )block )function_definition )module
Access the national :returns: twilio.rest.api.v2010.account.available_phone_number.national.NationalList :rtype: twilio.rest.api.v2010.account.available_phone_number.national.NationalList
(module (function_definition (function_name_client_getname) function_name_client_getname (parameters (identifier_self) identifier_self (default_parameter (identifier_encoding) identifier_encoding (identifier__NOTSET) identifier__NOTSET )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_execute) identifier_execute )attribute (argument_list (string_b'CLIENT') string_b'CLIENT' (string_b'GETNAME') string_b'GETNAME' (keyword_argument (identifier_encoding) identifier_encoding (identifier_encoding) identifier_encoding )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get the current connection name.
(module (function_definition (function_name_contributions) function_name_contributions (parameters (identifier_self) identifier_self (identifier_request) identifier_request (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (identifier_Contribution) identifier_Contribution (call (identifier_get_models) identifier_get_models (argument_list )argument_list )call )comparison_operator (block (return_statement (call (identifier_Response) identifier_Response (argument_list (list )list )argument_list )call )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_request) identifier_request (identifier_method) identifier_method )attribute (string_"POST") string_"POST" )comparison_operator (block (expression_statement (assignment (identifier_serializer) identifier_serializer (call (identifier_ContributionSerializer) identifier_ContributionSerializer (argument_list (keyword_argument (identifier_data) identifier_data (call (identifier_get_request_data) identifier_get_request_data (argument_list (identifier_request) identifier_request )argument_list )call )keyword_argument (keyword_argument (identifier_many) identifier_many (True) True )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_serializer) identifier_serializer (identifier_is_valid) identifier_is_valid )attribute (argument_list )argument_list )call )not_operator (block (return_statement (call (identifier_Response) identifier_Response (argument_list (attribute (identifier_serializer) identifier_serializer (identifier_errors) identifier_errors )attribute (keyword_argument (identifier_status) identifier_status (attribute (identifier_status) identifier_status (identifier_HTTP_400_BAD_REQUEST) identifier_HTTP_400_BAD_REQUEST )attribute )keyword_argument )argument_list )call )return_statement )block )if_statement (expression_statement (call (attribute (identifier_serializer) identifier_serializer (identifier_save) identifier_save )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (identifier_Response) identifier_Response (argument_list (attribute (identifier_serializer) identifier_serializer (identifier_data) identifier_data )attribute )argument_list )call )return_statement )block (else_clause (block (expression_statement (assignment (identifier_content_pk) identifier_content_pk (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'pk') string_'pk' (None) None )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_content_pk) identifier_content_pk (None) None )comparison_operator (block (return_statement (call (identifier_Response) identifier_Response (argument_list (list )list (keyword_argument (identifier_status) identifier_status (attribute (identifier_status) identifier_status (identifier_HTTP_404_NOT_FOUND) identifier_HTTP_404_NOT_FOUND )attribute )keyword_argument )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_queryset) identifier_queryset (call (attribute (call (attribute (attribute (identifier_Contribution) identifier_Contribution (identifier_search_objects) identifier_search_objects )attribute (identifier_search) identifier_search )attribute (argument_list )argument_list )call (identifier_filter) identifier_filter )attribute (argument_list (call (attribute (identifier_es_filter) identifier_es_filter (identifier_Term) identifier_Term )attribute (argument_list (dictionary_splat (dictionary (pair (string_'content.id') string_'content.id' (identifier_content_pk) identifier_content_pk )pair )dictionary )dictionary_splat )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_serializer) identifier_serializer (call (identifier_ContributionSerializer) identifier_ContributionSerializer (argument_list (call (attribute (subscript (identifier_queryset) identifier_queryset (slice (colon) colon (call (attribute (identifier_queryset) identifier_queryset (identifier_count) identifier_count )attribute (argument_list )argument_list )call )slice )subscript (identifier_sort) identifier_sort )attribute (argument_list (string_'id') string_'id' )argument_list )call (keyword_argument (identifier_many) identifier_many (True) True )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (identifier_Response) identifier_Response (argument_list (attribute (identifier_serializer) identifier_serializer (identifier_data) identifier_data )attribute )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
gets or adds contributions :param request: a WSGI request object :param kwargs: keyword arguments (optional) :return: `rest_framework.response.Response`
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__track_changes) identifier__track_changes )attribute )not_operator (block (return_statement (True) True )return_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_self) identifier_self (identifier_to_api_data) identifier_to_api_data )attribute (argument_list (keyword_argument (identifier_restrict_keys) identifier_restrict_keys (attribute (identifier_self) identifier_self (identifier__track_changes) identifier__track_changes )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (attribute (identifier_self) identifier_self (identifier_session) identifier_session )attribute (identifier_patch) identifier_patch )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier_build_url) identifier_build_url )attribute (argument_list (string_'') string_'' )argument_list )call (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_response) identifier_response )not_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_field) identifier_field (attribute (identifier_self) identifier_self (identifier__track_changes) identifier__track_changes )attribute (block (expression_statement (call (identifier_setattr) identifier_setattr (argument_list (identifier_self) identifier_self (call (identifier_snakecase) identifier_snakecase (argument_list (identifier_field) identifier_field )argument_list )call (call (attribute (identifier_data) identifier_data (identifier_get) identifier_get )attribute (argument_list (identifier_field) identifier_field )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__track_changes) identifier__track_changes )attribute (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )function_definition )module
Update this range
(module (function_definition (function_name__ParseRecordExtraField) function_name__ParseRecordExtraField (parameters (identifier_self) identifier_self (identifier_byte_stream) identifier_byte_stream (identifier_file_offset) identifier_file_offset )parameters (block (expression_statement (assignment (identifier_extra_field_map) identifier_extra_field_map (call (attribute (identifier_self) identifier_self (identifier__GetDataTypeMap) identifier__GetDataTypeMap )attribute (argument_list (string_'asl_record_extra_field') string_'asl_record_extra_field' )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_record_extra_field) identifier_record_extra_field (call (attribute (identifier_self) identifier_self (identifier__ReadStructureFromByteStream) identifier__ReadStructureFromByteStream )attribute (argument_list (identifier_byte_stream) identifier_byte_stream (identifier_file_offset) identifier_file_offset (identifier_extra_field_map) identifier_extra_field_map )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (tuple (identifier_ValueError) identifier_ValueError (attribute (identifier_errors) identifier_errors (identifier_ParseError) identifier_ParseError )attribute )tuple (as_pattern_target (identifier_exception) identifier_exception )as_pattern_target )as_pattern (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_ParseError) identifier_ParseError )attribute (argument_list (call (attribute (parenthesized_expression (concatenated_string (string_'Unable to parse record extra field at offset: 0x{0:08x} with error: ') string_'Unable to parse record extra field at offset: 0x{0:08x} with error: ' (string_'{1!s}') string_'{1!s}' )concatenated_string )parenthesized_expression (identifier_format) identifier_format )attribute (argument_list (identifier_file_offset) identifier_file_offset (identifier_exception) identifier_exception )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (identifier_record_extra_field) identifier_record_extra_field )return_statement )block )function_definition )module
Parses a record extra field. Args: byte_stream (bytes): byte stream. file_offset (int): offset of the record extra field relative to the start of the file. Returns: asl_record_extra_field: record extra field. Raises: ParseError: if the record extra field cannot be parsed.
(module (function_definition (function_name_submodules) function_name_submodules (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_p) identifier_p (lambda (lambda_parameters (identifier_o) identifier_o )lambda_parameters (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_o) identifier_o (identifier_Module) identifier_Module )argument_list )call (call (attribute (identifier_self) identifier_self (identifier__docfilter) identifier__docfilter )attribute (argument_list (identifier_o) identifier_o )argument_list )call )boolean_operator )lambda )assignment )expression_statement (return_statement (call (identifier_sorted) identifier_sorted (argument_list (call (identifier_filter) identifier_filter (argument_list (identifier_p) identifier_p (call (attribute (attribute (identifier_self) identifier_self (identifier_doc) identifier_doc )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Returns all documented sub-modules in the module sorted alphabetically as a list of `pydoc.Module`.
(module (function_definition (function_name_inet_to_str) function_name_inet_to_str (parameters (identifier_inet) identifier_inet )parameters (block (try_statement (block (return_statement (call (attribute (identifier_socket) identifier_socket (identifier_inet_ntop) identifier_inet_ntop )attribute (argument_list (attribute (identifier_socket) identifier_socket (identifier_AF_INET) identifier_AF_INET )attribute (identifier_inet) identifier_inet )argument_list )call )return_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (return_statement (call (attribute (identifier_socket) identifier_socket (identifier_inet_ntop) identifier_inet_ntop )attribute (argument_list (attribute (identifier_socket) identifier_socket (identifier_AF_INET6) identifier_AF_INET6 )attribute (identifier_inet) identifier_inet )argument_list )call )return_statement )block )except_clause )try_statement )block )function_definition )module
Convert inet object to a string Args: inet (inet struct): inet network address Returns: str: Printable/readable IP address
(module (function_definition (function_name_install_dependencies) function_name_install_dependencies (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__skip_virtualenv) identifier__skip_virtualenv )attribute (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_info) identifier_info )attribute (argument_list (string_'Skip Virtualenv set ... nothing to do') string_'Skip Virtualenv set ... nothing to do' )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_has_reqs) identifier_has_reqs (boolean_operator (call (identifier__isfile) identifier__isfile (argument_list (attribute (identifier_self) identifier_self (identifier__requirements_file) identifier__requirements_file )attribute )argument_list )call (attribute (identifier_self) identifier_self (identifier__requirements) identifier__requirements )attribute )boolean_operator )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier__virtualenv) identifier__virtualenv )attribute (None) None )comparison_operator (identifier_has_reqs) identifier_has_reqs )boolean_operator (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_info) identifier_info )attribute (argument_list (string_'Building new virtualenv and installing requirements') string_'Building new virtualenv and installing requirements' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__build_new_virtualenv) identifier__build_new_virtualenv )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__install_requirements) identifier__install_requirements )attribute (argument_list )argument_list )call )expression_statement )block (elif_clause (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier__virtualenv) identifier__virtualenv )attribute (None) None )comparison_operator (not_operator (identifier_has_reqs) identifier_has_reqs )not_operator )boolean_operator (block (expression_statement (call (attribute (identifier_LOG) identifier_LOG (identifier_info) identifier_info )attribute (argument_list (string_'No requirements found, so no virtualenv will be made') string_'No requirements found, so no virtualenv will be made' )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__pkg_venv) identifier__pkg_venv )attribute (False) False )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_'Cannot determine what to do about virtualenv') string_'Cannot determine what to do about virtualenv' )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Creates a virtualenv and installs requirements
(module (function_definition (function_name__master_control_program) function_name__master_control_program (parameters (identifier_self) identifier_self )parameters (block (return_statement (call (attribute (identifier_mcp) identifier_mcp (identifier_MasterControlProgram) identifier_MasterControlProgram )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (keyword_argument (identifier_consumer) identifier_consumer (attribute (attribute (identifier_self) identifier_self (identifier_args) identifier_args )attribute (identifier_consumer) identifier_consumer )attribute )keyword_argument (keyword_argument (identifier_profile) identifier_profile (attribute (attribute (identifier_self) identifier_self (identifier_args) identifier_args )attribute (identifier_profile) identifier_profile )attribute )keyword_argument (keyword_argument (identifier_quantity) identifier_quantity (attribute (attribute (identifier_self) identifier_self (identifier_args) identifier_args )attribute (identifier_quantity) identifier_quantity )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return an instance of the MasterControlProgram. :rtype: rejected.mcp.MasterControlProgram
(module (function_definition (function_name_create_switch) function_name_create_switch (parameters (identifier_type) identifier_type (identifier_settings) identifier_settings (identifier_pin) identifier_pin )parameters (block (expression_statement (assignment (identifier_switch) identifier_switch (None) None )assignment )expression_statement (if_statement (comparison_operator (identifier_type) identifier_type (string_"A") string_"A" )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_group) identifier_group (identifier_device) identifier_device )pattern_list (call (attribute (identifier_settings) identifier_settings (identifier_split) identifier_split )attribute (argument_list (string_",") string_"," )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_switch) identifier_switch (call (attribute (identifier_pi_switch) identifier_pi_switch (identifier_RCSwitchA) identifier_RCSwitchA )attribute (argument_list (identifier_group) identifier_group (identifier_device) identifier_device )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_type) identifier_type (string_"B") string_"B" )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_addr) identifier_addr (identifier_channel) identifier_channel )pattern_list (call (attribute (identifier_settings) identifier_settings (identifier_split) identifier_split )attribute (argument_list (string_",") string_"," )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_addr) identifier_addr (call (identifier_int) identifier_int (argument_list (identifier_addr) identifier_addr )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_channel) identifier_channel (call (identifier_int) identifier_int (argument_list (identifier_channel) identifier_channel )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_switch) identifier_switch (call (attribute (identifier_pi_switch) identifier_pi_switch (identifier_RCSwitchB) identifier_RCSwitchB )attribute (argument_list (identifier_addr) identifier_addr (identifier_channel) identifier_channel )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_type) identifier_type (string_"C") string_"C" )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_family) identifier_family (identifier_group) identifier_group (identifier_device) identifier_device )pattern_list (call (attribute (identifier_settings) identifier_settings (identifier_split) identifier_split )attribute (argument_list (string_",") string_"," )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_group) identifier_group (call (identifier_int) identifier_int (argument_list (identifier_group) identifier_group )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_device) identifier_device (call (identifier_int) identifier_int (argument_list (identifier_device) identifier_device )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_switch) identifier_switch (call (attribute (identifier_pi_switch) identifier_pi_switch (identifier_RCSwitchC) identifier_RCSwitchC )attribute (argument_list (identifier_family) identifier_family (identifier_group) identifier_group (identifier_device) identifier_device )argument_list )call )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (identifier_type) identifier_type (string_"D") string_"D" )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_group) identifier_group (identifier_device) identifier_device )pattern_list (call (attribute (identifier_settings) identifier_settings (identifier_split) identifier_split )attribute (argument_list (string_",") string_"," )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_device) identifier_device (call (identifier_int) identifier_int (argument_list (identifier_device) identifier_device )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_switch) identifier_switch (call (attribute (identifier_pi_switch) identifier_pi_switch (identifier_RCSwitchD) identifier_RCSwitchD )attribute (argument_list (identifier_group) identifier_group (identifier_device) identifier_device )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (print_statement (binary_operator (string_"Type %s is not supported!") string_"Type %s is not supported!" (identifier_type) identifier_type )binary_operator )print_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_switch) identifier_switch (identifier_enableTransmit) identifier_enableTransmit )attribute (argument_list (identifier_pin) identifier_pin )argument_list )call )expression_statement (return_statement (identifier_switch) identifier_switch )return_statement )block )function_definition )module
Create a switch. Args: type: (str): type of the switch [A,B,C,D] settings (str): a comma separted list pin (int): wiringPi pin Returns: switch
(module (function_definition (function_name_on_import1) function_name_on_import1 (parameters (identifier_self) identifier_self (identifier_event) identifier_event )parameters (block (expression_statement (call (attribute (identifier_pmag_menu_dialogs) identifier_pmag_menu_dialogs (identifier_MoveFileIntoWD) identifier_MoveFileIntoWD )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (attribute (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (identifier_WD) identifier_WD )attribute )argument_list )call )expression_statement )block )function_definition )module
initialize window to import an arbitrary file into the working directory
(module (function_definition (function_name_init_all_receivers) function_name_init_all_receivers (parameters )parameters (block (expression_statement (assignment (identifier_receivers) identifier_receivers (call (identifier_discover) identifier_discover (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_init_receivers) identifier_init_receivers (list )list )assignment )expression_statement (for_statement (identifier_receiver) identifier_receiver (identifier_receivers) identifier_receivers (block (expression_statement (assignment (identifier_init_receiver) identifier_init_receiver (call (identifier_DenonAVR) identifier_DenonAVR (argument_list (subscript (identifier_receiver) identifier_receiver (string_"host") string_"host" )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_init_receivers) identifier_init_receivers (identifier_append) identifier_append )attribute (argument_list (identifier_init_receiver) identifier_init_receiver )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_init_receivers) identifier_init_receivers )return_statement )block )function_definition )module
Initialize all discovered Denon AVR receivers in LAN zone. Returns a list of created Denon AVR instances. By default SSDP broadcasts are sent up to 3 times with a 2 seconds timeout.
(module (function_definition (function_name_from_argparse) function_name_from_argparse (parameters (identifier_cls) identifier_cls (identifier_opts) identifier_opts )parameters (block (return_statement (call (identifier_cls) identifier_cls (argument_list (attribute (identifier_opts) identifier_opts (identifier_ethinca_pn_order) identifier_ethinca_pn_order )attribute (attribute (identifier_opts) identifier_opts (identifier_filter_cutoff) identifier_filter_cutoff )attribute (attribute (identifier_opts) identifier_opts (identifier_ethinca_frequency_step) identifier_ethinca_frequency_step )attribute (keyword_argument (identifier_fLow) identifier_fLow (None) None )keyword_argument (keyword_argument (identifier_full_ethinca) identifier_full_ethinca (attribute (identifier_opts) identifier_opts (identifier_calculate_ethinca_metric) identifier_calculate_ethinca_metric )attribute )keyword_argument (keyword_argument (identifier_time_ethinca) identifier_time_ethinca (attribute (identifier_opts) identifier_opts (identifier_calculate_time_metric_components) identifier_calculate_time_metric_components )attribute )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Initialize an instance of the ethincaParameters class from an argparse.OptionParser instance. This assumes that insert_ethinca_metric_options and verify_ethinca_metric_options have already been called before initializing the class.
(module (function_definition (function_name__by_columns) function_name__by_columns (parameters (identifier_self) identifier_self (identifier_columns) identifier_columns )parameters (block (return_statement (conditional_expression (identifier_columns) identifier_columns (call (attribute (identifier_self) identifier_self (identifier_isstr) identifier_isstr )attribute (argument_list (identifier_columns) identifier_columns )argument_list )call (call (attribute (identifier_self) identifier_self (identifier__backtick_columns) identifier__backtick_columns )attribute (argument_list (identifier_columns) identifier_columns )argument_list )call )conditional_expression )return_statement )block )function_definition )module
Allow select.group and select.order accepting string and list
(module (function_definition (function_name__operator_norms) function_name__operator_norms (parameters (identifier_L) identifier_L )parameters (block (expression_statement (assignment (identifier_L_norms) identifier_L_norms (list )list )assignment )expression_statement (for_statement (identifier_Li) identifier_Li (identifier_L) identifier_L (block (if_statement (call (attribute (identifier_np) identifier_np (identifier_isscalar) identifier_isscalar )attribute (argument_list (identifier_Li) identifier_Li )argument_list )call (block (expression_statement (call (attribute (identifier_L_norms) identifier_L_norms (identifier_append) identifier_append )attribute (argument_list (call (identifier_float) identifier_float (argument_list (identifier_Li) identifier_Li )argument_list )call )argument_list )call )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_Li) identifier_Li (identifier_Operator) identifier_Operator )argument_list )call (block (expression_statement (call (attribute (identifier_L_norms) identifier_L_norms (identifier_append) identifier_append )attribute (argument_list (call (attribute (identifier_Li) identifier_Li (identifier_norm) identifier_norm )attribute (argument_list (keyword_argument (identifier_estimate) identifier_estimate (True) True )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (string_'invalid entry {!r} in `L`') string_'invalid entry {!r} in `L`' (identifier_format) identifier_format )attribute (argument_list (identifier_Li) identifier_Li )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_L_norms) identifier_L_norms )return_statement )block )function_definition )module
Get operator norms if needed. Parameters ---------- L : sequence of `Operator` or float The operators or the norms of the operators that are used in the `douglas_rachford_pd` method. For `Operator` entries, the norm is computed with ``Operator.norm(estimate=True)``.
(module (function_definition (function_name__first_word_not_cmd) function_name__first_word_not_cmd (parameters (identifier_self) identifier_self (typed_parameter (identifier_first_word) identifier_first_word (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_command) identifier_command (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_args) identifier_args (type (identifier_tuple) identifier_tuple )type )typed_parameter (typed_parameter (identifier_kwargs) identifier_kwargs (type (identifier_dict) identifier_dict )type )typed_parameter )parameters (type (None) None )type (block (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_service_interface) identifier_service_interface )attribute (identifier_is_service) identifier_is_service )attribute (argument_list (identifier_first_word) identifier_first_word )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__logger) identifier__logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_' first word is a service') string_' first word is a service' )argument_list )call )expression_statement (expression_statement (assignment (identifier_kwargs) identifier_kwargs (call (attribute (attribute (identifier_self) identifier_self (identifier_service_interface) identifier_service_interface )attribute (identifier_get_metadata) identifier_get_metadata )attribute (argument_list (identifier_first_word) identifier_first_word (identifier_kwargs) identifier_kwargs )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__logger) identifier__logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_' service transform kwargs: %s') string_' service transform kwargs: %s' (identifier_kwargs) identifier_kwargs )argument_list )call )expression_statement )block (elif_clause (call (attribute (attribute (identifier_self) identifier_self (identifier_author_interface) identifier_author_interface )attribute (identifier_is_author) identifier_is_author )attribute (argument_list (identifier_first_word) identifier_first_word )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__logger) identifier__logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_' first word is an author') string_' first word is an author' )argument_list )call )expression_statement (expression_statement (assignment (identifier_kwargs) identifier_kwargs (call (attribute (attribute (identifier_self) identifier_self (identifier_author_interface) identifier_author_interface )attribute (identifier_get_metadata) identifier_get_metadata )attribute (argument_list (identifier_first_word) identifier_first_word (identifier_kwargs) identifier_kwargs )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__logger) identifier__logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_' author transform kwargs: %s') string_' author transform kwargs: %s' (identifier_kwargs) identifier_kwargs )argument_list )call )expression_statement )block )elif_clause )if_statement (if_statement (not_operator (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'remote') string_'remote' )argument_list )call )not_operator (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'remote_command') string_'remote_command' )subscript (identifier_command) identifier_command )assignment )expression_statement (expression_statement (assignment (identifier_command) identifier_command (string_'REMOTE') string_'REMOTE' )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_messaging) identifier_messaging )attribute (identifier_send_command) identifier_send_command )attribute (argument_list (identifier_command) identifier_command (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (return_statement )return_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_messaging) identifier_messaging )attribute (identifier_send_command) identifier_send_command )attribute (argument_list (identifier_command) identifier_command (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
check to see if this is an author or service. This method does high level control handling
(module (function_definition (function_name_run) function_name_run (parameters (identifier_cmd_str) identifier_cmd_str (default_parameter (identifier_cwd) identifier_cwd (string_'.') string_'.' )default_parameter (default_parameter (identifier_verbose) identifier_verbose (False) False )default_parameter )parameters (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (string_"run() has moved to pyemu.os_utils") string_"run() has moved to pyemu.os_utils" (identifier_PyemuWarning) identifier_PyemuWarning )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_pyemu) identifier_pyemu (identifier_os_utils) identifier_os_utils )attribute (identifier_run) identifier_run )attribute (argument_list (keyword_argument (identifier_cmd_str) identifier_cmd_str (identifier_cmd_str) identifier_cmd_str )keyword_argument (keyword_argument (identifier_cwd) identifier_cwd (identifier_cwd) identifier_cwd )keyword_argument (keyword_argument (identifier_verbose) identifier_verbose (identifier_verbose) identifier_verbose )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
an OS agnostic function to execute command Parameters ---------- cmd_str : str the str to execute with os.system() cwd : str the directory to execute the command in verbose : bool flag to echo to stdout complete cmd str Note ---- uses platform to detect OS and adds .exe or ./ as appropriate for Windows, if os.system returns non-zero, raises exception Example ------- ``>>>import pyemu`` ``>>>pyemu.helpers.run("pestpp pest.pst")``