sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_merge_values) function_name_merge_values (parameters (identifier_values1) identifier_values1 (identifier_values2) identifier_values2 )parameters (block (expression_statement (assignment (identifier_array1) identifier_array1 (call (identifier_values_to_array) identifier_values_to_array (argument_list (identifier_values1) identifier_values1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_array2) identifier_array2 (call (identifier_values_to_array) identifier_values_to_array (argument_list (identifier_values2) identifier_values2 )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_array1) identifier_array1 (identifier_size) identifier_size )attribute (integer_0) integer_0 )comparison_operator (block (return_statement (identifier_array2) identifier_array2 )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_array2) identifier_array2 (identifier_size) identifier_size )attribute (integer_0) integer_0 )comparison_operator (block (return_statement (identifier_array1) identifier_array1 )return_statement )block )if_statement (expression_statement (assignment (identifier_merged_array) identifier_merged_array (list )list )assignment )expression_statement (for_statement (identifier_row_array1) identifier_row_array1 (identifier_array1) identifier_array1 (block (for_statement (identifier_row_array2) identifier_row_array2 (identifier_array2) identifier_array2 (block (expression_statement (assignment (identifier_merged_row) identifier_merged_row (call (attribute (identifier_np) identifier_np (identifier_hstack) identifier_hstack )attribute (argument_list (tuple (identifier_row_array1) identifier_row_array1 (identifier_row_array2) identifier_row_array2 )tuple )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_merged_array) identifier_merged_array (identifier_append) identifier_append )attribute (argument_list (identifier_merged_row) identifier_merged_row )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (call (attribute (identifier_np) identifier_np (identifier_atleast_2d) identifier_atleast_2d )attribute (argument_list (identifier_merged_array) identifier_merged_array )argument_list )call )return_statement )block )function_definition )module
Merges two numpy arrays by calculating all possible combinations of rows
(module (function_definition (function_name_read_mac) function_name_read_mac (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_mac0) identifier_mac0 (call (attribute (identifier_self) identifier_self (identifier_read_reg) identifier_read_reg )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_ESP_OTP_MAC0) identifier_ESP_OTP_MAC0 )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mac1) identifier_mac1 (call (attribute (identifier_self) identifier_self (identifier_read_reg) identifier_read_reg )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_ESP_OTP_MAC1) identifier_ESP_OTP_MAC1 )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_mac3) identifier_mac3 (call (attribute (identifier_self) identifier_self (identifier_read_reg) identifier_read_reg )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_ESP_OTP_MAC3) identifier_ESP_OTP_MAC3 )attribute )argument_list )call )assignment )expression_statement (if_statement (parenthesized_expression (comparison_operator (identifier_mac3) identifier_mac3 (integer_0) integer_0 )comparison_operator )parenthesized_expression (block (expression_statement (assignment (identifier_oui) identifier_oui (tuple (binary_operator (parenthesized_expression (binary_operator (identifier_mac3) identifier_mac3 (integer_16) integer_16 )binary_operator )parenthesized_expression (integer_0xff) integer_0xff )binary_operator (binary_operator (parenthesized_expression (binary_operator (identifier_mac3) identifier_mac3 (integer_8) integer_8 )binary_operator )parenthesized_expression (integer_0xff) integer_0xff )binary_operator (binary_operator (identifier_mac3) identifier_mac3 (integer_0xff) integer_0xff )binary_operator )tuple )assignment )expression_statement )block (elif_clause (comparison_operator (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (identifier_mac1) identifier_mac1 (integer_16) integer_16 )binary_operator )parenthesized_expression (integer_0xff) integer_0xff )binary_operator )parenthesized_expression (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_oui) identifier_oui (tuple (integer_0x18) integer_0x18 (integer_0xfe) integer_0xfe (integer_0x34) integer_0x34 )tuple )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (parenthesized_expression (binary_operator (parenthesized_expression (binary_operator (identifier_mac1) identifier_mac1 (integer_16) integer_16 )binary_operator )parenthesized_expression (integer_0xff) integer_0xff )binary_operator )parenthesized_expression (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_oui) identifier_oui (tuple (integer_0xac) integer_0xac (integer_0xd0) integer_0xd0 (integer_0x74) integer_0x74 )tuple )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_FatalError) identifier_FatalError (argument_list (string_"Unknown OUI") string_"Unknown OUI" )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (binary_operator (identifier_oui) identifier_oui (tuple (binary_operator (parenthesized_expression (binary_operator (identifier_mac1) identifier_mac1 (integer_8) integer_8 )binary_operator )parenthesized_expression (integer_0xff) integer_0xff )binary_operator (binary_operator (identifier_mac1) identifier_mac1 (integer_0xff) integer_0xff )binary_operator (binary_operator (parenthesized_expression (binary_operator (identifier_mac0) identifier_mac0 (integer_24) integer_24 )binary_operator )parenthesized_expression (integer_0xff) integer_0xff )binary_operator )tuple )binary_operator )return_statement )block )function_definition )module
Read MAC from OTP ROM
(module (function_definition (function_name_assign_literal) function_name_assign_literal (parameters (identifier_element) identifier_element (identifier_value) identifier_value )parameters (block (expression_statement (identifier_u) identifier_u )expression_statement (expression_statement (assignment (identifier_helper) identifier_helper (call (attribute (attribute (identifier_helpers) identifier_helpers (identifier_CAST_DICT) identifier_CAST_DICT )attribute (identifier_get) identifier_get )attribute (argument_list (call (identifier_type) identifier_type (argument_list (identifier_value) identifier_value )argument_list )call (identifier_str) identifier_str )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_element) identifier_element (identifier_clear) identifier_clear )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_element) identifier_element (identifier_text) identifier_text )attribute (call (identifier_helper) identifier_helper (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block )function_definition )module
u"""Assigns a literal. If a given node doesn't exist, it will be created. :param etree.Element element: element to which we assign. :param value: the value to assign
(module (function_definition (function_name_return_on_initial_capital) function_name_return_on_initial_capital (parameters (identifier_capital) identifier_capital (identifier_period_pl) identifier_period_pl (default_parameter (identifier_leverage) identifier_leverage (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_capital) identifier_capital (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_'cost must be a positive number not %s') string_'cost must be a positive number not %s' (identifier_capital) identifier_capital )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_leverage) identifier_leverage (boolean_operator (identifier_leverage) identifier_leverage (float_1.) float_1. )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_eod) identifier_eod (binary_operator (identifier_capital) identifier_capital (parenthesized_expression (binary_operator (identifier_leverage) identifier_leverage (call (attribute (identifier_period_pl) identifier_period_pl (identifier_cumsum) identifier_cumsum )attribute (argument_list )argument_list )call )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_ltd_rets) identifier_ltd_rets (binary_operator (parenthesized_expression (binary_operator (identifier_eod) identifier_eod (identifier_capital) identifier_capital )binary_operator )parenthesized_expression (float_1.) float_1. )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_dly_rets) identifier_dly_rets (identifier_ltd_rets) identifier_ltd_rets )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_dly_rets) identifier_dly_rets (identifier_iloc) identifier_iloc )attribute (slice (integer_1) integer_1 (colon) colon )slice )subscript (subscript (attribute (call (attribute (parenthesized_expression (binary_operator (float_1.) float_1. (identifier_ltd_rets) identifier_ltd_rets )binary_operator )parenthesized_expression (identifier_pct_change) identifier_pct_change )attribute (argument_list )argument_list )call (identifier_iloc) identifier_iloc )attribute (slice (integer_1) integer_1 (colon) colon )slice )subscript )assignment )expression_statement (return_statement (identifier_dly_rets) identifier_dly_rets )return_statement )block )function_definition )module
Return the daily return series based on the capital
(module (function_definition (function_name_types_) function_name_types_ (parameters (identifier_self) identifier_self (typed_parameter (identifier_col) identifier_col (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (attribute (identifier_pd) identifier_pd (identifier_DataFrame) identifier_DataFrame )attribute )type (block (expression_statement (assignment (identifier_cols) identifier_cols (attribute (attribute (attribute (identifier_self) identifier_self (identifier_df) identifier_df )attribute (identifier_columns) identifier_columns )attribute (identifier_values) identifier_values )attribute )assignment )expression_statement (expression_statement (assignment (identifier_all_types) identifier_all_types (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_col) identifier_col (identifier_cols) identifier_cols (block (expression_statement (assignment (identifier_local_types) identifier_local_types (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_i) identifier_i (identifier_val) identifier_val )pattern_list (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_df) identifier_df )attribute (identifier_col) identifier_col )subscript (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_t) identifier_t (attribute (call (identifier_type) identifier_type (argument_list (identifier_val) identifier_val )argument_list )call (identifier___name__) identifier___name__ )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_t) identifier_t (identifier_local_types) identifier_local_types )comparison_operator (block (expression_statement (call (attribute (identifier_local_types) identifier_local_types (identifier_append) identifier_append )attribute (argument_list (identifier_t) identifier_t )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (subscript (identifier_all_types) identifier_all_types (identifier_col) identifier_col )subscript (tuple (identifier_local_types) identifier_local_types (identifier_i) identifier_i )tuple )assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_df) identifier_df (call (attribute (identifier_pd) identifier_pd (identifier_DataFrame) identifier_DataFrame )attribute (argument_list (identifier_all_types) identifier_all_types (keyword_argument (identifier_index) identifier_index (list (string_"type") string_"type" (string_"num") string_"num" )list )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_df) identifier_df )return_statement )block )function_definition )module
Display types of values in a column :param col: column name :type col: str :return: a pandas dataframe :rtype: pd.DataFrame :example: ``ds.types_("Col 1")``
(module (function_definition (function_name_transform) function_name_transform (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (string_"fitted") string_"fitted" )argument_list )call )not_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_"`transform` called before `fit` or `fit_transform`.") string_"`transform` called before `fit` or `fit_transform`." )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_data) identifier_data (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output_column_prefix) identifier_output_column_prefix (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (string_"output_column_prefix") string_"output_column_prefix" )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_output_column_prefix) identifier_output_column_prefix (None) None )comparison_operator (block (expression_statement (assignment (identifier_prefix) identifier_prefix (string_"") string_"" )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_prefix) identifier_prefix (binary_operator (identifier_output_column_prefix) identifier_output_column_prefix (string_'.') string_'.' )binary_operator )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_transform_function) identifier_transform_function (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (string_"transform_function") string_"transform_function" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_feature_columns) identifier_feature_columns (call (attribute (identifier_self) identifier_self (identifier__get) identifier__get )attribute (argument_list (string_"features") string_"features" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_feature_columns) identifier_feature_columns (call (attribute (identifier__internal_utils) identifier__internal_utils (identifier_select_feature_subset) identifier_select_feature_subset )attribute (argument_list (identifier_data) identifier_data (identifier_feature_columns) identifier_feature_columns )argument_list )call )assignment )expression_statement (for_statement (identifier_f) identifier_f (identifier_feature_columns) identifier_feature_columns (block (expression_statement (assignment (subscript (identifier_data) identifier_data (binary_operator (identifier_prefix) identifier_prefix (identifier_f) identifier_f )binary_operator )subscript (call (identifier_transform_function) identifier_transform_function (argument_list (subscript (identifier_data) identifier_data (identifier_f) identifier_f )subscript )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Transforms the data.
(module (function_definition (function_name_create_tag) function_name_create_tag (parameters (identifier_self) identifier_self (identifier_tag_name) identifier_tag_name )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_create) identifier_create )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_ensure_working_tree) identifier_ensure_working_tree )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_"Creating tag '%s' in %s ..") string_"Creating tag '%s' in %s .." (identifier_tag_name) identifier_tag_name (call (identifier_format_path) identifier_format_path (argument_list (attribute (identifier_self) identifier_self (identifier_local) identifier_local )attribute )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (identifier_execute) identifier_execute )attribute (argument_list (list_splat (call (attribute (identifier_self) identifier_self (identifier_get_create_tag_command) identifier_get_create_tag_command )attribute (argument_list (identifier_tag_name) identifier_tag_name )argument_list )call )list_splat )argument_list )call )expression_statement )block )function_definition )module
Create a new tag based on the working tree's revision. :param tag_name: The name of the tag to create (a string).
(module (function_definition (function_name_get_race) function_name_get_race (parameters (identifier_self) identifier_self (identifier_row) identifier_row (identifier_division) identifier_division )parameters (block (expression_statement (assignment (identifier_office) identifier_office (call (attribute (identifier_self) identifier_self (identifier_get_office) identifier_get_office )attribute (argument_list (identifier_row) identifier_row (identifier_division) identifier_division )argument_list )call )assignment )expression_statement (try_statement (block (return_statement (call (attribute (attribute (attribute (identifier_election) identifier_election (identifier_Race) identifier_Race )attribute (identifier_objects) identifier_objects )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_office) identifier_office (identifier_office) identifier_office )keyword_argument (keyword_argument (identifier_cycle__name) identifier_cycle__name (subscript (call (attribute (subscript (identifier_row) identifier_row (string_"electiondate") string_"electiondate" )subscript (identifier_split) identifier_split )attribute (argument_list (string_"-") string_"-" )argument_list )call (integer_0) integer_0 )subscript )keyword_argument (keyword_argument (identifier_special) identifier_special (parenthesized_expression (boolean_operator (boolean_operator (parenthesized_expression (boolean_operator (comparison_operator (subscript (identifier_row) identifier_row (string_"seatnum") string_"seatnum" )subscript (parenthesized_expression (string_"2") string_"2" )parenthesized_expression )comparison_operator (comparison_operator (attribute (attribute (identifier_office) identifier_office (identifier_body) identifier_body )attribute (identifier_slug) identifier_slug )attribute (string_"senate") string_"senate" )comparison_operator )boolean_operator )parenthesized_expression (parenthesized_expression (boolean_operator (comparison_operator (string_"Class II") string_"Class II" (call (attribute (identifier_row) identifier_row (identifier_get) identifier_get )attribute (argument_list (string_"description") string_"description" (string_"") string_"" )argument_list )call )comparison_operator (comparison_operator (attribute (attribute (identifier_office) identifier_office (identifier_body) identifier_body )attribute (identifier_slug) identifier_slug )attribute (string_"senate") string_"senate" )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (parenthesized_expression (call (attribute (subscript (identifier_row) identifier_row (string_"racetype") string_"racetype" )subscript (identifier_startswith) identifier_startswith )attribute (argument_list (string_"Special") string_"Special" )argument_list )call )parenthesized_expression )boolean_operator )parenthesized_expression )keyword_argument )argument_list )call )return_statement )block (except_clause (identifier_ObjectDoesNotExist) identifier_ObjectDoesNotExist (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"Could not find race for {} {}") string_"Could not find race for {} {}" (identifier_format) identifier_format )attribute (argument_list (subscript (call (attribute (subscript (identifier_row) identifier_row (string_"electiondate") string_"electiondate" )subscript (identifier_split) identifier_split )attribute (argument_list (string_"-") string_"-" )argument_list )call (integer_0) integer_0 )subscript (attribute (identifier_office) identifier_office (identifier_label) identifier_label )attribute )argument_list )call )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Gets the Race object for the given row of election results. In order to get the race, we must know the office. This function will get the office as well. The only way to know if a Race is a special is based on the string of the `racetype` field from the AP data.
(module (function_definition (function_name_is_vert_aligned) function_name_is_vert_aligned (parameters (identifier_c) identifier_c )parameters (block (return_statement (call (identifier_all) identifier_all (argument_list (list_comprehension (boolean_operator (call (attribute (attribute (call (identifier__to_span) identifier__to_span (argument_list (subscript (identifier_c) identifier_c (identifier_i) identifier_i )subscript )argument_list )call (identifier_sentence) identifier_sentence )attribute (identifier_is_visual) identifier_is_visual )attribute (argument_list )argument_list )call (call (identifier_bbox_vert_aligned) identifier_bbox_vert_aligned (argument_list (call (identifier_bbox_from_span) identifier_bbox_from_span (argument_list (call (identifier__to_span) identifier__to_span (argument_list (subscript (identifier_c) identifier_c (identifier_i) identifier_i )subscript )argument_list )call )argument_list )call (call (identifier_bbox_from_span) identifier_bbox_from_span (argument_list (call (identifier__to_span) identifier__to_span (argument_list (subscript (identifier_c) identifier_c (integer_0) integer_0 )subscript )argument_list )call )argument_list )call )argument_list )call )boolean_operator (for_in_clause (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_c) identifier_c )argument_list )call )argument_list )call )for_in_clause )list_comprehension )argument_list )call )return_statement )block )function_definition )module
Return true if all the components of c are vertically aligned. Vertical alignment means that the bounding boxes of each Mention of c shares a similar x-axis value in the visual rendering of the document. :param c: The candidate to evaluate :rtype: boolean
(module (function_definition (function_name__send_pub) function_name__send_pub (parameters (identifier_self) identifier_self (identifier_load) identifier_load )parameters (block (for_statement (pattern_list (identifier_transport) identifier_transport (identifier_opts) identifier_opts )pattern_list (call (identifier_iter_transport_opts) identifier_iter_transport_opts (argument_list (attribute (identifier_self) identifier_self (identifier_opts) identifier_opts )attribute )argument_list )call (block (expression_statement (assignment (identifier_chan) identifier_chan (call (attribute (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_transport) identifier_transport )attribute (identifier_server) identifier_server )attribute (identifier_PubServerChannel) identifier_PubServerChannel )attribute (identifier_factory) identifier_factory )attribute (argument_list (identifier_opts) identifier_opts )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_chan) identifier_chan (identifier_publish) identifier_publish )attribute (argument_list (identifier_load) identifier_load )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Take a load and send it across the network to connected minions
(module (function_definition (function_name_render) function_name_render (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_engine) identifier_engine (call (identifier_Engine) identifier_Engine (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (call (attribute (identifier_engine) identifier_engine (identifier_from_string) identifier_from_string )attribute (argument_list (identifier_SUMMARY_TEMPLATE) identifier_SUMMARY_TEMPLATE )argument_list )call (identifier_render) identifier_render )attribute (argument_list (call (identifier_Context) identifier_Context (argument_list (attribute (identifier_self) identifier_self (identifier___dict__) identifier___dict__ )attribute )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Render the summary.
(module (function_definition (function_name_describe_table) function_name_describe_table (parameters (identifier_self) identifier_self (identifier_tablename) identifier_tablename )parameters (block (try_statement (block (expression_statement (assignment (identifier_response) identifier_response (subscript (call (attribute (identifier_self) identifier_self (identifier_call) identifier_call )attribute (argument_list (string_'describe_table') string_'describe_table' (keyword_argument (identifier_TableName) identifier_TableName (identifier_tablename) identifier_tablename )keyword_argument )argument_list )call (string_'Table') string_'Table' )subscript )assignment )expression_statement (return_statement (call (attribute (identifier_Table) identifier_Table (identifier_from_response) identifier_from_response )attribute (argument_list (identifier_response) identifier_response )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_DynamoDBError) identifier_DynamoDBError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (if_statement (comparison_operator (subscript (attribute (identifier_e) identifier_e (identifier_kwargs) identifier_kwargs )attribute (string_'Code') string_'Code' )subscript (string_'ResourceNotFoundException') string_'ResourceNotFoundException' )comparison_operator (block (return_statement (None) None )return_statement )block (else_clause (block (raise_statement )raise_statement )block )else_clause )if_statement )block )except_clause )try_statement )block )function_definition )module
Get the details about a table Parameters ---------- tablename : str Name of the table Returns ------- table : :class:`~dynamo3.fields.Table`
(module (function_definition (function_name_groupby) function_name_groupby (parameters (identifier_self) identifier_self (default_parameter (identifier_by) identifier_by (None) None )default_parameter (default_parameter (identifier_axis) identifier_axis (integer_0) integer_0 )default_parameter (default_parameter (identifier_level) identifier_level (None) None )default_parameter (default_parameter (identifier_as_index) identifier_as_index (True) True )default_parameter (default_parameter (identifier_sort) identifier_sort (True) True )default_parameter (default_parameter (identifier_group_keys) identifier_group_keys (True) True )default_parameter (default_parameter (identifier_squeeze) identifier_squeeze (False) False )default_parameter (default_parameter (identifier_observed) identifier_observed (False) False )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (import_from_statement (dotted_name (identifier_pandas) identifier_pandas (identifier_core) identifier_core (identifier_groupby) identifier_groupby (identifier_groupby) identifier_groupby )dotted_name (dotted_name (identifier_groupby) identifier_groupby )dotted_name )import_from_statement (if_statement (boolean_operator (comparison_operator (identifier_level) identifier_level (None) None )comparison_operator (comparison_operator (identifier_by) identifier_by (None) None )comparison_operator )boolean_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"You have to supply one of 'by' and 'level'") string_"You have to supply one of 'by' and 'level'" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_axis) identifier_axis (call (attribute (identifier_self) identifier_self (identifier__get_axis_number) identifier__get_axis_number )attribute (argument_list (identifier_axis) identifier_axis )argument_list )call )assignment )expression_statement (return_statement (call (identifier_groupby) identifier_groupby (argument_list (identifier_self) identifier_self (keyword_argument (identifier_by) identifier_by (identifier_by) identifier_by )keyword_argument (keyword_argument (identifier_axis) identifier_axis (identifier_axis) identifier_axis )keyword_argument (keyword_argument (identifier_level) identifier_level (identifier_level) identifier_level )keyword_argument (keyword_argument (identifier_as_index) identifier_as_index (identifier_as_index) identifier_as_index )keyword_argument (keyword_argument (identifier_sort) identifier_sort (identifier_sort) identifier_sort )keyword_argument (keyword_argument (identifier_group_keys) identifier_group_keys (identifier_group_keys) identifier_group_keys )keyword_argument (keyword_argument (identifier_squeeze) identifier_squeeze (identifier_squeeze) identifier_squeeze )keyword_argument (keyword_argument (identifier_observed) identifier_observed (identifier_observed) identifier_observed )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Group DataFrame or Series using a mapper or by a Series of columns. A groupby operation involves some combination of splitting the object, applying a function, and combining the results. This can be used to group large amounts of data and compute operations on these groups. Parameters ---------- by : mapping, function, label, or list of labels Used to determine the groups for the groupby. If ``by`` is a function, it's called on each value of the object's index. If a dict or Series is passed, the Series or dict VALUES will be used to determine the groups (the Series' values are first aligned; see ``.align()`` method). If an ndarray is passed, the values are used as-is determine the groups. A label or list of labels may be passed to group by the columns in ``self``. Notice that a tuple is interpreted a (single) key. axis : {0 or 'index', 1 or 'columns'}, default 0 Split along rows (0) or columns (1). level : int, level name, or sequence of such, default None If the axis is a MultiIndex (hierarchical), group by a particular level or levels. as_index : bool, default True For aggregated output, return object with group labels as the index. Only relevant for DataFrame input. as_index=False is effectively "SQL-style" grouped output. sort : bool, default True Sort group keys. Get better performance by turning this off. Note this does not influence the order of observations within each group. Groupby preserves the order of rows within each group. group_keys : bool, default True When calling apply, add group keys to index to identify pieces. squeeze : bool, default False Reduce the dimensionality of the return type if possible, otherwise return a consistent type. observed : bool, default False This only applies if any of the groupers are Categoricals. If True: only show observed values for categorical groupers. If False: show all values for categorical groupers. .. versionadded:: 0.23.0 **kwargs Optional, only accepts keyword argument 'mutated' and is passed to groupby. Returns ------- DataFrameGroupBy or SeriesGroupBy Depends on the calling object and returns groupby object that contains information about the groups. See Also -------- resample : Convenience method for frequency conversion and resampling of time series. Notes ----- See the `user guide <http://pandas.pydata.org/pandas-docs/stable/groupby.html>`_ for more. Examples -------- >>> df = pd.DataFrame({'Animal': ['Falcon', 'Falcon', ... 'Parrot', 'Parrot'], ... 'Max Speed': [380., 370., 24., 26.]}) >>> df Animal Max Speed 0 Falcon 380.0 1 Falcon 370.0 2 Parrot 24.0 3 Parrot 26.0 >>> df.groupby(['Animal']).mean() Max Speed Animal Falcon 375.0 Parrot 25.0 **Hierarchical Indexes** We can groupby different levels of a hierarchical index using the `level` parameter: >>> arrays = [['Falcon', 'Falcon', 'Parrot', 'Parrot'], ... ['Captive', 'Wild', 'Captive', 'Wild']] >>> index = pd.MultiIndex.from_arrays(arrays, names=('Animal', 'Type')) >>> df = pd.DataFrame({'Max Speed': [390., 350., 30., 20.]}, ... index=index) >>> df Max Speed Animal Type Falcon Captive 390.0 Wild 350.0 Parrot Captive 30.0 Wild 20.0 >>> df.groupby(level=0).mean() Max Speed Animal Falcon 370.0 Parrot 25.0 >>> df.groupby(level=1).mean() Max Speed Type Captive 210.0 Wild 185.0
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (default_parameter (identifier_docs) identifier_docs (None) None )default_parameter (default_parameter (identifier_split) identifier_split (integer_0) integer_0 )default_parameter (default_parameter (identifier_parallelism) identifier_parallelism (None) None )default_parameter (default_parameter (identifier_progress_bar) identifier_progress_bar (True) True )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_apply) identifier_apply )attribute (argument_list (keyword_argument (identifier_docs) identifier_docs (identifier_docs) identifier_docs )keyword_argument (keyword_argument (identifier_split) identifier_split (identifier_split) identifier_split )keyword_argument (keyword_argument (identifier_train) identifier_train (True) True )keyword_argument (keyword_argument (identifier_clear) identifier_clear (False) False )keyword_argument (keyword_argument (identifier_parallelism) identifier_parallelism (identifier_parallelism) identifier_parallelism )keyword_argument (keyword_argument (identifier_progress_bar) identifier_progress_bar (identifier_progress_bar) identifier_progress_bar )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Update the features of the specified candidates. :param docs: If provided, apply features to all the candidates in these documents. :param split: If docs is None, apply features to the candidates in this particular split. :type split: int :param parallelism: How many threads to use for extraction. This will override the parallelism value used to initialize the Featurizer if it is provided. :type parallelism: int :param progress_bar: Whether or not to display a progress bar. The progress bar is measured per document. :type progress_bar: bool
(module (function_definition (function_name_start_in_oneshot_processes) function_name_start_in_oneshot_processes (parameters (identifier_obj) identifier_obj (identifier_nb_process) identifier_nb_process )parameters (block (expression_statement (assignment (identifier_processes) identifier_processes (list )list )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_nb_process) identifier_nb_process )argument_list )call (block (expression_statement (assignment (identifier_p) identifier_p (call (identifier_Process) identifier_Process (argument_list (keyword_argument (identifier_target) identifier_target (identifier_oneshot_in_process) identifier_oneshot_in_process )keyword_argument (keyword_argument (identifier_args) identifier_args (tuple (identifier_obj) identifier_obj )tuple )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_p) identifier_p (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_processes) identifier_processes (identifier_append) identifier_append )attribute (argument_list (identifier_p) identifier_p )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_process) identifier_process (identifier_processes) identifier_processes (block (expression_statement (call (attribute (identifier_process) identifier_process (identifier_join) identifier_join )attribute (argument_list )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Start nb_process processes to do the job. Then process finish the job they die.
(module (function_definition (function_name_change_state_id) function_name_change_state_id (parameters (identifier_self) identifier_self (default_parameter (identifier_state_id) identifier_state_id (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_old_state_id) identifier_old_state_id (attribute (identifier_self) identifier_self (identifier_state_id) identifier_state_id )attribute )assignment )expression_statement (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_ContainerState) identifier_ContainerState (identifier_self) identifier_self )argument_list )call (identifier_change_state_id) identifier_change_state_id )attribute (argument_list (identifier_state_id) identifier_state_id )argument_list )call )expression_statement (for_statement (identifier_transition) identifier_transition (call (attribute (attribute (identifier_self) identifier_self (identifier_transitions) identifier_transitions )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_transition) identifier_transition (identifier_from_state) identifier_from_state )attribute (identifier_old_state_id) identifier_old_state_id )comparison_operator (block (expression_statement (assignment (attribute (identifier_transition) identifier_transition (identifier__from_state) identifier__from_state )attribute (attribute (identifier_self) identifier_self (identifier_state_id) identifier_state_id )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_transition) identifier_transition (identifier_to_state) identifier_to_state )attribute (identifier_old_state_id) identifier_old_state_id )comparison_operator (block (expression_statement (assignment (attribute (identifier_transition) identifier_transition (identifier__to_state) identifier__to_state )attribute (attribute (identifier_self) identifier_self (identifier_state_id) identifier_state_id )attribute )assignment )expression_statement )block )if_statement )block )for_statement (for_statement (identifier_data_flow) identifier_data_flow (call (attribute (attribute (identifier_self) identifier_self (identifier_data_flows) identifier_data_flows )attribute (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (attribute (identifier_data_flow) identifier_data_flow (identifier_from_state) identifier_from_state )attribute (identifier_old_state_id) identifier_old_state_id )comparison_operator (block (expression_statement (assignment (attribute (identifier_data_flow) identifier_data_flow (identifier__from_state) identifier__from_state )attribute (attribute (identifier_self) identifier_self (identifier_state_id) identifier_state_id )attribute )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_data_flow) identifier_data_flow (identifier_to_state) identifier_to_state )attribute (identifier_old_state_id) identifier_old_state_id )comparison_operator (block (expression_statement (assignment (attribute (identifier_data_flow) identifier_data_flow (identifier__to_state) identifier__to_state )attribute (attribute (identifier_self) identifier_self (identifier_state_id) identifier_state_id )attribute )assignment )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Changes the id of the state to a new id. This functions replaces the old state_id with the new state_id in all data flows and transitions. :param state_id: The new state if of the state
(module (function_definition (function_name__convert_status) function_name__convert_status (parameters (identifier_self) identifier_self (identifier_msg) identifier_msg )parameters (block (expression_statement (assignment (identifier_code) identifier_code (call (attribute (identifier_msg) identifier_msg (identifier_get_int) identifier_get_int )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_text) identifier_text (call (attribute (identifier_msg) identifier_msg (identifier_get_text) identifier_get_text )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_code) identifier_code (identifier_SFTP_OK) identifier_SFTP_OK )comparison_operator (block (return_statement )return_statement )block (elif_clause (comparison_operator (identifier_code) identifier_code (identifier_SFTP_EOF) identifier_SFTP_EOF )comparison_operator (block (raise_statement (call (identifier_EOFError) identifier_EOFError (argument_list (identifier_text) identifier_text )argument_list )call )raise_statement )block )elif_clause (elif_clause (comparison_operator (identifier_code) identifier_code (identifier_SFTP_NO_SUCH_FILE) identifier_SFTP_NO_SUCH_FILE )comparison_operator (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (attribute (identifier_errno) identifier_errno (identifier_ENOENT) identifier_ENOENT )attribute (identifier_text) identifier_text )argument_list )call )raise_statement )block )elif_clause (elif_clause (comparison_operator (identifier_code) identifier_code (identifier_SFTP_PERMISSION_DENIED) identifier_SFTP_PERMISSION_DENIED )comparison_operator (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (attribute (identifier_errno) identifier_errno (identifier_EACCES) identifier_EACCES )attribute (identifier_text) identifier_text )argument_list )call )raise_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (identifier_text) identifier_text )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Raises EOFError or IOError on error status; otherwise does nothing.
(module (function_definition (function_name_wait) function_name_wait (parameters (identifier_self) identifier_self )parameters (block (while_statement (True) True (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_greenlet_watch) identifier_greenlet_watch )attribute )not_operator (block (break_statement )break_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_stopping) identifier_stopping )attribute (block (expression_statement (call (attribute (identifier_gevent) identifier_gevent (identifier_sleep) identifier_sleep )attribute (argument_list (float_0.1) float_0.1 )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_gevent) identifier_gevent (identifier_sleep) identifier_sleep )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )else_clause )if_statement )block )while_statement )block )function_definition )module
Waits for the pool to be fully stopped
(module (function_definition (function_name_add_usb_device_source) function_name_add_usb_device_source (parameters (identifier_self) identifier_self (identifier_backend) identifier_backend (identifier_id_p) identifier_id_p (identifier_address) identifier_address (identifier_property_names) identifier_property_names (identifier_property_values) identifier_property_values )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_backend) identifier_backend (identifier_basestring) identifier_basestring )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"backend can only be an instance of type basestring") string_"backend can only be an instance of type basestring" )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_id_p) identifier_id_p (identifier_basestring) identifier_basestring )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"id_p can only be an instance of type basestring") string_"id_p can only be an instance of type basestring" )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_address) identifier_address (identifier_basestring) identifier_basestring )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"address can only be an instance of type basestring") string_"address can only be an instance of type basestring" )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_property_names) identifier_property_names (identifier_list) identifier_list )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"property_names can only be an instance of type list") string_"property_names can only be an instance of type list" )argument_list )call )raise_statement )block )if_statement (for_statement (identifier_a) identifier_a (subscript (identifier_property_names) identifier_property_names (slice (colon) colon (integer_10) integer_10 )slice )subscript (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_a) identifier_a (identifier_basestring) identifier_basestring )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"array can only contain objects of type basestring") string_"array can only contain objects of type basestring" )argument_list )call )raise_statement )block )if_statement )block )for_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_property_values) identifier_property_values (identifier_list) identifier_list )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"property_values can only be an instance of type list") string_"property_values can only be an instance of type list" )argument_list )call )raise_statement )block )if_statement (for_statement (identifier_a) identifier_a (subscript (identifier_property_values) identifier_property_values (slice (colon) colon (integer_10) integer_10 )slice )subscript (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_a) identifier_a (identifier_basestring) identifier_basestring )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"array can only contain objects of type basestring") string_"array can only contain objects of type basestring" )argument_list )call )raise_statement )block )if_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__call) identifier__call )attribute (argument_list (string_"addUSBDeviceSource") string_"addUSBDeviceSource" (keyword_argument (identifier_in_p) identifier_in_p (list (identifier_backend) identifier_backend (identifier_id_p) identifier_id_p (identifier_address) identifier_address (identifier_property_names) identifier_property_names (identifier_property_values) identifier_property_values )list )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Adds a new USB device source. in backend of type str The backend to use as the new device source. in id_p of type str Unique ID to identify the source. in address of type str Address to use, the format is dependent on the backend. For USB/IP backends for example the notation is host[:port]. in property_names of type str Array of property names for more detailed configuration. Not used at the moment. in property_values of type str Array of property values for more detailed configuration. Not used at the moment.
(module (function_definition (function_name_groupBy) function_name_groupBy (parameters (identifier_self) identifier_self (identifier_f) identifier_f (default_parameter (identifier_numPartitions) identifier_numPartitions (None) None )default_parameter (default_parameter (identifier_partitionFunc) identifier_partitionFunc (identifier_portable_hash) identifier_portable_hash )default_parameter )parameters (block (return_statement (call (attribute (call (attribute (identifier_self) identifier_self (identifier_map) identifier_map )attribute (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (tuple (call (identifier_f) identifier_f (argument_list (identifier_x) identifier_x )argument_list )call (identifier_x) identifier_x )tuple )lambda )argument_list )call (identifier_groupByKey) identifier_groupByKey )attribute (argument_list (identifier_numPartitions) identifier_numPartitions (identifier_partitionFunc) identifier_partitionFunc )argument_list )call )return_statement )block )function_definition )module
Return an RDD of grouped items. >>> rdd = sc.parallelize([1, 1, 2, 3, 5, 8]) >>> result = rdd.groupBy(lambda x: x % 2).collect() >>> sorted([(x, sorted(y)) for (x, y) in result]) [(0, [2, 8]), (1, [1, 1, 3, 5])]
(module (function_definition (function_name_get_route) function_name_get_route (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_session) identifier_session (call (identifier_OAuth1Session) identifier_OAuth1Session (argument_list (attribute (identifier_self) identifier_self (identifier_consumer_key) identifier_consumer_key )attribute (attribute (identifier_self) identifier_self (identifier_consumer_secret) identifier_consumer_secret )attribute (keyword_argument (identifier_access_token) identifier_access_token (attribute (identifier_self) identifier_self (identifier_session_token) identifier_session_token )attribute )keyword_argument (keyword_argument (identifier_access_token_secret) identifier_access_token_secret (attribute (identifier_self) identifier_self (identifier_session_secret) identifier_session_secret )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_session) identifier_session (identifier_get) identifier_get )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_test_rest_url) identifier_test_rest_url )attribute )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_r) identifier_r (identifier_status_code) identifier_status_code )attribute (integer_200) integer_200 )comparison_operator (comparison_operator (attribute (identifier_r) identifier_r (identifier_status_code) identifier_status_code )attribute (integer_201) integer_201 )comparison_operator )boolean_operator (block (if_statement (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_'json') string_'json' (subscript (attribute (identifier_r) identifier_r (identifier_headers) identifier_headers )attribute (string_'content-type') string_'content-type' )subscript (keyword_argument (identifier_flags) identifier_flags (integer_0) integer_0 )keyword_argument )argument_list )call (block (expression_statement (assignment (identifier_decoded) identifier_decoded (call (attribute (identifier_r) identifier_r (identifier_json) identifier_json )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_decoded) identifier_decoded (attribute (identifier_r) identifier_r (identifier_text) identifier_text )attribute )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_loci) identifier_loci )attribute (subscript (identifier_decoded) identifier_decoded (string_'loci') string_'loci' )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_profile) identifier_profile )attribute (subscript (identifier_decoded) identifier_decoded (string_'schemes') string_'schemes' )subscript )assignment )expression_statement )block )if_statement )block )function_definition )module
Creates a session to find the URL for the loci and schemes
(module (function_definition (function_name_put_file) function_name_put_file (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_filename) identifier_filename (default_parameter (identifier_to_local_store) identifier_to_local_store (True) True )default_parameter (default_parameter (identifier_to_remote_store) identifier_to_remote_store (True) True )default_parameter (default_parameter (identifier_compress_hint) identifier_compress_hint (True) True )default_parameter )parameters (block (if_statement (boolean_operator (not_operator (identifier_to_local_store) identifier_to_local_store )not_operator (not_operator (identifier_to_remote_store) identifier_to_remote_store )not_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_"Neither to_local_store nor to_remote_store set ") string_"Neither to_local_store nor to_remote_store set " (string_"in a call to filetracker.Client.put_file") string_"in a call to filetracker.Client.put_file" )concatenated_string )argument_list )call )raise_statement )block )if_statement (expression_statement (call (identifier_check_name) identifier_check_name (argument_list (identifier_name) identifier_name )argument_list )call )expression_statement (expression_statement (assignment (identifier_lock) identifier_lock (None) None )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_local_store) identifier_local_store )attribute (block (expression_statement (assignment (identifier_lock) identifier_lock (call (attribute (attribute (identifier_self) identifier_self (identifier_lock_manager) identifier_lock_manager )attribute (identifier_lock_for) identifier_lock_for )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_lock) identifier_lock (identifier_lock_exclusive) identifier_lock_exclusive )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (try_statement (block (if_statement (boolean_operator (parenthesized_expression (boolean_operator (identifier_to_local_store) identifier_to_local_store (not_operator (attribute (identifier_self) identifier_self (identifier_remote_store) identifier_remote_store )attribute )not_operator )boolean_operator )parenthesized_expression (attribute (identifier_self) identifier_self (identifier_local_store) identifier_local_store )attribute )boolean_operator (block (expression_statement (assignment (identifier_versioned_name) identifier_versioned_name (call (attribute (attribute (identifier_self) identifier_self (identifier_local_store) identifier_local_store )attribute (identifier_add_file) identifier_add_file )attribute (argument_list (identifier_name) identifier_name (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (boolean_operator (parenthesized_expression (boolean_operator (identifier_to_remote_store) identifier_to_remote_store (not_operator (attribute (identifier_self) identifier_self (identifier_local_store) identifier_local_store )attribute )not_operator )boolean_operator )parenthesized_expression (attribute (identifier_self) identifier_self (identifier_remote_store) identifier_remote_store )attribute )boolean_operator (block (expression_statement (assignment (identifier_versioned_name) identifier_versioned_name (call (attribute (attribute (identifier_self) identifier_self (identifier_remote_store) identifier_remote_store )attribute (identifier_add_file) identifier_add_file )attribute (argument_list (identifier_name) identifier_name (identifier_filename) identifier_filename (keyword_argument (identifier_compress_hint) identifier_compress_hint (identifier_compress_hint) identifier_compress_hint )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement )block (finally_clause (block (if_statement (identifier_lock) identifier_lock (block (expression_statement (call (attribute (identifier_lock) identifier_lock (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )finally_clause )try_statement (return_statement (identifier_versioned_name) identifier_versioned_name )return_statement )block )function_definition )module
Adds file ``filename`` to the filetracker under the name ``name``. If the file already exists, a new version is created. In practice if the store does not support versioning, the file is overwritten. The file may be added to local store only (if ``to_remote_store`` is ``False``), to remote store only (if ``to_local_store`` is ``False``) or both. If only one store is configured, the values of ``to_local_store`` and ``to_remote_store`` are ignored. Local data store implemented in :class:`LocalDataStore` tries to not directly copy the data to the final cache destination, but uses hardlinking. Therefore you should not modify the file in-place later as this would be disastrous. If ``compress_hint`` is set to False, file is compressed on the server, instead of the client. This is generally not recommended, unless you know what you're doing.
(module (function_definition (function_name_data_chunk) function_name_data_chunk (parameters (identifier_data) identifier_data (identifier_chunk) identifier_chunk (default_parameter (identifier_with_overlap) identifier_with_overlap (False) False )default_parameter )parameters (block (assert_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_chunk) identifier_chunk (identifier_tuple) identifier_tuple )argument_list )call )assert_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_chunk) identifier_chunk )argument_list )call (integer_2) integer_2 )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_i) identifier_i (identifier_j) identifier_j )pattern_list (identifier_chunk) identifier_chunk )assignment )expression_statement )block (elif_clause (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_chunk) identifier_chunk )argument_list )call (integer_4) integer_4 )comparison_operator (block (if_statement (identifier_with_overlap) identifier_with_overlap (block (expression_statement (assignment (pattern_list (identifier_i) identifier_i (identifier_j) identifier_j )pattern_list (subscript (identifier_chunk) identifier_chunk (slice (colon) colon (integer_2) integer_2 )slice )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (pattern_list (identifier_i) identifier_i (identifier_j) identifier_j )pattern_list (subscript (identifier_chunk) identifier_chunk (slice (integer_2) integer_2 (colon) colon )slice )subscript )assignment )expression_statement )block )else_clause )if_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_"'chunk' should have 2 or 4 elements, ") string_"'chunk' should have 2 or 4 elements, " (string_"not {0:d}") string_"not {0:d}" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (call (identifier_len) identifier_len (argument_list (identifier_chunk) identifier_chunk )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement (return_statement (subscript (identifier_data) identifier_data (slice (identifier_i) identifier_i (colon) colon (identifier_j) identifier_j )slice (ellipsis_...) ellipsis_... )subscript )return_statement )block )function_definition )module
Get a data chunk.
(module (function_definition (function_name__numbered_vowel_to_accented) function_name__numbered_vowel_to_accented (parameters (identifier_vowel) identifier_vowel (identifier_tone) identifier_tone )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_tone) identifier_tone (identifier_int) identifier_int )argument_list )call (block (expression_statement (assignment (identifier_tone) identifier_tone (call (identifier_str) identifier_str (argument_list (identifier_tone) identifier_tone )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (subscript (identifier__PINYIN_TONES) identifier__PINYIN_TONES (binary_operator (identifier_vowel) identifier_vowel (identifier_tone) identifier_tone )binary_operator )subscript )return_statement )block )function_definition )module
Convert a numbered Pinyin vowel to an accented Pinyin vowel.
(module (function_definition (function_name_data_size) function_name_data_size (parameters (identifier_self) identifier_self (default_parameter (identifier_live_data) identifier_live_data (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_live_data) identifier_live_data (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (string_"The 'live_data' keyword argument is deprecated.") string_"The 'live_data' keyword argument is deprecated." (identifier_DeprecationWarning) identifier_DeprecationWarning )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_output) identifier_output (subscript (call (attribute (identifier_self) identifier_self (identifier_nodetool) identifier_nodetool )attribute (argument_list (string_'info') string_'info' )argument_list )call (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (call (identifier__get_load_from_info_output) identifier__get_load_from_info_output (argument_list (identifier_output) identifier_output )argument_list )call )return_statement )block )function_definition )module
Uses `nodetool info` to get the size of a node's data in KB.
(module (function_definition (function_name_parse_href) function_name_parse_href (parameters (identifier_href) identifier_href )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (identifier_urlparse) identifier_urlparse (argument_list (identifier_href) identifier_href )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_url) identifier_url (identifier_path) identifier_path )attribute (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_collection_name) identifier_collection_name (subscript (identifier_path) identifier_path (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_id_) identifier_id_ (subscript (identifier_path) identifier_path (integer_2) integer_2 )subscript )assignment )expression_statement (return_statement (expression_list (identifier_collection_name) identifier_collection_name (identifier_id_) identifier_id_ )expression_list )return_statement )block )function_definition )module
Parses an Analyze Re href into collection name and ID
(module (function_definition (function_name_pre_dispatch) function_name_pre_dispatch (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_middleware) identifier_middleware (call (identifier_sort_by_priority) identifier_sort_by_priority (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement (return_statement (call (identifier_tuple) identifier_tuple (generator_expression (attribute (identifier_m) identifier_m (identifier_pre_dispatch) identifier_pre_dispatch )attribute (for_in_clause (identifier_m) identifier_m (identifier_middleware) identifier_middleware )for_in_clause (if_clause (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_m) identifier_m (string_'pre_dispatch') string_'pre_dispatch' )argument_list )call )if_clause )generator_expression )call )return_statement )block )function_definition )module
List of pre-dispatch methods from registered middleware.
(module (function_definition (function_name_is_output) function_name_is_output (parameters (identifier_self) identifier_self (identifier_stream) identifier_stream )parameters (block (for_statement (identifier_streamer) identifier_streamer (attribute (identifier_self) identifier_self (identifier_streamers) identifier_streamers )attribute (block (if_statement (call (attribute (attribute (identifier_streamer) identifier_streamer (identifier_selector) identifier_selector )attribute (identifier_matches) identifier_matches )attribute (argument_list (identifier_stream) identifier_stream )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Check if a stream is a sensor graph output. Return: bool
(module (function_definition (function_name__get_queue_types) function_name__get_queue_types (parameters (identifier_fed_arrays) identifier_fed_arrays (identifier_data_sources) identifier_data_sources )parameters (block (try_statement (block (return_statement (list_comprehension (attribute (subscript (identifier_data_sources) identifier_data_sources (identifier_n) identifier_n )subscript (identifier_dtype) identifier_dtype )attribute (for_in_clause (identifier_n) identifier_n (identifier_fed_arrays) identifier_fed_arrays )for_in_clause )list_comprehension )return_statement )block (except_clause (as_pattern (identifier_KeyError) identifier_KeyError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (expression_list (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Array '{k}' has no data source!") string_"Array '{k}' has no data source!" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_k) identifier_k (attribute (identifier_e) identifier_e (identifier_message) identifier_message )attribute )keyword_argument )argument_list )call )argument_list )call (None) None (subscript (call (attribute (identifier_sys) identifier_sys (identifier_exc_info) identifier_exc_info )attribute (argument_list )argument_list )call (integer_2) integer_2 )subscript )expression_list )raise_statement )block )except_clause )try_statement )block )function_definition )module
Given a list of arrays to feed in fed_arrays, return a list of associated queue types, obtained from tuples in the data_sources dictionary
(module (function_definition (function_name_find_results_gen) function_name_find_results_gen (parameters (identifier_search_term) identifier_search_term (default_parameter (identifier_field) identifier_field (string_'title') string_'title' )default_parameter )parameters (block (expression_statement (assignment (identifier_scan_params) identifier_scan_params (call (identifier_make_query) identifier_make_query (argument_list (identifier_search_term) identifier_search_term (keyword_argument (identifier_querytype) identifier_querytype (string_'AdvancedKeywordQuery') string_'AdvancedKeywordQuery' )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_search_result_ids) identifier_search_result_ids (call (identifier_do_search) identifier_do_search (argument_list (identifier_scan_params) identifier_scan_params )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_all_titles) identifier_all_titles (list )list )assignment )expression_statement (for_statement (identifier_pdb_result) identifier_pdb_result (identifier_search_result_ids) identifier_search_result_ids (block (expression_statement (assignment (identifier_result) identifier_result (call (identifier_describe_pdb) identifier_describe_pdb (argument_list (identifier_pdb_result) identifier_pdb_result )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_field) identifier_field (call (attribute (identifier_result) identifier_result (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (yield (subscript (identifier_result) identifier_result (identifier_field) identifier_field )subscript )yield )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Return a generator of the results returned by a search of the protein data bank. This generator is used internally. Parameters ---------- search_term : str The search keyword field : str The type of information to record about each entry Examples -------- >>> result_gen = find_results_gen('bleb') >>> pprint.pprint([item for item in result_gen][:5]) ['MYOSIN II DICTYOSTELIUM DISCOIDEUM MOTOR DOMAIN S456Y BOUND WITH MGADP-BEFX', 'MYOSIN II DICTYOSTELIUM DISCOIDEUM MOTOR DOMAIN S456Y BOUND WITH MGADP-ALF4', 'DICTYOSTELIUM DISCOIDEUM MYOSIN II MOTOR DOMAIN S456E WITH BOUND MGADP-BEFX', 'MYOSIN II DICTYOSTELIUM DISCOIDEUM MOTOR DOMAIN S456E BOUND WITH MGADP-ALF4', 'The structural basis of blebbistatin inhibition and specificity for myosin ' 'II']
(module (function_definition (function_name_read_galaxy_amqp_config) function_name_read_galaxy_amqp_config (parameters (identifier_galaxy_config) identifier_galaxy_config (identifier_base_dir) identifier_base_dir )parameters (block (expression_statement (assignment (identifier_galaxy_config) identifier_galaxy_config (call (identifier_add_full_path) identifier_add_full_path (argument_list (identifier_galaxy_config) identifier_galaxy_config (identifier_base_dir) identifier_base_dir )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_config) identifier_config (call (attribute (attribute (attribute (identifier_six) identifier_six (identifier_moves) identifier_moves )attribute (identifier_configparser) identifier_configparser )attribute (identifier_ConfigParser) identifier_ConfigParser )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_config) identifier_config (identifier_read) identifier_read )attribute (argument_list (identifier_galaxy_config) identifier_galaxy_config )argument_list )call )expression_statement (expression_statement (assignment (identifier_amqp_config) identifier_amqp_config (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_option) identifier_option (call (attribute (identifier_config) identifier_config (identifier_options) identifier_options )attribute (argument_list (string_"galaxy_amqp") string_"galaxy_amqp" )argument_list )call (block (expression_statement (assignment (subscript (identifier_amqp_config) identifier_amqp_config (identifier_option) identifier_option )subscript (call (attribute (identifier_config) identifier_config (identifier_get) identifier_get )attribute (argument_list (string_"galaxy_amqp") string_"galaxy_amqp" (identifier_option) identifier_option )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_amqp_config) identifier_amqp_config )return_statement )block )function_definition )module
Read connection information on the RabbitMQ server from Galaxy config.
(module (function_definition (function_name_minutes) function_name_minutes (parameters (identifier_start) identifier_start (default_parameter (identifier_end) identifier_end (None) None )default_parameter )parameters (block (return_statement (call (attribute (identifier_iterate) identifier_iterate (identifier_between) identifier_between )attribute (argument_list (identifier_start) identifier_start (call (attribute (identifier_datetime) identifier_datetime (identifier_timedelta) identifier_timedelta )attribute (argument_list (keyword_argument (identifier_minutes) identifier_minutes (integer_1) integer_1 )keyword_argument )argument_list )call (identifier_end) identifier_end )argument_list )call )return_statement )block )function_definition )module
Iterate over the minutes between the given datetime_tzs. Args: start: datetime_tz to start from. end: (Optional) Date to end at, if not given the iterator will never terminate. Returns: An iterator which generates datetime_tz objects a minute apart.
(module (function_definition (function_name_tob) function_name_tob (parameters (identifier_data) identifier_data (default_parameter (identifier_enc) identifier_enc (string_'utf8') string_'utf8' )default_parameter )parameters (block (return_statement (conditional_expression (call (attribute (identifier_data) identifier_data (identifier_encode) identifier_encode )attribute (argument_list (identifier_enc) identifier_enc )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_data) identifier_data (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute )argument_list )call (call (identifier_bytes) identifier_bytes (argument_list (identifier_data) identifier_data )argument_list )call )conditional_expression )return_statement )block )function_definition )module
Convert anything to bytes
(module (function_definition (function_name_wind_bft) function_name_wind_bft (parameters (identifier_ms) identifier_ms )parameters (block (expression_statement (string_"Convert wind from metres per second to Beaufort scale") string_"Convert wind from metres per second to Beaufort scale" )expression_statement (if_statement (comparison_operator (identifier_ms) identifier_ms (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (for_statement (identifier_bft) identifier_bft (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier__bft_threshold) identifier__bft_threshold )argument_list )call )argument_list )call (block (if_statement (comparison_operator (identifier_ms) identifier_ms (subscript (identifier__bft_threshold) identifier__bft_threshold (identifier_bft) identifier_bft )subscript )comparison_operator (block (return_statement (identifier_bft) identifier_bft )return_statement )block )if_statement )block )for_statement (return_statement (call (identifier_len) identifier_len (argument_list (identifier__bft_threshold) identifier__bft_threshold )argument_list )call )return_statement )block )function_definition )module
Convert wind from metres per second to Beaufort scale
(module (function_definition (function_name_save_csv) function_name_save_csv (parameters (identifier_self) identifier_self (identifier_fd) identifier_fd )parameters (block (import_from_statement (dotted_name (identifier_pylon) identifier_pylon (identifier_io) identifier_io (identifier_excel) identifier_excel )dotted_name (dotted_name (identifier_CSVWriter) identifier_CSVWriter )dotted_name )import_from_statement (expression_statement (call (attribute (call (identifier_CSVWriter) identifier_CSVWriter (argument_list (identifier_self) identifier_self )argument_list )call (identifier_write) identifier_write )attribute (argument_list (identifier_fd) identifier_fd )argument_list )call )expression_statement )block )function_definition )module
Saves the case as a series of Comma-Separated Values.
(module (function_definition (function_name_update_progress) function_name_update_progress (parameters (identifier_self) identifier_self (identifier_progress) identifier_progress (default_parameter (identifier_prefix) identifier_prefix (string_'') string_'' )default_parameter )parameters (block (expression_statement (assignment (identifier_total_length) identifier_total_length (integer_40) integer_40 )assignment )expression_statement (if_statement (comparison_operator (identifier_progress) identifier_progress (float_1.) float_1. )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_'\r') string_'\r' (binary_operator (string_' ') string_' ' (parenthesized_expression (binary_operator (binary_operator (identifier_total_length) identifier_total_length (call (identifier_len) identifier_len (argument_list (identifier_prefix) identifier_prefix )argument_list )call )binary_operator (integer_50) integer_50 )binary_operator )parenthesized_expression )binary_operator )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (string_'\n') string_'\n' )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_bar_length) identifier_bar_length (call (identifier_int) identifier_int (argument_list (call (identifier_round) identifier_round (argument_list (binary_operator (identifier_total_length) identifier_total_length (identifier_progress) identifier_progress )binary_operator )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_'\r%s [%s%s] %.1f %% ') string_'\r%s [%s%s] %.1f %% ' (tuple (identifier_prefix) identifier_prefix (binary_operator (string_'=') string_'=' (identifier_bar_length) identifier_bar_length )binary_operator (binary_operator (string_' ') string_' ' (parenthesized_expression (binary_operator (identifier_total_length) identifier_total_length (identifier_bar_length) identifier_bar_length )binary_operator )parenthesized_expression )binary_operator (binary_operator (identifier_progress) identifier_progress (integer_100) integer_100 )binary_operator )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stderr) identifier_stderr )attribute (identifier_flush) identifier_flush )attribute (argument_list )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Print a progress bar for longer-running scripts. The progress value is a value between 0.0 and 1.0. If a prefix is present, it will be printed before the progress bar.
(module (function_definition (function_name_on_success) function_name_on_success (parameters (identifier_self) identifier_self (identifier_inv_plugin) identifier_inv_plugin (identifier_emit_set_slot) identifier_emit_set_slot )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_dirty) identifier_dirty )attribute (call (identifier_set) identifier_set (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_apply) identifier_apply )attribute (argument_list (identifier_inv_plugin) identifier_inv_plugin )argument_list )call )expression_statement (for_statement (identifier_changed_slot) identifier_changed_slot (attribute (identifier_self) identifier_self (identifier_dirty) identifier_dirty )attribute (block (expression_statement (call (identifier_emit_set_slot) identifier_emit_set_slot (argument_list (identifier_changed_slot) identifier_changed_slot )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Called when the click was successful and should be applied to the inventory. Args: inv_plugin (InventoryPlugin): inventory plugin instance emit_set_slot (func): function to signal a slot change, should be InventoryPlugin().emit_set_slot
(module (function_definition (function_name_create_cities_csv) function_name_create_cities_csv (parameters (default_parameter (identifier_filename) identifier_filename (string_"places2k.txt") string_"places2k.txt" )default_parameter (default_parameter (identifier_output) identifier_output (string_"cities.csv") string_"cities.csv" )default_parameter )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_city_file) identifier_city_file )as_pattern_target )as_pattern )with_item )with_clause (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_output) identifier_output (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_out) identifier_out )as_pattern_target )as_pattern )with_item )with_clause (block (for_statement (identifier_line) identifier_line (identifier_city_file) identifier_city_file (block (if_statement (comparison_operator (subscript (identifier_line) identifier_line (slice (integer_0) integer_0 (colon) colon (integer_2) integer_2 )slice )subscript (string_"PR") string_"PR" )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (attribute (identifier_out) identifier_out (identifier_write) identifier_write )attribute (argument_list (binary_operator (call (attribute (string_" ") string_" " (identifier_join) identifier_join )attribute (argument_list (subscript (call (attribute (subscript (identifier_line) identifier_line (slice (integer_9) integer_9 (colon) colon (integer_72) integer_72 )slice )subscript (identifier_split) identifier_split )attribute (argument_list )argument_list )call (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )argument_list )call (string_'\n') string_'\n' )binary_operator )argument_list )call )expression_statement )block )for_statement )block )with_statement )block )with_statement )block )function_definition )module
Takes the places2k.txt from USPS and creates a simple file of all cities.
(module (function_definition (function_name__add_filters) function_name__add_filters (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_filters) identifier_filters )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_string_filters) identifier_string_filters (call (attribute (identifier_filters) identifier_filters (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_filters) identifier_filters (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_is_extended) identifier_is_extended (False) False )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_RedisField) identifier_RedisField )argument_list )call (block (if_statement (parenthesized_expression (boolean_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_SingleValueField) identifier_SingleValueField )argument_list )call )not_operator (comparison_operator (call (identifier_getattr) identifier_getattr (argument_list (identifier_value) identifier_value (string_'_instance') string_'_instance' (None) None )argument_list )call (None) None )comparison_operator )boolean_operator )parenthesized_expression (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_'If a field is used as a filter value, it ') string_'If a field is used as a filter value, it ' (string_'must be a simple value field attached to ') string_'must be a simple value field attached to ' (string_'an instance') string_'an instance' )concatenated_string )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_is_extended) identifier_is_extended (True) True )assignment )expression_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_RedisModel) identifier_RedisModel )argument_list )call (block (expression_statement (assignment (identifier_is_extended) identifier_is_extended (True) True )assignment )expression_statement )block )elif_clause )if_statement (if_statement (identifier_is_extended) identifier_is_extended (block (if_statement (call (attribute (identifier_self) identifier_self (identifier__field_is_pk) identifier__field_is_pk )attribute (argument_list (identifier_key) identifier_key )argument_list )call (block (expression_statement (assignment (identifier_raw_filter) identifier_raw_filter (call (identifier_RawFilter) identifier_RawFilter (argument_list (identifier_key) identifier_key (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__lazy_collection) identifier__lazy_collection )attribute (string_'pks') string_'pks' )subscript (identifier_add) identifier_add )attribute (argument_list (identifier_raw_filter) identifier_raw_filter )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (pattern_list (identifier_index) identifier_index (identifier_suffix) identifier_suffix (identifier_extra_field_parts) identifier_extra_field_parts )pattern_list (call (attribute (identifier_self) identifier_self (identifier__parse_filter_key) identifier__parse_filter_key )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_parsed_filter) identifier_parsed_filter (call (identifier_ParsedFilter) identifier_ParsedFilter (argument_list (identifier_index) identifier_index (identifier_suffix) identifier_suffix (identifier_extra_field_parts) identifier_extra_field_parts (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier__lazy_collection) identifier__lazy_collection )attribute (string_'sets') string_'sets' )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_parsed_filter) identifier_parsed_filter )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_string_filters) identifier_string_filters (identifier_pop) identifier_pop )attribute (argument_list (identifier_key) identifier_key )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list (identifier_ExtendedCollectionManager) identifier_ExtendedCollectionManager (identifier_self) identifier_self )argument_list )call (identifier__add_filters) identifier__add_filters )attribute (argument_list (dictionary_splat (identifier_string_filters) identifier_string_filters )dictionary_splat )argument_list )call )expression_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
In addition to the normal _add_filters, this one accept RedisField objects on the right part of a filter. The value will be fetched from redis when calling the collection. The filter value can also be a model instance, in which case its PK will be fetched when calling the collection, too.
(module (function_definition (function_name_descend) function_name_descend (parameters (identifier_self) identifier_self (identifier_remote) identifier_remote (default_parameter (identifier_force) identifier_force (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_remote_dirs) identifier_remote_dirs (call (attribute (identifier_remote) identifier_remote (identifier_split) identifier_split )attribute (argument_list (string_'/') string_'/' )argument_list )call )assignment )expression_statement (for_statement (identifier_directory) identifier_directory (identifier_remote_dirs) identifier_remote_dirs (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_conn) identifier_conn )attribute (identifier_cwd) identifier_cwd )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (if_statement (identifier_force) identifier_force (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_conn) identifier_conn )attribute (identifier_mkd) identifier_mkd )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_conn) identifier_conn )attribute (identifier_cwd) identifier_cwd )attribute (argument_list (identifier_directory) identifier_directory )argument_list )call )expression_statement )block )if_statement )block )except_clause )try_statement )block )for_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_conn) identifier_conn )attribute (identifier_pwd) identifier_pwd )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Descend, possibly creating directories as needed
(module (function_definition (function_name_cleanup_images) function_name_cleanup_images (parameters (default_parameter (identifier_remove_old) identifier_remove_old (False) False )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_keep_tags) identifier_keep_tags (call (attribute (identifier_env) identifier_env (identifier_get) identifier_get )attribute (argument_list (string_'docker_keep_tags') string_'docker_keep_tags' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_keep_tags) identifier_keep_tags (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_'keep_tags') string_'keep_tags' (identifier_keep_tags) identifier_keep_tags )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (identifier_removed_images) identifier_removed_images (call (attribute (call (identifier_docker_fabric) identifier_docker_fabric (argument_list )argument_list )call (identifier_cleanup_images) identifier_cleanup_images )attribute (argument_list (keyword_argument (identifier_remove_old) identifier_remove_old (identifier_remove_old) identifier_remove_old )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_get) identifier_get )attribute (argument_list (string_'list_only') string_'list_only' )argument_list )call (block (expression_statement (call (identifier_puts) identifier_puts (argument_list (string_'Unused images:') string_'Unused images:' )argument_list )call )expression_statement (for_statement (identifier_image_name) identifier_image_name (identifier_removed_images) identifier_removed_images (block (expression_statement (call (identifier_fastprint) identifier_fastprint (argument_list (identifier_image_name) identifier_image_name (keyword_argument (identifier_end) identifier_end (string_'\n') string_'\n' )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )if_statement )block )function_definition )module
Removes all images that have no name, and that are not references as dependency by any other named image. Similar to the ``prune`` functionality in newer Docker versions, but supports more filters. :param remove_old: Also remove images that do have a name, but no `latest` tag. :type remove_old: bool
(module (function_definition (function_name_channel_is_opened) function_name_channel_is_opened (parameters (identifier_self) identifier_self (typed_parameter (identifier_participant1) identifier_participant1 (type (identifier_Address) identifier_Address )type )typed_parameter (typed_parameter (identifier_participant2) identifier_participant2 (type (identifier_Address) identifier_Address )type )typed_parameter (typed_parameter (identifier_block_identifier) identifier_block_identifier (type (identifier_BlockSpecification) identifier_BlockSpecification )type )typed_parameter (typed_parameter (identifier_channel_identifier) identifier_channel_identifier (type (identifier_ChannelID) identifier_ChannelID )type )typed_parameter )parameters (type (identifier_bool) identifier_bool )type (block (try_statement (block (expression_statement (assignment (identifier_channel_state) identifier_channel_state (call (attribute (identifier_self) identifier_self (identifier__get_channel_state) identifier__get_channel_state )attribute (argument_list (keyword_argument (identifier_participant1) identifier_participant1 (identifier_participant1) identifier_participant1 )keyword_argument (keyword_argument (identifier_participant2) identifier_participant2 (identifier_participant2) identifier_participant2 )keyword_argument (keyword_argument (identifier_block_identifier) identifier_block_identifier (identifier_block_identifier) identifier_block_identifier )keyword_argument (keyword_argument (identifier_channel_identifier) identifier_channel_identifier (identifier_channel_identifier) identifier_channel_identifier )keyword_argument )argument_list )call )assignment )expression_statement )block (except_clause (identifier_RaidenRecoverableError) identifier_RaidenRecoverableError (block (return_statement (False) False )return_statement )block )except_clause )try_statement (return_statement (comparison_operator (identifier_channel_state) identifier_channel_state (attribute (identifier_ChannelState) identifier_ChannelState (identifier_OPENED) identifier_OPENED )attribute )comparison_operator )return_statement )block )function_definition )module
Returns true if the channel is in an open state, false otherwise.
(module (function_definition (function_name___list_uniques) function_name___list_uniques (parameters (identifier_self) identifier_self (identifier_date_range) identifier_date_range (identifier_field_name) identifier_field_name )parameters (block (expression_statement (assignment (identifier_s) identifier_s (call (identifier_Search) identifier_Search (argument_list (keyword_argument (identifier_using) identifier_using (attribute (identifier_self) identifier_self (identifier__es_conn) identifier__es_conn )attribute )keyword_argument (keyword_argument (identifier_index) identifier_index (attribute (identifier_self) identifier_self (identifier__es_index) identifier__es_index )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_s) identifier_s (identifier_filter) identifier_filter )attribute (argument_list (string_'range') string_'range' (dictionary_splat (identifier_date_range) identifier_date_range )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_s) identifier_s (subscript (identifier_s) identifier_s (slice (integer_0) integer_0 (colon) colon (integer_0) integer_0 )slice )subscript )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_s) identifier_s (identifier_aggs) identifier_aggs )attribute (identifier_bucket) identifier_bucket )attribute (argument_list (string_'uniques') string_'uniques' (string_'terms') string_'terms' (keyword_argument (identifier_field) identifier_field (identifier_field_name) identifier_field_name )keyword_argument (keyword_argument (identifier_size) identifier_size (integer_1000) integer_1000 )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_s) identifier_s (identifier_execute) identifier_execute )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_uniques_list) identifier_uniques_list (list )list )assignment )expression_statement (for_statement (identifier_item) identifier_item (attribute (attribute (attribute (identifier_response) identifier_response (identifier_aggregations) identifier_aggregations )attribute (identifier_uniques) identifier_uniques )attribute (identifier_buckets) identifier_buckets )attribute (block (expression_statement (call (attribute (identifier_uniques_list) identifier_uniques_list (identifier_append) identifier_append )attribute (argument_list (attribute (identifier_item) identifier_item (identifier_key) identifier_key )attribute )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_uniques_list) identifier_uniques_list )return_statement )block )function_definition )module
Retrieve a list of unique values in a given field within a date range. :param date_range: :param field_name: :return: list of unique values.
(module (function_definition (function_name_prepare_hmet_lsm) function_name_prepare_hmet_lsm (parameters (identifier_self) identifier_self (identifier_lsm_data_var_map_array) identifier_lsm_data_var_map_array (default_parameter (identifier_hmet_ascii_output_folder) identifier_hmet_ascii_output_folder (None) None )default_parameter (default_parameter (identifier_netcdf_file_path) identifier_netcdf_file_path (None) None )default_parameter )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_l2g) identifier_l2g )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"LSM converter not loaded ...") string_"LSM converter not loaded ..." )argument_list )call )raise_statement )block )if_statement (with_statement (with_clause (with_item (call (identifier_tmp_chdir) identifier_tmp_chdir (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_project_manager) identifier_project_manager )attribute (identifier_project_directory) identifier_project_directory )attribute )argument_list )call )with_item )with_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__update_simulation_end_from_lsm) identifier__update_simulation_end_from_lsm )attribute (argument_list )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_netcdf_file_path) identifier_netcdf_file_path (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_l2g) identifier_l2g )attribute (identifier_lsm_data_to_subset_netcdf) identifier_lsm_data_to_subset_netcdf )attribute (argument_list (identifier_netcdf_file_path) identifier_netcdf_file_path (identifier_lsm_data_var_map_array) identifier_lsm_data_var_map_array )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__update_card) identifier__update_card )attribute (argument_list (string_"HMET_NETCDF") string_"HMET_NETCDF" (identifier_netcdf_file_path) identifier_netcdf_file_path (True) True )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_project_manager) identifier_project_manager )attribute (identifier_deleteCard) identifier_deleteCard )attribute (argument_list (string_'HMET_ASCII') string_'HMET_ASCII' (attribute (identifier_self) identifier_self (identifier_db_session) identifier_db_session )attribute )argument_list )call )expression_statement )block (else_clause (block (if_statement (boolean_operator (comparison_operator (string_"{0}") string_"{0}" (identifier_hmet_ascii_output_folder) identifier_hmet_ascii_output_folder )comparison_operator (comparison_operator (string_"{1}") string_"{1}" (identifier_hmet_ascii_output_folder) identifier_hmet_ascii_output_folder )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_hmet_ascii_output_folder) identifier_hmet_ascii_output_folder (call (attribute (identifier_hmet_ascii_output_folder) identifier_hmet_ascii_output_folder (identifier_format) identifier_format )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_simulation_start) identifier_simulation_start )attribute (identifier_strftime) identifier_strftime )attribute (argument_list (string_"%Y%m%d%H%M") string_"%Y%m%d%H%M" )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_simulation_end) identifier_simulation_end )attribute (identifier_strftime) identifier_strftime )attribute (argument_list (string_"%Y%m%d%H%M") string_"%Y%m%d%H%M" )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_l2g) identifier_l2g )attribute (identifier_lsm_data_to_arc_ascii) identifier_lsm_data_to_arc_ascii )attribute (argument_list (identifier_lsm_data_var_map_array) identifier_lsm_data_var_map_array (keyword_argument (identifier_main_output_folder) identifier_main_output_folder (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_gssha_directory) identifier_gssha_directory )attribute (identifier_hmet_ascii_output_folder) identifier_hmet_ascii_output_folder )argument_list )call )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__update_card) identifier__update_card )attribute (argument_list (string_"HMET_ASCII") string_"HMET_ASCII" (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_hmet_ascii_output_folder) identifier_hmet_ascii_output_folder (string_'hmet_file_list.txt') string_'hmet_file_list.txt' )argument_list )call (True) True )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_project_manager) identifier_project_manager )attribute (identifier_deleteCard) identifier_deleteCard )attribute (argument_list (string_'HMET_NETCDF') string_'HMET_NETCDF' (attribute (identifier_self) identifier_self (identifier_db_session) identifier_db_session )attribute )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__update_gmt) identifier__update_gmt )attribute (argument_list )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Prepares HMET data for GSSHA simulation from land surface model data. Parameters: lsm_data_var_map_array(str): Array with connections for LSM output and GSSHA input. See: :func:`~gsshapy.grid.GRIDtoGSSHA.` hmet_ascii_output_folder(Optional[str]): Path to diretory to output HMET ASCII files. Mutually exclusice with netcdf_file_path. Default is None. netcdf_file_path(Optional[str]): If you want the HMET data output as a NetCDF4 file for input to GSSHA. Mutually exclusice with hmet_ascii_output_folder. Default is None.
(module (function_definition (function_name_write_alias_config_hash) function_name_write_alias_config_hash (parameters (default_parameter (identifier_alias_config_hash) identifier_alias_config_hash (string_'') string_'' )default_parameter (default_parameter (identifier_empty_hash) identifier_empty_hash (False) False )default_parameter )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_GLOBAL_ALIAS_HASH_PATH) identifier_GLOBAL_ALIAS_HASH_PATH (string_'w') string_'w' )argument_list )call (as_pattern_target (identifier_alias_config_hash_file) identifier_alias_config_hash_file )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_alias_config_hash_file) identifier_alias_config_hash_file (identifier_write) identifier_write )attribute (argument_list (conditional_expression (string_'') string_'' (identifier_empty_hash) identifier_empty_hash (identifier_alias_config_hash) identifier_alias_config_hash )conditional_expression )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Write self.alias_config_hash to the alias hash file. Args: empty_hash: True if we want to write an empty string into the file. Empty string in the alias hash file means that we have to perform a full load of the command table in the next run.
(module (function_definition (function_name_decode) function_name_decode (parameters (identifier_self) identifier_self (identifier_codes) identifier_codes )parameters (block (assert_statement (comparison_operator (attribute (identifier_codes) identifier_codes (identifier_ndim) identifier_ndim )attribute (integer_2) integer_2 )comparison_operator )assert_statement (expression_statement (assignment (pattern_list (identifier_N) identifier_N (identifier_M) identifier_M )pattern_list (attribute (identifier_codes) identifier_codes (identifier_shape) identifier_shape )attribute )assignment )expression_statement (assert_statement (comparison_operator (identifier_M) identifier_M (attribute (identifier_self) identifier_self (identifier_M) identifier_M )attribute )comparison_operator )assert_statement (assert_statement (comparison_operator (attribute (identifier_codes) identifier_codes (identifier_dtype) identifier_dtype )attribute (attribute (identifier_self) identifier_self (identifier_code_dtype) identifier_code_dtype )attribute )comparison_operator )assert_statement (expression_statement (assignment (identifier_vecs) identifier_vecs (call (attribute (identifier_np) identifier_np (identifier_empty) identifier_empty )attribute (argument_list (tuple (identifier_N) identifier_N (binary_operator (attribute (identifier_self) identifier_self (identifier_Ds) identifier_Ds )attribute (attribute (identifier_self) identifier_self (identifier_M) identifier_M )attribute )binary_operator )tuple (keyword_argument (identifier_dtype) identifier_dtype (attribute (identifier_np) identifier_np (identifier_float32) identifier_float32 )attribute )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_m) identifier_m (call (identifier_range) identifier_range (argument_list (attribute (identifier_self) identifier_self (identifier_M) identifier_M )attribute )argument_list )call (block (expression_statement (assignment (subscript (identifier_vecs) identifier_vecs (slice (colon) colon )slice (slice (binary_operator (identifier_m) identifier_m (attribute (identifier_self) identifier_self (identifier_Ds) identifier_Ds )attribute )binary_operator (colon) colon (binary_operator (parenthesized_expression (binary_operator (identifier_m) identifier_m (integer_1) integer_1 )binary_operator )parenthesized_expression (attribute (identifier_self) identifier_self (identifier_Ds) identifier_Ds )attribute )binary_operator )slice )subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier_codewords) identifier_codewords )attribute (identifier_m) identifier_m )subscript (subscript (identifier_codes) identifier_codes (slice (colon) colon )slice (identifier_m) identifier_m )subscript (slice (colon) colon )slice )subscript )assignment )expression_statement )block )for_statement (return_statement (identifier_vecs) identifier_vecs )return_statement )block )function_definition )module
Given PQ-codes, reconstruct original D-dimensional vectors approximately by fetching the codewords. Args: codes (np.ndarray): PQ-cdoes with shape=(N, M) and dtype=self.code_dtype. Each row is a PQ-code Returns: np.ndarray: Reconstructed vectors with shape=(N, D) and dtype=np.float32
(module (function_definition (function_name_remove_pending_work_units) function_name_remove_pending_work_units (parameters (identifier_self) identifier_self (identifier_work_spec_name) identifier_work_spec_name (identifier_work_unit_names) identifier_work_unit_names )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__remove_some_work_units) identifier__remove_some_work_units )attribute (argument_list (identifier_work_spec_name) identifier_work_spec_name (identifier_work_unit_names) identifier_work_unit_names (keyword_argument (identifier_priority_min) identifier_priority_min (call (attribute (identifier_time) identifier_time (identifier_time) identifier_time )attribute (argument_list )argument_list )call )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Remove some work units in the pending list. If `work_unit_names` is :const:`None` (which must be passed explicitly), all pending work units in `work_spec_name` are removed; otherwise only the specific named work units will be. Note that this function has the potential to confuse workers if they are actually working on the work units in question. If you have ensured that the workers are dead and you would be otherwise waiting for the leases to expire before calling :meth:`remove_available_work_units`, then this is a useful shortcut. :param str work_spec_name: name of the work spec :param list work_unit_names: names of the work units, or :const:`None` for all in `work_spec_name` :return: number of work units removed
(module (function_definition (function_name_do_unmute) function_name_do_unmute (parameters (identifier_self) identifier_self (identifier_sender) identifier_sender (identifier_body) identifier_body (identifier_args) identifier_args )parameters (block (if_statement (call (attribute (identifier_sender) identifier_sender (identifier_get) identifier_get )attribute (argument_list (string_'MUTED') string_'MUTED' )argument_list )call (block (expression_statement (assignment (subscript (identifier_sender) identifier_sender (string_'MUTED') string_'MUTED' )subscript (False) False )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_broadcast) identifier_broadcast )attribute (argument_list (binary_operator (string_'%s has unmuted this chatroom') string_'%s has unmuted this chatroom' (tuple (subscript (identifier_sender) identifier_sender (string_'NICK') string_'NICK' )subscript )tuple )binary_operator )argument_list )call )expression_statement (for_statement (identifier_msg) identifier_msg (call (attribute (identifier_sender) identifier_sender (identifier_get) identifier_get )attribute (argument_list (string_'QUEUED_MESSAGES') string_'QUEUED_MESSAGES' (list )list )argument_list )call (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send_message) identifier_send_message )attribute (argument_list (identifier_msg) identifier_msg (identifier_sender) identifier_sender )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (subscript (identifier_sender) identifier_sender (string_'QUEUED_MESSAGES') string_'QUEUED_MESSAGES' )subscript (list )list )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_send_message) identifier_send_message )attribute (argument_list (string_'you were not muted') string_'you were not muted' (identifier_sender) identifier_sender )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Unmutes the chatroom for a user
(module (function_definition (function_name_sparsify) function_name_sparsify (parameters (identifier_dirname) identifier_dirname (identifier_output_every) identifier_output_every )parameters (block (expression_statement (assignment (identifier_fnames) identifier_fnames (call (identifier_get_filenames) identifier_get_filenames (argument_list (identifier_dirname) identifier_dirname )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output_every_old) identifier_output_every_old (call (identifier_get_output_every) identifier_get_output_every (argument_list (identifier_dirname) identifier_dirname )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (binary_operator (identifier_output_every) identifier_output_every (identifier_output_every_old) identifier_output_every_old )binary_operator (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_'Directory with output_every={} cannot be coerced to') string_'Directory with output_every={} cannot be coerced to' (string_'desired new value.') string_'desired new value.' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_output_every_old) identifier_output_every_old )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_keep_every) identifier_keep_every (binary_operator (identifier_output_every) identifier_output_every (identifier_output_every_old) identifier_output_every_old )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_fnames_to_keep) identifier_fnames_to_keep (subscript (identifier_fnames) identifier_fnames (slice (colon) colon (colon) colon (identifier_keep_every) identifier_keep_every )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_fnames_to_delete) identifier_fnames_to_delete (binary_operator (call (identifier_set) identifier_set (argument_list (identifier_fnames) identifier_fnames )argument_list )call (call (identifier_set) identifier_set (argument_list (identifier_fnames_to_keep) identifier_fnames_to_keep )argument_list )call )binary_operator )assignment )expression_statement (for_statement (identifier_fname) identifier_fname (identifier_fnames_to_delete) identifier_fnames_to_delete (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_fname) identifier_fname )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Remove files from an output directory at regular interval, so as to make it as if there had been more iterations between outputs. Can be used to reduce the storage size of a directory. If the new number of iterations between outputs is not an integer multiple of the old number, then raise an exception. Parameters ---------- dirname: str A path to a directory. output_every: int Desired new number of iterations between outputs. Raises ------ ValueError The directory cannot be coerced into representing `output_every`.
(module (function_definition (function_name__add_trustee) function_name__add_trustee (parameters (identifier_self) identifier_self (identifier_device) identifier_device )parameters (block (expression_statement (assignment (identifier_device_name) identifier_device_name (attribute (call (identifier_get_device_info) identifier_get_device_info (argument_list (identifier_device) identifier_device )argument_list )call (identifier_name) identifier_name )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_device_name) identifier_device_name (attribute (identifier_self) identifier_self (identifier_domain) identifier_domain )attribute )comparison_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (binary_operator (string_'Device: %r is already in this trust domain.') string_'Device: %r is already in this trust domain.' (identifier_device_name) identifier_device_name )binary_operator )assignment )expression_statement (raise_statement (call (identifier_DeviceAlreadyInTrustDomain) identifier_DeviceAlreadyInTrustDomain (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__modify_trust) identifier__modify_trust )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_devices) identifier_devices )attribute (integer_0) integer_0 )subscript (attribute (identifier_self) identifier_self (identifier__get_add_trustee_cmd) identifier__get_add_trustee_cmd )attribute (identifier_device) identifier_device )argument_list )call )expression_statement )block )function_definition )module
Add a single trusted device to the trust domain. :param device: ManagementRoot object -- device to add to trust domain
(module (function_definition (function_name__setGroupNames) function_name__setGroupNames (parameters (identifier_classes) identifier_classes (identifier_classRename) identifier_classRename )parameters (block (expression_statement (assignment (identifier_groups) identifier_groups (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_groupName) identifier_groupName (identifier_glyphList) identifier_glyphList )pattern_list (call (attribute (identifier_classes) identifier_classes (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_groupName) identifier_groupName (call (attribute (identifier_classRename) identifier_classRename (identifier_get) identifier_get )attribute (argument_list (identifier_groupName) identifier_groupName (identifier_groupName) identifier_groupName )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_glyphList) identifier_glyphList )argument_list )call (integer_1) integer_1 )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (subscript (identifier_groups) identifier_groups (identifier_groupName) identifier_groupName )subscript (identifier_glyphList) identifier_glyphList )assignment )expression_statement )block )for_statement (return_statement (identifier_groups) identifier_groups )return_statement )block )function_definition )module
Set the final names into the groups.
(module (function_definition (function_name__visible_in_diff) function_name__visible_in_diff (parameters (identifier_merge_result) identifier_merge_result (default_parameter (identifier_context_lines) identifier_context_lines (integer_3) integer_3 )default_parameter )parameters (block (expression_statement (assignment (identifier_i) identifier_i (assignment (identifier_old_line) identifier_old_line (assignment (identifier_new_line) identifier_new_line (integer_0) integer_0 )assignment )assignment )assignment )expression_statement (while_statement (comparison_operator (identifier_i) identifier_i (call (identifier_len) identifier_len (argument_list (identifier_merge_result) identifier_merge_result )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_line_or_conflict) identifier_line_or_conflict (subscript (identifier_merge_result) identifier_merge_result (identifier_i) identifier_i )subscript )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_line_or_conflict) identifier_line_or_conflict (identifier_tuple) identifier_tuple )argument_list )call (block (expression_statement (yield (expression_list (identifier_old_line) identifier_old_line (identifier_new_line) identifier_new_line (identifier_line_or_conflict) identifier_line_or_conflict )expression_list )yield )expression_statement (expression_statement (augmented_assignment (identifier_old_line) identifier_old_line (call (identifier_len) identifier_len (argument_list (subscript (identifier_line_or_conflict) identifier_line_or_conflict (integer_0) integer_0 )subscript )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_new_line) identifier_new_line (call (identifier_len) identifier_len (argument_list (subscript (identifier_line_or_conflict) identifier_line_or_conflict (integer_1) integer_1 )subscript )argument_list )call )augmented_assignment )expression_statement )block (else_clause (block (for_statement (identifier_j) identifier_j (parenthesized_expression (binary_operator (call (identifier_list) identifier_list (argument_list (call (identifier_range) identifier_range (argument_list (call (identifier_max) identifier_max (argument_list (integer_0) integer_0 (binary_operator (identifier_i) identifier_i (identifier_context_lines) identifier_context_lines )binary_operator )argument_list )call (identifier_i) identifier_i )argument_list )call )argument_list )call (call (identifier_list) identifier_list (argument_list (call (identifier_range) identifier_range (argument_list (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator (call (identifier_min) identifier_min (argument_list (call (identifier_len) identifier_len (argument_list (identifier_merge_result) identifier_merge_result )argument_list )call (binary_operator (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator (identifier_context_lines) identifier_context_lines )binary_operator )argument_list )call )argument_list )call )argument_list )call )binary_operator )parenthesized_expression (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (subscript (identifier_merge_result) identifier_merge_result (identifier_j) identifier_j )subscript (identifier_tuple) identifier_tuple )argument_list )call (block (expression_statement (yield (expression_list (identifier_old_line) identifier_old_line (identifier_new_line) identifier_new_line (identifier_line_or_conflict) identifier_line_or_conflict )expression_list )yield )expression_statement (break_statement )break_statement )block )if_statement )block (else_clause (block (expression_statement (yield (None) None )yield )expression_statement )block )else_clause )for_statement (expression_statement (augmented_assignment (identifier_old_line) identifier_old_line (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_new_line) identifier_new_line (integer_1) integer_1 )augmented_assignment )expression_statement )block )else_clause )if_statement (expression_statement (augmented_assignment (identifier_i) identifier_i (integer_1) integer_1 )augmented_assignment )expression_statement )block )while_statement (expression_statement (yield (None) None )yield )expression_statement )block )function_definition )module
Collects the set of lines that should be visible in a diff with a certain number of context lines
(module (function_definition (function_name_datetimes) function_name_datetimes (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__timestamps_data) identifier__timestamps_data )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__calculate_timestamps) identifier__calculate_timestamps )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (return_statement (call (identifier_tuple) identifier_tuple (generator_expression (call (attribute (identifier_DateTime) identifier_DateTime (identifier_from_moy) identifier_from_moy )attribute (argument_list (identifier_moy) identifier_moy (attribute (identifier_self) identifier_self (identifier_is_leap_year) identifier_is_leap_year )attribute )argument_list )call (for_in_clause (identifier_moy) identifier_moy (attribute (identifier_self) identifier_self (identifier__timestamps_data) identifier__timestamps_data )attribute )for_in_clause )generator_expression )call )return_statement )block )function_definition )module
A sorted list of datetimes in this analysis period.
(module (function_definition (function_name_on_close) function_name_on_close (parameters (identifier_self) identifier_self (identifier_ws) identifier_ws )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"Closing WebSocket connection with {}") string_"Closing WebSocket connection with {}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_url) identifier_url )attribute )argument_list )call )argument_list )call )expression_statement (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_keepalive) identifier_keepalive )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_keepalive) identifier_keepalive )attribute (identifier_is_alive) identifier_is_alive )attribute (argument_list )argument_list )call )boolean_operator (block (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_keepalive) identifier_keepalive )attribute (identifier_do_run) identifier_do_run )attribute (False) False )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_keepalive) identifier_keepalive )attribute (identifier_join) identifier_join )attribute (argument_list )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Called when websocket connection is closed
(module (function_definition (function_name_parsyfiles_global_config) function_name_parsyfiles_global_config (parameters (typed_default_parameter (identifier_multiple_errors_tb_limit) identifier_multiple_errors_tb_limit (type (identifier_int) identifier_int )type (None) None )typed_default_parameter (typed_default_parameter (identifier_full_paths_in_logs) identifier_full_paths_in_logs (type (identifier_bool) identifier_bool )type (None) None )typed_default_parameter (typed_default_parameter (identifier_dict_to_object_subclass_limit) identifier_dict_to_object_subclass_limit (type (identifier_int) identifier_int )type (None) None )typed_default_parameter )parameters (block (if_statement (comparison_operator (identifier_multiple_errors_tb_limit) identifier_multiple_errors_tb_limit (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_GLOBAL_CONFIG) identifier_GLOBAL_CONFIG (identifier_multiple_errors_tb_limit) identifier_multiple_errors_tb_limit )attribute (identifier_multiple_errors_tb_limit) identifier_multiple_errors_tb_limit )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_full_paths_in_logs) identifier_full_paths_in_logs (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_GLOBAL_CONFIG) identifier_GLOBAL_CONFIG (identifier_full_paths_in_logs) identifier_full_paths_in_logs )attribute (identifier_full_paths_in_logs) identifier_full_paths_in_logs )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_dict_to_object_subclass_limit) identifier_dict_to_object_subclass_limit (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_GLOBAL_CONFIG) identifier_GLOBAL_CONFIG (identifier_dict_to_object_subclass_limit) identifier_dict_to_object_subclass_limit )attribute (identifier_dict_to_object_subclass_limit) identifier_dict_to_object_subclass_limit )assignment )expression_statement )block )if_statement )block )function_definition )module
This is the method you should use to configure the parsyfiles library :param multiple_errors_tb_limit: the traceback size (default is 3) of individual parsers exceptions displayed when parsyfiles tries several parsing chains and all of them fail. :param full_paths_in_logs: if True, full file paths will be displayed in logs. Otherwise only the parent path will be displayed and children paths will be indented (default is False) :param dict_to_object_subclass_limit: the number of subclasses that the <dict_to_object> converter will try, when instantiating an object from a dictionary. Default is 50 :return:
(module (function_definition (function_name_pop_stream) function_name_pop_stream (parameters (identifier_cache) identifier_cache (identifier_user_id) identifier_user_id )parameters (block (expression_statement (assignment (identifier_stack) identifier_stack (call (attribute (identifier_cache) identifier_cache (identifier_get) identifier_get )attribute (argument_list (identifier_user_id) identifier_user_id )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_stack) identifier_stack (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_stack) identifier_stack (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_stack) identifier_stack )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_cache) identifier_cache (identifier_delete) identifier_delete )attribute (argument_list (identifier_user_id) identifier_user_id )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_cache) identifier_cache (identifier_set) identifier_set )attribute (argument_list (identifier_user_id) identifier_user_id (identifier_stack) identifier_stack )argument_list )call )expression_statement )block )else_clause )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Pop an item off the stack in the cache. If stack is empty after pop, it deletes the stack. :param cache: werkzeug BasicCache-like object :param user_id: id of user, used as key in cache :return: top item from stack, otherwise None
(module (function_definition (function_name_remove_tenant_user) function_name_remove_tenant_user (parameters (identifier_request) identifier_request (default_parameter (identifier_project) identifier_project (None) None )default_parameter (default_parameter (identifier_user) identifier_user (None) None )default_parameter (default_parameter (identifier_domain) identifier_domain (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_client) identifier_client (call (identifier_keystoneclient) identifier_keystoneclient (argument_list (identifier_request) identifier_request (keyword_argument (identifier_admin) identifier_admin (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_roles) identifier_roles (call (attribute (attribute (identifier_client) identifier_client (identifier_roles) identifier_roles )attribute (identifier_roles_for_user) identifier_roles_for_user )attribute (argument_list (identifier_user) identifier_user (identifier_project) identifier_project )argument_list )call )assignment )expression_statement (for_statement (identifier_role) identifier_role (identifier_roles) identifier_roles (block (expression_statement (call (identifier_remove_tenant_user_role) identifier_remove_tenant_user_role (argument_list (identifier_request) identifier_request (keyword_argument (identifier_user) identifier_user (identifier_user) identifier_user )keyword_argument (keyword_argument (identifier_role) identifier_role (attribute (identifier_role) identifier_role (identifier_id) identifier_id )attribute )keyword_argument (keyword_argument (identifier_project) identifier_project (identifier_project) identifier_project )keyword_argument (keyword_argument (identifier_domain) identifier_domain (identifier_domain) identifier_domain )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Removes all roles from a user on a tenant, removing them from it.
(module (function_definition (function_name_is_dynamo_value) function_name_is_dynamo_value (parameters (identifier_value) identifier_value )parameters (block (if_statement (boolean_operator (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_dict) identifier_dict )argument_list )call )not_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_value) identifier_value )argument_list )call (integer_1) integer_1 )comparison_operator )boolean_operator (block (return_statement (False) False )return_statement )block )if_statement (expression_statement (assignment (identifier_subkey) identifier_subkey (call (attribute (identifier_six) identifier_six (identifier_next) identifier_next )attribute (argument_list (call (attribute (identifier_six) identifier_six (identifier_iterkeys) identifier_iterkeys )attribute (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (comparison_operator (identifier_subkey) identifier_subkey (identifier_TYPES_REV) identifier_TYPES_REV )comparison_operator )return_statement )block )function_definition )module
Returns True if the value is a Dynamo-formatted value
(module (function_definition (function_name_get_message_plain_text) function_name_get_message_plain_text (parameters (typed_parameter (identifier_msg) identifier_msg (type (identifier_Message) identifier_Message )type )typed_parameter )parameters (block (if_statement (attribute (identifier_msg) identifier_msg (identifier_body) identifier_body )attribute (block (return_statement (attribute (identifier_msg) identifier_msg (identifier_body) identifier_body )attribute )return_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_BeautifulSoup) identifier_BeautifulSoup (None) None )comparison_operator (not_operator (attribute (identifier_msg) identifier_msg (identifier_html) identifier_html )attribute )not_operator )boolean_operator (block (return_statement (attribute (identifier_msg) identifier_msg (identifier_html) identifier_html )attribute )return_statement )block )if_statement (expression_statement (assignment (identifier_plain_text) identifier_plain_text (call (attribute (string_'\n') string_'\n' (identifier_join) identifier_join )attribute (generator_expression (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (for_in_clause (identifier_line) identifier_line (call (attribute (attribute (call (identifier_BeautifulSoup) identifier_BeautifulSoup (argument_list (attribute (identifier_msg) identifier_msg (identifier_html) identifier_html )attribute (string_'lxml') string_'lxml' )argument_list )call (identifier_text) identifier_text )attribute (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call )for_in_clause )generator_expression )call )assignment )expression_statement (return_statement (call (attribute (call (attribute (identifier_re) identifier_re (identifier_sub) identifier_sub )attribute (argument_list (string_r'\n\n+') string_r'\n\n+' (string_'\n\n') string_'\n\n' (identifier_plain_text) identifier_plain_text )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Converts an HTML message to plain text. :param msg: A :class:`~flask_mail.Message` :return: The plain text message.
(module (function_definition (function_name_add_to_package_package_tree) function_name_add_to_package_package_tree (parameters (identifier_self) identifier_self (identifier_root) identifier_root (identifier_node_path) identifier_node_path (identifier_pkgnode) identifier_pkgnode )parameters (block (if_statement (identifier_node_path) identifier_node_path (block (expression_statement (assignment (identifier_ptr) identifier_ptr (identifier_root) identifier_root )assignment )expression_statement (for_statement (identifier_node) identifier_node (subscript (identifier_node_path) identifier_node_path (slice (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript (block (expression_statement (assignment (identifier_ptr) identifier_ptr (call (attribute (attribute (identifier_ptr) identifier_ptr (identifier_children) identifier_children )attribute (identifier_setdefault) identifier_setdefault )attribute (argument_list (identifier_node) identifier_node (call (identifier_GroupNode) identifier_GroupNode (argument_list (call (identifier_dict) identifier_dict (argument_list )argument_list )call )argument_list )call )argument_list )call )assignment )expression_statement )block )for_statement (expression_statement (assignment (subscript (attribute (identifier_ptr) identifier_ptr (identifier_children) identifier_children )attribute (subscript (identifier_node_path) identifier_node_path (unary_operator (integer_1) integer_1 )unary_operator )subscript )subscript (identifier_pkgnode) identifier_pkgnode )assignment )expression_statement )block (else_clause (block (if_statement (attribute (identifier_root) identifier_root (identifier_children) identifier_children )attribute (block (raise_statement (call (identifier_PackageException) identifier_PackageException (argument_list (string_"Attempting to overwrite root node of a non-empty package.") string_"Attempting to overwrite root node of a non-empty package." )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_root) identifier_root (identifier_children) identifier_children )attribute (call (attribute (attribute (identifier_pkgnode) identifier_pkgnode (identifier_children) identifier_children )attribute (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Adds a package or sub-package tree from an existing package to this package's contents.
(module (function_definition (function_name_My_TreeTable) function_name_My_TreeTable (parameters (identifier_self) identifier_self (identifier_table) identifier_table (identifier_heads) identifier_heads (default_parameter (identifier_heads2) identifier_heads2 (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_Define_TreeTable) identifier_Define_TreeTable )attribute (argument_list (identifier_heads) identifier_heads (identifier_heads2) identifier_heads2 )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_Display_TreeTable) identifier_Display_TreeTable )attribute (argument_list (identifier_table) identifier_table )argument_list )call )expression_statement )block )function_definition )module
Define and display a table in which the values in first column form one or more trees.
(module (function_definition (function_name_exec_module) function_name_exec_module (parameters (identifier_self) identifier_self (identifier_module) identifier_module )parameters (block (global_statement (identifier_MAIN_MODULE_NAME) identifier_MAIN_MODULE_NAME )global_statement (if_statement (comparison_operator (attribute (identifier_module) identifier_module (identifier___name__) identifier___name__ )attribute (identifier_MAIN_MODULE_NAME) identifier_MAIN_MODULE_NAME )comparison_operator (block (expression_statement (assignment (attribute (identifier_module) identifier_module (identifier___name__) identifier___name__ )attribute (string_"__main__") string_"__main__" )assignment )expression_statement (expression_statement (assignment (identifier_MAIN_MODULE_NAME) identifier_MAIN_MODULE_NAME (None) None )assignment )expression_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (attribute (identifier_self) identifier_self (identifier_filename) identifier_filename )attribute )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_source) identifier_source (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement )block )with_statement (if_statement (attribute (identifier_transforms) identifier_transforms (identifier_transformers) identifier_transformers )attribute (block (expression_statement (assignment (identifier_source) identifier_source (call (attribute (identifier_transforms) identifier_transforms (identifier_transform) identifier_transform )attribute (argument_list (identifier_source) identifier_source )argument_list )call )assignment )expression_statement )block (else_clause (block (for_statement (identifier_line) identifier_line (call (attribute (identifier_source) identifier_source (identifier_split) identifier_split )attribute (argument_list (string_'\n') string_'\n' )argument_list )call (block (if_statement (call (attribute (attribute (identifier_transforms) identifier_transforms (identifier_FROM_EXPERIMENTAL) identifier_FROM_EXPERIMENTAL )attribute (identifier_match) identifier_match )attribute (argument_list (identifier_line) identifier_line )argument_list )call (block (expression_statement (assignment (identifier_source) identifier_source (call (attribute (identifier_transforms) identifier_transforms (identifier_transform) identifier_transform )attribute (argument_list (identifier_source) identifier_source )argument_list )call )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement )block )else_clause )if_statement (expression_statement (call (identifier_exec) identifier_exec (argument_list (identifier_source) identifier_source (call (identifier_vars) identifier_vars (argument_list (identifier_module) identifier_module )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
import the source code, transforma it before executing it so that it is known to Python.
(module (function_definition (function_name_modify_karma) function_name_modify_karma (parameters (identifier_self) identifier_self (identifier_words) identifier_words )parameters (block (expression_statement (assignment (identifier_k) identifier_k (call (identifier_defaultdict) identifier_defaultdict (argument_list (identifier_int) identifier_int )argument_list )call )assignment )expression_statement (if_statement (identifier_words) identifier_words (block (for_statement (identifier_word_tuple) identifier_word_tuple (identifier_words) identifier_words (block (expression_statement (assignment (identifier_word) identifier_word (subscript (identifier_word_tuple) identifier_word_tuple (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_ending) identifier_ending (subscript (identifier_word) identifier_word (unary_operator (integer_1) integer_1 )unary_operator )subscript )assignment )expression_statement (expression_statement (assignment (identifier_change) identifier_change (conditional_expression (unary_operator (integer_1) integer_1 )unary_operator (comparison_operator (identifier_ending) identifier_ending (string_'-') string_'-' )comparison_operator (integer_1) integer_1 )conditional_expression )assignment )expression_statement (if_statement (comparison_operator (string_'-') string_'-' (identifier_ending) identifier_ending )comparison_operator (block (expression_statement (assignment (identifier_word) identifier_word (call (attribute (identifier_word) identifier_word (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_'-') string_'-' )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (string_'+') string_'+' (identifier_ending) identifier_ending )comparison_operator (block (expression_statement (assignment (identifier_word) identifier_word (call (attribute (identifier_word) identifier_word (identifier_rstrip) identifier_rstrip )attribute (argument_list (string_'+') string_'+' )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement (if_statement (boolean_operator (call (attribute (identifier_word) identifier_word (identifier_startswith) identifier_startswith )attribute (argument_list (string_'(') string_'(' )argument_list )call (call (attribute (identifier_word) identifier_word (identifier_endswith) identifier_endswith )attribute (argument_list (string_')') string_')' )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_word) identifier_word (subscript (identifier_word) identifier_word (slice (integer_1) integer_1 (colon) colon (unary_operator (integer_1) integer_1 )unary_operator )slice )subscript )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_word) identifier_word (call (attribute (identifier_word) identifier_word (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (identifier_word) identifier_word (block (expression_statement (augmented_assignment (subscript (identifier_k) identifier_k (identifier_word) identifier_word )subscript (identifier_change) identifier_change )augmented_assignment )expression_statement )block )if_statement )block )for_statement )block )if_statement (return_statement (identifier_k) identifier_k )return_statement )block )function_definition )module
Given a regex object, look through the groups and modify karma as necessary
(module (function_definition (function_name__convert_units) function_name__convert_units (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_m1) identifier_m1 )attribute (binary_operator (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_m1) identifier_m1 )attribute (identifier_M_sun) identifier_M_sun )binary_operator (attribute (identifier_ct) identifier_ct (identifier_G) identifier_G )attribute )binary_operator (binary_operator (attribute (identifier_ct) identifier_ct (identifier_c) identifier_c )attribute (integer_2) integer_2 )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_m2) identifier_m2 )attribute (binary_operator (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_m2) identifier_m2 )attribute (identifier_M_sun) identifier_M_sun )binary_operator (attribute (identifier_ct) identifier_ct (identifier_G) identifier_G )attribute )binary_operator (binary_operator (attribute (identifier_ct) identifier_ct (identifier_c) identifier_c )attribute (integer_2) integer_2 )binary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_initial_cond_type_conversion) identifier_initial_cond_type_conversion (dictionary (pair (string_'time') string_'time' (binary_operator (attribute (identifier_ct) identifier_ct (identifier_c) identifier_c )attribute (attribute (identifier_ct) identifier_ct (identifier_Julian_year) identifier_Julian_year )attribute )binary_operator )pair (pair (string_'frequency') string_'frequency' (binary_operator (float_1.) float_1. (attribute (identifier_ct) identifier_ct (identifier_c) identifier_c )attribute )binary_operator )pair (pair (string_'separation') string_'separation' (attribute (identifier_ct) identifier_ct (identifier_parsec) identifier_parsec )attribute )pair )dictionary )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_initial_point) identifier_initial_point )attribute (binary_operator (attribute (identifier_self) identifier_self (identifier_initial_point) identifier_initial_point )attribute (subscript (identifier_initial_cond_type_conversion) identifier_initial_cond_type_conversion (attribute (identifier_self) identifier_self (identifier_initial_cond_type) identifier_initial_cond_type )attribute )subscript )binary_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_t_obs) identifier_t_obs )attribute (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_t_obs) identifier_t_obs )attribute (attribute (identifier_ct) identifier_ct (identifier_c) identifier_c )attribute )binary_operator (attribute (identifier_ct) identifier_ct (identifier_Julian_year) identifier_Julian_year )attribute )binary_operator )assignment )expression_statement (return_statement )return_statement )block )function_definition )module
Convert units to geometrized units. Change to G=c=1 (geometrized) units for ease in calculations.
(module (function_definition (function_name_childFactory) function_name_childFactory (parameters (identifier_self) identifier_self (identifier_ctx) identifier_ctx (identifier_name) identifier_name )parameters (block (try_statement (block (expression_statement (assignment (identifier_o) identifier_o (call (attribute (attribute (identifier_self) identifier_self (identifier_webapp) identifier_webapp )attribute (identifier_fromWebID) identifier_fromWebID )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement )block (except_clause (identifier__WebIDFormatException) identifier__WebIDFormatException (block (return_statement (None) None )return_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_o) identifier_o (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_webViewer) identifier_webViewer )attribute (identifier_wrapModel) identifier_wrapModel )attribute (argument_list (identifier_o) identifier_o )argument_list )call )return_statement )block )function_definition )module
Return a shell page wrapped around the Item model described by the webID, or return None if no such item can be found.
(module (function_definition (function_name_get_proc_name) function_name_get_proc_name (parameters (identifier_cmd) identifier_cmd )parameters (block (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_cmd) identifier_cmd (identifier_Iterable) identifier_Iterable )argument_list )call (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_cmd) identifier_cmd (identifier_str) identifier_str )argument_list )call )not_operator )boolean_operator (block (expression_statement (assignment (identifier_cmd) identifier_cmd (call (attribute (string_" ") string_" " (identifier_join) identifier_join )attribute (argument_list (identifier_cmd) identifier_cmd )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (call (attribute (call (attribute (subscript (call (attribute (identifier_cmd) identifier_cmd (identifier_split) identifier_split )attribute (argument_list )argument_list )call (integer_0) integer_0 )subscript (identifier_replace) identifier_replace )attribute (argument_list (string_'(') string_'(' (string_'') string_'' )argument_list )call (identifier_replace) identifier_replace )attribute (argument_list (string_')') string_')' (string_'') string_'' )argument_list )call )return_statement )block )function_definition )module
Get the representative process name from complex command :param str | list[str] cmd: a command to be processed :return str: the basename representative command
(module (function_definition (function_name_cudaMemcpy_htod) function_name_cudaMemcpy_htod (parameters (identifier_dst) identifier_dst (identifier_src) identifier_src (identifier_count) identifier_count )parameters (block (expression_statement (assignment (identifier_status) identifier_status (call (attribute (identifier__libcudart) identifier__libcudart (identifier_cudaMemcpy) identifier_cudaMemcpy )attribute (argument_list (identifier_dst) identifier_dst (identifier_src) identifier_src (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_size_t) identifier_c_size_t )attribute (argument_list (identifier_count) identifier_count )argument_list )call (identifier_cudaMemcpyHostToDevice) identifier_cudaMemcpyHostToDevice )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_cudaCheckStatus) identifier_cudaCheckStatus (argument_list (identifier_status) identifier_status )argument_list )call )expression_statement )block )function_definition )module
Copy memory from host to device. Copy data from host memory to device memory. Parameters ---------- dst : ctypes pointer Device memory pointer. src : ctypes pointer Host memory pointer. count : int Number of bytes to copy.
(module (function_definition (function_name__setup_phantomjs) function_name__setup_phantomjs (parameters (identifier_self) identifier_self (identifier_capabilities) identifier_capabilities )parameters (block (expression_statement (assignment (identifier_phantomjs_driver) identifier_phantomjs_driver (call (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_get) identifier_get )attribute (argument_list (string_'Driver') string_'Driver' (string_'phantomjs_driver_path') string_'phantomjs_driver_path' )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_"Phantom driver path given in properties: %s") string_"Phantom driver path given in properties: %s" (identifier_phantomjs_driver) identifier_phantomjs_driver )argument_list )call )expression_statement (return_statement (call (attribute (identifier_webdriver) identifier_webdriver (identifier_PhantomJS) identifier_PhantomJS )attribute (argument_list (keyword_argument (identifier_executable_path) identifier_executable_path (identifier_phantomjs_driver) identifier_phantomjs_driver )keyword_argument (keyword_argument (identifier_desired_capabilities) identifier_desired_capabilities (identifier_capabilities) identifier_capabilities )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Setup phantomjs webdriver :param capabilities: capabilities object :returns: a new local phantomjs driver
(module (function_definition (function_name_from_py_func) function_name_from_py_func (parameters (identifier_cls) identifier_cls (identifier_func) identifier_func )parameters (block (import_from_statement (dotted_name (identifier_bokeh) identifier_bokeh (identifier_util) identifier_util (identifier_deprecation) identifier_deprecation )dotted_name (dotted_name (identifier_deprecated) identifier_deprecated )dotted_name )import_from_statement (expression_statement (call (identifier_deprecated) identifier_deprecated (argument_list (concatenated_string (string_"'from_py_func' is deprecated and will be removed in an eventual 2.0 release. ") string_"'from_py_func' is deprecated and will be removed in an eventual 2.0 release. " (string_"Use CustomJSFilter directly instead.") string_"Use CustomJSFilter directly instead." )concatenated_string )argument_list )call )expression_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_func) identifier_func (identifier_FunctionType) identifier_FunctionType )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'CustomJSFilter.from_py_func only accepts function objects.') string_'CustomJSFilter.from_py_func only accepts function objects.' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_pscript) identifier_pscript (call (identifier_import_required) identifier_import_required (argument_list (string_'pscript') string_'pscript' (call (identifier_dedent) identifier_dedent (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_argspec) identifier_argspec (call (attribute (identifier_inspect) identifier_inspect (identifier_getargspec) identifier_getargspec )attribute (argument_list (identifier_func) identifier_func )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_default_names) identifier_default_names (attribute (identifier_argspec) identifier_argspec (identifier_args) identifier_args )attribute )assignment )expression_statement (expression_statement (assignment (identifier_default_values) identifier_default_values (boolean_operator (attribute (identifier_argspec) identifier_argspec (identifier_defaults) identifier_defaults )attribute (list )list )boolean_operator )assignment )expression_statement (if_statement (comparison_operator (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_default_names) identifier_default_names )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_default_values) identifier_default_values )argument_list )call )binary_operator (integer_0) integer_0 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Function may only contain keyword arguments.") string_"Function may only contain keyword arguments." )argument_list )call )raise_statement )block )if_statement (if_statement (boolean_operator (identifier_default_values) identifier_default_values (not_operator (call (identifier_any) identifier_any (generator_expression (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_Model) identifier_Model )argument_list )call (for_in_clause (identifier_value) identifier_value (identifier_default_values) identifier_default_values )for_in_clause )generator_expression )call )not_operator )boolean_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Default value must be a plot object.") string_"Default value must be a plot object." )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_func_kwargs) identifier_func_kwargs (call (identifier_dict) identifier_dict (argument_list (call (identifier_zip) identifier_zip (argument_list (identifier_default_names) identifier_default_names (identifier_default_values) identifier_default_values )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_code) identifier_code (binary_operator (call (attribute (identifier_pscript) identifier_pscript (identifier_py2js) identifier_py2js )attribute (argument_list (identifier_func) identifier_func (string_'filter') string_'filter' )argument_list )call (binary_operator (string_'return filter(%s);\n') string_'return filter(%s);\n' (call (attribute (string_', ') string_', ' (identifier_join) identifier_join )attribute (argument_list (identifier_default_names) identifier_default_names )argument_list )call )binary_operator )binary_operator )assignment )expression_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (keyword_argument (identifier_code) identifier_code (identifier_code) identifier_code )keyword_argument (keyword_argument (identifier_args) identifier_args (identifier_func_kwargs) identifier_func_kwargs )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Create a ``CustomJSFilter`` instance from a Python function. The function is translated to JavaScript using PScript. The ``func`` function namespace will contain the variable ``source`` at render time. This will be the data source associated with the ``CDSView`` that this filter is added to.
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (expression_statement (assignment (identifier_block_remaining) identifier_block_remaining (binary_operator (identifier__BLOCK_SIZE) identifier__BLOCK_SIZE (binary_operator (attribute (identifier_self) identifier_self (identifier___position) identifier___position )attribute (identifier__BLOCK_SIZE) identifier__BLOCK_SIZE )binary_operator )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_block_remaining) identifier_block_remaining (identifier__HEADER_LENGTH) identifier__HEADER_LENGTH )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier___writer) identifier___writer )attribute (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_'\x00') string_'\x00' (identifier_block_remaining) identifier_block_remaining )binary_operator )argument_list )call )expression_statement (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier___position) identifier___position )attribute (identifier_block_remaining) identifier_block_remaining )augmented_assignment )expression_statement (expression_statement (assignment (identifier_block_remaining) identifier_block_remaining (identifier__BLOCK_SIZE) identifier__BLOCK_SIZE )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_block_remaining) identifier_block_remaining (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call (identifier__HEADER_LENGTH) identifier__HEADER_LENGTH )binary_operator )comparison_operator (block (expression_statement (assignment (identifier_first_chunk) identifier_first_chunk (subscript (identifier_data) identifier_data (slice (colon) colon (binary_operator (identifier_block_remaining) identifier_block_remaining (identifier__HEADER_LENGTH) identifier__HEADER_LENGTH )binary_operator )slice )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier___write_record) identifier___write_record )attribute (argument_list (identifier__RECORD_TYPE_FIRST) identifier__RECORD_TYPE_FIRST (identifier_first_chunk) identifier_first_chunk )argument_list )call )expression_statement (expression_statement (assignment (identifier_data) identifier_data (subscript (identifier_data) identifier_data (slice (call (identifier_len) identifier_len (argument_list (identifier_first_chunk) identifier_first_chunk )argument_list )call (colon) colon )slice )subscript )assignment )expression_statement (while_statement (True) True (block (expression_statement (assignment (identifier_block_remaining) identifier_block_remaining (binary_operator (identifier__BLOCK_SIZE) identifier__BLOCK_SIZE (binary_operator (attribute (identifier_self) identifier_self (identifier___position) identifier___position )attribute (identifier__BLOCK_SIZE) identifier__BLOCK_SIZE )binary_operator )binary_operator )assignment )expression_statement (if_statement (comparison_operator (identifier_block_remaining) identifier_block_remaining (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_data) identifier_data )argument_list )call (identifier__HEADER_LENGTH) identifier__HEADER_LENGTH )binary_operator )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier___write_record) identifier___write_record )attribute (argument_list (identifier__RECORD_TYPE_LAST) identifier__RECORD_TYPE_LAST (identifier_data) identifier_data )argument_list )call )expression_statement (break_statement )break_statement )block (else_clause (block (expression_statement (assignment (identifier_chunk) identifier_chunk (subscript (identifier_data) identifier_data (slice (colon) colon (binary_operator (identifier_block_remaining) identifier_block_remaining (identifier__HEADER_LENGTH) identifier__HEADER_LENGTH )binary_operator )slice )subscript )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier___write_record) identifier___write_record )attribute (argument_list (identifier__RECORD_TYPE_MIDDLE) identifier__RECORD_TYPE_MIDDLE (identifier_chunk) identifier_chunk )argument_list )call )expression_statement (expression_statement (assignment (identifier_data) identifier_data (subscript (identifier_data) identifier_data (slice (call (identifier_len) identifier_len (argument_list (identifier_chunk) identifier_chunk )argument_list )call (colon) colon )slice )subscript )assignment )expression_statement )block )else_clause )if_statement )block )while_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier___write_record) identifier___write_record )attribute (argument_list (identifier__RECORD_TYPE_FULL) identifier__RECORD_TYPE_FULL (identifier_data) identifier_data )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Write single record. Args: data: record data to write as string, byte array or byte sequence.
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (default_parameter (identifier_back) identifier_back (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_back) identifier_back (call (attribute (identifier_self) identifier_self (identifier_backends) identifier_backends )attribute (argument_list (identifier_back) identifier_back )argument_list )call )assignment )expression_statement (for_statement (identifier_fsb) identifier_fsb (identifier_back) identifier_back (block (expression_statement (assignment (identifier_fstr) identifier_fstr (call (attribute (string_'{0}.update') string_'{0}.update' (identifier_format) identifier_format )attribute (argument_list (identifier_fsb) identifier_fsb )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_fstr) identifier_fstr (attribute (identifier_self) identifier_self (identifier_servers) identifier_servers )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (string_'Updating %s fileserver cache') string_'Updating %s fileserver cache' (identifier_fsb) identifier_fsb )argument_list )call )expression_statement (expression_statement (call (subscript (attribute (identifier_self) identifier_self (identifier_servers) identifier_servers )attribute (identifier_fstr) identifier_fstr )subscript (argument_list )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Update all of the enabled fileserver backends which support the update function, or
(module (function_definition (function_name_raise_thread_exception) function_name_raise_thread_exception (parameters (identifier_thread_id) identifier_thread_id (identifier_exception) identifier_exception )parameters (block (if_statement (comparison_operator (identifier_current_platform) identifier_current_platform (string_"CPython") string_"CPython" )comparison_operator (block (expression_statement (call (identifier__raise_thread_exception_cpython) identifier__raise_thread_exception_cpython (argument_list (identifier_thread_id) identifier_thread_id (identifier_exception) identifier_exception )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_message) identifier_message (string_"Setting thread exceptions (%s) is not supported for your current platform (%r).") string_"Setting thread exceptions (%s) is not supported for your current platform (%r)." )assignment )expression_statement (expression_statement (assignment (identifier_exctype) identifier_exctype (attribute (parenthesized_expression (conditional_expression (identifier_exception) identifier_exception (call (attribute (identifier_inspect) identifier_inspect (identifier_isclass) identifier_isclass )attribute (argument_list (identifier_exception) identifier_exception )argument_list )call (call (identifier_type) identifier_type (argument_list (identifier_exception) identifier_exception )argument_list )call )conditional_expression )parenthesized_expression (identifier___name__) identifier___name__ )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_critical) identifier_critical )attribute (argument_list (identifier_message) identifier_message (identifier_exctype) identifier_exctype (identifier_current_platform) identifier_current_platform )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
Raise an exception in a thread. Currently, this is only available on CPython. Note: This works by setting an async exception in the thread. This means that the exception will only get called the next time that thread acquires the GIL. Concretely, this means that this middleware can't cancel system calls.
(module (function_definition (function_name_get_schema_descendant) function_name_get_schema_descendant (parameters (identifier_self) identifier_self (typed_parameter (identifier_route) identifier_route (type (identifier_SchemaRoute) identifier_SchemaRoute )type )typed_parameter )parameters (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_SchemaNode) identifier_SchemaNode )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_node) identifier_node (identifier_self) identifier_self )assignment )expression_statement (for_statement (identifier_p) identifier_p (identifier_route) identifier_route (block (expression_statement (assignment (identifier_node) identifier_node (call (attribute (identifier_node) identifier_node (identifier_get_child) identifier_get_child )attribute (argument_list (list_splat (identifier_p) identifier_p )list_splat )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_node) identifier_node (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement )block )for_statement (return_statement (identifier_node) identifier_node )return_statement )block )function_definition )module
Return descendant schema node or ``None`` if not found. Args: route: Schema route to the descendant node (relative to the receiver).
(module (function_definition (function_name__create_scsi_devices) function_name__create_scsi_devices (parameters (identifier_scsi_devices) identifier_scsi_devices )parameters (block (expression_statement (assignment (identifier_keys) identifier_keys (call (identifier_range) identifier_range (argument_list (unary_operator (integer_1000) integer_1000 )unary_operator (unary_operator (integer_1050) integer_1050 )unary_operator (unary_operator (integer_1) integer_1 )unary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_scsi_specs) identifier_scsi_specs (list )list )assignment )expression_statement (if_statement (identifier_scsi_devices) identifier_scsi_devices (block (expression_statement (assignment (identifier_devs) identifier_devs (list_comprehension (subscript (identifier_scsi) identifier_scsi (string_'adapter') string_'adapter' )subscript (for_in_clause (identifier_scsi) identifier_scsi (identifier_scsi_devices) identifier_scsi_devices )for_in_clause )list_comprehension )assignment )expression_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_trace) identifier_trace )attribute (argument_list (string_'Creating SCSI devices %s') string_'Creating SCSI devices %s' (identifier_devs) identifier_devs )argument_list )call )expression_statement (for_statement (tuple_pattern (identifier_key) identifier_key (identifier_scsi_controller) identifier_scsi_controller )tuple_pattern (call (identifier_zip) identifier_zip (argument_list (identifier_keys) identifier_keys (identifier_scsi_devices) identifier_scsi_devices )argument_list )call (block (expression_statement (assignment (identifier_scsi_spec) identifier_scsi_spec (call (identifier__apply_scsi_controller) identifier__apply_scsi_controller (argument_list (subscript (identifier_scsi_controller) identifier_scsi_controller (string_'adapter') string_'adapter' )subscript (subscript (identifier_scsi_controller) identifier_scsi_controller (string_'type') string_'type' )subscript (subscript (identifier_scsi_controller) identifier_scsi_controller (string_'bus_sharing') string_'bus_sharing' )subscript (identifier_key) identifier_key (subscript (identifier_scsi_controller) identifier_scsi_controller (string_'bus_number') string_'bus_number' )subscript (string_'add') string_'add' )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_scsi_specs) identifier_scsi_specs (identifier_append) identifier_append )attribute (argument_list (identifier_scsi_spec) identifier_scsi_spec )argument_list )call )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_scsi_specs) identifier_scsi_specs )return_statement )block )function_definition )module
Returns a list of vim.vm.device.VirtualDeviceSpec objects representing SCSI controllers scsi_devices: List of SCSI device properties
(module (function_definition (function_name_pct_negative) function_name_pct_negative (parameters (identifier_self) identifier_self (default_parameter (identifier_threshold) identifier_threshold (float_0.0) float_0.0 )default_parameter )parameters (block (return_statement (binary_operator (call (attribute (identifier_np) identifier_np (identifier_count_nonzero) identifier_count_nonzero )attribute (argument_list (subscript (identifier_self) identifier_self (comparison_operator (identifier_self) identifier_self (identifier_threshold) identifier_threshold )comparison_operator )subscript )argument_list )call (call (attribute (identifier_self) identifier_self (identifier_count) identifier_count )attribute (argument_list )argument_list )call )binary_operator )return_statement )block )function_definition )module
Pct. of periods in which `self` is less than `threshold.` Parameters ---------- threshold : {float, TSeries, pd.Series}, default 0. Returns ------- float
(module (function_definition (function_name_astype) function_name_astype (parameters (identifier_value) identifier_value (default_parameter (identifier_types) identifier_types (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_types) identifier_types (None) None )comparison_operator (block (expression_statement (assignment (identifier_types) identifier_types (expression_list (identifier_int) identifier_int (identifier_float) identifier_float (identifier_asbool) identifier_asbool (identifier_bytes2str) identifier_bytes2str )expression_list )assignment )expression_statement )block )if_statement (for_statement (identifier_typ) identifier_typ (identifier_types) identifier_types (block (try_statement (block (return_statement (call (identifier_typ) identifier_typ (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block (except_clause (tuple (identifier_ValueError) identifier_ValueError (identifier_AttributeError) identifier_AttributeError (identifier_TypeError) identifier_TypeError (identifier_UnicodeEncodeError) identifier_UnicodeEncodeError )tuple (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
Return argument as one of types if possible. >>> astype('42') 42 >>> astype('3.14') 3.14 >>> astype('True') True >>> astype(b'Neee-Wom') 'Neee-Wom'
(module (function_definition (function_name_strip_tags) function_name_strip_tags (parameters (identifier_cls) identifier_cls (identifier_html) identifier_html )parameters (block (expression_statement (assignment (identifier_s) identifier_s (call (identifier_cls) identifier_cls (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_s) identifier_s (identifier_feed) identifier_feed )attribute (argument_list (identifier_html) identifier_html )argument_list )call )expression_statement (return_statement (call (attribute (identifier_s) identifier_s (identifier_get_data) identifier_get_data )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
This function may be used to remove HTML tags from data.
(module (function_definition (function_name_cache_dest) function_name_cache_dest (parameters (identifier_self) identifier_self (identifier_url) identifier_url (default_parameter (identifier_saltenv) identifier_saltenv (string_'base') string_'base' )default_parameter (default_parameter (identifier_cachedir) identifier_cachedir (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_proto) identifier_proto (attribute (call (identifier_urlparse) identifier_urlparse (argument_list (identifier_url) identifier_url )argument_list )call (identifier_scheme) identifier_scheme )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_proto) identifier_proto (string_'') string_'' )comparison_operator (block (return_statement (identifier_url) identifier_url )return_statement )block )if_statement (if_statement (comparison_operator (identifier_proto) identifier_proto (string_'salt') string_'salt' )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_url) identifier_url (identifier_senv) identifier_senv )pattern_list (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_url) identifier_url )attribute (identifier_parse) identifier_parse )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (if_statement (identifier_senv) identifier_senv (block (expression_statement (assignment (identifier_saltenv) identifier_saltenv (identifier_senv) identifier_senv )assignment )expression_statement )block )if_statement (return_statement (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_opts) identifier_opts )attribute (string_'cachedir') string_'cachedir' )subscript (string_'files') string_'files' (identifier_saltenv) identifier_saltenv (call (attribute (identifier_url) identifier_url (identifier_lstrip) identifier_lstrip )attribute (argument_list (string_'|/') string_'|/' )argument_list )call )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__extrn_path) identifier__extrn_path )attribute (argument_list (identifier_url) identifier_url (identifier_saltenv) identifier_saltenv (keyword_argument (identifier_cachedir) identifier_cachedir (identifier_cachedir) identifier_cachedir )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return the expected cache location for the specified URL and environment.
(module (function_definition (function_name__package_exists) function_name__package_exists (parameters (identifier_path) identifier_path )parameters (block (while_statement (identifier_path) identifier_path (block (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_path) identifier_path )argument_list )call (block (return_statement (True) True )return_statement )block (else_clause (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )while_statement (return_statement (False) False )return_statement )block )function_definition )module
Checks if the given Python path matches a valid file or a valid container file :param path: A Python path :return: True if the module or its container exists
(module (function_definition (function_name_index_template_absent) function_name_index_template_absent (parameters (identifier_name) identifier_name )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'changes') string_'changes' (dictionary )dictionary )pair (pair (string_'result') string_'result' (True) True )pair (pair (string_'comment') string_'comment' (string_'') string_'' )pair )dictionary )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_index_template) identifier_index_template (call (subscript (identifier___salt__) identifier___salt__ (string_'elasticsearch.index_template_get') string_'elasticsearch.index_template_get' )subscript (argument_list (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (identifier_index_template) identifier_index_template (comparison_operator (identifier_name) identifier_name (identifier_index_template) identifier_index_template )comparison_operator )boolean_operator (block (if_statement (subscript (identifier___opts__) identifier___opts__ (string_'test') string_'test' )subscript (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (call (attribute (string_'Index template {0} will be removed') string_'Index template {0} will be removed' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (subscript (identifier_ret) identifier_ret (string_'changes') string_'changes' )subscript (string_'old') string_'old' )subscript (subscript (identifier_index_template) identifier_index_template (identifier_name) identifier_name )subscript )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (None) None )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (call (subscript (identifier___salt__) identifier___salt__ (string_'elasticsearch.index_template_delete') string_'elasticsearch.index_template_delete' )subscript (argument_list (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (call (attribute (string_'Successfully removed index template {0}') string_'Successfully removed index template {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (subscript (identifier_ret) identifier_ret (string_'changes') string_'changes' )subscript (string_'old') string_'old' )subscript (subscript (identifier_index_template) identifier_index_template (identifier_name) identifier_name )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (call (attribute (string_'Failed to remove index template {0} for unknown reasons') string_'Failed to remove index template {0} for unknown reasons' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (call (attribute (string_'Index template {0} is already absent') string_'Index template {0} is already absent' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_err) identifier_err )as_pattern_target )as_pattern (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'result') string_'result' )subscript (False) False )assignment )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'comment') string_'comment' )subscript (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_err) identifier_err )argument_list )call )assignment )expression_statement )block )except_clause )try_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Ensure that the named index template is absent. name Name of the index to remove
(module (function_definition (function_name_reverse_transform) function_name_reverse_transform (parameters (identifier_self) identifier_self (identifier_tables) identifier_tables (default_parameter (identifier_table_metas) identifier_table_metas (None) None )default_parameter (default_parameter (identifier_missing) identifier_missing (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_missing) identifier_missing (None) None )comparison_operator (block (expression_statement (assignment (identifier_missing) identifier_missing (attribute (identifier_self) identifier_self (identifier_missing) identifier_missing )attribute )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_missing) identifier_missing )attribute (identifier_missing) identifier_missing )assignment )expression_statement (expression_statement (call (attribute (identifier_warnings) identifier_warnings (identifier_warn) identifier_warn )attribute (argument_list (call (attribute (identifier_DEPRECATION_MESSAGE) identifier_DEPRECATION_MESSAGE (identifier_format) identifier_format )attribute (argument_list (string_'reverse_transform') string_'reverse_transform' )argument_list )call (identifier_DeprecationWarning) identifier_DeprecationWarning )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_reverse) identifier_reverse (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_table_name) identifier_table_name (identifier_tables) identifier_tables (block (expression_statement (assignment (identifier_table) identifier_table (subscript (identifier_tables) identifier_tables (identifier_table_name) identifier_table_name )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_table_metas) identifier_table_metas (None) None )comparison_operator (block (expression_statement (assignment (identifier_table_meta) identifier_table_meta (subscript (subscript (attribute (identifier_self) identifier_self (identifier_table_dict) identifier_table_dict )attribute (identifier_table_name) identifier_table_name )subscript (integer_1) integer_1 )subscript )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_table_meta) identifier_table_meta (subscript (identifier_table_metas) identifier_table_metas (identifier_table_name) identifier_table_name )subscript )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (subscript (identifier_reverse) identifier_reverse (identifier_table_name) identifier_table_name )subscript (call (attribute (identifier_self) identifier_self (identifier_reverse_transform_table) identifier_reverse_transform_table )attribute (argument_list (identifier_table) identifier_table (identifier_table_meta) identifier_table_meta )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_reverse) identifier_reverse )return_statement )block )function_definition )module
Transform data back to its original format. Args: tables(dict): mapping of table names to `tuple` where each tuple is on the form (`pandas.DataFrame`, `dict`). The `DataFrame` contains the transformed data and the `dict` the corresponding meta information. If not specified, the tables will be retrieved using the meta_file. table_metas(dict): Full metadata file for the dataset. missing(bool): Wheter or not use NullTransformer to handle missing values. Returns: dict: Map from `str` (table_names) to `pandas.DataFrame` (transformed data).
(module (function_definition (function_name_draw) function_name_draw (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ax) identifier_ax )attribute (identifier_plot) identifier_plot )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_k_values_) identifier_k_values_ )attribute (attribute (identifier_self) identifier_self (identifier_k_scores_) identifier_k_scores_ )attribute (keyword_argument (identifier_marker) identifier_marker (string_"D") string_"D" )keyword_argument )argument_list )call )expression_statement (if_statement (boolean_operator (attribute (identifier_self) identifier_self (identifier_locate_elbow) identifier_locate_elbow )attribute (comparison_operator (attribute (identifier_self) identifier_self (identifier_elbow_value_) identifier_elbow_value_ )attribute (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_elbow_label) identifier_elbow_label (call (attribute (string_"$elbow\ at\ k={}, score={:0.3f}$") string_"$elbow\ at\ k={}, score={:0.3f}$" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_elbow_value_) identifier_elbow_value_ )attribute (attribute (identifier_self) identifier_self (identifier_elbow_score_) identifier_elbow_score_ )attribute )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ax) identifier_ax )attribute (identifier_axvline) identifier_axvline )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_elbow_value_) identifier_elbow_value_ )attribute (keyword_argument (identifier_c) identifier_c (identifier_LINE_COLOR) identifier_LINE_COLOR )keyword_argument (keyword_argument (identifier_linestyle) identifier_linestyle (string_"--") string_"--" )keyword_argument (keyword_argument (identifier_label) identifier_label (identifier_elbow_label) identifier_elbow_label )keyword_argument )argument_list )call )expression_statement )block )if_statement (if_statement (attribute (identifier_self) identifier_self (identifier_timings) identifier_timings )attribute (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_axes) identifier_axes )attribute (list (attribute (identifier_self) identifier_self (identifier_ax) identifier_ax )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_ax) identifier_ax )attribute (identifier_twinx) identifier_twinx )attribute (argument_list )argument_list )call )list )assignment )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_axes) identifier_axes )attribute (integer_1) integer_1 )subscript (identifier_plot) identifier_plot )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_k_values_) identifier_k_values_ )attribute (attribute (identifier_self) identifier_self (identifier_k_timers_) identifier_k_timers_ )attribute (keyword_argument (identifier_label) identifier_label (string_"fit time") string_"fit time" )keyword_argument (keyword_argument (identifier_c) identifier_c (string_'g') string_'g' )keyword_argument (keyword_argument (identifier_marker) identifier_marker (string_"o") string_"o" )keyword_argument (keyword_argument (identifier_linestyle) identifier_linestyle (string_"--") string_"--" )keyword_argument (keyword_argument (identifier_alpha) identifier_alpha (float_0.75) float_0.75 )keyword_argument )argument_list )call )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier_ax) identifier_ax )attribute )return_statement )block )function_definition )module
Draw the elbow curve for the specified scores and values of K.
(module (function_definition (function_name_exec_cmd) function_name_exec_cmd (parameters (identifier_self) identifier_self (identifier_cmdstr) identifier_cmdstr )parameters (block (expression_statement (assignment (identifier_parts) identifier_parts (call (attribute (identifier_cmdstr) identifier_cmdstr (identifier_split) identifier_split )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (call (identifier_len) identifier_len (argument_list (identifier_parts) identifier_parts )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_cmd) identifier_cmd (identifier_args) identifier_args )pattern_list (expression_list (subscript (identifier_parts) identifier_parts (integer_0) integer_0 )subscript (subscript (identifier_parts) identifier_parts (slice (integer_1) integer_1 (colon) colon )slice )subscript )expression_list )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__dispatch) identifier__dispatch )attribute (argument_list (identifier_cmd) identifier_cmd (identifier_args) identifier_args )argument_list )call )expression_statement )block (else_clause (block (pass_statement )pass_statement )block )else_clause )if_statement )block )function_definition )module
Parse line from CLI read loop and execute provided command
(module (function_definition (function_name__unpack) function_name__unpack (parameters (identifier_self) identifier_self (identifier_data) identifier_data )parameters (block (expression_statement (assignment (pattern_list (identifier_msg_magic) identifier_msg_magic (identifier_msg_length) identifier_msg_length (identifier_msg_type) identifier_msg_type )pattern_list (call (attribute (identifier_self) identifier_self (identifier__unpack_header) identifier__unpack_header )attribute (argument_list (identifier_data) identifier_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_msg_size) identifier_msg_size (binary_operator (attribute (identifier_self) identifier_self (identifier__struct_header_size) identifier__struct_header_size )attribute (identifier_msg_length) identifier_msg_length )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_payload) identifier_payload (subscript (identifier_data) identifier_data (slice (attribute (identifier_self) identifier_self (identifier__struct_header_size) identifier__struct_header_size )attribute (colon) colon (identifier_msg_size) identifier_msg_size )slice )subscript )assignment )expression_statement (return_statement (call (attribute (identifier_payload) identifier_payload (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' (string_'replace') string_'replace' )argument_list )call )return_statement )block )function_definition )module
Unpacks the given byte string and parses the result from JSON. Returns None on failure and saves data into "self.buffer".
(module (function_definition (function_name_ParseMultiple) function_name_ParseMultiple (parameters (identifier_self) identifier_self (identifier_result_dicts) identifier_result_dicts )parameters (block (for_statement (identifier_result_dict) identifier_result_dict (identifier_result_dicts) identifier_result_dicts (block (expression_statement (assignment (identifier_kb_user) identifier_kb_user (call (attribute (identifier_rdf_client) identifier_rdf_client (identifier_User) identifier_User )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_wmi_key) identifier_wmi_key (identifier_kb_key) identifier_kb_key )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (attribute (identifier_self) identifier_self (identifier_account_mapping) identifier_account_mapping )attribute )argument_list )call (block (try_statement (block (expression_statement (call (attribute (identifier_kb_user) identifier_kb_user (identifier_Set) identifier_Set )attribute (argument_list (identifier_kb_key) identifier_kb_key (subscript (identifier_result_dict) identifier_result_dict (identifier_wmi_key) identifier_wmi_key )subscript )argument_list )call )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (if_statement (boolean_operator (attribute (identifier_kb_user) identifier_kb_user (identifier_sid) identifier_sid )attribute (attribute (identifier_kb_user) identifier_kb_user (identifier_username) identifier_username )attribute )boolean_operator (block (expression_statement (yield (identifier_kb_user) identifier_kb_user )yield )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Parse the WMI Win32_UserAccount output.
(module (function_definition (function_name_get_subscriptions) function_name_get_subscriptions (parameters (identifier_self) identifier_self (default_parameter (identifier_fetch) identifier_fetch (False) False )default_parameter )parameters (block (return_statement (call (identifier_Subscriptions) identifier_Subscriptions (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_resource) identifier_resource )attribute (identifier_subscriptions) identifier_subscriptions )attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (keyword_argument (identifier_populate) identifier_populate (identifier_fetch) identifier_fetch )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return this Wallet's subscriptions object, populating it if fetch is True.
(module (function_definition (function_name_create_symlink_job) function_name_create_symlink_job (parameters (identifier_directory) identifier_directory (identifier_checksums) identifier_checksums (identifier_filetype) identifier_filetype (identifier_symlink_path) identifier_symlink_path )parameters (block (expression_statement (assignment (identifier_pattern) identifier_pattern (call (attribute (identifier_NgdConfig) identifier_NgdConfig (identifier_get_fileending) identifier_get_fileending )attribute (argument_list (identifier_filetype) identifier_filetype )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_filename) identifier_filename (identifier__) identifier__ )pattern_list (call (identifier_get_name_and_checksum) identifier_get_name_and_checksum (argument_list (identifier_checksums) identifier_checksums (identifier_pattern) identifier_pattern )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_local_file) identifier_local_file (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_directory) identifier_directory (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_full_symlink) identifier_full_symlink (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_symlink_path) identifier_symlink_path (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (return_statement (call (identifier_DownloadJob) identifier_DownloadJob (argument_list (None) None (identifier_local_file) identifier_local_file (None) None (identifier_full_symlink) identifier_full_symlink )argument_list )call )return_statement )block )function_definition )module
Create a symlink-creating DownloadJob for an already downloaded file.
(module (function_definition (function_name__check_pcre_minions) function_name__check_pcre_minions (parameters (identifier_self) identifier_self (identifier_expr) identifier_expr (identifier_greedy) identifier_greedy )parameters (block (expression_statement (assignment (identifier_reg) identifier_reg (call (attribute (identifier_re) identifier_re (identifier_compile) identifier_compile )attribute (argument_list (identifier_expr) identifier_expr )argument_list )call )assignment )expression_statement (return_statement (dictionary (pair (string_'minions') string_'minions' (list_comprehension (identifier_m) identifier_m (for_in_clause (identifier_m) identifier_m (call (attribute (identifier_self) identifier_self (identifier__pki_minions) identifier__pki_minions )attribute (argument_list )argument_list )call )for_in_clause (if_clause (call (attribute (identifier_reg) identifier_reg (identifier_match) identifier_match )attribute (argument_list (identifier_m) identifier_m )argument_list )call )if_clause )list_comprehension )pair (pair (string_'missing') string_'missing' (list )list )pair )dictionary )return_statement )block )function_definition )module
Return the minions found by looking via regular expressions
(module (function_definition (function_name__handle_response_error) function_name__handle_response_error (parameters (identifier_self) identifier_self (identifier_response) identifier_response (identifier_retries) identifier_retries (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (expression_statement (assignment (identifier_error) identifier_error (call (attribute (identifier_self) identifier_self (identifier__convert_response_to_error) identifier__convert_response_to_error )attribute (argument_list (identifier_response) identifier_response )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_error) identifier_error (None) None )comparison_operator (block (return_statement (identifier_response) identifier_response )return_statement )block )if_statement (expression_statement (assignment (identifier_max_retries) identifier_max_retries (call (attribute (identifier_self) identifier_self (identifier__max_retries_for_error) identifier__max_retries_for_error )attribute (argument_list (identifier_error) identifier_error )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_max_retries) identifier_max_retries (None) None )comparison_operator (comparison_operator (identifier_retries) identifier_retries (identifier_max_retries) identifier_max_retries )comparison_operator )boolean_operator (block (return_statement (identifier_response) identifier_response )return_statement )block )if_statement (expression_statement (assignment (identifier_backoff) identifier_backoff (call (identifier_min) identifier_min (argument_list (binary_operator (float_0.0625) float_0.0625 (binary_operator (integer_2) integer_2 (identifier_retries) identifier_retries )binary_operator )binary_operator (float_1.0) float_1.0 )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_warning) identifier_warning )attribute (argument_list (string_"Sleeping for %r before retrying failed request...") string_"Sleeping for %r before retrying failed request..." (identifier_backoff) identifier_backoff )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (identifier_backoff) identifier_backoff )argument_list )call )expression_statement (expression_statement (augmented_assignment (identifier_retries) identifier_retries (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_warning) identifier_warning )attribute (argument_list (string_"Retrying failed request. Attempt %d/%d.") string_"Retrying failed request. Attempt %d/%d." (identifier_retries) identifier_retries (identifier_max_retries) identifier_max_retries )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_request) identifier_request )attribute (argument_list (keyword_argument (identifier_retries) identifier_retries (identifier_retries) identifier_retries )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
r"""Provides a way for each connection wrapper to handle error responses. Parameters: response(Response): An instance of :class:`.requests.Response`. retries(int): The number of times :meth:`.request` has been called so far. \**kwargs: The parameters with which :meth:`.request` was called. The `retries` parameter is excluded from `kwargs` intentionally. Returns: requests.Response
(module (function_definition (function_name_random_uniform) function_name_random_uniform (parameters (identifier_mesh) identifier_mesh (identifier_shape) identifier_shape (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_shape) identifier_shape (call (identifier_convert_to_shape) identifier_convert_to_shape (argument_list (identifier_shape) identifier_shape )argument_list )call )assignment )expression_statement (return_statement (subscript (attribute (call (identifier_RandomOperation) identifier_RandomOperation (argument_list (identifier_mesh) identifier_mesh (identifier_shape) identifier_shape (attribute (attribute (identifier_tf) identifier_tf (identifier_random) identifier_random )attribute (identifier_uniform) identifier_uniform )attribute (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (identifier_outputs) identifier_outputs )attribute (integer_0) integer_0 )subscript )return_statement )block )function_definition )module
Random uniform. Args: mesh: a Mesh shape: a Shape **kwargs: keyword args for tf.random.uniform, except seed Returns: a Tensor
(module (function_definition (function_name_omit_wells) function_name_omit_wells (parameters (identifier_self) identifier_self (default_parameter (identifier_uwis) identifier_uwis (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_uwis) identifier_uwis (None) None )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Must specify at least one uwi') string_'Must specify at least one uwi' )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_Project) identifier_Project (argument_list (list_comprehension (identifier_w) identifier_w (for_in_clause (identifier_w) identifier_w (identifier_self) identifier_self )for_in_clause (if_clause (comparison_operator (attribute (identifier_w) identifier_w (identifier_uwi) identifier_uwi )attribute (identifier_uwis) identifier_uwis )comparison_operator )if_clause )list_comprehension )argument_list )call )return_statement )block )function_definition )module
Returns a new project where wells with specified uwis have been omitted Args: uwis (list): list or tuple of UWI strings. Returns: project
(module (function_definition (function_name_buscar) function_name_buscar (parameters (identifier_self) identifier_self (identifier_id_vlan) identifier_id_vlan )parameters (block (if_statement (not_operator (call (identifier_is_valid_int_param) identifier_is_valid_int_param (argument_list (identifier_id_vlan) identifier_id_vlan )argument_list )call )not_operator (block (raise_statement (call (identifier_InvalidParameterError) identifier_InvalidParameterError (argument_list (string_u'Vlan id is invalid or was not informed.') string_u'Vlan id is invalid or was not informed.' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_url) identifier_url (binary_operator (binary_operator (string_'vlan/') string_'vlan/' (call (identifier_str) identifier_str (argument_list (identifier_id_vlan) identifier_id_vlan )argument_list )call )binary_operator (string_'/') string_'/' )binary_operator )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_code) identifier_code (identifier_xml) identifier_xml )pattern_list (call (attribute (identifier_self) identifier_self (identifier_submit) identifier_submit )attribute (argument_list (None) None (string_'GET') string_'GET' (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_response) identifier_response )attribute (argument_list (identifier_code) identifier_code (identifier_xml) identifier_xml )argument_list )call )return_statement )block )function_definition )module
Get VLAN by its identifier. :param id_vlan: VLAN identifier. :return: Following dictionary: :: {'vlan': {'id': < id_vlan >, 'nome': < nome_vlan >, 'num_vlan': < num_vlan >, 'id_ambiente': < id_ambiente >, 'id_tipo_rede': < id_tipo_rede >, 'rede_oct1': < rede_oct1 >, 'rede_oct2': < rede_oct2 >, 'rede_oct3': < rede_oct3 >, 'rede_oct4': < rede_oct4 >, 'bloco': < bloco >, 'mascara_oct1': < mascara_oct1 >, 'mascara_oct2': < mascara_oct2 >, 'mascara_oct3': < mascara_oct3 >, 'mascara_oct4': < mascara_oct4 >, 'broadcast': < broadcast >, 'descricao': < descricao >, 'acl_file_name': < acl_file_name >, 'acl_valida': < acl_valida >, 'ativada': < ativada >} OR {'id': < id_vlan >, 'nome': < nome_vlan >, 'num_vlan': < num_vlan >, 'id_tipo_rede': < id_tipo_rede >, 'id_ambiente': < id_ambiente >, 'bloco1': < bloco1 >, 'bloco2': < bloco2 >, 'bloco3': < bloco3 >, 'bloco4': < bloco4 >, 'bloco5': < bloco5 >, 'bloco6': < bloco6 >, 'bloco7': < bloco7 >, 'bloco8': < bloco8 >, 'bloco': < bloco >, 'mask_bloco1': < mask_bloco1 >, 'mask_bloco2': < mask_bloco2 >, 'mask_bloco3': < mask_bloco3 >, 'mask_bloco4': < mask_bloco4 >, 'mask_bloco5': < mask_bloco5 >, 'mask_bloco6': < mask_bloco6 >, 'mask_bloco7': < mask_bloco7 >, 'mask_bloco8': < mask_bloco8 >, 'broadcast': < broadcast >, 'descricao': < descricao >, 'acl_file_name': < acl_file_name >, 'acl_valida': < acl_valida >, 'acl_file_name_v6': < acl_file_name_v6 >, 'acl_valida_v6': < acl_valida_v6 >, 'ativada': < ativada >}} :raise VlanNaoExisteError: VLAN does not exist. :raise InvalidParameterError: VLAN id is none or invalid. :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to generate the XML response.
(module (function_definition (function_name_serialize) function_name_serialize (parameters (identifier_v) identifier_v (default_parameter (identifier_known_modules) identifier_known_modules (list )list )default_parameter )parameters (block (expression_statement (assignment (identifier_tname) identifier_tname (call (identifier_name) identifier_name (argument_list (identifier_v) identifier_v (keyword_argument (identifier_known_modules) identifier_known_modules (identifier_known_modules) identifier_known_modules )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_func) identifier_func (call (identifier_serializer) identifier_serializer (argument_list (identifier_tname) identifier_tname )argument_list )call )assignment )expression_statement (return_statement (expression_list (call (identifier_func) identifier_func (argument_list (identifier_v) identifier_v )argument_list )call (identifier_tname) identifier_tname )expression_list )return_statement )block )function_definition )module
Get a text representation of an object.
(module (function_definition (function_name_dispatch_hook) function_name_dispatch_hook (parameters (identifier_cls) identifier_cls (identifier__pkt) identifier__pkt (default_parameter (identifier__underlayer) identifier__underlayer (None) None )default_parameter (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kargs) identifier_kargs )dictionary_splat_pattern )parameters (block (for_statement (identifier_klass) identifier_klass (attribute (identifier_cls) identifier_cls (identifier__payload_class) identifier__payload_class )attribute (block (if_statement (boolean_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_klass) identifier_klass (string_"can_handle") string_"can_handle" )argument_list )call (line_continuation_\) line_continuation_\ (call (attribute (identifier_klass) identifier_klass (identifier_can_handle) identifier_can_handle )attribute (argument_list (identifier__pkt) identifier__pkt (identifier__underlayer) identifier__underlayer )argument_list )call )boolean_operator (block (return_statement (identifier_klass) identifier_klass )return_statement )block )if_statement )block )for_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_"DCE/RPC payload class not found or undefined (using Raw)") string_"DCE/RPC payload class not found or undefined (using Raw)" )argument_list )call )expression_statement (return_statement (identifier_Raw) identifier_Raw )return_statement )block )function_definition )module
dispatch_hook to choose among different registered payloads
(module (function_definition (function_name_config_args) function_name_config_args (parameters (identifier_self) identifier_self (default_parameter (identifier_section) identifier_section (string_'default') string_'default' )default_parameter )parameters (block (if_statement (comparison_operator (attribute (identifier_sys) identifier_sys (identifier_version_info) identifier_version_info )attribute (tuple (integer_2) integer_2 (integer_7) integer_7 (integer_0) integer_0 )tuple )comparison_operator (block (expression_statement (assignment (identifier_parser) identifier_parser (call (attribute (identifier_ConfigParser) identifier_ConfigParser (identifier_SafeConfigParser) identifier_SafeConfigParser )attribute (argument_list (keyword_argument (identifier_allow_no_value) identifier_allow_no_value (True) True )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_parser) identifier_parser (call (attribute (identifier_ConfigParser) identifier_ConfigParser (identifier_SafeConfigParser) identifier_SafeConfigParser )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (identifier_parser) identifier_parser (identifier_optionxform) identifier_optionxform )attribute (identifier_str) identifier_str )assignment )expression_statement (expression_statement (assignment (identifier_args) identifier_args (dictionary )dictionary )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_parser) identifier_parser (identifier_read) identifier_read )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_config_file) identifier_config_file )attribute )argument_list )call )expression_statement (for_statement (pattern_list (identifier_name) identifier_name (identifier_value) identifier_value )pattern_list (call (attribute (identifier_parser) identifier_parser (identifier_items) identifier_items )attribute (argument_list (identifier_section) identifier_section )argument_list )call (block (if_statement (call (identifier_any) identifier_any (argument_list (list (comparison_operator (identifier_value) identifier_value (string_'False') string_'False' )comparison_operator (comparison_operator (identifier_value) identifier_value (string_'false') string_'false' )comparison_operator )list )argument_list )call (block (expression_statement (assignment (identifier_value) identifier_value (False) False )assignment )expression_statement )block (elif_clause (call (identifier_any) identifier_any (argument_list (list (comparison_operator (identifier_value) identifier_value (string_'True') string_'True' )comparison_operator (comparison_operator (identifier_value) identifier_value (string_'true') string_'true' )comparison_operator )list )argument_list )call (block (expression_statement (assignment (identifier_value) identifier_value (True) True )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (identifier_utils) identifier_utils (identifier_is_int) identifier_is_int )attribute (argument_list (keyword_argument (identifier_value) identifier_value (identifier_value) identifier_value )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (subscript (identifier_args) identifier_args (identifier_name) identifier_name )subscript (identifier_value) identifier_value )assignment )expression_statement )block )for_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_exp) identifier_exp )as_pattern_target )as_pattern (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_warn) identifier_warn )attribute (argument_list (string_'Section: [ %s ] Message: "%s"') string_'Section: [ %s ] Message: "%s"' (identifier_section) identifier_section (identifier_exp) identifier_exp )argument_list )call )expression_statement (return_statement (dictionary )dictionary )return_statement )block )except_clause (else_clause (block (return_statement (identifier_args) identifier_args )return_statement )block )else_clause )try_statement )block )function_definition )module
Loop through the configuration file and set all of our values. Note: that anything can be set as a "section" in the argument file. If a section does not exist an empty dict will be returned. :param section: ``str`` :return: ``dict``
(module (function_definition (function_name_nmltostring) function_name_nmltostring (parameters (identifier_nml) identifier_nml )parameters (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_nml) identifier_nml (identifier_dict) identifier_dict )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"nml should be a dict !") string_"nml should be a dict !" )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_curstr) identifier_curstr (string_"") string_"" )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_group) identifier_group )pattern_list (call (attribute (identifier_nml) identifier_nml (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_namelist) identifier_namelist (list (binary_operator (string_"&") string_"&" (identifier_key) identifier_key )binary_operator )list )assignment )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_group) identifier_group (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_v) identifier_v (identifier_list) identifier_list )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_v) identifier_v (identifier_tuple) identifier_tuple )argument_list )call )boolean_operator (block (expression_statement (call (attribute (identifier_namelist) identifier_namelist (identifier_append) identifier_append )attribute (argument_list (binary_operator (binary_operator (binary_operator (identifier_k) identifier_k (string_" = ") string_" = " )binary_operator (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (call (identifier_map) identifier_map (argument_list (identifier_str) identifier_str (identifier_v) identifier_v )argument_list )call )argument_list )call )binary_operator (string_",") string_"," )binary_operator )argument_list )call )expression_statement )block (elif_clause (call (identifier_is_string) identifier_is_string (argument_list (identifier_v) identifier_v )argument_list )call (block (expression_statement (call (attribute (identifier_namelist) identifier_namelist (identifier_append) identifier_append )attribute (argument_list (binary_operator (binary_operator (binary_operator (identifier_k) identifier_k (string_" = '") string_" = '" )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_v) identifier_v )argument_list )call )binary_operator (string_"',") string_"'," )binary_operator )argument_list )call )expression_statement )block )elif_clause (else_clause (block (expression_statement (call (attribute (identifier_namelist) identifier_namelist (identifier_append) identifier_append )attribute (argument_list (binary_operator (binary_operator (binary_operator (identifier_k) identifier_k (string_" = ") string_" = " )binary_operator (call (identifier_str) identifier_str (argument_list (identifier_v) identifier_v )argument_list )call )binary_operator (string_",") string_"," )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (call (attribute (identifier_namelist) identifier_namelist (identifier_append) identifier_append )attribute (argument_list (string_"/") string_"/" )argument_list )call )expression_statement (expression_statement (assignment (identifier_curstr) identifier_curstr (binary_operator (binary_operator (identifier_curstr) identifier_curstr (call (attribute (string_"\n") string_"\n" (identifier_join) identifier_join )attribute (argument_list (identifier_namelist) identifier_namelist )argument_list )call )binary_operator (string_"\n") string_"\n" )binary_operator )assignment )expression_statement )block )for_statement (return_statement (identifier_curstr) identifier_curstr )return_statement )block )function_definition )module
Convert a dictionary representing a Fortran namelist into a string.
(module (function_definition (function_name__rollback_handle) function_name__rollback_handle (parameters (identifier_cls) identifier_cls (identifier_connection) identifier_connection )parameters (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_connection) identifier_connection (identifier_handle) identifier_handle )attribute (identifier_rollback) identifier_rollback )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (as_pattern (attribute (attribute (attribute (identifier_snowflake) identifier_snowflake (identifier_connector) identifier_connector )attribute (identifier_errors) identifier_errors )attribute (identifier_ProgrammingError) identifier_ProgrammingError )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (assignment (identifier_msg) identifier_msg (call (attribute (attribute (identifier_dbt) identifier_dbt (identifier_compat) identifier_compat )attribute (identifier_to_string) identifier_to_string )attribute (argument_list (identifier_e) identifier_e )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (string_'Session no longer exists') string_'Session no longer exists' (identifier_msg) identifier_msg )comparison_operator (block (raise_statement )raise_statement )block )if_statement )block )except_clause )try_statement )block )function_definition )module
On snowflake, rolling back the handle of an aborted session raises an exception.
(module (function_definition (function_name_OnLinkBitmap) function_name_OnLinkBitmap (parameters (identifier_self) identifier_self (identifier_event) identifier_event )parameters (block (expression_statement (assignment (identifier_wildcard) identifier_wildcard (string_"*") string_"*" )assignment )expression_statement (expression_statement (assignment (identifier_message) identifier_message (call (identifier__) identifier__ (argument_list (string_"Select bitmap for current cell") string_"Select bitmap for current cell" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_style) identifier_style (binary_operator (attribute (identifier_wx) identifier_wx (identifier_OPEN) identifier_OPEN )attribute (attribute (identifier_wx) identifier_wx (identifier_CHANGE_DIR) identifier_CHANGE_DIR )attribute )binary_operator )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_filepath) identifier_filepath (identifier___) identifier___ )pattern_list (line_continuation_\) line_continuation_\ (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_grid) identifier_grid )attribute (identifier_interfaces) identifier_interfaces )attribute (identifier_get_filepath_findex_from_user) identifier_get_filepath_findex_from_user )attribute (argument_list (identifier_wildcard) identifier_wildcard (identifier_message) identifier_message (identifier_style) identifier_style )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_bmp) identifier_bmp (call (attribute (identifier_wx) identifier_wx (identifier_Bitmap) identifier_Bitmap )attribute (argument_list (identifier_filepath) identifier_filepath )argument_list )call )assignment )expression_statement )block (except_clause (identifier_TypeError) identifier_TypeError (block (return_statement )return_statement )block )except_clause )try_statement (if_statement (comparison_operator (attribute (identifier_bmp) identifier_bmp (identifier_Size) identifier_Size )attribute (tuple (unary_operator (integer_1) integer_1 )unary_operator (unary_operator (integer_1) integer_1 )unary_operator )tuple )comparison_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_code) identifier_code (call (attribute (string_"wx.Bitmap(r'{filepath}')") string_"wx.Bitmap(r'{filepath}')" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_filepath) identifier_filepath (identifier_filepath) identifier_filepath )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_key) identifier_key (attribute (attribute (attribute (identifier_self) identifier_self (identifier_grid) identifier_grid )attribute (identifier_actions) identifier_actions )attribute (identifier_cursor) identifier_cursor )attribute )assignment )expression_statement (expression_statement (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_grid) identifier_grid )attribute (identifier_actions) identifier_actions )attribute (identifier_set_code) identifier_set_code )attribute (argument_list (identifier_key) identifier_key (identifier_code) identifier_code )argument_list )call )expression_statement )block )function_definition )module
Link bitmap event handler
(module (function_definition (function_name__wait_and_except_if_failed) function_name__wait_and_except_if_failed (parameters (identifier_self) identifier_self (identifier_event) identifier_event (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_event) identifier_event (identifier_wait) identifier_wait )attribute (argument_list (boolean_operator (identifier_timeout) identifier_timeout (attribute (identifier_self) identifier_self (identifier___sync_timeout) identifier___sync_timeout )attribute )boolean_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__except_if_failed) identifier__except_if_failed )attribute (argument_list (identifier_event) identifier_event )argument_list )call )expression_statement )block )function_definition )module
Combines waiting for event and call to `_except_if_failed`. If timeout is not specified the configured sync_timeout is used.
(module (function_definition (function_name_create_group) function_name_create_group (parameters (identifier_self) identifier_self (identifier_group) identifier_group )parameters (block (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_group) identifier_group (identifier_to_json) identifier_to_json )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier__do_request) identifier__do_request )attribute (argument_list (string_'POST') string_'POST' (string_'/v2/groups') string_'/v2/groups' (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Create and start a group. :param :class:`marathon.models.group.MarathonGroup` group: the group to create :returns: success :rtype: dict containing the version ID