sequence
stringlengths 557
12.7k
| docstring
stringlengths 4
15.2k
|
|---|---|
(module
(function_definition
(function_name_get_branding) function_name_get_branding
(parameters
(identifier_self) identifier_self
(identifier_branding_id) identifier_branding_id
)parameters
(block
(expression_statement
(assignment
(identifier_connection) identifier_connection
(call
(identifier_Connection) identifier_Connection
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_token) identifier_token
)attribute
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_connection) identifier_connection
(identifier_set_url) identifier_set_url
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_production) identifier_production
)attribute
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier_BRANDINGS_ID_URL) identifier_BRANDINGS_ID_URL
)attribute
(identifier_branding_id) identifier_branding_id
)binary_operator
)argument_list
)call
)expression_statement
(return_statement
(call
(attribute
(identifier_connection) identifier_connection
(identifier_get_request) identifier_get_request
)attribute
(argument_list
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Get a concrete branding
@branding_id: Id of the branding to fetch
@return Branding
|
(module
(function_definition
(function_name__event_funcs) function_name__event_funcs
(parameters
(identifier_self) identifier_self
(typed_parameter
(identifier_event) identifier_event
(type
(identifier_str) identifier_str
)type
)typed_parameter
)parameters
(type
(generic_type
(identifier_Iterable) identifier_Iterable
(type_parameter
(type
(identifier_Callable) identifier_Callable
)type
)type_parameter
)generic_type
)type
(block
(for_statement
(identifier_func) identifier_func
(subscript
(attribute
(identifier_self) identifier_self
(identifier__events) identifier__events
)attribute
(identifier_event) identifier_event
)subscript
(block
(expression_statement
(yield
(identifier_func) identifier_func
)yield
)expression_statement
)block
)for_statement
)block
)function_definition
)module
|
Returns an Iterable of the functions subscribed to a event.
:param event: Name of the event.
:type event: str
:return: A iterable to do things with.
:rtype: Iterable
|
(module
(function_definition
(function_name__api_itemvalue) function_name__api_itemvalue
(parameters
(identifier_self) identifier_self
(identifier_plugin) identifier_plugin
(identifier_item) identifier_item
(default_parameter
(identifier_value) identifier_value
(None) None
)default_parameter
(default_parameter
(identifier_history) identifier_history
(False) False
)default_parameter
(default_parameter
(identifier_nb) identifier_nb
(integer_0) integer_0
)default_parameter
)parameters
(block
(expression_statement
(assignment
(attribute
(identifier_response) identifier_response
(identifier_content_type) identifier_content_type
)attribute
(string_'application/json; charset=utf-8') string_'application/json; charset=utf-8'
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_plugin) identifier_plugin
(attribute
(identifier_self) identifier_self
(identifier_plugins_list) identifier_plugins_list
)attribute
)comparison_operator
(block
(expression_statement
(call
(identifier_abort) identifier_abort
(argument_list
(integer_400) integer_400
(binary_operator
(string_"Unknown plugin %s (available plugins: %s)") string_"Unknown plugin %s (available plugins: %s)"
(tuple
(identifier_plugin) identifier_plugin
(attribute
(identifier_self) identifier_self
(identifier_plugins_list) identifier_plugins_list
)attribute
)tuple
)binary_operator
)argument_list
)call
)expression_statement
)block
)if_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier___update__) identifier___update__
)attribute
(argument_list
)argument_list
)call
)expression_statement
(if_statement
(comparison_operator
(identifier_value) identifier_value
(None) None
)comparison_operator
(block
(if_statement
(identifier_history) identifier_history
(block
(expression_statement
(assignment
(identifier_ret) identifier_ret
(call
(attribute
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_stats) identifier_stats
)attribute
(identifier_get_plugin) identifier_get_plugin
)attribute
(argument_list
(identifier_plugin) identifier_plugin
)argument_list
)call
(identifier_get_stats_history) identifier_get_stats_history
)attribute
(argument_list
(identifier_item) identifier_item
(keyword_argument
(identifier_nb) identifier_nb
(call
(identifier_int) identifier_int
(argument_list
(identifier_nb) identifier_nb
)argument_list
)call
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_ret) identifier_ret
(call
(attribute
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_stats) identifier_stats
)attribute
(identifier_get_plugin) identifier_get_plugin
)attribute
(argument_list
(identifier_plugin) identifier_plugin
)argument_list
)call
(identifier_get_stats_item) identifier_get_stats_item
)attribute
(argument_list
(identifier_item) identifier_item
)argument_list
)call
)assignment
)expression_statement
)block
)else_clause
)if_statement
(if_statement
(comparison_operator
(identifier_ret) identifier_ret
(None) None
)comparison_operator
(block
(expression_statement
(call
(identifier_abort) identifier_abort
(argument_list
(integer_404) integer_404
(binary_operator
(string_"Cannot get item %s%s in plugin %s") string_"Cannot get item %s%s in plugin %s"
(tuple
(identifier_item) identifier_item
(conditional_expression
(string_'history ') string_'history '
(identifier_history) identifier_history
(string_'') string_''
)conditional_expression
(identifier_plugin) identifier_plugin
)tuple
)binary_operator
)argument_list
)call
)expression_statement
)block
)if_statement
)block
(else_clause
(block
(if_statement
(identifier_history) identifier_history
(block
(expression_statement
(assignment
(identifier_ret) identifier_ret
(None) None
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_ret) identifier_ret
(call
(attribute
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_stats) identifier_stats
)attribute
(identifier_get_plugin) identifier_get_plugin
)attribute
(argument_list
(identifier_plugin) identifier_plugin
)argument_list
)call
(identifier_get_stats_value) identifier_get_stats_value
)attribute
(argument_list
(identifier_item) identifier_item
(identifier_value) identifier_value
)argument_list
)call
)assignment
)expression_statement
)block
)else_clause
)if_statement
(if_statement
(comparison_operator
(identifier_ret) identifier_ret
(None) None
)comparison_operator
(block
(expression_statement
(call
(identifier_abort) identifier_abort
(argument_list
(integer_404) integer_404
(binary_operator
(string_"Cannot get item %s(%s=%s) in plugin %s") string_"Cannot get item %s(%s=%s) in plugin %s"
(tuple
(conditional_expression
(string_'history ') string_'history '
(identifier_history) identifier_history
(string_'') string_''
)conditional_expression
(identifier_item) identifier_item
(identifier_value) identifier_value
(identifier_plugin) identifier_plugin
)tuple
)binary_operator
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)else_clause
)if_statement
(return_statement
(identifier_ret) identifier_ret
)return_statement
)block
)function_definition
)module
|
Father method for _api_item and _api_value.
|
(module
(function_definition
(function_name_nonoverlap) function_name_nonoverlap
(parameters
(identifier_item_a) identifier_item_a
(identifier_time_a) identifier_time_a
(identifier_item_b) identifier_item_b
(identifier_time_b) identifier_time_b
(identifier_max_value) identifier_max_value
)parameters
(block
(return_statement
(binary_operator
(call
(attribute
(identifier_np) identifier_np
(identifier_minimum) identifier_minimum
)attribute
(argument_list
(binary_operator
(integer_1) integer_1
(call
(attribute
(identifier_item_a) identifier_item_a
(identifier_count_overlap) identifier_count_overlap
)attribute
(argument_list
(identifier_time_a) identifier_time_a
(identifier_item_b) identifier_item_b
(identifier_time_b) identifier_time_b
)argument_list
)call
)binary_operator
(identifier_max_value) identifier_max_value
)argument_list
)call
(call
(identifier_float) identifier_float
(argument_list
(identifier_max_value) identifier_max_value
)argument_list
)call
)binary_operator
)return_statement
)block
)function_definition
)module
|
Percentage of pixels in each object that do not overlap with the other object
Args:
item_a: STObject from the first set in ObjectMatcher
time_a: Time integer being evaluated
item_b: STObject from the second set in ObjectMatcher
time_b: Time integer being evaluated
max_value: Maximum distance value used as scaling value and upper constraint.
Returns:
Distance value between 0 and 1.
|
(module
(function_definition
(function_name_focus_first_child) function_name_focus_first_child
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(pattern_list
(identifier_w) identifier_w
(identifier_focuspos) identifier_focuspos
)pattern_list
(call
(attribute
(identifier_self) identifier_self
(identifier_get_focus) identifier_get_focus
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_child) identifier_child
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__tree) identifier__tree
)attribute
(identifier_first_child_position) identifier_first_child_position
)attribute
(argument_list
(identifier_focuspos) identifier_focuspos
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_child) identifier_child
(None) None
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_set_focus) identifier_set_focus
)attribute
(argument_list
(identifier_child) identifier_child
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)function_definition
)module
|
move focus to first child of currently focussed one
|
(module
(function_definition
(function_name_languages) function_name_languages
(parameters
(identifier_self) identifier_self
(identifier_key) identifier_key
(identifier_value) identifier_value
)parameters
(block
(expression_statement
(assignment
(identifier_languages) identifier_languages
(call
(attribute
(identifier_self) identifier_self
(identifier_get) identifier_get
)attribute
(argument_list
(string_'languages') string_'languages'
(list
)list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_values) identifier_values
(call
(identifier_force_list) identifier_force_list
(argument_list
(call
(attribute
(identifier_value) identifier_value
(identifier_get) identifier_get
)attribute
(argument_list
(string_'a') string_'a'
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(for_statement
(identifier_value) identifier_value
(identifier_values) identifier_values
(block
(for_statement
(identifier_language) identifier_language
(call
(attribute
(identifier_RE_LANGUAGE) identifier_RE_LANGUAGE
(identifier_split) identifier_split
)attribute
(argument_list
(identifier_value) identifier_value
)argument_list
)call
(block
(try_statement
(block
(expression_statement
(assignment
(identifier_name) identifier_name
(call
(attribute
(call
(attribute
(identifier_language) identifier_language
(identifier_strip) identifier_strip
)attribute
(argument_list
)argument_list
)call
(identifier_capitalize) identifier_capitalize
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_languages) identifier_languages
(identifier_append) identifier_append
)attribute
(argument_list
(attribute
(call
(attribute
(attribute
(identifier_pycountry) identifier_pycountry
(identifier_languages) identifier_languages
)attribute
(identifier_get) identifier_get
)attribute
(argument_list
(keyword_argument
(identifier_name) identifier_name
(identifier_name) identifier_name
)keyword_argument
)argument_list
)call
(identifier_alpha_2) identifier_alpha_2
)attribute
)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
)block
)for_statement
(return_statement
(identifier_languages) identifier_languages
)return_statement
)block
)function_definition
)module
|
Populate the ``languages`` key.
|
(module
(function_definition
(function_name_rightStatus) function_name_rightStatus
(parameters
(identifier_self) identifier_self
(identifier_sheet) identifier_sheet
)parameters
(block
(expression_statement
(string_'Compose right side of status bar.') string_'Compose right side of status bar.'
)expression_statement
(if_statement
(attribute
(identifier_sheet) identifier_sheet
(identifier_currentThreads) identifier_currentThreads
)attribute
(block
(expression_statement
(assignment
(identifier_gerund) identifier_gerund
(conditional_expression
(parenthesized_expression
(binary_operator
(string_' ') string_' '
(attribute
(subscript
(attribute
(identifier_sheet) identifier_sheet
(identifier_progresses) identifier_progresses
)attribute
(integer_0) integer_0
)subscript
(identifier_gerund) identifier_gerund
)attribute
)binary_operator
)parenthesized_expression
(attribute
(identifier_sheet) identifier_sheet
(identifier_progresses) identifier_progresses
)attribute
(string_'') string_''
)conditional_expression
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_status) identifier_status
(binary_operator
(string_'%9d %2d%%%s') string_'%9d %2d%%%s'
(tuple
(call
(identifier_len) identifier_len
(argument_list
(identifier_sheet) identifier_sheet
)argument_list
)call
(attribute
(identifier_sheet) identifier_sheet
(identifier_progressPct) identifier_progressPct
)attribute
(identifier_gerund) identifier_gerund
)tuple
)binary_operator
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_status) identifier_status
(binary_operator
(string_'%9d %s') string_'%9d %s'
(tuple
(call
(identifier_len) identifier_len
(argument_list
(identifier_sheet) identifier_sheet
)argument_list
)call
(attribute
(identifier_sheet) identifier_sheet
(identifier_rowtype) identifier_rowtype
)attribute
)tuple
)binary_operator
)assignment
)expression_statement
)block
)else_clause
)if_statement
(return_statement
(expression_list
(identifier_status) identifier_status
(string_'color_status') string_'color_status'
)expression_list
)return_statement
)block
)function_definition
)module
|
Compose right side of status bar.
|
(module
(function_definition
(function_name_get_consensus_at) function_name_get_consensus_at
(parameters
(identifier_self) identifier_self
(identifier_block_id) identifier_block_id
)parameters
(block
(expression_statement
(assignment
(identifier_query) identifier_query
(string_'SELECT consensus_hash FROM snapshots WHERE block_id = ?;') string_'SELECT consensus_hash FROM snapshots WHERE block_id = ?;'
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_args) identifier_args
(tuple
(identifier_block_id) identifier_block_id
)tuple
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_con) identifier_con
(call
(attribute
(identifier_self) identifier_self
(identifier_db_open) identifier_db_open
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_impl) identifier_impl
)attribute
(attribute
(identifier_self) identifier_self
(identifier_working_dir) identifier_working_dir
)attribute
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_rows) identifier_rows
(call
(attribute
(identifier_self) identifier_self
(identifier_db_query_execute) identifier_db_query_execute
)attribute
(argument_list
(identifier_con) identifier_con
(identifier_query) identifier_query
(identifier_args) identifier_args
(keyword_argument
(identifier_verbose) identifier_verbose
(False) False
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_res) identifier_res
(None) None
)assignment
)expression_statement
(for_statement
(identifier_r) identifier_r
(identifier_rows) identifier_rows
(block
(expression_statement
(assignment
(identifier_res) identifier_res
(subscript
(identifier_r) identifier_r
(string_'consensus_hash') string_'consensus_hash'
)subscript
)assignment
)expression_statement
)block
)for_statement
(expression_statement
(call
(attribute
(identifier_con) identifier_con
(identifier_close) identifier_close
)attribute
(argument_list
)argument_list
)call
)expression_statement
(return_statement
(identifier_res) identifier_res
)return_statement
)block
)function_definition
)module
|
Get the consensus hash at a given block.
Return the consensus hash if we have one for this block.
Return None if we don't
|
(module
(function_definition
(function_name_search) function_name_search
(parameters
(identifier_self) identifier_self
(identifier_params) identifier_params
(default_parameter
(identifier_standardize) identifier_standardize
(False) False
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_resp) identifier_resp
(call
(attribute
(identifier_self) identifier_self
(identifier__request) identifier__request
)attribute
(argument_list
(subscript
(identifier_ENDPOINTS) identifier_ENDPOINTS
(string_'SEARCH') string_'SEARCH'
)subscript
(identifier_params) identifier_params
)argument_list
)call
)assignment
)expression_statement
(if_statement
(not_operator
(identifier_standardize) identifier_standardize
)not_operator
(block
(return_statement
(identifier_resp) identifier_resp
)return_statement
)block
)if_statement
(for_statement
(identifier_res) identifier_res
(subscript
(identifier_resp) identifier_resp
(string_'result_data') string_'result_data'
)subscript
(block
(expression_statement
(assignment
(identifier_res) identifier_res
(call
(attribute
(identifier_self) identifier_self
(identifier_standardize) identifier_standardize
)attribute
(argument_list
(identifier_res) identifier_res
)argument_list
)call
)assignment
)expression_statement
)block
)for_statement
(return_statement
(identifier_resp) identifier_resp
)return_statement
)block
)function_definition
)module
|
Get a list of person objects for the given search params.
:param params: Dictionary specifying the query parameters
:param standardize: Whether to standardize names and other features,
currently disabled for backwards compatibility. Currently
standardizes names, lowercases emails, and removes faculty label
from affiliation.
>>> people = d.search({'first_name': 'tobias', 'last_name': 'funke'})
|
(module
(function_definition
(function_name_bs_values_df) function_name_bs_values_df
(parameters
(identifier_run_list) identifier_run_list
(identifier_estimator_list) identifier_estimator_list
(identifier_estimator_names) identifier_estimator_names
(identifier_n_simulate) identifier_n_simulate
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(expression_statement
(assignment
(identifier_tqdm_kwargs) identifier_tqdm_kwargs
(call
(attribute
(identifier_kwargs) identifier_kwargs
(identifier_pop) identifier_pop
)attribute
(argument_list
(string_'tqdm_kwargs') string_'tqdm_kwargs'
(dictionary
(pair
(string_'desc') string_'desc'
(string_'bs values') string_'bs values'
)pair
)dictionary
)argument_list
)call
)assignment
)expression_statement
(assert_statement
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_estimator_list) identifier_estimator_list
)argument_list
)call
(call
(identifier_len) identifier_len
(argument_list
(identifier_estimator_names) identifier_estimator_names
)argument_list
)call
)comparison_operator
(parenthesized_expression
(call
(attribute
(string_'len(estimator_list) = {0} != len(estimator_names = {1}') string_'len(estimator_list) = {0} != len(estimator_names = {1}'
(identifier_format) identifier_format
)attribute
(argument_list
(call
(identifier_len) identifier_len
(argument_list
(identifier_estimator_list) identifier_estimator_list
)argument_list
)call
(call
(identifier_len) identifier_len
(argument_list
(identifier_estimator_names) identifier_estimator_names
)argument_list
)call
)argument_list
)call
)parenthesized_expression
)assert_statement
(expression_statement
(assignment
(identifier_bs_values_list) identifier_bs_values_list
(call
(attribute
(identifier_pu) identifier_pu
(identifier_parallel_apply) identifier_parallel_apply
)attribute
(argument_list
(attribute
(attribute
(identifier_nestcheck) identifier_nestcheck
(identifier_error_analysis) identifier_error_analysis
)attribute
(identifier_run_bootstrap_values) identifier_run_bootstrap_values
)attribute
(identifier_run_list) identifier_run_list
(keyword_argument
(identifier_func_args) identifier_func_args
(tuple
(identifier_estimator_list) identifier_estimator_list
)tuple
)keyword_argument
(keyword_argument
(identifier_func_kwargs) identifier_func_kwargs
(dictionary
(pair
(string_'n_simulate') string_'n_simulate'
(identifier_n_simulate) identifier_n_simulate
)pair
)dictionary
)keyword_argument
(keyword_argument
(identifier_tqdm_kwargs) identifier_tqdm_kwargs
(identifier_tqdm_kwargs) identifier_tqdm_kwargs
)keyword_argument
(dictionary_splat
(identifier_kwargs) identifier_kwargs
)dictionary_splat
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_df) identifier_df
(call
(attribute
(identifier_pd) identifier_pd
(identifier_DataFrame) identifier_DataFrame
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(for_statement
(pattern_list
(identifier_i) identifier_i
(identifier_name) identifier_name
)pattern_list
(call
(identifier_enumerate) identifier_enumerate
(argument_list
(identifier_estimator_names) identifier_estimator_names
)argument_list
)call
(block
(expression_statement
(assignment
(subscript
(identifier_df) identifier_df
(identifier_name) identifier_name
)subscript
(list_comprehension
(subscript
(identifier_arr) identifier_arr
(identifier_i) identifier_i
(slice
(colon) colon
)slice
)subscript
(for_in_clause
(identifier_arr) identifier_arr
(identifier_bs_values_list) identifier_bs_values_list
)for_in_clause
)list_comprehension
)assignment
)expression_statement
)block
)for_statement
(for_statement
(identifier_vals_shape) identifier_vals_shape
(attribute
(call
(attribute
(subscript
(attribute
(identifier_df) identifier_df
(identifier_loc) identifier_loc
)attribute
(integer_0) integer_0
)subscript
(identifier_apply) identifier_apply
)attribute
(argument_list
(lambda
(lambda_parameters
(identifier_x) identifier_x
)lambda_parameters
(attribute
(identifier_x) identifier_x
(identifier_shape) identifier_shape
)attribute
)lambda
)argument_list
)call
(identifier_values) identifier_values
)attribute
(block
(assert_statement
(comparison_operator
(identifier_vals_shape) identifier_vals_shape
(tuple
(identifier_n_simulate) identifier_n_simulate
)tuple
)comparison_operator
(parenthesized_expression
(binary_operator
(binary_operator
(binary_operator
(binary_operator
(string_'Should be n_simulate=') string_'Should be n_simulate='
(call
(identifier_str) identifier_str
(argument_list
(identifier_n_simulate) identifier_n_simulate
)argument_list
)call
)binary_operator
(string_' values in ') string_' values in '
)binary_operator
(string_'each cell. The cell contains array with shape ') string_'each cell. The cell contains array with shape '
)binary_operator
(call
(identifier_str) identifier_str
(argument_list
(identifier_vals_shape) identifier_vals_shape
)argument_list
)call
)binary_operator
)parenthesized_expression
)assert_statement
)block
)for_statement
(return_statement
(identifier_df) identifier_df
)return_statement
)block
)function_definition
)module
|
Computes a data frame of bootstrap resampled values.
Parameters
----------
run_list: list of dicts
List of nested sampling run dicts.
estimator_list: list of functions
Estimators to apply to runs.
estimator_names: list of strs
Name of each func in estimator_list.
n_simulate: int
Number of bootstrap replications to use on each run.
kwargs:
Kwargs to pass to parallel_apply.
Returns
-------
bs_values_df: pandas data frame
Columns represent estimators and rows represent runs.
Each cell contains a 1d array of bootstrap resampled values for the run
and estimator.
|
(module
(function_definition
(function_name_createThreeObjects) function_name_createThreeObjects
(parameters
)parameters
(block
(expression_statement
(assignment
(identifier_objectA) identifier_objectA
(call
(identifier_zip) identifier_zip
(argument_list
(call
(identifier_range) identifier_range
(argument_list
(integer_10) integer_10
)argument_list
)call
(call
(identifier_range) identifier_range
(argument_list
(integer_10) integer_10
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_objectB) identifier_objectB
(list
(tuple
(integer_0) integer_0
(integer_0) integer_0
)tuple
(tuple
(integer_2) integer_2
(integer_2) integer_2
)tuple
(tuple
(integer_1) integer_1
(integer_1) integer_1
)tuple
(tuple
(integer_1) integer_1
(integer_4) integer_4
)tuple
(tuple
(integer_4) integer_4
(integer_2) integer_2
)tuple
(tuple
(integer_4) integer_4
(integer_1) integer_1
)tuple
)list
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_objectC) identifier_objectC
(list
(tuple
(integer_0) integer_0
(integer_0) integer_0
)tuple
(tuple
(integer_1) integer_1
(integer_1) integer_1
)tuple
(tuple
(integer_3) integer_3
(integer_1) integer_1
)tuple
(tuple
(integer_0) integer_0
(integer_1) integer_1
)tuple
)list
)assignment
)expression_statement
(return_statement
(list
(identifier_objectA) identifier_objectA
(identifier_objectB) identifier_objectB
(identifier_objectC) identifier_objectC
)list
)return_statement
)block
)function_definition
)module
|
Helper function that creates a set of three objects used for basic
experiments.
:return: (list(list(tuple)) List of lists of feature / location pairs.
|
(module
(function_definition
(function_name__update_quoting_state) function_name__update_quoting_state
(parameters
(identifier_self) identifier_self
(identifier_ch) identifier_ch
)parameters
(block
(expression_statement
(assignment
(identifier_is_escaped) identifier_is_escaped
(attribute
(identifier_self) identifier_self
(identifier_escaped) identifier_escaped
)attribute
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_escaped) identifier_escaped
)attribute
(parenthesized_expression
(boolean_operator
(boolean_operator
(not_operator
(attribute
(identifier_self) identifier_self
(identifier_escaped) identifier_escaped
)attribute
)not_operator
(comparison_operator
(identifier_ch) identifier_ch
(string_'\\') string_'\\'
)comparison_operator
)boolean_operator
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_quotes) identifier_quotes
)attribute
(attribute
(identifier_self) identifier_self
(identifier_SQUOTE) identifier_SQUOTE
)attribute
)comparison_operator
)boolean_operator
)parenthesized_expression
)assignment
)expression_statement
(if_statement
(attribute
(identifier_self) identifier_self
(identifier_escaped) identifier_escaped
)attribute
(block
(return_statement
(string_'') string_''
)return_statement
)block
)if_statement
(if_statement
(identifier_is_escaped) identifier_is_escaped
(block
(if_statement
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_quotes) identifier_quotes
)attribute
(attribute
(identifier_self) identifier_self
(identifier_DQUOTE) identifier_DQUOTE
)attribute
)comparison_operator
(block
(if_statement
(comparison_operator
(identifier_ch) identifier_ch
(string_'"') string_'"'
)comparison_operator
(block
(return_statement
(identifier_ch) identifier_ch
)return_statement
)block
)if_statement
(return_statement
(call
(attribute
(string_"{0}{1}") string_"{0}{1}"
(identifier_format) identifier_format
)attribute
(argument_list
(string_'\\') string_'\\'
(identifier_ch) identifier_ch
)argument_list
)call
)return_statement
)block
)if_statement
(return_statement
(identifier_ch) identifier_ch
)return_statement
)block
)if_statement
(if_statement
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_quotes) identifier_quotes
)attribute
(None) None
)comparison_operator
(block
(if_statement
(comparison_operator
(identifier_ch) identifier_ch
(tuple
(attribute
(identifier_self) identifier_self
(identifier_SQUOTE) identifier_SQUOTE
)attribute
(attribute
(identifier_self) identifier_self
(identifier_DQUOTE) identifier_DQUOTE
)attribute
)tuple
)comparison_operator
(block
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_quotes) identifier_quotes
)attribute
(identifier_ch) identifier_ch
)assignment
)expression_statement
(return_statement
(string_'') string_''
)return_statement
)block
)if_statement
)block
(elif_clause
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier_quotes) identifier_quotes
)attribute
(identifier_ch) identifier_ch
)comparison_operator
(block
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_quotes) identifier_quotes
)attribute
(None) None
)assignment
)expression_statement
(return_statement
(string_'') string_''
)return_statement
)block
)elif_clause
)if_statement
(return_statement
(identifier_ch) identifier_ch
)return_statement
)block
)function_definition
)module
|
Update self.quotes and self.escaped
:param ch: str, current character
:return: ch if it was not used to update quoting state, else ''
|
(module
(function_definition
(function_name_handle) function_name_handle
(parameters
(identifier_self) identifier_self
(identifier_data) identifier_data
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(try_statement
(block
(if_statement
(attribute
(identifier_self) identifier_self
(identifier_many) identifier_many
)attribute
(block
(return_statement
(call
(attribute
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_mapper) identifier_mapper
)attribute
(identifier_many) identifier_many
)attribute
(argument_list
(keyword_argument
(identifier_raw) identifier_raw
(attribute
(identifier_self) identifier_self
(identifier_raw) identifier_raw
)attribute
)keyword_argument
(dictionary_splat
(attribute
(identifier_self) identifier_self
(identifier_mapper_kwargs) identifier_mapper_kwargs
)attribute
)dictionary_splat
)argument_list
)call
(identifier_marshal) identifier_marshal
)attribute
(argument_list
(identifier_data) identifier_data
(keyword_argument
(identifier_role) identifier_role
(attribute
(identifier_self) identifier_self
(identifier_role) identifier_role
)attribute
)keyword_argument
)argument_list
)call
)return_statement
)block
(else_clause
(block
(return_statement
(call
(attribute
(call
(attribute
(identifier_self) identifier_self
(identifier_mapper) identifier_mapper
)attribute
(argument_list
(keyword_argument
(identifier_data) identifier_data
(identifier_data) identifier_data
)keyword_argument
(keyword_argument
(identifier_obj) identifier_obj
(attribute
(identifier_self) identifier_self
(identifier_obj) identifier_obj
)attribute
)keyword_argument
(keyword_argument
(identifier_partial) identifier_partial
(attribute
(identifier_self) identifier_self
(identifier_partial) identifier_partial
)attribute
)keyword_argument
(dictionary_splat
(attribute
(identifier_self) identifier_self
(identifier_mapper_kwargs) identifier_mapper_kwargs
)attribute
)dictionary_splat
)argument_list
)call
(identifier_marshal) identifier_marshal
)attribute
(argument_list
(keyword_argument
(identifier_role) identifier_role
(attribute
(identifier_self) identifier_self
(identifier_role) identifier_role
)attribute
)keyword_argument
)argument_list
)call
)return_statement
)block
)else_clause
)if_statement
)block
(except_clause
(as_pattern
(identifier_MappingInvalid) identifier_MappingInvalid
(as_pattern_target
(identifier_e) identifier_e
)as_pattern_target
)as_pattern
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_handle_error) identifier_handle_error
)attribute
(argument_list
(identifier_e) identifier_e
)argument_list
)call
)expression_statement
)block
)except_clause
)try_statement
)block
)function_definition
)module
|
Run marshalling for the specified mapper_class.
Supports both .marshal and .many().marshal Kim interfaces. Handles errors raised
during marshalling and automatically returns a HTTP error response.
:param data: Data to be marshaled.
:returns: Marshaled object according to mapper configuration
:raises: :class:`werkzeug.exceptions.UnprocessableEntity`
|
(module
(function_definition
(function_name_path_from_row_pks) function_name_path_from_row_pks
(parameters
(identifier_row) identifier_row
(identifier_pks) identifier_pks
(identifier_use_rowid) identifier_use_rowid
(default_parameter
(identifier_quote) identifier_quote
(True) True
)default_parameter
)parameters
(block
(if_statement
(identifier_use_rowid) identifier_use_rowid
(block
(expression_statement
(assignment
(identifier_bits) identifier_bits
(list
(subscript
(identifier_row) identifier_row
(string_'rowid') string_'rowid'
)subscript
)list
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_bits) identifier_bits
(list_comprehension
(conditional_expression
(subscript
(subscript
(identifier_row) identifier_row
(identifier_pk) identifier_pk
)subscript
(string_"value") string_"value"
)subscript
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(subscript
(identifier_row) identifier_row
(identifier_pk) identifier_pk
)subscript
(identifier_dict) identifier_dict
)argument_list
)call
(subscript
(identifier_row) identifier_row
(identifier_pk) identifier_pk
)subscript
)conditional_expression
(for_in_clause
(identifier_pk) identifier_pk
(identifier_pks) identifier_pks
)for_in_clause
)list_comprehension
)assignment
)expression_statement
)block
)else_clause
)if_statement
(if_statement
(identifier_quote) identifier_quote
(block
(expression_statement
(assignment
(identifier_bits) identifier_bits
(list_comprehension
(call
(attribute
(attribute
(identifier_urllib) identifier_urllib
(identifier_parse) identifier_parse
)attribute
(identifier_quote_plus) identifier_quote_plus
)attribute
(argument_list
(call
(identifier_str) identifier_str
(argument_list
(identifier_bit) identifier_bit
)argument_list
)call
)argument_list
)call
(for_in_clause
(identifier_bit) identifier_bit
(identifier_bits) identifier_bits
)for_in_clause
)list_comprehension
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_bits) identifier_bits
(list_comprehension
(call
(identifier_str) identifier_str
(argument_list
(identifier_bit) identifier_bit
)argument_list
)call
(for_in_clause
(identifier_bit) identifier_bit
(identifier_bits) identifier_bits
)for_in_clause
)list_comprehension
)assignment
)expression_statement
)block
)else_clause
)if_statement
(return_statement
(call
(attribute
(string_',') string_','
(identifier_join) identifier_join
)attribute
(argument_list
(identifier_bits) identifier_bits
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Generate an optionally URL-quoted unique identifier
for a row from its primary keys.
|
(module
(function_definition
(function_name_get_int) function_name_get_int
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_token) identifier_token
(call
(attribute
(call
(attribute
(identifier_self) identifier_self
(identifier_get) identifier_get
)attribute
(argument_list
)argument_list
)call
(identifier_unescape) identifier_unescape
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(if_statement
(not_operator
(call
(attribute
(identifier_token) identifier_token
(identifier_is_identifier) identifier_is_identifier
)attribute
(argument_list
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(attribute
(attribute
(identifier_dns) identifier_dns
(identifier_exception) identifier_exception
)attribute
(identifier_SyntaxError) identifier_SyntaxError
)attribute
(argument_list
(string_'expecting an identifier') string_'expecting an identifier'
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(not_operator
(call
(attribute
(attribute
(identifier_token) identifier_token
(identifier_value) identifier_value
)attribute
(identifier_isdigit) identifier_isdigit
)attribute
(argument_list
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(attribute
(attribute
(identifier_dns) identifier_dns
(identifier_exception) identifier_exception
)attribute
(identifier_SyntaxError) identifier_SyntaxError
)attribute
(argument_list
(string_'expecting an integer') string_'expecting an integer'
)argument_list
)call
)raise_statement
)block
)if_statement
(return_statement
(call
(identifier_int) identifier_int
(argument_list
(attribute
(identifier_token) identifier_token
(identifier_value) identifier_value
)attribute
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Read the next token and interpret it as an integer.
@raises dns.exception.SyntaxError:
@rtype: int
|
(module
(function_definition
(function_name_watch) function_name_watch
(parameters
(identifier_self) identifier_self
(identifier_keys) identifier_keys
(identifier_on_watch) identifier_on_watch
(default_parameter
(identifier_filters) identifier_filters
(None) None
)default_parameter
(default_parameter
(identifier_start_revision) identifier_start_revision
(None) None
)default_parameter
(default_parameter
(identifier_return_previous) identifier_return_previous
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_d) identifier_d
(call
(attribute
(identifier_self) identifier_self
(identifier__start_watching) identifier__start_watching
)attribute
(argument_list
(identifier_keys) identifier_keys
(identifier_on_watch) identifier_on_watch
(identifier_filters) identifier_filters
(identifier_start_revision) identifier_start_revision
(identifier_return_previous) identifier_return_previous
)argument_list
)call
)assignment
)expression_statement
(function_definition
(function_name_on_err) function_name_on_err
(parameters
(list_splat_pattern
(identifier_args) identifier_args
)list_splat_pattern
)parameters
(block
(if_statement
(comparison_operator
(attribute
(subscript
(identifier_args) identifier_args
(integer_0) integer_0
)subscript
(identifier_type) identifier_type
)attribute
(list
(identifier_CancelledError) identifier_CancelledError
(identifier_ResponseFailed) identifier_ResponseFailed
)list
)comparison_operator
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_log) identifier_log
)attribute
(identifier_warn) identifier_warn
)attribute
(argument_list
(string_'etcd watch terminated with "{error}"') string_'etcd watch terminated with "{error}"'
(keyword_argument
(identifier_error) identifier_error
(attribute
(subscript
(identifier_args) identifier_args
(integer_0) integer_0
)subscript
(identifier_type) identifier_type
)attribute
)keyword_argument
)argument_list
)call
)expression_statement
(return_statement
(subscript
(identifier_args) identifier_args
(integer_0) integer_0
)subscript
)return_statement
)block
)if_statement
)block
)function_definition
(expression_statement
(call
(attribute
(identifier_d) identifier_d
(identifier_addErrback) identifier_addErrback
)attribute
(argument_list
(identifier_on_err) identifier_on_err
)argument_list
)call
)expression_statement
(return_statement
(identifier_d) identifier_d
)return_statement
)block
)function_definition
)module
|
Watch one or more keys or key sets and invoke a callback.
Watch watches for events happening or that have happened. The entire event history
can be watched starting from the last compaction revision.
:param keys: Watch these keys / key sets.
:type keys: list of bytes or list of instance of :class:`txaioetcd.KeySet`
:param on_watch: The callback to invoke upon receiving
a watch event.
:type on_watch: callable
:param filters: Any filters to apply.
:param start_revision: start_revision is an optional
revision to watch from (inclusive). No start_revision is "now".
:type start_revision: int
:param return_previous: Flag to request returning previous values.
:returns: A deferred that just fires when watching has started successfully,
or which fires with an error in case the watching could not be started.
:rtype: twisted.internet.Deferred
|
(module
(function_definition
(function_name__checkReturnTo) function_name__checkReturnTo
(parameters
(identifier_self) identifier_self
(identifier_message) identifier_message
(identifier_return_to) identifier_return_to
)parameters
(block
(try_statement
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__verifyReturnToArgs) identifier__verifyReturnToArgs
)attribute
(argument_list
(call
(attribute
(identifier_message) identifier_message
(identifier_toPostArgs) identifier_toPostArgs
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)expression_statement
)block
(except_clause
(as_pattern
(identifier_ProtocolError) identifier_ProtocolError
(as_pattern_target
(identifier_why) identifier_why
)as_pattern_target
)as_pattern
(block
(expression_statement
(call
(attribute
(identifier_logging) identifier_logging
(identifier_exception) identifier_exception
)attribute
(argument_list
(binary_operator
(string_"Verifying return_to arguments: %s") string_"Verifying return_to arguments: %s"
(tuple
(identifier_why) identifier_why
)tuple
)binary_operator
)argument_list
)call
)expression_statement
(return_statement
(False) False
)return_statement
)block
)except_clause
)try_statement
(expression_statement
(assignment
(identifier_msg_return_to) identifier_msg_return_to
(call
(attribute
(identifier_message) identifier_message
(identifier_getArg) identifier_getArg
)attribute
(argument_list
(identifier_OPENID_NS) identifier_OPENID_NS
(string_'return_to') string_'return_to'
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_app_parts) identifier_app_parts
(call
(identifier_urlparse) identifier_urlparse
(argument_list
(call
(attribute
(identifier_urinorm) identifier_urinorm
(identifier_urinorm) identifier_urinorm
)attribute
(argument_list
(identifier_return_to) identifier_return_to
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_msg_parts) identifier_msg_parts
(call
(identifier_urlparse) identifier_urlparse
(argument_list
(call
(attribute
(identifier_urinorm) identifier_urinorm
(identifier_urinorm) identifier_urinorm
)attribute
(argument_list
(identifier_msg_return_to) identifier_msg_return_to
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(for_statement
(identifier_part) identifier_part
(call
(identifier_range) identifier_range
(argument_list
(integer_0) integer_0
(integer_3) integer_3
)argument_list
)call
(block
(if_statement
(comparison_operator
(subscript
(identifier_app_parts) identifier_app_parts
(identifier_part) identifier_part
)subscript
(subscript
(identifier_msg_parts) identifier_msg_parts
(identifier_part) identifier_part
)subscript
)comparison_operator
(block
(return_statement
(False) False
)return_statement
)block
)if_statement
)block
)for_statement
(return_statement
(True) True
)return_statement
)block
)function_definition
)module
|
Check an OpenID message and its openid.return_to value
against a return_to URL from an application. Return True on
success, False on failure.
|
(module
(function_definition
(function_name_structure_repr) function_name_structure_repr
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_ret) identifier_ret
(binary_operator
(string_'{%s}') string_'{%s}'
(call
(attribute
(string_', ') string_', '
(identifier_join) identifier_join
)attribute
(argument_list
(list_comprehension
(call
(identifier_str) identifier_str
(argument_list
(identifier_x) identifier_x
)argument_list
)call
(for_in_clause
(identifier_x) identifier_x
(attribute
(identifier_self) identifier_self
(identifier_elements) identifier_elements
)attribute
)for_in_clause
)list_comprehension
)argument_list
)call
)binary_operator
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__wrap_packed) identifier__wrap_packed
)attribute
(argument_list
(identifier_ret) identifier_ret
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Return the LLVM IR for the structure representation
|
(module
(function_definition
(function_name_in_group) function_name_in_group
(parameters
(identifier_self) identifier_self
(identifier_group) identifier_group
(default_parameter
(identifier_dn) identifier_dn
(False) False
)default_parameter
)parameters
(block
(if_statement
(identifier_dn) identifier_dn
(block
(return_statement
(comparison_operator
(identifier_group) identifier_group
(call
(attribute
(identifier_self) identifier_self
(identifier_groups) identifier_groups
)attribute
(argument_list
)argument_list
)call
)comparison_operator
)return_statement
)block
)if_statement
(return_statement
(call
(attribute
(identifier_group) identifier_group
(identifier_check_member) identifier_check_member
)attribute
(argument_list
(identifier_self) identifier_self
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Get whether or not the bound CSH LDAP member object is part of a
group.
Arguments:
group -- the CSHGroup object (or distinguished name) of the group to
check membership for
|
(module
(function_definition
(function_name_set_pending_symbol) function_name_set_pending_symbol
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_pending_symbol) identifier_pending_symbol
(None) None
)default_parameter
)parameters
(block
(if_statement
(comparison_operator
(identifier_pending_symbol) identifier_pending_symbol
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(identifier_pending_symbol) identifier_pending_symbol
(call
(identifier_CodePointArray) identifier_CodePointArray
(argument_list
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_value) identifier_value
)attribute
(call
(identifier_bytearray) identifier_bytearray
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_pending_symbol) identifier_pending_symbol
)attribute
(identifier_pending_symbol) identifier_pending_symbol
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_line_comment) identifier_line_comment
)attribute
(False) False
)assignment
)expression_statement
(return_statement
(identifier_self) identifier_self
)return_statement
)block
)function_definition
)module
|
Sets the context's ``pending_symbol`` with the given unicode sequence and resets the context's ``value``.
If the input is None, an empty :class:`CodePointArray` is used.
|
(module
(function_definition
(function_name_write_params) function_name_write_params
(parameters
(identifier_path) identifier_path
(list_splat_pattern
(identifier_args) identifier_args
)list_splat_pattern
(dictionary_splat_pattern
(identifier_dicts) identifier_dicts
)dictionary_splat_pattern
)parameters
(block
(expression_statement
(assignment
(identifier_path) identifier_path
(call
(identifier_Path) identifier_Path
(argument_list
(identifier_path) identifier_path
)argument_list
)call
)assignment
)expression_statement
(if_statement
(not_operator
(call
(attribute
(attribute
(identifier_path) identifier_path
(identifier_parent) identifier_parent
)attribute
(identifier_is_dir) identifier_is_dir
)attribute
(argument_list
)argument_list
)call
)not_operator
(block
(expression_statement
(call
(attribute
(attribute
(identifier_path) identifier_path
(identifier_parent) identifier_parent
)attribute
(identifier_mkdir) identifier_mkdir
)attribute
(argument_list
(keyword_argument
(identifier_parents) identifier_parents
(True) True
)keyword_argument
)argument_list
)call
)expression_statement
)block
)if_statement
(if_statement
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_args) identifier_args
)argument_list
)call
(integer_1) integer_1
)comparison_operator
(block
(expression_statement
(assignment
(identifier_d) identifier_d
(subscript
(identifier_args) identifier_args
(integer_0) integer_0
)subscript
)assignment
)expression_statement
(with_statement
(with_clause
(with_item
(as_pattern
(call
(attribute
(identifier_path) identifier_path
(identifier_open) identifier_open
)attribute
(argument_list
(string_'w') string_'w'
)argument_list
)call
(as_pattern_target
(identifier_f) identifier_f
)as_pattern_target
)as_pattern
)with_item
)with_clause
(block
(for_statement
(identifier_key) identifier_key
(identifier_d) identifier_d
(block
(expression_statement
(call
(attribute
(identifier_f) identifier_f
(identifier_write) identifier_write
)attribute
(argument_list
(binary_operator
(binary_operator
(binary_operator
(identifier_key) identifier_key
(string_' = ') string_' = '
)binary_operator
(call
(identifier_str) identifier_str
(argument_list
(subscript
(identifier_d) identifier_d
(identifier_key) identifier_key
)subscript
)argument_list
)call
)binary_operator
(string_'\n') string_'\n'
)binary_operator
)argument_list
)call
)expression_statement
)block
)for_statement
)block
)with_statement
)block
(else_clause
(block
(with_statement
(with_clause
(with_item
(as_pattern
(call
(attribute
(identifier_path) identifier_path
(identifier_open) identifier_open
)attribute
(argument_list
(string_'w') string_'w'
)argument_list
)call
(as_pattern_target
(identifier_f) identifier_f
)as_pattern_target
)as_pattern
)with_item
)with_clause
(block
(for_statement
(pattern_list
(identifier_k) identifier_k
(identifier_d) identifier_d
)pattern_list
(call
(attribute
(identifier_dicts) identifier_dicts
(identifier_items) identifier_items
)attribute
(argument_list
)argument_list
)call
(block
(expression_statement
(call
(attribute
(identifier_f) identifier_f
(identifier_write) identifier_write
)attribute
(argument_list
(binary_operator
(binary_operator
(string_'[') string_'['
(identifier_k) identifier_k
)binary_operator
(string_']\n') string_']\n'
)binary_operator
)argument_list
)call
)expression_statement
(for_statement
(pattern_list
(identifier_key) identifier_key
(identifier_val) identifier_val
)pattern_list
(call
(attribute
(identifier_d) identifier_d
(identifier_items) identifier_items
)attribute
(argument_list
)argument_list
)call
(block
(expression_statement
(call
(attribute
(identifier_f) identifier_f
(identifier_write) identifier_write
)attribute
(argument_list
(binary_operator
(binary_operator
(binary_operator
(identifier_key) identifier_key
(string_' = ') string_' = '
)binary_operator
(call
(identifier_str) identifier_str
(argument_list
(identifier_val) identifier_val
)argument_list
)call
)binary_operator
(string_'\n') string_'\n'
)binary_operator
)argument_list
)call
)expression_statement
)block
)for_statement
)block
)for_statement
)block
)with_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module
|
Write parameters to file, so that it's readable by read_params.
Uses INI file format.
|
(module
(function_definition
(function_name_check_for_stalled_tasks) function_name_check_for_stalled_tasks
(parameters
)parameters
(block
(import_from_statement
(dotted_name
(identifier_api) identifier_api
(identifier_models) identifier_models
(identifier_tasks) identifier_tasks
)dotted_name
(dotted_name
(identifier_Task) identifier_Task
)dotted_name
)import_from_statement
(for_statement
(identifier_task) identifier_task
(call
(attribute
(attribute
(identifier_Task) identifier_Task
(identifier_objects) identifier_objects
)attribute
(identifier_filter) identifier_filter
)attribute
(argument_list
(keyword_argument
(identifier_status_is_running) identifier_status_is_running
(True) True
)keyword_argument
)argument_list
)call
(block
(if_statement
(not_operator
(call
(attribute
(identifier_task) identifier_task
(identifier_is_responsive) identifier_is_responsive
)attribute
(argument_list
)argument_list
)call
)not_operator
(block
(expression_statement
(call
(attribute
(identifier_task) identifier_task
(identifier_system_error) identifier_system_error
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)if_statement
(if_statement
(call
(attribute
(identifier_task) identifier_task
(identifier_is_timed_out) identifier_is_timed_out
)attribute
(argument_list
)argument_list
)call
(block
(expression_statement
(call
(attribute
(identifier_task) identifier_task
(identifier_timeout_error) identifier_timeout_error
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)for_statement
)block
)function_definition
)module
|
Check for tasks that are no longer sending a heartbeat
|
(module
(function_definition
(function_name_all) function_name_all
(parameters
(identifier_self) identifier_self
(identifier_paths) identifier_paths
(default_parameter
(identifier_access) identifier_access
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_failures) identifier_failures
)attribute
(list_comprehension
(identifier_path) identifier_path
(for_in_clause
(identifier_path) identifier_path
(identifier_paths) identifier_paths
)for_in_clause
(if_clause
(not_operator
(call
(identifier_isvalid) identifier_isvalid
(argument_list
(identifier_path) identifier_path
(identifier_access) identifier_access
(keyword_argument
(identifier_filetype) identifier_filetype
(string_'all') string_'all'
)keyword_argument
)argument_list
)call
)not_operator
)if_clause
)list_comprehension
)assignment
)expression_statement
(return_statement
(not_operator
(attribute
(identifier_self) identifier_self
(identifier_failures) identifier_failures
)attribute
)not_operator
)return_statement
)block
)function_definition
)module
|
Verify list of paths
|
(module
(function_definition
(function_name_expanduser) function_name_expanduser
(parameters
(identifier_path) identifier_path
)parameters
(block
(if_statement
(call
(attribute
(identifier_hdfs_fs) identifier_hdfs_fs
(identifier_default_is_local) identifier_default_is_local
)attribute
(argument_list
)argument_list
)call
(block
(return_statement
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_expanduser) identifier_expanduser
)attribute
(argument_list
(identifier_path) identifier_path
)argument_list
)call
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_m) identifier_m
(call
(attribute
(identifier_re) identifier_re
(identifier_match) identifier_match
)attribute
(argument_list
(string_r'^~([^/]*)') string_r'^~([^/]*)'
(identifier_path) identifier_path
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_m) identifier_m
(None) None
)comparison_operator
(block
(return_statement
(identifier_path) identifier_path
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_user) identifier_user
(boolean_operator
(subscript
(call
(attribute
(identifier_m) identifier_m
(identifier_groups) identifier_groups
)attribute
(argument_list
)argument_list
)call
(integer_0) integer_0
)subscript
(attribute
(identifier_common) identifier_common
(identifier_DEFAULT_USER) identifier_DEFAULT_USER
)attribute
)boolean_operator
)assignment
)expression_statement
(return_statement
(binary_operator
(string_'/user/%s%s') string_'/user/%s%s'
(tuple
(identifier_user) identifier_user
(subscript
(identifier_path) identifier_path
(slice
(call
(attribute
(identifier_m) identifier_m
(identifier_end) identifier_end
)attribute
(argument_list
(integer_1) integer_1
)argument_list
)call
(colon) colon
)slice
)subscript
)tuple
)binary_operator
)return_statement
)block
)function_definition
)module
|
Replace initial ``~`` or ``~user`` with the user's home directory.
**NOTE:** if the default file system is HDFS, the ``~user`` form is
expanded regardless of the user's existence.
|
(module
(function_definition
(function_name_to_dict) function_name_to_dict
(parameters
(identifier_obj) identifier_obj
)parameters
(block
(expression_statement
(assignment
(identifier_json_obj) identifier_json_obj
(dictionary
(pair
(string_'type') string_'type'
(call
(identifier_repr) identifier_repr
(argument_list
(identifier_obj) identifier_obj
)argument_list
)call
)pair
)dictionary
)assignment
)expression_statement
(if_statement
(attribute
(identifier_obj) identifier_obj
(identifier_is_failed) identifier_is_failed
)attribute
(block
(expression_statement
(assignment
(subscript
(identifier_json_obj) identifier_json_obj
(string_'errors') string_'errors'
)subscript
(attribute
(identifier_obj) identifier_obj
(identifier_errors) identifier_errors
)attribute
)assignment
)expression_statement
)block
(elif_clause
(attribute
(identifier_obj) identifier_obj
(identifier_is_success) identifier_is_success
)attribute
(block
(expression_statement
(assignment
(subscript
(identifier_json_obj) identifier_json_obj
(string_'modelOutput') string_'modelOutput'
)subscript
(attribute
(identifier_obj) identifier_obj
(identifier_model_output) identifier_model_output
)attribute
)assignment
)expression_statement
)block
)elif_clause
)if_statement
(return_statement
(identifier_json_obj) identifier_json_obj
)return_statement
)block
)function_definition
)module
|
Generate a JSON serialization for the run state object.
Returns
-------
Json-like object
Json serialization of model run state object
|
(module
(function_definition
(function_name__has_argument) function_name__has_argument
(parameters
(identifier_func) identifier_func
)parameters
(block
(if_statement
(call
(identifier_hasattr) identifier_hasattr
(argument_list
(identifier_inspect) identifier_inspect
(string_'signature') string_'signature'
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_sig) identifier_sig
(call
(attribute
(identifier_inspect) identifier_inspect
(identifier_signature) identifier_signature
)attribute
(argument_list
(identifier_func) identifier_func
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(identifier_bool) identifier_bool
(argument_list
(attribute
(identifier_sig) identifier_sig
(identifier_parameters) identifier_parameters
)attribute
)argument_list
)call
)return_statement
)block
(else_clause
(block
(return_statement
(call
(identifier_bool) identifier_bool
(argument_list
(attribute
(call
(attribute
(identifier_inspect) identifier_inspect
(identifier_getargspec) identifier_getargspec
)attribute
(argument_list
(identifier_func) identifier_func
)argument_list
)call
(identifier_args) identifier_args
)attribute
)argument_list
)call
)return_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module
|
Test whether a function expects an argument.
:param func:
The function to be tested for existence of an argument.
|
(module
(function_definition
(function_name_authInsert) function_name_authInsert
(parameters
(identifier_user) identifier_user
(identifier_role) identifier_role
(identifier_group) identifier_group
(identifier_site) identifier_site
)parameters
(block
(if_statement
(not_operator
(identifier_role) identifier_role
)not_operator
(block
(return_statement
(True) True
)return_statement
)block
)if_statement
(for_statement
(pattern_list
(identifier_k) identifier_k
(identifier_v) identifier_v
)pattern_list
(call
(attribute
(subscript
(identifier_user) identifier_user
(string_'roles') string_'roles'
)subscript
(identifier_iteritems) identifier_iteritems
)attribute
(argument_list
)argument_list
)call
(block
(for_statement
(identifier_g) identifier_g
(subscript
(identifier_v) identifier_v
(string_'group') string_'group'
)subscript
(block
(if_statement
(comparison_operator
(identifier_k) identifier_k
(call
(attribute
(call
(attribute
(identifier_role) identifier_role
(identifier_get) identifier_get
)attribute
(argument_list
(identifier_g) identifier_g
(string_'') string_''
)argument_list
)call
(identifier_split) identifier_split
)attribute
(argument_list
(string_':') string_':'
)argument_list
)call
)comparison_operator
(block
(return_statement
(True) True
)return_statement
)block
)if_statement
)block
)for_statement
)block
)for_statement
(return_statement
(False) False
)return_statement
)block
)function_definition
)module
|
Authorization function for general insert
|
(module
(function_definition
(function_name_register_metric_descriptor) function_name_register_metric_descriptor
(parameters
(identifier_self) identifier_self
(identifier_oc_md) identifier_oc_md
)parameters
(block
(expression_statement
(assignment
(identifier_metric_type) identifier_metric_type
(call
(attribute
(identifier_self) identifier_self
(identifier_get_metric_type) identifier_get_metric_type
)attribute
(argument_list
(identifier_oc_md) identifier_oc_md
)argument_list
)call
)assignment
)expression_statement
(with_statement
(with_clause
(with_item
(attribute
(identifier_self) identifier_self
(identifier__md_lock) identifier__md_lock
)attribute
)with_item
)with_clause
(block
(if_statement
(comparison_operator
(identifier_metric_type) identifier_metric_type
(attribute
(identifier_self) identifier_self
(identifier__md_cache) identifier__md_cache
)attribute
)comparison_operator
(block
(return_statement
(subscript
(attribute
(identifier_self) identifier_self
(identifier__md_cache) identifier__md_cache
)attribute
(identifier_metric_type) identifier_metric_type
)subscript
)return_statement
)block
)if_statement
)block
)with_statement
(expression_statement
(assignment
(identifier_descriptor) identifier_descriptor
(call
(attribute
(identifier_self) identifier_self
(identifier_get_metric_descriptor) identifier_get_metric_descriptor
)attribute
(argument_list
(identifier_oc_md) identifier_oc_md
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_project_name) identifier_project_name
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_client) identifier_client
)attribute
(identifier_project_path) identifier_project_path
)attribute
(argument_list
(attribute
(attribute
(identifier_self) identifier_self
(identifier_options) identifier_options
)attribute
(identifier_project_id) identifier_project_id
)attribute
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_sd_md) identifier_sd_md
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_client) identifier_client
)attribute
(identifier_create_metric_descriptor) identifier_create_metric_descriptor
)attribute
(argument_list
(identifier_project_name) identifier_project_name
(identifier_descriptor) identifier_descriptor
)argument_list
)call
)assignment
)expression_statement
(with_statement
(with_clause
(with_item
(attribute
(identifier_self) identifier_self
(identifier__md_lock) identifier__md_lock
)attribute
)with_item
)with_clause
(block
(expression_statement
(assignment
(subscript
(attribute
(identifier_self) identifier_self
(identifier__md_cache) identifier__md_cache
)attribute
(identifier_metric_type) identifier_metric_type
)subscript
(identifier_sd_md) identifier_sd_md
)assignment
)expression_statement
)block
)with_statement
(return_statement
(identifier_sd_md) identifier_sd_md
)return_statement
)block
)function_definition
)module
|
Register a metric descriptor with stackdriver.
|
(module
(function_definition
(function_name_group) function_name_group
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(string_"Group inherited from items") string_"Group inherited from items"
)expression_statement
(if_statement
(attribute
(identifier_self) identifier_self
(identifier__group) identifier__group
)attribute
(block
(return_statement
(attribute
(identifier_self) identifier_self
(identifier__group) identifier__group
)attribute
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_group) identifier_group
(conditional_expression
(call
(identifier_get_ndmapping_label) identifier_get_ndmapping_label
(argument_list
(identifier_self) identifier_self
(string_'group') string_'group'
)argument_list
)call
(call
(identifier_len) identifier_len
(argument_list
(identifier_self) identifier_self
)argument_list
)call
(None) None
)conditional_expression
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_group) identifier_group
(None) None
)comparison_operator
(block
(return_statement
(attribute
(call
(identifier_type) identifier_type
(argument_list
(identifier_self) identifier_self
)argument_list
)call
(identifier___name__) identifier___name__
)attribute
)return_statement
)block
)if_statement
(return_statement
(identifier_group) identifier_group
)return_statement
)block
)function_definition
)module
|
Group inherited from items
|
(module
(function_definition
(function_name_triads) function_name_triads
(parameters
(identifier_key) identifier_key
)parameters
(block
(if_statement
(call
(attribute
(identifier__triads_cache) identifier__triads_cache
(identifier_has_key) identifier_has_key
)attribute
(argument_list
(identifier_key) identifier_key
)argument_list
)call
(block
(return_statement
(subscript
(identifier__triads_cache) identifier__triads_cache
(identifier_key) identifier_key
)subscript
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_res) identifier_res
(call
(identifier_map) identifier_map
(argument_list
(lambda
(lambda_parameters
(identifier_x) identifier_x
)lambda_parameters
(call
(identifier_triad) identifier_triad
(argument_list
(identifier_x) identifier_x
(identifier_key) identifier_key
)argument_list
)call
)lambda
(call
(attribute
(identifier_keys) identifier_keys
(identifier_get_notes) identifier_get_notes
)attribute
(argument_list
(identifier_key) identifier_key
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier__triads_cache) identifier__triads_cache
(identifier_key) identifier_key
)subscript
(identifier_res) identifier_res
)assignment
)expression_statement
(return_statement
(identifier_res) identifier_res
)return_statement
)block
)function_definition
)module
|
Return all the triads in key.
Implemented using a cache.
|
(module
(function_definition
(function_name__create_storage_profile) function_name__create_storage_profile
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(attribute
(identifier_self) identifier_self
(identifier_image_publisher) identifier_image_publisher
)attribute
(block
(expression_statement
(assignment
(identifier_storage_profile) identifier_storage_profile
(dictionary
(pair
(string_'image_reference') string_'image_reference'
(dictionary
(pair
(string_'publisher') string_'publisher'
(attribute
(identifier_self) identifier_self
(identifier_image_publisher) identifier_image_publisher
)attribute
)pair
(pair
(string_'offer') string_'offer'
(attribute
(identifier_self) identifier_self
(identifier_image_offer) identifier_image_offer
)attribute
)pair
(pair
(string_'sku') string_'sku'
(attribute
(identifier_self) identifier_self
(identifier_image_sku) identifier_image_sku
)attribute
)pair
(pair
(string_'version') string_'version'
(attribute
(identifier_self) identifier_self
(identifier_image_version) identifier_image_version
)attribute
)pair
)dictionary
)pair
)dictionary
)assignment
)expression_statement
)block
(else_clause
(block
(for_statement
(identifier_image) identifier_image
(call
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier_compute) identifier_compute
)attribute
(identifier_images) identifier_images
)attribute
(identifier_list) identifier_list
)attribute
(argument_list
)argument_list
)call
(block
(if_statement
(comparison_operator
(attribute
(identifier_image) identifier_image
(identifier_name) identifier_name
)attribute
(attribute
(identifier_self) identifier_self
(identifier_image_id) identifier_image_id
)attribute
)comparison_operator
(block
(expression_statement
(assignment
(identifier_image_id) identifier_image_id
(attribute
(identifier_image) identifier_image
(identifier_id) identifier_id
)attribute
)assignment
)expression_statement
(break_statement
)break_statement
)block
)if_statement
)block
(else_clause
(block
(raise_statement
(call
(identifier_AzureCloudException) identifier_AzureCloudException
(argument_list
(call
(attribute
(string_'Image with name {0} not found.') string_'Image with name {0} not found.'
(identifier_format) identifier_format
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_image_id) identifier_image_id
)attribute
)argument_list
)call
)argument_list
)call
)raise_statement
)block
)else_clause
)for_statement
(expression_statement
(assignment
(identifier_storage_profile) identifier_storage_profile
(dictionary
(pair
(string_'image_reference') string_'image_reference'
(dictionary
(pair
(string_'id') string_'id'
(identifier_image_id) identifier_image_id
)pair
)dictionary
)pair
)dictionary
)assignment
)expression_statement
)block
)else_clause
)if_statement
(return_statement
(identifier_storage_profile) identifier_storage_profile
)return_statement
)block
)function_definition
)module
|
Create the storage profile for the instance.
Image reference can be a custom image name or a published urn.
|
(module
(function_definition
(function_name_install_extension) function_name_install_extension
(parameters
(identifier_conn) identifier_conn
(typed_parameter
(identifier_extension) identifier_extension
(type
(identifier_str) identifier_str
)type
)typed_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_query) identifier_query
(string_'CREATE EXTENSION IF NOT EXISTS "%s";') string_'CREATE EXTENSION IF NOT EXISTS "%s";'
)assignment
)expression_statement
(with_statement
(with_clause
(with_item
(as_pattern
(call
(attribute
(identifier_conn) identifier_conn
(identifier_cursor) identifier_cursor
)attribute
(argument_list
)argument_list
)call
(as_pattern_target
(identifier_cursor) identifier_cursor
)as_pattern_target
)as_pattern
)with_item
)with_clause
(block
(expression_statement
(call
(attribute
(identifier_cursor) identifier_cursor
(identifier_execute) identifier_execute
)attribute
(argument_list
(identifier_query) identifier_query
(tuple
(call
(identifier_AsIs) identifier_AsIs
(argument_list
(identifier_extension) identifier_extension
)argument_list
)call
)tuple
)argument_list
)call
)expression_statement
)block
)with_statement
(expression_statement
(assignment
(identifier_installed) identifier_installed
(call
(identifier_check_extension) identifier_check_extension
(argument_list
(identifier_conn) identifier_conn
(identifier_extension) identifier_extension
)argument_list
)call
)assignment
)expression_statement
(if_statement
(not_operator
(identifier_installed) identifier_installed
)not_operator
(block
(raise_statement
(call
(attribute
(identifier_psycopg2) identifier_psycopg2
(identifier_ProgrammingError) identifier_ProgrammingError
)attribute
(argument_list
(string_'Postgres extension failed installation.') string_'Postgres extension failed installation.'
(identifier_extension) identifier_extension
)argument_list
)call
)raise_statement
)block
)if_statement
)block
)function_definition
)module
|
Install Postgres extension.
|
(module
(function_definition
(function_name___get_jp) function_name___get_jp
(parameters
(identifier_self) identifier_self
(identifier_extractor_processor) identifier_extractor_processor
(default_parameter
(identifier_sub_output) identifier_sub_output
(None) None
)default_parameter
)parameters
(block
(if_statement
(boolean_operator
(comparison_operator
(identifier_sub_output) identifier_sub_output
(None) None
)comparison_operator
(comparison_operator
(attribute
(identifier_extractor_processor) identifier_extractor_processor
(identifier_output_field) identifier_output_field
)attribute
(None) None
)comparison_operator
)boolean_operator
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(string_"ExtractorProcessors input paths cannot be unioned across fields. Please specify either a sub_output or use a single scalar output_field") string_"ExtractorProcessors input paths cannot be unioned across fields. Please specify either a sub_output or use a single scalar output_field"
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(comparison_operator
(call
(attribute
(identifier_extractor_processor) identifier_extractor_processor
(identifier_get_output_jsonpath_with_name) identifier_get_output_jsonpath_with_name
)attribute
(argument_list
(identifier_sub_output) identifier_sub_output
)argument_list
)call
(None) None
)comparison_operator
(block
(return_statement
(call
(attribute
(identifier_extractor_processor) identifier_extractor_processor
(identifier_get_output_jsonpath_with_name) identifier_get_output_jsonpath_with_name
)attribute
(argument_list
(identifier_sub_output) identifier_sub_output
)argument_list
)call
)return_statement
)block
(else_clause
(block
(return_statement
(call
(attribute
(identifier_extractor_processor) identifier_extractor_processor
(identifier_get_output_jsonpath) identifier_get_output_jsonpath
)attribute
(argument_list
(identifier_sub_output) identifier_sub_output
)argument_list
)call
)return_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module
|
Tries to get name from ExtractorProcessor to filter on first.
Otherwise falls back to filtering based on its metadata
|
(module
(function_definition
(function_name_roll) function_name_roll
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_shifts) identifier_shifts
(None) None
)default_parameter
(default_parameter
(identifier_roll_coords) identifier_roll_coords
(None) None
)default_parameter
(dictionary_splat_pattern
(identifier_shifts_kwargs) identifier_shifts_kwargs
)dictionary_splat_pattern
)parameters
(block
(expression_statement
(assignment
(identifier_ds) identifier_ds
(call
(attribute
(call
(attribute
(identifier_self) identifier_self
(identifier__to_temp_dataset) identifier__to_temp_dataset
)attribute
(argument_list
)argument_list
)call
(identifier_roll) identifier_roll
)attribute
(argument_list
(keyword_argument
(identifier_shifts) identifier_shifts
(identifier_shifts) identifier_shifts
)keyword_argument
(keyword_argument
(identifier_roll_coords) identifier_roll_coords
(identifier_roll_coords) identifier_roll_coords
)keyword_argument
(dictionary_splat
(identifier_shifts_kwargs) identifier_shifts_kwargs
)dictionary_splat
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__from_temp_dataset) identifier__from_temp_dataset
)attribute
(argument_list
(identifier_ds) identifier_ds
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Roll this array by an offset along one or more dimensions.
Unlike shift, roll may rotate all variables, including coordinates
if specified. The direction of rotation is consistent with
:py:func:`numpy.roll`.
Parameters
----------
roll_coords : bool
Indicates whether to roll the coordinates by the offset
The current default of roll_coords (None, equivalent to True) is
deprecated and will change to False in a future version.
Explicitly pass roll_coords to silence the warning.
**shifts : keyword arguments of the form {dim: offset}
Integer offset to rotate each of the given dimensions. Positive
offsets roll to the right; negative offsets roll to the left.
Returns
-------
rolled : DataArray
DataArray with the same attributes but rolled data and coordinates.
See also
--------
shift
Examples
--------
>>> arr = xr.DataArray([5, 6, 7], dims='x')
>>> arr.roll(x=1)
<xarray.DataArray (x: 3)>
array([7, 5, 6])
Coordinates:
* x (x) int64 2 0 1
|
(module
(function_definition
(function_name_append_surface) function_name_append_surface
(parameters
(identifier_self) identifier_self
(identifier_name) identifier_name
(identifier_surface) identifier_surface
(default_parameter
(identifier_alpha) identifier_alpha
(float_1.) float_1.
)default_parameter
)parameters
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_insert_surface) identifier_insert_surface
)attribute
(argument_list
(keyword_argument
(identifier_position) identifier_position
(subscript
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier_df_surfaces) identifier_df_surfaces
)attribute
(identifier_index) identifier_index
)attribute
(identifier_shape) identifier_shape
)attribute
(integer_0) integer_0
)subscript
)keyword_argument
(keyword_argument
(identifier_name) identifier_name
(identifier_name) identifier_name
)keyword_argument
(keyword_argument
(identifier_surface) identifier_surface
(identifier_surface) identifier_surface
)keyword_argument
(keyword_argument
(identifier_alpha) identifier_alpha
(identifier_alpha) identifier_alpha
)keyword_argument
)argument_list
)call
)expression_statement
)block
)function_definition
)module
|
Append Cairo surface as new layer on top of existing layers.
Args
----
name (str) : Name of layer.
surface (cairo.ImageSurface) : Surface to render.
alpha (float) : Alpha/transparency level in the range `[0, 1]`.
|
(module
(function_definition
(function_name_resize) function_name_resize
(parameters
(identifier_self) identifier_self
(identifier_targ_sz) identifier_targ_sz
(default_parameter
(identifier_new_path) identifier_new_path
(string_'tmp') string_'tmp'
)default_parameter
(default_parameter
(identifier_resume) identifier_resume
(True) True
)default_parameter
(default_parameter
(identifier_fn) identifier_fn
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_new_ds) identifier_new_ds
(list
)list
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_dls) identifier_dls
(list
(attribute
(identifier_self) identifier_self
(identifier_trn_dl) identifier_trn_dl
)attribute
(attribute
(identifier_self) identifier_self
(identifier_val_dl) identifier_val_dl
)attribute
(attribute
(identifier_self) identifier_self
(identifier_fix_dl) identifier_fix_dl
)attribute
(attribute
(identifier_self) identifier_self
(identifier_aug_dl) identifier_aug_dl
)attribute
)list
)assignment
)expression_statement
(if_statement
(attribute
(identifier_self) identifier_self
(identifier_test_dl) identifier_test_dl
)attribute
(block
(expression_statement
(augmented_assignment
(identifier_dls) identifier_dls
(list
(attribute
(identifier_self) identifier_self
(identifier_test_dl) identifier_test_dl
)attribute
(attribute
(identifier_self) identifier_self
(identifier_test_aug_dl) identifier_test_aug_dl
)attribute
)list
)augmented_assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(augmented_assignment
(identifier_dls) identifier_dls
(list
(None) None
(None) None
)list
)augmented_assignment
)expression_statement
)block
)else_clause
)if_statement
(expression_statement
(assignment
(identifier_t) identifier_t
(call
(identifier_tqdm_notebook) identifier_tqdm_notebook
(argument_list
(identifier_dls) identifier_dls
)argument_list
)call
)assignment
)expression_statement
(for_statement
(identifier_dl) identifier_dl
(identifier_t) identifier_t
(block
(expression_statement
(call
(attribute
(identifier_new_ds) identifier_new_ds
(identifier_append) identifier_append
)attribute
(argument_list
(call
(attribute
(identifier_self) identifier_self
(identifier_resized) identifier_resized
)attribute
(argument_list
(identifier_dl) identifier_dl
(identifier_targ_sz) identifier_targ_sz
(identifier_new_path) identifier_new_path
(identifier_resume) identifier_resume
(identifier_fn) identifier_fn
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)for_statement
(expression_statement
(call
(attribute
(identifier_t) identifier_t
(identifier_close) identifier_close
)attribute
(argument_list
)argument_list
)call
)expression_statement
(return_statement
(call
(attribute
(identifier_self) identifier_self
(identifier___class__) identifier___class__
)attribute
(argument_list
(attribute
(subscript
(identifier_new_ds) identifier_new_ds
(integer_0) integer_0
)subscript
(identifier_path) identifier_path
)attribute
(identifier_new_ds) identifier_new_ds
(attribute
(identifier_self) identifier_self
(identifier_bs) identifier_bs
)attribute
(attribute
(identifier_self) identifier_self
(identifier_num_workers) identifier_num_workers
)attribute
(attribute
(identifier_self) identifier_self
(identifier_classes) identifier_classes
)attribute
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Resizes all the images in the train, valid, test folders to a given size.
Arguments:
targ_sz (int): the target size
new_path (str): the path to save the resized images (default tmp)
resume (bool): if True, check for images in the DataSet that haven't been resized yet (useful if a previous resize
operation was aborted)
fn (function): optional custom resizing function
|
(module
(function_definition
(function_name_deploy) function_name_deploy
(parameters
(identifier_self) identifier_self
(identifier_machine) identifier_machine
)parameters
(block
(expression_statement
(call
(attribute
(identifier_log) identifier_log
(identifier_debug) identifier_debug
)attribute
(argument_list
(binary_operator
(string_"machine id: %s.") string_"machine id: %s."
(identifier_machine) identifier_machine
)binary_operator
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_path) identifier_path
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier_path) identifier_path
)attribute
(string_"/machines") string_"/machines"
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(pattern_list
(identifier_value) identifier_value
(identifier_metadata) identifier_metadata
)pattern_list
(yield
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_client) identifier_client
)attribute
(identifier_get) identifier_get
)attribute
(argument_list
(identifier_path) identifier_path
)argument_list
)call
)yield
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_machines) identifier_machines
(call
(attribute
(identifier_json) identifier_json
(identifier_loads) identifier_loads
)attribute
(argument_list
(identifier_value) identifier_value
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_machines) identifier_machines
(identifier_append) identifier_append
)attribute
(argument_list
(identifier_machine) identifier_machine
)argument_list
)call
)expression_statement
(expression_statement
(yield
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_client) identifier_client
)attribute
(identifier_set) identifier_set
)attribute
(argument_list
(identifier_path) identifier_path
(call
(attribute
(identifier_json) identifier_json
(identifier_dumps) identifier_dumps
)attribute
(argument_list
(identifier_machines) identifier_machines
)argument_list
)call
)argument_list
)call
)yield
)expression_statement
)block
)function_definition
)module
|
Deploy service.
|
(module
(function_definition
(function_name_query_all) function_name_query_all
(parameters
(default_parameter
(identifier_kind) identifier_kind
(string_'1') string_'1'
)default_parameter
(default_parameter
(identifier_by_count) identifier_by_count
(False) False
)default_parameter
(default_parameter
(identifier_by_order) identifier_by_order
(True) True
)default_parameter
)parameters
(block
(if_statement
(identifier_by_count) identifier_by_count
(block
(expression_statement
(assignment
(identifier_recs) identifier_recs
(call
(attribute
(call
(attribute
(call
(attribute
(identifier_TabTag) identifier_TabTag
(identifier_select) identifier_select
)attribute
(argument_list
)argument_list
)call
(identifier_where) identifier_where
)attribute
(argument_list
(comparison_operator
(attribute
(identifier_TabTag) identifier_TabTag
(identifier_kind) identifier_kind
)attribute
(identifier_kind) identifier_kind
)comparison_operator
)argument_list
)call
(identifier_order_by) identifier_order_by
)attribute
(argument_list
(call
(attribute
(attribute
(identifier_TabTag) identifier_TabTag
(identifier_count) identifier_count
)attribute
(identifier_desc) identifier_desc
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
)block
(elif_clause
(identifier_by_order) identifier_by_order
(block
(expression_statement
(assignment
(identifier_recs) identifier_recs
(call
(attribute
(call
(attribute
(call
(attribute
(identifier_TabTag) identifier_TabTag
(identifier_select) identifier_select
)attribute
(argument_list
)argument_list
)call
(identifier_where) identifier_where
)attribute
(argument_list
(comparison_operator
(attribute
(identifier_TabTag) identifier_TabTag
(identifier_kind) identifier_kind
)attribute
(identifier_kind) identifier_kind
)comparison_operator
)argument_list
)call
(identifier_order_by) identifier_order_by
)attribute
(argument_list
(attribute
(identifier_TabTag) identifier_TabTag
(identifier_order) identifier_order
)attribute
)argument_list
)call
)assignment
)expression_statement
)block
)elif_clause
(else_clause
(block
(expression_statement
(assignment
(identifier_recs) identifier_recs
(call
(attribute
(call
(attribute
(call
(attribute
(identifier_TabTag) identifier_TabTag
(identifier_select) identifier_select
)attribute
(argument_list
)argument_list
)call
(identifier_where) identifier_where
)attribute
(argument_list
(comparison_operator
(attribute
(identifier_TabTag) identifier_TabTag
(identifier_kind) identifier_kind
)attribute
(identifier_kind) identifier_kind
)comparison_operator
)argument_list
)call
(identifier_order_by) identifier_order_by
)attribute
(argument_list
(attribute
(identifier_TabTag) identifier_TabTag
(identifier_uid) identifier_uid
)attribute
)argument_list
)call
)assignment
)expression_statement
)block
)else_clause
)if_statement
(return_statement
(identifier_recs) identifier_recs
)return_statement
)block
)function_definition
)module
|
Qeury all the categories, order by count or defined order.
|
(module
(function_definition
(function_name_sample) function_name_sample
(parameters
(identifier_self) identifier_self
(identifier_fraction) identifier_fraction
(default_parameter
(identifier_seed) identifier_seed
(None) None
)default_parameter
(default_parameter
(identifier_exact) identifier_exact
(False) False
)default_parameter
)parameters
(block
(if_statement
(parenthesized_expression
(boolean_operator
(comparison_operator
(identifier_fraction) identifier_fraction
(integer_1) integer_1
)comparison_operator
(comparison_operator
(identifier_fraction) identifier_fraction
(integer_0) integer_0
)comparison_operator
)boolean_operator
)parenthesized_expression
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(binary_operator
(string_'Invalid sampling rate: ') string_'Invalid sampling rate: '
(call
(identifier_str) identifier_str
(argument_list
(identifier_fraction) identifier_fraction
)argument_list
)call
)binary_operator
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(parenthesized_expression
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_self) identifier_self
)argument_list
)call
(integer_0) integer_0
)comparison_operator
)parenthesized_expression
(block
(return_statement
(call
(identifier_SArray) identifier_SArray
(argument_list
)argument_list
)call
)return_statement
)block
)if_statement
(if_statement
(comparison_operator
(identifier_seed) identifier_seed
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(identifier_seed) identifier_seed
(binary_operator
(call
(identifier_abs) identifier_abs
(argument_list
(call
(identifier_hash) identifier_hash
(argument_list
(binary_operator
(string_"%0.20f") string_"%0.20f"
(call
(attribute
(identifier_time) identifier_time
(identifier_time) identifier_time
)attribute
(argument_list
)argument_list
)call
)binary_operator
)argument_list
)call
)argument_list
)call
(parenthesized_expression
(binary_operator
(integer_2) integer_2
(integer_31) integer_31
)binary_operator
)parenthesized_expression
)binary_operator
)assignment
)expression_statement
)block
)if_statement
(with_statement
(with_clause
(with_item
(call
(identifier_cython_context) identifier_cython_context
(argument_list
)argument_list
)call
)with_item
)with_clause
(block
(return_statement
(call
(identifier_SArray) identifier_SArray
(argument_list
(keyword_argument
(identifier__proxy) identifier__proxy
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier___proxy__) identifier___proxy__
)attribute
(identifier_sample) identifier_sample
)attribute
(argument_list
(identifier_fraction) identifier_fraction
(identifier_seed) identifier_seed
(identifier_exact) identifier_exact
)argument_list
)call
)keyword_argument
)argument_list
)call
)return_statement
)block
)with_statement
)block
)function_definition
)module
|
Create an SArray which contains a subsample of the current SArray.
Parameters
----------
fraction : float
Fraction of the rows to fetch. Must be between 0 and 1.
if exact is False (default), the number of rows returned is
approximately the fraction times the number of rows.
seed : int, optional
The random seed for the random number generator.
exact: bool, optional
Defaults to False. If exact=True, an exact fraction is returned,
but at a performance penalty.
Returns
-------
out : SArray
The new SArray which contains the subsampled rows.
Examples
--------
>>> sa = turicreate.SArray(range(10))
>>> sa.sample(.3)
dtype: int
Rows: 3
[2, 6, 9]
|
(module
(function_definition
(function_name_create) function_name_create
(parameters
(identifier_self) identifier_self
(identifier_unique_name) identifier_unique_name
(default_parameter
(identifier_domain_suffix) identifier_domain_suffix
(attribute
(identifier_values) identifier_values
(identifier_unset) identifier_unset
)attribute
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_data) identifier_data
(call
(attribute
(identifier_values) identifier_values
(identifier_of) identifier_of
)attribute
(argument_list
(dictionary
(pair
(string_'UniqueName') string_'UniqueName'
(identifier_unique_name) identifier_unique_name
)pair
(pair
(string_'DomainSuffix') string_'DomainSuffix'
(identifier_domain_suffix) identifier_domain_suffix
)pair
)dictionary
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_payload) identifier_payload
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__version) identifier__version
)attribute
(identifier_create) identifier_create
)attribute
(argument_list
(string_'POST') string_'POST'
(attribute
(identifier_self) identifier_self
(identifier__uri) identifier__uri
)attribute
(keyword_argument
(identifier_data) identifier_data
(identifier_data) identifier_data
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(identifier_EnvironmentInstance) identifier_EnvironmentInstance
(argument_list
(attribute
(identifier_self) identifier_self
(identifier__version) identifier__version
)attribute
(identifier_payload) identifier_payload
(keyword_argument
(identifier_service_sid) identifier_service_sid
(subscript
(attribute
(identifier_self) identifier_self
(identifier__solution) identifier__solution
)attribute
(string_'service_sid') string_'service_sid'
)subscript
)keyword_argument
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Create a new EnvironmentInstance
:param unicode unique_name: The unique_name
:param unicode domain_suffix: The domain_suffix
:returns: Newly created EnvironmentInstance
:rtype: twilio.rest.serverless.v1.service.environment.EnvironmentInstance
|
(module
(function_definition
(function_name_findCampaigns) function_name_findCampaigns
(parameters
(identifier_ra) identifier_ra
(identifier_dec) identifier_dec
)parameters
(block
(expression_statement
(assignment
(attribute
(identifier_logger) identifier_logger
(identifier_disabled) identifier_disabled
)attribute
(True) True
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_campaigns_visible) identifier_campaigns_visible
(list
)list
)assignment
)expression_statement
(for_statement
(identifier_c) identifier_c
(call
(attribute
(identifier_fields) identifier_fields
(identifier_getFieldNumbers) identifier_getFieldNumbers
)attribute
(argument_list
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_fovobj) identifier_fovobj
(call
(attribute
(identifier_fields) identifier_fields
(identifier_getKeplerFov) identifier_getKeplerFov
)attribute
(argument_list
(identifier_c) identifier_c
)argument_list
)call
)assignment
)expression_statement
(if_statement
(call
(identifier_onSiliconCheck) identifier_onSiliconCheck
(argument_list
(identifier_ra) identifier_ra
(identifier_dec) identifier_dec
(identifier_fovobj) identifier_fovobj
)argument_list
)call
(block
(expression_statement
(call
(attribute
(identifier_campaigns_visible) identifier_campaigns_visible
(identifier_append) identifier_append
)attribute
(argument_list
(identifier_c) identifier_c
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)for_statement
(expression_statement
(assignment
(attribute
(identifier_logger) identifier_logger
(identifier_disabled) identifier_disabled
)attribute
(True) True
)assignment
)expression_statement
(return_statement
(identifier_campaigns_visible) identifier_campaigns_visible
)return_statement
)block
)function_definition
)module
|
Returns a list of the campaigns that cover a given position.
Parameters
----------
ra, dec : float, float
Position in decimal degrees (J2000).
Returns
-------
campaigns : list of int
A list of the campaigns that cover the given position.
|
(module
(function_definition
(function_name_get_aa_code) function_name_get_aa_code
(parameters
(identifier_aa_letter) identifier_aa_letter
)parameters
(block
(expression_statement
(assignment
(identifier_aa_code) identifier_aa_code
(None) None
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_aa_letter) identifier_aa_letter
(string_'X') string_'X'
)comparison_operator
(block
(for_statement
(pattern_list
(identifier_key) identifier_key
(identifier_val) identifier_val
)pattern_list
(call
(attribute
(identifier_standard_amino_acids) identifier_standard_amino_acids
(identifier_items) identifier_items
)attribute
(argument_list
)argument_list
)call
(block
(if_statement
(comparison_operator
(identifier_key) identifier_key
(identifier_aa_letter) identifier_aa_letter
)comparison_operator
(block
(expression_statement
(assignment
(identifier_aa_code) identifier_aa_code
(identifier_val) identifier_val
)assignment
)expression_statement
)block
)if_statement
)block
)for_statement
)block
)if_statement
(return_statement
(identifier_aa_code) identifier_aa_code
)return_statement
)block
)function_definition
)module
|
Get three-letter aa code if possible. If not, return None.
If three-letter code is None, will have to find this later from the filesystem.
Parameters
----------
aa_letter : str
One-letter amino acid code.
Returns
-------
aa_code : str, or None
Three-letter aa code.
|
(module
(function_definition
(function_name_make_bubble_surface) function_name_make_bubble_surface
(parameters
(default_parameter
(identifier_dims) identifier_dims
(identifier_DEFAULT_DIMS) identifier_DEFAULT_DIMS
)default_parameter
(default_parameter
(identifier_repeat) identifier_repeat
(integer_3) integer_3
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_gradients) identifier_gradients
(call
(identifier_make_gradients) identifier_make_gradients
(argument_list
(identifier_dims) identifier_dims
)argument_list
)call
)assignment
)expression_statement
(return_statement
(parenthesized_expression
(binary_operator
(call
(attribute
(identifier_np) identifier_np
(identifier_sin) identifier_sin
)attribute
(argument_list
(binary_operator
(binary_operator
(parenthesized_expression
(binary_operator
(subscript
(identifier_gradients) identifier_gradients
(integer_0) integer_0
)subscript
(float_0.5) float_0.5
)binary_operator
)parenthesized_expression
(identifier_repeat) identifier_repeat
)binary_operator
(attribute
(identifier_np) identifier_np
(identifier_pi) identifier_pi
)attribute
)binary_operator
)argument_list
)call
(call
(attribute
(identifier_np) identifier_np
(identifier_sin) identifier_sin
)attribute
(argument_list
(binary_operator
(binary_operator
(parenthesized_expression
(binary_operator
(subscript
(identifier_gradients) identifier_gradients
(integer_1) integer_1
)subscript
(float_0.5) float_0.5
)binary_operator
)parenthesized_expression
(identifier_repeat) identifier_repeat
)binary_operator
(attribute
(identifier_np) identifier_np
(identifier_pi) identifier_pi
)attribute
)binary_operator
)argument_list
)call
)binary_operator
)parenthesized_expression
)return_statement
)block
)function_definition
)module
|
Makes a surface from the product of sine functions on each axis.
Args:
dims (pair): the dimensions of the surface to create
repeat (int): the frequency of the waves is set to ensure this many
repetitions of the function
Returns:
surface: A surface.
|
(module
(function_definition
(function_name_relpath) function_name_relpath
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_cwd) identifier_cwd
(call
(attribute
(identifier_self) identifier_self
(identifier___class__) identifier___class__
)attribute
(argument_list
(call
(attribute
(identifier_os) identifier_os
(identifier_getcwd) identifier_getcwd
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_cwd) identifier_cwd
(identifier_relpathto) identifier_relpathto
)attribute
(argument_list
(identifier_self) identifier_self
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Return this path as a relative path,
based from the current working directory.
|
(module
(function_definition
(function_name_process_template) function_name_process_template
(parameters
(identifier_self) identifier_self
(identifier_sql) identifier_sql
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(expression_statement
(assignment
(identifier_template) identifier_template
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_env) identifier_env
)attribute
(identifier_from_string) identifier_from_string
)attribute
(argument_list
(identifier_sql) identifier_sql
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_kwargs) identifier_kwargs
(identifier_update) identifier_update
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_context) identifier_context
)attribute
)argument_list
)call
)expression_statement
(return_statement
(call
(attribute
(identifier_template) identifier_template
(identifier_render) identifier_render
)attribute
(argument_list
(identifier_kwargs) identifier_kwargs
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Processes a sql template
>>> sql = "SELECT '{{ datetime(2017, 1, 1).isoformat() }}'"
>>> process_template(sql)
"SELECT '2017-01-01T00:00:00'"
|
(module
(function_definition
(function_name__update_feature_log_prob) function_name__update_feature_log_prob
(parameters
(identifier_self) identifier_self
(identifier_alpha) identifier_alpha
)parameters
(block
(expression_statement
(assignment
(identifier_smoothed_fc) identifier_smoothed_fc
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier_feature_count_) identifier_feature_count_
)attribute
(identifier_alpha) identifier_alpha
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_smoothed_cc) identifier_smoothed_cc
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier_class_count_) identifier_class_count_
)attribute
(binary_operator
(identifier_alpha) identifier_alpha
(integer_2) integer_2
)binary_operator
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier_feature_log_prob_) identifier_feature_log_prob_
)attribute
(parenthesized_expression
(binary_operator
(call
(attribute
(identifier_np) identifier_np
(identifier_log) identifier_log
)attribute
(argument_list
(identifier_smoothed_fc) identifier_smoothed_fc
)argument_list
)call
(call
(attribute
(identifier_np) identifier_np
(identifier_log) identifier_log
)attribute
(argument_list
(call
(attribute
(identifier_smoothed_cc) identifier_smoothed_cc
(identifier_reshape) identifier_reshape
)attribute
(argument_list
(unary_operator
(integer_1) integer_1
)unary_operator
(integer_1) integer_1
)argument_list
)call
)argument_list
)call
)binary_operator
)parenthesized_expression
)assignment
)expression_statement
)block
)function_definition
)module
|
Apply smoothing to raw counts and recompute log probabilities
|
(module
(function_definition
(function_name__options) function_name__options
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(comparison_operator
(attribute
(identifier_self) identifier_self
(identifier__options_cache) identifier__options_cache
)attribute
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(identifier_target_url) identifier_target_url
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_client) identifier_client
)attribute
(identifier_get_url) identifier_get_url
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier__URL_KEY) identifier__URL_KEY
)attribute
(string_'OPTIONS') string_'OPTIONS'
(string_'options') string_'options'
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_r) identifier_r
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_client) identifier_client
)attribute
(identifier_request) identifier_request
)attribute
(argument_list
(string_'OPTIONS') string_'OPTIONS'
(identifier_target_url) identifier_target_url
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_self) identifier_self
(identifier__options_cache) identifier__options_cache
)attribute
(call
(attribute
(identifier_r) identifier_r
(identifier_json) identifier_json
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(return_statement
(attribute
(identifier_self) identifier_self
(identifier__options_cache) identifier__options_cache
)attribute
)return_statement
)block
)function_definition
)module
|
Returns a raw options object
:rtype: dict
|
(module
(function_definition
(function_name__output) function_name__output
(parameters
(identifier_self) identifier_self
(identifier_s) identifier_s
)parameters
(block
(if_statement
(call
(attribute
(call
(attribute
(identifier_s) identifier_s
(identifier_lower) identifier_lower
)attribute
(argument_list
)argument_list
)call
(identifier_startswith) identifier_startswith
)attribute
(argument_list
(string_b'host: ') string_b'host: '
)argument_list
)call
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__buffer) identifier__buffer
)attribute
(identifier_insert) identifier_insert
)attribute
(argument_list
(integer_1) integer_1
(identifier_s) identifier_s
)argument_list
)call
)expression_statement
)block
(else_clause
(block
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier__buffer) identifier__buffer
)attribute
(identifier_append) identifier_append
)attribute
(argument_list
(identifier_s) identifier_s
)argument_list
)call
)expression_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module
|
Host header should always be first
|
(module
(function_definition
(function_name_format_explanation) function_name_format_explanation
(parameters
(identifier_explanation) identifier_explanation
(default_parameter
(identifier_original_msg) identifier_original_msg
(None) None
)default_parameter
)parameters
(block
(if_statement
(boolean_operator
(not_operator
(call
(attribute
(identifier_conf) identifier_conf
(identifier_is_message_introspection_enabled) identifier_is_message_introspection_enabled
)attribute
(argument_list
)argument_list
)call
)not_operator
(identifier_original_msg) identifier_original_msg
)boolean_operator
(block
(return_statement
(identifier_original_msg) identifier_original_msg
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_explanation) identifier_explanation
(call
(identifier_ecu) identifier_ecu
(argument_list
(identifier_explanation) identifier_explanation
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_lines) identifier_lines
(call
(identifier__split_explanation) identifier__split_explanation
(argument_list
(identifier_explanation) identifier_explanation
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_result) identifier_result
(call
(identifier__format_lines) identifier__format_lines
(argument_list
(identifier_lines) identifier_lines
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(call
(identifier_u) identifier_u
(argument_list
(string_'\n') string_'\n'
)argument_list
)call
(identifier_join) identifier_join
)attribute
(argument_list
(identifier_result) identifier_result
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
This formats an explanation
Normally all embedded newlines are escaped, however there are
three exceptions: \n{, \n} and \n~. The first two are intended
cover nested explanations, see function and attribute explanations
for examples (.visit_Call(), visit_Attribute()). The last one is
for when one explanation needs to span multiple lines, e.g. when
displaying diffs.
|
(module
(function_definition
(function_name_packageGraph) function_name_packageGraph
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_packagelevel) identifier_packagelevel
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_packages) identifier_packages
(dictionary
)dictionary
)assignment
)expression_statement
(for_statement
(identifier_module) identifier_module
(call
(attribute
(identifier_self) identifier_self
(identifier_listModules) identifier_listModules
)attribute
(argument_list
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_package_name) identifier_package_name
(call
(attribute
(identifier_self) identifier_self
(identifier_packageOf) identifier_packageOf
)attribute
(argument_list
(attribute
(identifier_module) identifier_module
(identifier_modname) identifier_modname
)attribute
(identifier_packagelevel) identifier_packagelevel
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_package_name) identifier_package_name
(identifier_packages) identifier_packages
)comparison_operator
(block
(expression_statement
(assignment
(identifier_dirname) identifier_dirname
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_dirname) identifier_dirname
)attribute
(argument_list
(attribute
(identifier_module) identifier_module
(identifier_filename) identifier_filename
)attribute
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(subscript
(identifier_packages) identifier_packages
(identifier_package_name) identifier_package_name
)subscript
(call
(identifier_Module) identifier_Module
(argument_list
(identifier_package_name) identifier_package_name
(identifier_dirname) identifier_dirname
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_package) identifier_package
(subscript
(identifier_packages) identifier_packages
(identifier_package_name) identifier_package_name
)subscript
)assignment
)expression_statement
(for_statement
(identifier_name) identifier_name
(attribute
(identifier_module) identifier_module
(identifier_imports) identifier_imports
)attribute
(block
(expression_statement
(assignment
(identifier_package_name) identifier_package_name
(call
(attribute
(identifier_self) identifier_self
(identifier_packageOf) identifier_packageOf
)attribute
(argument_list
(identifier_name) identifier_name
(identifier_packagelevel) identifier_packagelevel
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_package_name) identifier_package_name
(attribute
(identifier_package) identifier_package
(identifier_modname) identifier_modname
)attribute
)comparison_operator
(block
(expression_statement
(call
(attribute
(attribute
(identifier_package) identifier_package
(identifier_imports) identifier_imports
)attribute
(identifier_add) identifier_add
)attribute
(argument_list
(identifier_package_name) identifier_package_name
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)for_statement
)block
)for_statement
(expression_statement
(assignment
(identifier_graph) identifier_graph
(call
(identifier_ModuleGraph) identifier_ModuleGraph
(argument_list
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_graph) identifier_graph
(identifier_modules) identifier_modules
)attribute
(identifier_packages) identifier_packages
)assignment
)expression_statement
(return_statement
(identifier_graph) identifier_graph
)return_statement
)block
)function_definition
)module
|
Convert a module graph to a package graph.
|
(module
(function_definition
(function_name_register_path) function_name_register_path
(parameters
(identifier_self) identifier_self
(identifier_path) identifier_path
(default_parameter
(identifier_modified_time) identifier_modified_time
(None) None
)default_parameter
)parameters
(block
(if_statement
(not_operator
(call
(attribute
(attribute
(identifier_foundations) identifier_foundations
(identifier_common) identifier_common
)attribute
(identifier_path_exists) identifier_path_exists
)attribute
(argument_list
(identifier_path) identifier_path
)argument_list
)call
)not_operator
(block
(raise_statement
(call
(attribute
(attribute
(identifier_foundations) identifier_foundations
(identifier_exceptions) identifier_exceptions
)attribute
(identifier_PathExistsError) identifier_PathExistsError
)attribute
(argument_list
(call
(attribute
(string_"{0} | '{1}' path doesn't exists!") string_"{0} | '{1}' path doesn't exists!"
(identifier_format) identifier_format
)attribute
(argument_list
(attribute
(attribute
(identifier_self) identifier_self
(identifier___class__) identifier___class__
)attribute
(identifier___name__) identifier___name__
)attribute
(identifier_path) identifier_path
)argument_list
)call
)argument_list
)call
)raise_statement
)block
)if_statement
(if_statement
(comparison_operator
(identifier_path) identifier_path
(identifier_self) identifier_self
)comparison_operator
(block
(raise_statement
(call
(attribute
(attribute
(identifier_umbra) identifier_umbra
(identifier_exceptions) identifier_exceptions
)attribute
(identifier_PathRegistrationError) identifier_PathRegistrationError
)attribute
(argument_list
(call
(attribute
(string_"{0} | '{1}' path is already registered!") string_"{0} | '{1}' path is already registered!"
(identifier_format) identifier_format
)attribute
(argument_list
(attribute
(attribute
(identifier_self) identifier_self
(identifier___class__) identifier___class__
)attribute
(identifier___name__) identifier___name__
)attribute
(identifier_path) identifier_path
)argument_list
)call
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(assignment
(subscript
(attribute
(identifier_self) identifier_self
(identifier___paths) identifier___paths
)attribute
(identifier_path) identifier_path
)subscript
(tuple
(conditional_expression
(call
(attribute
(identifier_self) identifier_self
(identifier_get_path_modified_time) identifier_get_path_modified_time
)attribute
(argument_list
(identifier_path) identifier_path
)argument_list
)call
(comparison_operator
(identifier_modified_time) identifier_modified_time
(None) None
)comparison_operator
(identifier_modified_time) identifier_modified_time
)conditional_expression
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_isfile) identifier_isfile
)attribute
(argument_list
(identifier_path) identifier_path
)argument_list
)call
)tuple
)assignment
)expression_statement
(return_statement
(True) True
)return_statement
)block
)function_definition
)module
|
Registers given path.
:param path: Path name.
:type path: unicode
:param modified_time: Custom modified time.
:type modified_time: int or float
:return: Method success.
:rtype: bool
|
(module
(function_definition
(function_name_change_and_save) function_name_change_and_save
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_update_only_changed_fields) identifier_update_only_changed_fields
(False) False
)default_parameter
(dictionary_splat_pattern
(identifier_changed_fields) identifier_changed_fields
)dictionary_splat_pattern
)parameters
(block
(expression_statement
(call
(identifier_bulk_change_and_save) identifier_bulk_change_and_save
(argument_list
(identifier_self) identifier_self
(keyword_argument
(identifier_update_only_changed_fields) identifier_update_only_changed_fields
(identifier_update_only_changed_fields) identifier_update_only_changed_fields
)keyword_argument
(dictionary_splat
(identifier_changed_fields) identifier_changed_fields
)dictionary_splat
)argument_list
)call
)expression_statement
(return_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_filter) identifier_filter
)attribute
(argument_list
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Changes a given `changed_fields` on each object in the queryset, saves objects
and returns the changed objects in the queryset.
|
(module
(function_definition
(function_name_build_pages) function_name_build_pages
(parameters
(identifier_self) identifier_self
)parameters
(block
(for_statement
(pattern_list
(identifier_root) identifier_root
(identifier__) identifier__
(identifier_files) identifier_files
)pattern_list
(call
(attribute
(identifier_os) identifier_os
(identifier_walk) identifier_walk
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_pages_dir) identifier_pages_dir
)attribute
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_base_dir) identifier_base_dir
(call
(attribute
(call
(attribute
(identifier_root) identifier_root
(identifier_replace) identifier_replace
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_pages_dir) identifier_pages_dir
)attribute
(string_"") string_""
)argument_list
)call
(identifier_lstrip) identifier_lstrip
)attribute
(argument_list
(string_"/") string_"/"
)argument_list
)call
)assignment
)expression_statement
(if_statement
(not_operator
(call
(attribute
(identifier_base_dir) identifier_base_dir
(identifier_startswith) identifier_startswith
)attribute
(argument_list
(string_"_") string_"_"
)argument_list
)call
)not_operator
(block
(for_statement
(identifier_f) identifier_f
(identifier_files) identifier_files
(block
(expression_statement
(assignment
(identifier_src_file) identifier_src_file
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_join) identifier_join
)attribute
(argument_list
(identifier_base_dir) identifier_base_dir
(identifier_f) identifier_f
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__build_page) identifier__build_page
)attribute
(argument_list
(identifier_src_file) identifier_src_file
)argument_list
)call
)expression_statement
)block
)for_statement
)block
)if_statement
)block
)for_statement
)block
)function_definition
)module
|
Iterate over the pages_dir and build the pages
|
(module
(function_definition
(function_name__pass_variable) function_name__pass_variable
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_pass_var) identifier_pass_var
(list
)list
)assignment
)expression_statement
(for_statement
(identifier_var) identifier_var
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_environ) identifier_environ
)attribute
(identifier_keys) identifier_keys
)attribute
(argument_list
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_expVAR) identifier_expVAR
(call
(attribute
(identifier_var) identifier_var
(identifier_split) identifier_split
)attribute
(argument_list
(string_"_") string_"_"
)argument_list
)call
)assignment
)expression_statement
(if_statement
(boolean_operator
(comparison_operator
(subscript
(identifier_expVAR) identifier_expVAR
(integer_0) integer_0
)subscript
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_prgnam) identifier_prgnam
)attribute
(identifier_upper) identifier_upper
)attribute
(argument_list
)argument_list
)call
)comparison_operator
(comparison_operator
(subscript
(identifier_expVAR) identifier_expVAR
(integer_1) integer_1
)subscript
(string_"PATH") string_"PATH"
)comparison_operator
)boolean_operator
(block
(expression_statement
(call
(attribute
(identifier_pass_var) identifier_pass_var
(identifier_append) identifier_append
)attribute
(argument_list
(call
(attribute
(string_"{0}={1}") string_"{0}={1}"
(identifier_format) identifier_format
)attribute
(argument_list
(subscript
(identifier_expVAR) identifier_expVAR
(integer_1) integer_1
)subscript
(subscript
(attribute
(identifier_os) identifier_os
(identifier_environ) identifier_environ
)attribute
(identifier_var) identifier_var
)subscript
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)for_statement
(return_statement
(identifier_pass_var) identifier_pass_var
)return_statement
)block
)function_definition
)module
|
Return enviroment variables
|
(module
(function_definition
(function_name_getAllSecrets) function_name_getAllSecrets
(parameters
(default_parameter
(identifier_version) identifier_version
(string_"") string_""
)default_parameter
(default_parameter
(identifier_region) identifier_region
(None) None
)default_parameter
(default_parameter
(identifier_table) identifier_table
(string_"credential-store") string_"credential-store"
)default_parameter
(default_parameter
(identifier_context) identifier_context
(None) None
)default_parameter
(default_parameter
(identifier_credential) identifier_credential
(None) None
)default_parameter
(default_parameter
(identifier_session) identifier_session
(None) None
)default_parameter
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(if_statement
(comparison_operator
(identifier_session) identifier_session
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(identifier_session) identifier_session
(call
(identifier_get_session) identifier_get_session
(argument_list
(dictionary_splat
(identifier_kwargs) identifier_kwargs
)dictionary_splat
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_dynamodb) identifier_dynamodb
(call
(attribute
(identifier_session) identifier_session
(identifier_resource) identifier_resource
)attribute
(argument_list
(string_'dynamodb') string_'dynamodb'
(keyword_argument
(identifier_region_name) identifier_region_name
(identifier_region) identifier_region
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_kms) identifier_kms
(call
(attribute
(identifier_session) identifier_session
(identifier_client) identifier_client
)attribute
(argument_list
(string_'kms') string_'kms'
(keyword_argument
(identifier_region_name) identifier_region_name
(identifier_region) identifier_region
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_secrets) identifier_secrets
(call
(identifier_listSecrets) identifier_listSecrets
(argument_list
(identifier_region) identifier_region
(identifier_table) identifier_table
(dictionary_splat
(identifier_kwargs) identifier_kwargs
)dictionary_splat
)argument_list
)call
)assignment
)expression_statement
(if_statement
(boolean_operator
(identifier_credential) identifier_credential
(comparison_operator
(identifier_WILDCARD_CHAR) identifier_WILDCARD_CHAR
(identifier_credential) identifier_credential
)comparison_operator
)boolean_operator
(block
(expression_statement
(assignment
(identifier_names) identifier_names
(call
(identifier_set) identifier_set
(argument_list
(call
(identifier_expand_wildcard) identifier_expand_wildcard
(argument_list
(identifier_credential) identifier_credential
(list_comprehension
(subscript
(identifier_x) identifier_x
(string_"name") string_"name"
)subscript
(for_in_clause
(identifier_x) identifier_x
(identifier_secrets) identifier_secrets
)for_in_clause
)list_comprehension
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_names) identifier_names
(call
(identifier_set) identifier_set
(generator_expression
(subscript
(identifier_x) identifier_x
(string_"name") string_"name"
)subscript
(for_in_clause
(identifier_x) identifier_x
(identifier_secrets) identifier_secrets
)for_in_clause
)generator_expression
)call
)assignment
)expression_statement
)block
)else_clause
)if_statement
(expression_statement
(assignment
(identifier_pool) identifier_pool
(call
(identifier_ThreadPool) identifier_ThreadPool
(argument_list
(call
(identifier_min) identifier_min
(argument_list
(call
(identifier_len) identifier_len
(argument_list
(identifier_names) identifier_names
)argument_list
)call
(identifier_THREAD_POOL_MAX_SIZE) identifier_THREAD_POOL_MAX_SIZE
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_results) identifier_results
(call
(attribute
(identifier_pool) identifier_pool
(identifier_map) identifier_map
)attribute
(argument_list
(lambda
(lambda_parameters
(identifier_credential) identifier_credential
)lambda_parameters
(call
(identifier_getSecret) identifier_getSecret
(argument_list
(identifier_credential) identifier_credential
(identifier_version) identifier_version
(identifier_region) identifier_region
(identifier_table) identifier_table
(identifier_context) identifier_context
(identifier_dynamodb) identifier_dynamodb
(identifier_kms) identifier_kms
(dictionary_splat
(identifier_kwargs) identifier_kwargs
)dictionary_splat
)argument_list
)call
)lambda
(identifier_names) identifier_names
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_pool) identifier_pool
(identifier_close) identifier_close
)attribute
(argument_list
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_pool) identifier_pool
(identifier_join) identifier_join
)attribute
(argument_list
)argument_list
)call
)expression_statement
(return_statement
(call
(identifier_dict) identifier_dict
(argument_list
(call
(identifier_zip) identifier_zip
(argument_list
(identifier_names) identifier_names
(identifier_results) identifier_results
)argument_list
)call
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
fetch and decrypt all secrets
|
(module
(function_definition
(function_name_is_gentarget) function_name_is_gentarget
(parameters
(identifier_self) identifier_self
(identifier_target) identifier_target
)parameters
(block
(if_statement
(attribute
(identifier_self) identifier_self
(identifier_gentarget_type) identifier_gentarget_type
)attribute
(block
(return_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(identifier_target) identifier_target
(attribute
(identifier_self) identifier_self
(identifier_gentarget_type) identifier_gentarget_type
)attribute
)argument_list
)call
)return_statement
)block
(else_clause
(block
(raise_statement
(identifier_NotImplementedError) identifier_NotImplementedError
)raise_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module
|
Predicate which determines whether the target in question is relevant to this codegen task.
E.g., the JaxbGen task considers JaxbLibrary targets to be relevant, and nothing else.
:API: public
:param Target target: The target to check.
:return: True if this class can generate code for the given target, False otherwise.
|
(module
(function_definition
(function_name__parse_throttle) function_name__parse_throttle
(parameters
(identifier_self) identifier_self
(identifier_tablename) identifier_tablename
(identifier_throttle) identifier_throttle
)parameters
(block
(expression_statement
(assignment
(identifier_amount) identifier_amount
(list
)list
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_desc) identifier_desc
(call
(attribute
(identifier_self) identifier_self
(identifier_describe) identifier_describe
)attribute
(argument_list
(identifier_tablename) identifier_tablename
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_throughputs) identifier_throughputs
(list
(attribute
(identifier_desc) identifier_desc
(identifier_read_throughput) identifier_read_throughput
)attribute
(attribute
(identifier_desc) identifier_desc
(identifier_write_throughput) identifier_write_throughput
)attribute
)list
)assignment
)expression_statement
(for_statement
(pattern_list
(identifier_value) identifier_value
(identifier_throughput) identifier_throughput
)pattern_list
(call
(identifier_zip) identifier_zip
(argument_list
(subscript
(identifier_throttle) identifier_throttle
(slice
(integer_1) integer_1
(colon) colon
)slice
)subscript
(identifier_throughputs) identifier_throughputs
)argument_list
)call
(block
(if_statement
(comparison_operator
(identifier_value) identifier_value
(string_"*") string_"*"
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_amount) identifier_amount
(identifier_append) identifier_append
)attribute
(argument_list
(integer_0) integer_0
)argument_list
)call
)expression_statement
)block
(elif_clause
(comparison_operator
(subscript
(identifier_value) identifier_value
(unary_operator
(integer_1) integer_1
)unary_operator
)subscript
(string_"%") string_"%"
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_amount) identifier_amount
(identifier_append) identifier_append
)attribute
(argument_list
(binary_operator
(binary_operator
(identifier_throughput) identifier_throughput
(call
(identifier_float) identifier_float
(argument_list
(subscript
(identifier_value) identifier_value
(slice
(colon) colon
(unary_operator
(integer_1) integer_1
)unary_operator
)slice
)subscript
)argument_list
)call
)binary_operator
(float_100.0) float_100.0
)binary_operator
)argument_list
)call
)expression_statement
)block
)elif_clause
(else_clause
(block
(expression_statement
(call
(attribute
(identifier_amount) identifier_amount
(identifier_append) identifier_append
)attribute
(argument_list
(call
(identifier_float) identifier_float
(argument_list
(identifier_value) identifier_value
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)else_clause
)if_statement
)block
)for_statement
(expression_statement
(assignment
(identifier_cap) identifier_cap
(call
(identifier_Capacity) identifier_Capacity
(argument_list
(list_splat
(identifier_amount) identifier_amount
)list_splat
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(identifier_RateLimit) identifier_RateLimit
(argument_list
(keyword_argument
(identifier_total) identifier_total
(identifier_cap) identifier_cap
)keyword_argument
(keyword_argument
(identifier_callback) identifier_callback
(attribute
(identifier_self) identifier_self
(identifier__on_throttle) identifier__on_throttle
)attribute
)keyword_argument
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Parse a 'throttle' statement and return a RateLimit
|
(module
(function_definition
(function_name__reset) function_name__reset
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_force) identifier_force
(False) False
)default_parameter
)parameters
(block
(if_statement
(boolean_operator
(not_operator
(attribute
(identifier_self) identifier_self
(identifier__closed) identifier__closed
)attribute
)not_operator
(parenthesized_expression
(boolean_operator
(identifier_force) identifier_force
(attribute
(identifier_self) identifier_self
(identifier__transaction) identifier__transaction
)attribute
)boolean_operator
)parenthesized_expression
)boolean_operator
(block
(try_statement
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_rollback) identifier_rollback
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
(except_clause
(identifier_Exception) identifier_Exception
(block
(pass_statement
)pass_statement
)block
)except_clause
)try_statement
)block
)if_statement
)block
)function_definition
)module
|
Reset a tough connection.
Rollback if forced or the connection was in a transaction.
|
(module
(function_definition
(function_name_perimeter) function_name_perimeter
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(attribute
(identifier_self) identifier_self
(identifier__is_completely_masked) identifier__is_completely_masked
)attribute
(block
(return_statement
(binary_operator
(attribute
(identifier_np) identifier_np
(identifier_nan) identifier_nan
)attribute
(attribute
(identifier_u) identifier_u
(identifier_pix) identifier_pix
)attribute
)binary_operator
)return_statement
)block
(else_clause
(block
(import_from_statement
(dotted_name
(identifier_skimage) identifier_skimage
(identifier_measure) identifier_measure
)dotted_name
(dotted_name
(identifier_perimeter) identifier_perimeter
)dotted_name
)import_from_statement
(return_statement
(binary_operator
(call
(identifier_perimeter) identifier_perimeter
(argument_list
(unary_operator
(attribute
(identifier_self) identifier_self
(identifier__total_mask) identifier__total_mask
)attribute
)unary_operator
(keyword_argument
(identifier_neighbourhood) identifier_neighbourhood
(integer_4) integer_4
)keyword_argument
)argument_list
)call
(attribute
(identifier_u) identifier_u
(identifier_pix) identifier_pix
)attribute
)binary_operator
)return_statement
)block
)else_clause
)if_statement
)block
)function_definition
)module
|
The total perimeter of the source segment, approximated lines
through the centers of the border pixels using a 4-connectivity.
If any masked pixels make holes within the source segment, then
the perimeter around the inner hole (e.g. an annulus) will also
contribute to the total perimeter.
|
(module
(function_definition
(function_name_make_json_formatter) function_name_make_json_formatter
(parameters
(identifier_graph) identifier_graph
)parameters
(block
(return_statement
(dictionary
(pair
(string_"()") string_"()"
(attribute
(attribute
(attribute
(attribute
(identifier_graph) identifier_graph
(identifier_config) identifier_config
)attribute
(identifier_logging) identifier_logging
)attribute
(identifier_json_formatter) identifier_json_formatter
)attribute
(identifier_formatter) identifier_formatter
)attribute
)pair
(pair
(string_"fmt") string_"fmt"
(attribute
(attribute
(attribute
(identifier_graph) identifier_graph
(identifier_config) identifier_config
)attribute
(identifier_logging) identifier_logging
)attribute
(identifier_json_required_keys) identifier_json_required_keys
)attribute
)pair
)dictionary
)return_statement
)block
)function_definition
)module
|
Create the default json formatter.
|
(module
(function_definition
(function_name_vault_file) function_name_vault_file
(parameters
(identifier_env) identifier_env
(identifier_default) identifier_default
)parameters
(block
(expression_statement
(assignment
(identifier_home) identifier_home
(conditional_expression
(subscript
(attribute
(identifier_os) identifier_os
(identifier_environ) identifier_environ
)attribute
(string_'HOME') string_'HOME'
)subscript
(comparison_operator
(string_'HOME') string_'HOME'
(attribute
(identifier_os) identifier_os
(identifier_environ) identifier_environ
)attribute
)comparison_operator
(line_continuation_\) line_continuation_\
(subscript
(attribute
(identifier_os) identifier_os
(identifier_environ) identifier_environ
)attribute
(string_'USERPROFILE') string_'USERPROFILE'
)subscript
)conditional_expression
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_filename) identifier_filename
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_environ) identifier_environ
)attribute
(identifier_get) identifier_get
)attribute
(argument_list
(identifier_env) identifier_env
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_join) identifier_join
)attribute
(argument_list
(identifier_home) identifier_home
(identifier_default) identifier_default
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_filename) identifier_filename
(call
(identifier_abspath) identifier_abspath
(argument_list
(identifier_filename) identifier_filename
)argument_list
)call
)assignment
)expression_statement
(if_statement
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_exists) identifier_exists
)attribute
(argument_list
(identifier_filename) identifier_filename
)argument_list
)call
(block
(return_statement
(identifier_filename) identifier_filename
)return_statement
)block
)if_statement
(return_statement
(None) None
)return_statement
)block
)function_definition
)module
|
The path to a misc Vault file
This function will check for the env override on a file
path, compute a fully qualified OS appropriate path to
the desired file and return it if it exists. Otherwise
returns None
|
(module
(function_definition
(function_name_parse_routing_info) function_name_parse_routing_info
(parameters
(identifier_cls) identifier_cls
(identifier_records) identifier_records
)parameters
(block
(if_statement
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_records) identifier_records
)argument_list
)call
(integer_1) integer_1
)comparison_operator
(block
(raise_statement
(call
(identifier_RoutingProtocolError) identifier_RoutingProtocolError
(argument_list
(string_"Expected exactly one record") string_"Expected exactly one record"
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_record) identifier_record
(subscript
(identifier_records) identifier_records
(integer_0) integer_0
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_routers) identifier_routers
(list
)list
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_readers) identifier_readers
(list
)list
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_writers) identifier_writers
(list
)list
)assignment
)expression_statement
(try_statement
(block
(expression_statement
(assignment
(identifier_servers) identifier_servers
(subscript
(identifier_record) identifier_record
(string_"servers") string_"servers"
)subscript
)assignment
)expression_statement
(for_statement
(identifier_server) identifier_server
(identifier_servers) identifier_servers
(block
(expression_statement
(assignment
(identifier_role) identifier_role
(subscript
(identifier_server) identifier_server
(string_"role") string_"role"
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_addresses) identifier_addresses
(list
)list
)assignment
)expression_statement
(for_statement
(identifier_address) identifier_address
(subscript
(identifier_server) identifier_server
(string_"addresses") string_"addresses"
)subscript
(block
(expression_statement
(call
(attribute
(identifier_addresses) identifier_addresses
(identifier_append) identifier_append
)attribute
(argument_list
(call
(attribute
(identifier_SocketAddress) identifier_SocketAddress
(identifier_parse) identifier_parse
)attribute
(argument_list
(identifier_address) identifier_address
(identifier_DEFAULT_PORT) identifier_DEFAULT_PORT
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)for_statement
(if_statement
(comparison_operator
(identifier_role) identifier_role
(string_"ROUTE") string_"ROUTE"
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_routers) identifier_routers
(identifier_extend) identifier_extend
)attribute
(argument_list
(identifier_addresses) identifier_addresses
)argument_list
)call
)expression_statement
)block
(elif_clause
(comparison_operator
(identifier_role) identifier_role
(string_"READ") string_"READ"
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_readers) identifier_readers
(identifier_extend) identifier_extend
)attribute
(argument_list
(identifier_addresses) identifier_addresses
)argument_list
)call
)expression_statement
)block
)elif_clause
(elif_clause
(comparison_operator
(identifier_role) identifier_role
(string_"WRITE") string_"WRITE"
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_writers) identifier_writers
(identifier_extend) identifier_extend
)attribute
(argument_list
(identifier_addresses) identifier_addresses
)argument_list
)call
)expression_statement
)block
)elif_clause
)if_statement
)block
)for_statement
(expression_statement
(assignment
(identifier_ttl) identifier_ttl
(subscript
(identifier_record) identifier_record
(string_"ttl") string_"ttl"
)subscript
)assignment
)expression_statement
)block
(except_clause
(tuple
(identifier_KeyError) identifier_KeyError
(identifier_TypeError) identifier_TypeError
)tuple
(block
(raise_statement
(call
(identifier_RoutingProtocolError) identifier_RoutingProtocolError
(argument_list
(string_"Cannot parse routing info") string_"Cannot parse routing info"
)argument_list
)call
)raise_statement
)block
)except_clause
(else_clause
(block
(return_statement
(call
(identifier_cls) identifier_cls
(argument_list
(identifier_routers) identifier_routers
(identifier_readers) identifier_readers
(identifier_writers) identifier_writers
(identifier_ttl) identifier_ttl
)argument_list
)call
)return_statement
)block
)else_clause
)try_statement
)block
)function_definition
)module
|
Parse the records returned from a getServers call and
return a new RoutingTable instance.
|
(module
(function_definition
(function_name_average_sharded_losses) function_name_average_sharded_losses
(parameters
(identifier_sharded_losses) identifier_sharded_losses
)parameters
(block
(expression_statement
(assignment
(identifier_losses) identifier_losses
(dictionary
)dictionary
)assignment
)expression_statement
(for_statement
(identifier_loss_name) identifier_loss_name
(call
(identifier_sorted) identifier_sorted
(argument_list
(subscript
(identifier_sharded_losses) identifier_sharded_losses
(integer_0) integer_0
)subscript
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_all_shards) identifier_all_shards
(list_comprehension
(subscript
(identifier_shard_losses) identifier_shard_losses
(identifier_loss_name) identifier_loss_name
)subscript
(for_in_clause
(identifier_shard_losses) identifier_shard_losses
(identifier_sharded_losses) identifier_sharded_losses
)for_in_clause
)list_comprehension
)assignment
)expression_statement
(if_statement
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(subscript
(identifier_all_shards) identifier_all_shards
(integer_0) integer_0
)subscript
(identifier_tuple) identifier_tuple
)argument_list
)call
(block
(expression_statement
(assignment
(pattern_list
(identifier_sharded_num) identifier_sharded_num
(identifier_sharded_den) identifier_sharded_den
)pattern_list
(call
(identifier_zip) identifier_zip
(argument_list
(list_splat
(identifier_all_shards) identifier_all_shards
)list_splat
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_mean_loss) identifier_mean_loss
(parenthesized_expression
(binary_operator
(call
(attribute
(identifier_tf) identifier_tf
(identifier_add_n) identifier_add_n
)attribute
(argument_list
(identifier_sharded_num) identifier_sharded_num
)argument_list
)call
(call
(attribute
(identifier_tf) identifier_tf
(identifier_maximum) identifier_maximum
)attribute
(argument_list
(call
(attribute
(identifier_tf) identifier_tf
(identifier_cast) identifier_cast
)attribute
(argument_list
(float_1.0) float_1.0
(attribute
(subscript
(identifier_sharded_den) identifier_sharded_den
(integer_0) integer_0
)subscript
(identifier_dtype) identifier_dtype
)attribute
)argument_list
)call
(call
(attribute
(identifier_tf) identifier_tf
(identifier_add_n) identifier_add_n
)attribute
(argument_list
(identifier_sharded_den) identifier_sharded_den
)argument_list
)call
)argument_list
)call
)binary_operator
)parenthesized_expression
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_mean_loss) identifier_mean_loss
(call
(attribute
(identifier_tf) identifier_tf
(identifier_reduce_mean) identifier_reduce_mean
)attribute
(argument_list
(identifier_all_shards) identifier_all_shards
)argument_list
)call
)assignment
)expression_statement
)block
)else_clause
)if_statement
(expression_statement
(assignment
(subscript
(identifier_losses) identifier_losses
(identifier_loss_name) identifier_loss_name
)subscript
(identifier_mean_loss) identifier_mean_loss
)assignment
)expression_statement
)block
)for_statement
(return_statement
(identifier_losses) identifier_losses
)return_statement
)block
)function_definition
)module
|
Average losses across datashards.
Args:
sharded_losses: list<dict<str loss_name, Tensor loss>>. The loss
can be a single Tensor or a 2-tuple (numerator and denominator).
Returns:
losses: dict<str loss_name, Tensor avg_loss>
|
(module
(function_definition
(function_name_load_scene) function_name_load_scene
(parameters
(identifier_self) identifier_self
(identifier_item) identifier_item
)parameters
(block
(expression_statement
(assignment
(identifier_scene) identifier_scene
(call
(attribute
(identifier_Scene) identifier_Scene
(identifier_from_config) identifier_from_config
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_pyvlx) identifier_pyvlx
)attribute
(identifier_item) identifier_item
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_add) identifier_add
)attribute
(argument_list
(identifier_scene) identifier_scene
)argument_list
)call
)expression_statement
)block
)function_definition
)module
|
Load scene from json.
|
(module
(function_definition
(function_name_get_errors) function_name_get_errors
(parameters
(identifier_self) identifier_self
)parameters
(block
(return_statement
(list_comprehension
(dictionary
(pair
(attribute
(identifier_cr) identifier_cr
(identifier_component_name) identifier_component_name
)attribute
(call
(attribute
(identifier_cr) identifier_cr
(identifier_get_error) identifier_get_error
)attribute
(argument_list
)argument_list
)call
)pair
)dictionary
(for_in_clause
(identifier_cr) identifier_cr
(attribute
(identifier_self) identifier_self
(identifier_component_results) identifier_component_results
)attribute
)for_in_clause
(if_clause
(call
(attribute
(identifier_cr) identifier_cr
(identifier_has_error) identifier_has_error
)attribute
(argument_list
)argument_list
)call
)if_clause
)list_comprehension
)return_statement
)block
)function_definition
)module
|
If there were any business errors fetching data for this property,
returns the error messages.
Returns:
string - the error message, or None if there was no error.
|
(module
(function_definition
(function_name_delete_multireddit) function_name_delete_multireddit
(parameters
(identifier_self) identifier_self
(identifier_name) identifier_name
(list_splat_pattern
(identifier_args) identifier_args
)list_splat_pattern
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(expression_statement
(assignment
(identifier_url) identifier_url
(call
(attribute
(subscript
(attribute
(identifier_self) identifier_self
(identifier_config) identifier_config
)attribute
(string_'multireddit_about') string_'multireddit_about'
)subscript
(identifier_format) identifier_format
)attribute
(argument_list
(keyword_argument
(identifier_user) identifier_user
(attribute
(attribute
(identifier_self) identifier_self
(identifier_user) identifier_user
)attribute
(identifier_name) identifier_name
)attribute
)keyword_argument
(keyword_argument
(identifier_multi) identifier_multi
(identifier_name) identifier_name
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(if_statement
(not_operator
(attribute
(identifier_self) identifier_self
(identifier__use_oauth) identifier__use_oauth
)attribute
)not_operator
(block
(expression_statement
(assignment
(subscript
(attribute
(attribute
(identifier_self) identifier_self
(identifier_http) identifier_http
)attribute
(identifier_headers) identifier_headers
)attribute
(string_'x-modhash') string_'x-modhash'
)subscript
(attribute
(identifier_self) identifier_self
(identifier_modhash) identifier_modhash
)attribute
)assignment
)expression_statement
)block
)if_statement
(try_statement
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_request) identifier_request
)attribute
(argument_list
(identifier_url) identifier_url
(keyword_argument
(identifier_data) identifier_data
(dictionary
)dictionary
)keyword_argument
(keyword_argument
(identifier_method) identifier_method
(string_'DELETE') string_'DELETE'
)keyword_argument
(list_splat
(identifier_args) identifier_args
)list_splat
(dictionary_splat
(identifier_kwargs) identifier_kwargs
)dictionary_splat
)argument_list
)call
)expression_statement
)block
(finally_clause
(block
(if_statement
(not_operator
(attribute
(identifier_self) identifier_self
(identifier__use_oauth) identifier__use_oauth
)attribute
)not_operator
(block
(delete_statement
(subscript
(attribute
(attribute
(identifier_self) identifier_self
(identifier_http) identifier_http
)attribute
(identifier_headers) identifier_headers
)attribute
(string_'x-modhash') string_'x-modhash'
)subscript
)delete_statement
)block
)if_statement
)block
)finally_clause
)try_statement
)block
)function_definition
)module
|
Delete a Multireddit.
Any additional parameters are passed directly into
:meth:`~praw.__init__.BaseReddit.request`
|
(module
(function_definition
(function_name_update) function_name_update
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_args) identifier_args
(dictionary_comprehension
(pair
(identifier_attr) identifier_attr
(call
(identifier_getattr) identifier_getattr
(argument_list
(identifier_self) identifier_self
(identifier_attr) identifier_attr
)argument_list
)call
)pair
(for_in_clause
(identifier_attr) identifier_attr
(attribute
(identifier_self) identifier_self
(identifier_to_update) identifier_to_update
)attribute
)for_in_clause
)dictionary_comprehension
)assignment
)expression_statement
(expression_statement
(call
(identifier__perform_command) identifier__perform_command
(argument_list
(identifier_self) identifier_self
(string_'user_update') string_'user_update'
(identifier_args) identifier_args
)argument_list
)call
)expression_statement
)block
)function_definition
)module
|
Update the user's details on Todoist.
This method must be called to register any local attribute changes
with Todoist.
>>> from pytodoist import todoist
>>> user = todoist.login('[email protected]', 'password')
>>> user.full_name = 'John Smith'
>>> # At this point Todoist still thinks the name is 'John Doe'.
>>> user.update()
>>> # Now the name has been updated on Todoist.
|
(module
(function_definition
(function_name_enable_key) function_name_enable_key
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(call
(identifier_print) identifier_print
(argument_list
(string_"This command will enable a disabled key.") string_"This command will enable a disabled key."
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_apiKeyID) identifier_apiKeyID
(call
(identifier_input) identifier_input
(argument_list
(string_"API Key ID: ") string_"API Key ID: "
)argument_list
)call
)assignment
)expression_statement
(try_statement
(block
(expression_statement
(assignment
(identifier_key) identifier_key
(call
(attribute
(identifier_self) identifier_self
(identifier__curl_bitmex) identifier__curl_bitmex
)attribute
(argument_list
(string_"/apiKey/enable") string_"/apiKey/enable"
(keyword_argument
(identifier_postdict) identifier_postdict
(dictionary
(pair
(string_"apiKeyID") string_"apiKeyID"
(identifier_apiKeyID) identifier_apiKeyID
)pair
)dictionary
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(identifier_print) identifier_print
(argument_list
(binary_operator
(string_"Key with ID %s enabled.") string_"Key with ID %s enabled."
(subscript
(identifier_key) identifier_key
(string_"id") string_"id"
)subscript
)binary_operator
)argument_list
)call
)expression_statement
)block
(except_clause
(block
(expression_statement
(call
(identifier_print) identifier_print
(argument_list
(string_"Unable to enable key, please try again.") string_"Unable to enable key, please try again."
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_enable_key) identifier_enable_key
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)except_clause
)try_statement
)block
)function_definition
)module
|
Enable an existing API Key.
|
(module
(function_definition
(function_name_upload_keys) function_name_upload_keys
(parameters
(identifier_self) identifier_self
(default_parameter
(identifier_device_keys) identifier_device_keys
(None) None
)default_parameter
(default_parameter
(identifier_one_time_keys) identifier_one_time_keys
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_content) identifier_content
(dictionary
)dictionary
)assignment
)expression_statement
(if_statement
(identifier_device_keys) identifier_device_keys
(block
(expression_statement
(assignment
(subscript
(identifier_content) identifier_content
(string_"device_keys") string_"device_keys"
)subscript
(identifier_device_keys) identifier_device_keys
)assignment
)expression_statement
)block
)if_statement
(if_statement
(identifier_one_time_keys) identifier_one_time_keys
(block
(expression_statement
(assignment
(subscript
(identifier_content) identifier_content
(string_"one_time_keys") string_"one_time_keys"
)subscript
(identifier_one_time_keys) identifier_one_time_keys
)assignment
)expression_statement
)block
)if_statement
(return_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__send) identifier__send
)attribute
(argument_list
(string_"POST") string_"POST"
(string_"/keys/upload") string_"/keys/upload"
(keyword_argument
(identifier_content) identifier_content
(identifier_content) identifier_content
)keyword_argument
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Publishes end-to-end encryption keys for the device.
Said device must be the one used when logging in.
Args:
device_keys (dict): Optional. Identity keys for the device. The required
keys are:
| user_id (str): The ID of the user the device belongs to. Must match
the user ID used when logging in.
| device_id (str): The ID of the device these keys belong to. Must match
the device ID used when logging in.
| algorithms (list<str>): The encryption algorithms supported by this
device.
| keys (dict): Public identity keys. Should be formatted as
<algorithm:device_id>: <key>.
| signatures (dict): Signatures for the device key object. Should be
formatted as <user_id>: {<algorithm:device_id>: <key>}
one_time_keys (dict): Optional. One-time public keys. Should be
formatted as <algorithm:key_id>: <key>, the key format being
determined by the algorithm.
|
(module
(function_definition
(function_name_form) function_name_form
(parameters
(identifier_cls) identifier_cls
(identifier_name) identifier_name
(default_parameter
(identifier_type_) identifier_type_
(attribute
(identifier_Type) identifier_Type
(identifier_String) identifier_String
)attribute
)default_parameter
(default_parameter
(identifier_description) identifier_description
(None) None
)default_parameter
(default_parameter
(identifier_required) identifier_required
(None) None
)default_parameter
(default_parameter
(identifier_default) identifier_default
(None) None
)default_parameter
(default_parameter
(identifier_minimum) identifier_minimum
(None) None
)default_parameter
(default_parameter
(identifier_maximum) identifier_maximum
(None) None
)default_parameter
(default_parameter
(identifier_enum) identifier_enum
(None) None
)default_parameter
(dictionary_splat_pattern
(identifier_options) identifier_options
)dictionary_splat_pattern
)parameters
(block
(if_statement
(boolean_operator
(boolean_operator
(comparison_operator
(identifier_minimum) identifier_minimum
(None) None
)comparison_operator
(comparison_operator
(identifier_maximum) identifier_maximum
(None) None
)comparison_operator
)boolean_operator
(comparison_operator
(identifier_minimum) identifier_minimum
(identifier_maximum) identifier_maximum
)comparison_operator
)boolean_operator
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(string_"Minimum must be less than or equal to the maximum.") string_"Minimum must be less than or equal to the maximum."
)argument_list
)call
)raise_statement
)block
)if_statement
(return_statement
(call
(identifier_cls) identifier_cls
(argument_list
(identifier_name) identifier_name
(attribute
(identifier_In) identifier_In
(identifier_Form) identifier_Form
)attribute
(identifier_type_) identifier_type_
(None) None
(identifier_description) identifier_description
(keyword_argument
(identifier_required) identifier_required
(identifier_required) identifier_required
)keyword_argument
(keyword_argument
(identifier_default) identifier_default
(identifier_default) identifier_default
)keyword_argument
(keyword_argument
(identifier_minimum) identifier_minimum
(identifier_minimum) identifier_minimum
)keyword_argument
(keyword_argument
(identifier_maximum) identifier_maximum
(identifier_maximum) identifier_maximum
)keyword_argument
(keyword_argument
(identifier_enum) identifier_enum
(identifier_enum) identifier_enum
)keyword_argument
(dictionary_splat
(identifier_options) identifier_options
)dictionary_splat
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Define form parameter.
|
(module
(function_definition
(function_name_answer_approval) function_name_answer_approval
(parameters
(identifier_self) identifier_self
(identifier_issue_id_or_key) identifier_issue_id_or_key
(identifier_approval_id) identifier_approval_id
(identifier_decision) identifier_decision
)parameters
(block
(expression_statement
(assignment
(identifier_url) identifier_url
(call
(attribute
(string_'rest/servicedeskapi/request/{0}/approval/{1}') string_'rest/servicedeskapi/request/{0}/approval/{1}'
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_issue_id_or_key) identifier_issue_id_or_key
(identifier_approval_id) identifier_approval_id
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_data) identifier_data
(dictionary
(pair
(string_'decision') string_'decision'
(identifier_decision) identifier_decision
)pair
)dictionary
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_post) identifier_post
)attribute
(argument_list
(identifier_url) identifier_url
(keyword_argument
(identifier_headers) identifier_headers
(attribute
(identifier_self) identifier_self
(identifier_experimental_headers) identifier_experimental_headers
)attribute
)keyword_argument
(keyword_argument
(identifier_data) identifier_data
(identifier_data) identifier_data
)keyword_argument
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Answer a pending approval
:param issue_id_or_key: str
:param approval_id: str
:param decision: str
:return:
|
(module
(function_definition
(function_name_html_to_text) function_name_html_to_text
(parameters
(identifier_html) identifier_html
(default_parameter
(identifier_base_url) identifier_base_url
(string_'') string_''
)default_parameter
(default_parameter
(identifier_bodywidth) identifier_bodywidth
(identifier_CONFIG_DEFAULT) identifier_CONFIG_DEFAULT
)default_parameter
)parameters
(block
(function_definition
(function_name__patched_handle_charref) function_name__patched_handle_charref
(parameters
(identifier_c) identifier_c
)parameters
(block
(expression_statement
(assignment
(identifier_self) identifier_self
(identifier_h) identifier_h
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_charref) identifier_charref
(call
(attribute
(identifier_self) identifier_self
(identifier_charref) identifier_charref
)attribute
(argument_list
(identifier_c) identifier_c
)argument_list
)call
)assignment
)expression_statement
(if_statement
(boolean_operator
(attribute
(identifier_self) identifier_self
(identifier_code) identifier_code
)attribute
(attribute
(identifier_self) identifier_self
(identifier_pre) identifier_pre
)attribute
)boolean_operator
(block
(expression_statement
(assignment
(identifier_charref) identifier_charref
(call
(attribute
(identifier_cgi) identifier_cgi
(identifier_escape) identifier_escape
)attribute
(argument_list
(identifier_charref) identifier_charref
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_o) identifier_o
)attribute
(argument_list
(identifier_charref) identifier_charref
(integer_1) integer_1
)argument_list
)call
)expression_statement
)block
)function_definition
(function_definition
(function_name__patched_handle_entityref) function_name__patched_handle_entityref
(parameters
(identifier_c) identifier_c
)parameters
(block
(expression_statement
(assignment
(identifier_self) identifier_self
(identifier_h) identifier_h
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_entityref) identifier_entityref
(call
(attribute
(identifier_self) identifier_self
(identifier_entityref) identifier_entityref
)attribute
(argument_list
(identifier_c) identifier_c
)argument_list
)call
)assignment
)expression_statement
(if_statement
(boolean_operator
(attribute
(identifier_self) identifier_self
(identifier_code) identifier_code
)attribute
(attribute
(identifier_self) identifier_self
(identifier_pre) identifier_pre
)attribute
)boolean_operator
(block
(expression_statement
(assignment
(identifier_entityref) identifier_entityref
(call
(attribute
(identifier_cgi) identifier_cgi
(identifier_escape) identifier_escape
)attribute
(argument_list
(identifier_entityref) identifier_entityref
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_o) identifier_o
)attribute
(argument_list
(identifier_entityref) identifier_entityref
(integer_1) integer_1
)argument_list
)call
)expression_statement
)block
)function_definition
(expression_statement
(assignment
(identifier_h) identifier_h
(call
(identifier_HTML2Text) identifier_HTML2Text
(argument_list
(keyword_argument
(identifier_baseurl) identifier_baseurl
(identifier_base_url) identifier_base_url
)keyword_argument
(keyword_argument
(identifier_bodywidth) identifier_bodywidth
(conditional_expression
(attribute
(identifier_config) identifier_config
(identifier_BODY_WIDTH) identifier_BODY_WIDTH
)attribute
(comparison_operator
(identifier_bodywidth) identifier_bodywidth
(identifier_CONFIG_DEFAULT) identifier_CONFIG_DEFAULT
)comparison_operator
(identifier_bodywidth) identifier_bodywidth
)conditional_expression
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_h) identifier_h
(identifier_handle_entityref) identifier_handle_entityref
)attribute
(identifier__patched_handle_entityref) identifier__patched_handle_entityref
)assignment
)expression_statement
(expression_statement
(assignment
(attribute
(identifier_h) identifier_h
(identifier_handle_charref) identifier_handle_charref
)attribute
(identifier__patched_handle_charref) identifier__patched_handle_charref
)assignment
)expression_statement
(return_statement
(call
(attribute
(call
(attribute
(identifier_h) identifier_h
(identifier_handle) identifier_handle
)attribute
(argument_list
(identifier_html) identifier_html
)argument_list
)call
(identifier_rstrip) identifier_rstrip
)attribute
(argument_list
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Convert a HTML mesasge to plain text.
|
(module
(function_definition
(function_name_importTTX) function_name_importTTX
(parameters
(identifier_self) identifier_self
)parameters
(block
(import_statement
(dotted_name
(identifier_os) identifier_os
)dotted_name
)import_statement
(import_statement
(dotted_name
(identifier_re) identifier_re
)dotted_name
)import_statement
(expression_statement
(assignment
(identifier_prefix) identifier_prefix
(string_"com.github.fonttools.ttx") string_"com.github.fonttools.ttx"
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_sfntVersionRE) identifier_sfntVersionRE
(call
(attribute
(identifier_re) identifier_re
(identifier_compile) identifier_compile
)attribute
(argument_list
(string_'(^<ttFont\s+)(sfntVersion=".*"\s+)(.*>$)') string_'(^<ttFont\s+)(sfntVersion=".*"\s+)(.*>$)'
(keyword_argument
(identifier_flags) identifier_flags
(attribute
(identifier_re) identifier_re
(identifier_MULTILINE) identifier_MULTILINE
)attribute
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(if_statement
(not_operator
(call
(identifier_hasattr) identifier_hasattr
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_ufo) identifier_ufo
)attribute
(string_"data") string_"data"
)argument_list
)call
)not_operator
(block
(return_statement
)return_statement
)block
)if_statement
(if_statement
(not_operator
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier_ufo) identifier_ufo
)attribute
(identifier_data) identifier_data
)attribute
(identifier_fileNames) identifier_fileNames
)attribute
)not_operator
(block
(return_statement
)return_statement
)block
)if_statement
(for_statement
(identifier_path) identifier_path
(attribute
(attribute
(attribute
(identifier_self) identifier_self
(identifier_ufo) identifier_ufo
)attribute
(identifier_data) identifier_data
)attribute
(identifier_fileNames) identifier_fileNames
)attribute
(block
(expression_statement
(assignment
(pattern_list
(identifier_foldername) identifier_foldername
(identifier_filename) identifier_filename
)pattern_list
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_split) identifier_split
)attribute
(argument_list
(identifier_path) identifier_path
)argument_list
)call
)assignment
)expression_statement
(if_statement
(parenthesized_expression
(boolean_operator
(comparison_operator
(identifier_foldername) identifier_foldername
(identifier_prefix) identifier_prefix
)comparison_operator
(call
(attribute
(identifier_filename) identifier_filename
(identifier_endswith) identifier_endswith
)attribute
(argument_list
(string_".ttx") string_".ttx"
)argument_list
)call
)boolean_operator
)parenthesized_expression
(block
(expression_statement
(assignment
(identifier_ttx) identifier_ttx
(call
(attribute
(subscript
(attribute
(attribute
(identifier_self) identifier_self
(identifier_ufo) identifier_ufo
)attribute
(identifier_data) identifier_data
)attribute
(identifier_path) identifier_path
)subscript
(identifier_decode) identifier_decode
)attribute
(argument_list
(string_'utf-8') string_'utf-8'
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_ttx) identifier_ttx
(call
(attribute
(identifier_sfntVersionRE) identifier_sfntVersionRE
(identifier_sub) identifier_sub
)attribute
(argument_list
(string_r'\1\3') string_r'\1\3'
(identifier_ttx) identifier_ttx
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_fp) identifier_fp
(call
(identifier_BytesIO) identifier_BytesIO
(argument_list
(call
(attribute
(identifier_ttx) identifier_ttx
(identifier_encode) identifier_encode
)attribute
(argument_list
(string_'utf-8') string_'utf-8'
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_otf) identifier_otf
)attribute
(identifier_importXML) identifier_importXML
)attribute
(argument_list
(identifier_fp) identifier_fp
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)for_statement
)block
)function_definition
)module
|
Merge TTX files from data directory "com.github.fonttools.ttx"
**This should not be called externally.** Subclasses
may override this method to handle the bounds creation
in a different way if desired.
|
(module
(function_definition
(function_name_FoldValue) function_name_FoldValue
(parameters
(identifier_self) identifier_self
(identifier_value) identifier_value
)parameters
(block
(if_statement
(boolean_operator
(comparison_operator
(identifier_value) identifier_value
(False) False
)comparison_operator
(comparison_operator
(attribute
(attribute
(identifier_self) identifier_self
(identifier__data_type_definition) identifier__data_type_definition
)attribute
(identifier_false_value) identifier_false_value
)attribute
(None) None
)comparison_operator
)boolean_operator
(block
(return_statement
(attribute
(attribute
(identifier_self) identifier_self
(identifier__data_type_definition) identifier__data_type_definition
)attribute
(identifier_false_value) identifier_false_value
)attribute
)return_statement
)block
)if_statement
(if_statement
(boolean_operator
(comparison_operator
(identifier_value) identifier_value
(True) True
)comparison_operator
(comparison_operator
(attribute
(attribute
(identifier_self) identifier_self
(identifier__data_type_definition) identifier__data_type_definition
)attribute
(identifier_true_value) identifier_true_value
)attribute
(None) None
)comparison_operator
)boolean_operator
(block
(return_statement
(attribute
(attribute
(identifier_self) identifier_self
(identifier__data_type_definition) identifier__data_type_definition
)attribute
(identifier_true_value) identifier_true_value
)attribute
)return_statement
)block
)if_statement
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(string_'No matching True and False values') string_'No matching True and False values'
)argument_list
)call
)raise_statement
)block
)function_definition
)module
|
Folds the data type into a value.
Args:
value (object): value.
Returns:
object: folded value.
Raises:
ValueError: if the data type definition cannot be folded into the value.
|
(module
(function_definition
(function_name_bounding_ellipses) function_name_bounding_ellipses
(parameters
(identifier_self) identifier_self
)parameters
(block
(if_statement
(parenthesized_expression
(attribute
(identifier_self) identifier_self
(identifier_linear_growth) identifier_linear_growth
)attribute
)parenthesized_expression
(block
(expression_statement
(assignment
(identifier_a1) identifier_a1
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier_sma) identifier_sma
)attribute
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier_astep) identifier_astep
)attribute
(float_2.) float_2.
)binary_operator
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_a2) identifier_a2
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier_sma) identifier_sma
)attribute
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier_astep) identifier_astep
)attribute
(float_2.) float_2.
)binary_operator
)binary_operator
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_a1) identifier_a1
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier_sma) identifier_sma
)attribute
(parenthesized_expression
(binary_operator
(float_1.) float_1.
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier_astep) identifier_astep
)attribute
(float_2.) float_2.
)binary_operator
)binary_operator
)parenthesized_expression
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_a2) identifier_a2
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier_sma) identifier_sma
)attribute
(parenthesized_expression
(binary_operator
(float_1.) float_1.
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier_astep) identifier_astep
)attribute
(float_2.) float_2.
)binary_operator
)binary_operator
)parenthesized_expression
)binary_operator
)assignment
)expression_statement
)block
)else_clause
)if_statement
(return_statement
(expression_list
(identifier_a1) identifier_a1
(identifier_a2) identifier_a2
)expression_list
)return_statement
)block
)function_definition
)module
|
Compute the semimajor axis of the two ellipses that bound the
annulus where integrations take place.
Returns
-------
sma1, sma2 : float
The smaller and larger values of semimajor axis length that
define the annulus bounding ellipses.
|
(module
(function_definition
(function_name_vectorize_utterance_ohe) function_name_vectorize_utterance_ohe
(parameters
(identifier_self) identifier_self
(identifier_utterance) identifier_utterance
)parameters
(block
(for_statement
(pattern_list
(identifier_i) identifier_i
(identifier_word) identifier_word
)pattern_list
(call
(identifier_enumerate) identifier_enumerate
(argument_list
(identifier_utterance) identifier_utterance
)argument_list
)call
(block
(if_statement
(not_operator
(comparison_operator
(identifier_word) identifier_word
(attribute
(identifier_self) identifier_self
(identifier_vocab_list) identifier_vocab_list
)attribute
)comparison_operator
)not_operator
(block
(expression_statement
(assignment
(subscript
(identifier_utterance) identifier_utterance
(identifier_i) identifier_i
)subscript
(string_'<unk>') string_'<unk>'
)assignment
)expression_statement
)block
)if_statement
)block
)for_statement
(expression_statement
(assignment
(identifier_ie_utterance) identifier_ie_utterance
(call
(attribute
(identifier_self) identifier_self
(identifier_swap_pad_and_zero) identifier_swap_pad_and_zero
)attribute
(argument_list
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_ie) identifier_ie
)attribute
(identifier_transform) identifier_transform
)attribute
(argument_list
(identifier_utterance) identifier_utterance
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_ohe_utterance) identifier_ohe_utterance
(call
(attribute
(identifier_np) identifier_np
(identifier_array) identifier_array
)attribute
(argument_list
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_ohe) identifier_ohe
)attribute
(identifier_transform) identifier_transform
)attribute
(argument_list
(call
(attribute
(identifier_ie_utterance) identifier_ie_utterance
(identifier_reshape) identifier_reshape
)attribute
(argument_list
(call
(identifier_len) identifier_len
(argument_list
(identifier_ie_utterance) identifier_ie_utterance
)argument_list
)call
(integer_1) integer_1
)argument_list
)call
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(return_statement
(identifier_ohe_utterance) identifier_ohe_utterance
)return_statement
)block
)function_definition
)module
|
Take in a tokenized utterance and transform it into a sequence of one-hot vectors
|
(module
(function_definition
(function_name_add_data) function_name_add_data
(parameters
(identifier_self) identifier_self
(identifier_rawdata) identifier_rawdata
)parameters
(block
(for_statement
(identifier_data) identifier_data
(identifier_rawdata) identifier_rawdata
(block
(try_statement
(block
(expression_statement
(assignment
(identifier_item) identifier_item
(subscript
(identifier_data) identifier_data
(integer_0) integer_0
)subscript
)assignment
)expression_statement
(if_statement
(comparison_operator
(subscript
(identifier_item) identifier_item
(integer_0) integer_0
)subscript
(integer_2) integer_2
)comparison_operator
(block
(continue_statement
)continue_statement
)block
)if_statement
(if_statement
(comparison_operator
(subscript
(identifier_item) identifier_item
(integer_0) integer_0
)subscript
(integer_0) integer_0
)comparison_operator
(block
(expression_statement
(call
(attribute
(identifier_warnings) identifier_warnings
(identifier_warn) identifier_warn
)attribute
(argument_list
(string_f"Unknown message type '{item[0]}'") string_f"Unknown message type '{item[0]}'"
(identifier_Warning) identifier_Warning
)argument_list
)call
)expression_statement
(continue_statement
)continue_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_item) identifier_item
(subscript
(identifier_item) identifier_item
(integer_1) integer_1
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_target) identifier_target
(call
(identifier_str) identifier_str
(argument_list
(subscript
(identifier_item) identifier_item
(integer_0) integer_0
)subscript
)argument_list
)call
)assignment
)expression_statement
(try_statement
(block
(expression_statement
(assignment
(identifier_data) identifier_data
(subscript
(identifier_item) identifier_item
(integer_1) integer_1
)subscript
)assignment
)expression_statement
)block
(except_clause
(identifier_IndexError) identifier_IndexError
(block
(expression_statement
(assignment
(identifier_data) identifier_data
(call
(identifier_dict) identifier_dict
(argument_list
)argument_list
)call
)assignment
)expression_statement
)block
)except_clause
)try_statement
(try_statement
(block
(expression_statement
(assignment
(identifier_method) identifier_method
(call
(identifier_getattr) identifier_getattr
(argument_list
(identifier_self) identifier_self
(binary_operator
(attribute
(identifier_self) identifier_self
(identifier___head) identifier___head
)attribute
(identifier_target) identifier_target
)binary_operator
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(identifier_method) identifier_method
(argument_list
(identifier_data) identifier_data
)argument_list
)call
)expression_statement
)block
(except_clause
(identifier_AttributeError) identifier_AttributeError
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__handle_unhandled) identifier__handle_unhandled
)attribute
(argument_list
(identifier_target) identifier_target
(identifier_data) identifier_data
)argument_list
)call
)expression_statement
)block
)except_clause
)try_statement
)block
(except_clause
(identifier_IndexError) identifier_IndexError
(block
(expression_statement
(call
(attribute
(identifier_LOGGER) identifier_LOGGER
(identifier_warning) identifier_warning
)attribute
(argument_list
(string_"Wrongly constructed message received: %r") string_"Wrongly constructed message received: %r"
(identifier_data) identifier_data
)argument_list
)call
)expression_statement
)block
)except_clause
)try_statement
)block
)for_statement
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_conn) identifier_conn
)attribute
(identifier_process_queues) identifier_process_queues
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)function_definition
)module
|
Add data to given room's state
|
(module
(function_definition
(function_name_get_high_water_mark) function_name_get_high_water_mark
(parameters
(identifier_self) identifier_self
(identifier_mark_type) identifier_mark_type
(default_parameter
(identifier_obstory_name) identifier_obstory_name
(None) None
)default_parameter
)parameters
(block
(if_statement
(comparison_operator
(identifier_obstory_name) identifier_obstory_name
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(identifier_obstory_name) identifier_obstory_name
(attribute
(identifier_self) identifier_self
(identifier_obstory_name) identifier_obstory_name
)attribute
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_obstory) identifier_obstory
(call
(attribute
(identifier_self) identifier_self
(identifier_get_obstory_from_name) identifier_get_obstory_from_name
)attribute
(argument_list
(identifier_obstory_name) identifier_obstory_name
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_key_id) identifier_key_id
(call
(attribute
(identifier_self) identifier_self
(identifier_get_hwm_key_id) identifier_get_hwm_key_id
)attribute
(argument_list
(identifier_mark_type) identifier_mark_type
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_con) identifier_con
)attribute
(identifier_execute) identifier_execute
)attribute
(argument_list
(string_'SELECT time FROM archive_highWaterMarks WHERE markType=%s AND observatoryId=%s') string_'SELECT time FROM archive_highWaterMarks WHERE markType=%s AND observatoryId=%s'
(tuple
(identifier_key_id) identifier_key_id
(subscript
(identifier_obstory) identifier_obstory
(string_'uid') string_'uid'
)subscript
)tuple
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_results) identifier_results
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_con) identifier_con
)attribute
(identifier_fetchall) identifier_fetchall
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_results) identifier_results
)argument_list
)call
(integer_0) integer_0
)comparison_operator
(block
(return_statement
(subscript
(subscript
(identifier_results) identifier_results
(integer_0) integer_0
)subscript
(string_'time') string_'time'
)subscript
)return_statement
)block
)if_statement
(return_statement
(None) None
)return_statement
)block
)function_definition
)module
|
Retrieves the high water mark for a given obstory, defaulting to the current installation ID
:param string mark_type:
The type of high water mark to set
:param string obstory_name:
The obstory ID to check for, or the default installation ID if not specified
:return:
A UTC datetime for the high water mark, or None if none was found.
|
(module
(function_definition
(function_name_active_serving_watcher) function_name_active_serving_watcher
(parameters
(identifier_backend) identifier_backend
(identifier_kitchen) identifier_kitchen
(identifier_period) identifier_period
)parameters
(block
(expression_statement
(assignment
(pattern_list
(identifier_err_str) identifier_err_str
(identifier_use_kitchen) identifier_use_kitchen
)pattern_list
(call
(attribute
(identifier_Backend) identifier_Backend
(identifier_get_kitchen_from_user) identifier_get_kitchen_from_user
)attribute
(argument_list
(identifier_kitchen) identifier_kitchen
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_use_kitchen) identifier_use_kitchen
(None) None
)comparison_operator
(block
(raise_statement
(call
(attribute
(identifier_click) identifier_click
(identifier_ClickException) identifier_ClickException
)attribute
(argument_list
(identifier_err_str) identifier_err_str
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(call
(attribute
(identifier_click) identifier_click
(identifier_secho) identifier_secho
)attribute
(argument_list
(binary_operator
(string_'%s - Watching Active OrderRun Changes in Kitchen %s') string_'%s - Watching Active OrderRun Changes in Kitchen %s'
(tuple
(call
(identifier_get_datetime) identifier_get_datetime
(argument_list
)argument_list
)call
(identifier_use_kitchen) identifier_use_kitchen
)tuple
)binary_operator
(keyword_argument
(identifier_fg) identifier_fg
(string_'green') string_'green'
)keyword_argument
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_DKCloudCommandRunner) identifier_DKCloudCommandRunner
(identifier_watch_active_servings) identifier_watch_active_servings
)attribute
(argument_list
(attribute
(identifier_backend) identifier_backend
(identifier_dki) identifier_dki
)attribute
(identifier_use_kitchen) identifier_use_kitchen
(identifier_period) identifier_period
)argument_list
)call
)expression_statement
(while_statement
(True) True
(block
(try_statement
(block
(expression_statement
(call
(attribute
(identifier_DKCloudCommandRunner) identifier_DKCloudCommandRunner
(identifier_join_active_serving_watcher_thread_join) identifier_join_active_serving_watcher_thread_join
)attribute
(argument_list
)argument_list
)call
)expression_statement
(if_statement
(not_operator
(call
(attribute
(identifier_DKCloudCommandRunner) identifier_DKCloudCommandRunner
(identifier_watcher_running) identifier_watcher_running
)attribute
(argument_list
)argument_list
)call
)not_operator
(block
(break_statement
)break_statement
)block
)if_statement
)block
(except_clause
(identifier_KeyboardInterrupt) identifier_KeyboardInterrupt
(block
(print_statement
(string_'KeyboardInterrupt') string_'KeyboardInterrupt'
)print_statement
(expression_statement
(call
(identifier_exit_gracefully) identifier_exit_gracefully
(argument_list
(None) None
(None) None
)argument_list
)call
)expression_statement
)block
)except_clause
)try_statement
)block
)while_statement
(expression_statement
(call
(identifier_exit) identifier_exit
(argument_list
(integer_0) integer_0
)argument_list
)call
)expression_statement
)block
)function_definition
)module
|
Watches all cooking Recipes in a Kitchen
Provide the kitchen name as an argument or be in a Kitchen folder.
|
(module
(function_definition
(function_name_register_phonon_task) function_name_register_phonon_task
(parameters
(identifier_self) identifier_self
(list_splat_pattern
(identifier_args) identifier_args
)list_splat_pattern
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(expression_statement
(assignment
(subscript
(identifier_kwargs) identifier_kwargs
(string_"task_class") string_"task_class"
)subscript
(identifier_PhononTask) identifier_PhononTask
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_register_task) identifier_register_task
)attribute
(argument_list
(list_splat
(identifier_args) identifier_args
)list_splat
(dictionary_splat
(identifier_kwargs) identifier_kwargs
)dictionary_splat
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Register a phonon task.
|
(module
(function_definition
(function_name_set_blocking) function_name_set_blocking
(parameters
(identifier_fd) identifier_fd
(default_parameter
(identifier_blocking) identifier_blocking
(True) True
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_old_flag) identifier_old_flag
(call
(attribute
(identifier_fcntl) identifier_fcntl
(identifier_fcntl) identifier_fcntl
)attribute
(argument_list
(identifier_fd) identifier_fd
(attribute
(identifier_fcntl) identifier_fcntl
(identifier_F_GETFL) identifier_F_GETFL
)attribute
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_blocking) identifier_blocking
(block
(expression_statement
(assignment
(identifier_new_flag) identifier_new_flag
(binary_operator
(identifier_old_flag) identifier_old_flag
(unary_operator
(attribute
(identifier_os) identifier_os
(identifier_O_NONBLOCK) identifier_O_NONBLOCK
)attribute
)unary_operator
)binary_operator
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_new_flag) identifier_new_flag
(binary_operator
(identifier_old_flag) identifier_old_flag
(attribute
(identifier_os) identifier_os
(identifier_O_NONBLOCK) identifier_O_NONBLOCK
)attribute
)binary_operator
)assignment
)expression_statement
)block
)else_clause
)if_statement
(expression_statement
(call
(attribute
(identifier_fcntl) identifier_fcntl
(identifier_fcntl) identifier_fcntl
)attribute
(argument_list
(identifier_fd) identifier_fd
(attribute
(identifier_fcntl) identifier_fcntl
(identifier_F_SETFL) identifier_F_SETFL
)attribute
(identifier_new_flag) identifier_new_flag
)argument_list
)call
)expression_statement
(return_statement
(not_operator
(call
(identifier_bool) identifier_bool
(argument_list
(binary_operator
(identifier_old_flag) identifier_old_flag
(attribute
(identifier_os) identifier_os
(identifier_O_NONBLOCK) identifier_O_NONBLOCK
)attribute
)binary_operator
)argument_list
)call
)not_operator
)return_statement
)block
)function_definition
)module
|
Set the given file-descriptor blocking or non-blocking.
Returns the original blocking status.
|
(module
(function_definition
(function_name_posttrans_hook) function_name_posttrans_hook
(parameters
(identifier_conduit) identifier_conduit
)parameters
(block
(if_statement
(comparison_operator
(string_'SALT_RUNNING') string_'SALT_RUNNING'
(attribute
(identifier_os) identifier_os
(identifier_environ) identifier_environ
)attribute
)comparison_operator
(block
(with_statement
(with_clause
(with_item
(as_pattern
(call
(identifier_open) identifier_open
(argument_list
(identifier_CK_PATH) identifier_CK_PATH
(string_'w') string_'w'
)argument_list
)call
(as_pattern_target
(identifier_ck_fh) identifier_ck_fh
)as_pattern_target
)as_pattern
)with_item
)with_clause
(block
(expression_statement
(call
(attribute
(identifier_ck_fh) identifier_ck_fh
(identifier_write) identifier_write
)attribute
(argument_list
(call
(attribute
(string_'{chksum} {mtime}\n') string_'{chksum} {mtime}\n'
(identifier_format) identifier_format
)attribute
(argument_list
(keyword_argument
(identifier_chksum) identifier_chksum
(call
(identifier__get_checksum) identifier__get_checksum
(argument_list
)argument_list
)call
)keyword_argument
(keyword_argument
(identifier_mtime) identifier_mtime
(call
(identifier__get_mtime) identifier__get_mtime
(argument_list
)argument_list
)call
)keyword_argument
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)with_statement
)block
)if_statement
)block
)function_definition
)module
|
Hook after the package installation transaction.
:param conduit:
:return:
|
(module
(function_definition
(function_name_create_magic_packet) function_name_create_magic_packet
(parameters
(identifier_macaddress) identifier_macaddress
)parameters
(block
(if_statement
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_macaddress) identifier_macaddress
)argument_list
)call
(integer_12) integer_12
)comparison_operator
(block
(pass_statement
)pass_statement
)block
(elif_clause
(comparison_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_macaddress) identifier_macaddress
)argument_list
)call
(integer_17) integer_17
)comparison_operator
(block
(expression_statement
(assignment
(identifier_sep) identifier_sep
(subscript
(identifier_macaddress) identifier_macaddress
(integer_2) integer_2
)subscript
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_macaddress) identifier_macaddress
(call
(attribute
(identifier_macaddress) identifier_macaddress
(identifier_replace) identifier_replace
)attribute
(argument_list
(identifier_sep) identifier_sep
(string_'') string_''
)argument_list
)call
)assignment
)expression_statement
)block
)elif_clause
(else_clause
(block
(raise_statement
(call
(identifier_ValueError) identifier_ValueError
(argument_list
(string_'Incorrect MAC address format') string_'Incorrect MAC address format'
)argument_list
)call
)raise_statement
)block
)else_clause
)if_statement
(expression_statement
(assignment
(identifier_data) identifier_data
(binary_operator
(string_b'FFFFFFFFFFFF') string_b'FFFFFFFFFFFF'
(call
(attribute
(parenthesized_expression
(binary_operator
(identifier_macaddress) identifier_macaddress
(integer_16) integer_16
)binary_operator
)parenthesized_expression
(identifier_encode) identifier_encode
)attribute
(argument_list
)argument_list
)call
)binary_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_send_data) identifier_send_data
(string_b'') string_b''
)assignment
)expression_statement
(for_statement
(identifier_i) identifier_i
(call
(identifier_range) identifier_range
(argument_list
(integer_0) integer_0
(call
(identifier_len) identifier_len
(argument_list
(identifier_data) identifier_data
)argument_list
)call
(integer_2) integer_2
)argument_list
)call
(block
(expression_statement
(augmented_assignment
(identifier_send_data) identifier_send_data
(call
(attribute
(identifier_struct) identifier_struct
(identifier_pack) identifier_pack
)attribute
(argument_list
(string_b'B') string_b'B'
(call
(identifier_int) identifier_int
(argument_list
(subscript
(identifier_data) identifier_data
(slice
(identifier_i) identifier_i
(colon) colon
(binary_operator
(identifier_i) identifier_i
(integer_2) integer_2
)binary_operator
)slice
)subscript
(integer_16) integer_16
)argument_list
)call
)argument_list
)call
)augmented_assignment
)expression_statement
)block
)for_statement
(return_statement
(identifier_send_data) identifier_send_data
)return_statement
)block
)function_definition
)module
|
Create a magic packet.
A magic packet is a packet that can be used with the for wake on lan
protocol to wake up a computer. The packet is constructed from the
mac address given as a parameter.
Args:
macaddress (str): the mac address that should be parsed into a
magic packet.
|
(module
(function_definition
(function_name_parse_chains) function_name_parse_chains
(parameters
(identifier_data) identifier_data
)parameters
(block
(expression_statement
(assignment
(identifier_chains) identifier_chains
(call
(identifier_odict) identifier_odict
(argument_list
)argument_list
)call
)assignment
)expression_statement
(for_statement
(identifier_line) identifier_line
(call
(attribute
(identifier_data) identifier_data
(identifier_splitlines) identifier_splitlines
)attribute
(argument_list
(True) True
)argument_list
)call
(block
(expression_statement
(assignment
(identifier_m) identifier_m
(call
(attribute
(identifier_re_chain) identifier_re_chain
(identifier_match) identifier_match
)attribute
(argument_list
(identifier_line) identifier_line
)argument_list
)call
)assignment
)expression_statement
(if_statement
(identifier_m) identifier_m
(block
(expression_statement
(assignment
(identifier_policy) identifier_policy
(None) None
)assignment
)expression_statement
(if_statement
(comparison_operator
(call
(attribute
(identifier_m) identifier_m
(identifier_group) identifier_group
)attribute
(argument_list
(integer_2) integer_2
)argument_list
)call
(string_'-') string_'-'
)comparison_operator
(block
(expression_statement
(assignment
(identifier_policy) identifier_policy
(call
(attribute
(identifier_m) identifier_m
(identifier_group) identifier_group
)attribute
(argument_list
(integer_2) integer_2
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(subscript
(identifier_chains) identifier_chains
(call
(attribute
(identifier_m) identifier_m
(identifier_group) identifier_group
)attribute
(argument_list
(integer_1) integer_1
)argument_list
)call
)subscript
(dictionary
(pair
(string_'policy') string_'policy'
(identifier_policy) identifier_policy
)pair
(pair
(string_'packets') string_'packets'
(call
(identifier_int) identifier_int
(argument_list
(call
(attribute
(identifier_m) identifier_m
(identifier_group) identifier_group
)attribute
(argument_list
(integer_3) integer_3
)argument_list
)call
)argument_list
)call
)pair
(pair
(string_'bytes') string_'bytes'
(call
(identifier_int) identifier_int
(argument_list
(call
(attribute
(identifier_m) identifier_m
(identifier_group) identifier_group
)attribute
(argument_list
(integer_4) integer_4
)argument_list
)call
)argument_list
)call
)pair
)dictionary
)assignment
)expression_statement
)block
)if_statement
)block
)for_statement
(return_statement
(identifier_chains) identifier_chains
)return_statement
)block
)function_definition
)module
|
Parse the chain definitions.
|
(module
(function_definition
(function_name_stress) function_name_stress
(parameters
(identifier_ref_cds) identifier_ref_cds
(identifier_est_cds) identifier_est_cds
)parameters
(block
(expression_statement
(assignment
(identifier_ref_dists) identifier_ref_dists
(call
(identifier_pdist) identifier_pdist
(argument_list
(identifier_ref_cds) identifier_ref_cds
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_est_dists) identifier_est_dists
(call
(identifier_pdist) identifier_pdist
(argument_list
(identifier_est_cds) identifier_est_cds
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_np) identifier_np
(identifier_sqrt) identifier_sqrt
)attribute
(argument_list
(binary_operator
(call
(attribute
(parenthesized_expression
(binary_operator
(parenthesized_expression
(binary_operator
(identifier_ref_dists) identifier_ref_dists
(identifier_est_dists) identifier_est_dists
)binary_operator
)parenthesized_expression
(integer_2) integer_2
)binary_operator
)parenthesized_expression
(identifier_sum) identifier_sum
)attribute
(argument_list
)argument_list
)call
(call
(attribute
(parenthesized_expression
(binary_operator
(identifier_ref_dists) identifier_ref_dists
(integer_2) integer_2
)binary_operator
)parenthesized_expression
(identifier_sum) identifier_sum
)attribute
(argument_list
)argument_list
)call
)binary_operator
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Kruskal's stress
|
(module
(function_definition
(function_name_response) function_name_response
(parameters
(identifier_self) identifier_self
(identifier_component_id) identifier_component_id
(default_parameter
(identifier_component) identifier_component
(None) None
)default_parameter
(dictionary_splat_pattern
(identifier_kwargs) identifier_kwargs
)dictionary_splat_pattern
)parameters
(block
(if_statement
(comparison_operator
(identifier_component_id) identifier_component_id
(attribute
(identifier_self) identifier_self
(identifier__responses) identifier__responses
)attribute
)comparison_operator
(block
(raise_statement
(call
(identifier_DuplicateComponentNameError) identifier_DuplicateComponentNameError
(argument_list
(call
(attribute
(string_'Another response with name "{}" is already registered.') string_'Another response with name "{}" is already registered.'
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_component_id) identifier_component_id
)argument_list
)call
)argument_list
)call
)raise_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_component) identifier_component
(boolean_operator
(identifier_component) identifier_component
(dictionary
)dictionary
)boolean_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_ret) identifier_ret
(call
(attribute
(identifier_component) identifier_component
(identifier_copy) identifier_copy
)attribute
(argument_list
)argument_list
)call
)assignment
)expression_statement
(for_statement
(identifier_plugin) identifier_plugin
(attribute
(identifier_self) identifier_self
(identifier__plugins) identifier__plugins
)attribute
(block
(try_statement
(block
(expression_statement
(call
(attribute
(identifier_ret) identifier_ret
(identifier_update) identifier_update
)attribute
(argument_list
(boolean_operator
(call
(attribute
(identifier_plugin) identifier_plugin
(identifier_response_helper) identifier_response_helper
)attribute
(argument_list
(identifier_component) identifier_component
(dictionary_splat
(identifier_kwargs) identifier_kwargs
)dictionary_splat
)argument_list
)call
(dictionary
)dictionary
)boolean_operator
)argument_list
)call
)expression_statement
)block
(except_clause
(identifier_PluginMethodNotImplementedError) identifier_PluginMethodNotImplementedError
(block
(continue_statement
)continue_statement
)block
)except_clause
)try_statement
)block
)for_statement
(expression_statement
(assignment
(subscript
(attribute
(identifier_self) identifier_self
(identifier__responses) identifier__responses
)attribute
(identifier_component_id) identifier_component_id
)subscript
(identifier_ret) identifier_ret
)assignment
)expression_statement
(return_statement
(identifier_self) identifier_self
)return_statement
)block
)function_definition
)module
|
Add a response which can be referenced.
:param str component_id: ref_id to use as reference
:param dict component: response fields
:param dict kwargs: plugin-specific arguments
|
(module
(function_definition
(function_name_DomainFactory) function_name_DomainFactory
(parameters
(identifier_domain_name) identifier_domain_name
(identifier_cmds) identifier_cmds
)parameters
(block
(expression_statement
(assignment
(identifier_klass) identifier_klass
(call
(identifier_type) identifier_type
(argument_list
(call
(identifier_str) identifier_str
(argument_list
(identifier_domain_name) identifier_domain_name
)argument_list
)call
(tuple
(identifier_BaseDomain) identifier_BaseDomain
)tuple
(dictionary
)dictionary
)argument_list
)call
)assignment
)expression_statement
(for_statement
(identifier_c) identifier_c
(identifier_cmds) identifier_cmds
(block
(expression_statement
(assignment
(identifier_command) identifier_command
(call
(identifier_get_command) identifier_get_command
(argument_list
(identifier_domain_name) identifier_domain_name
(subscript
(identifier_c) identifier_c
(string_'name') string_'name'
)subscript
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(identifier_setattr) identifier_setattr
(argument_list
(identifier_klass) identifier_klass
(subscript
(identifier_c) identifier_c
(string_'name') string_'name'
)subscript
(call
(identifier_classmethod) identifier_classmethod
(argument_list
(identifier_command) identifier_command
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)for_statement
(return_statement
(identifier_klass) identifier_klass
)return_statement
)block
)function_definition
)module
|
Dynamically create Domain class and set it's methods.
|
(module
(function_definition
(function_name_zpopmax) function_name_zpopmax
(parameters
(identifier_self) identifier_self
(identifier_name) identifier_name
(default_parameter
(identifier_count) identifier_count
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_args) identifier_args
(boolean_operator
(boolean_operator
(parenthesized_expression
(comparison_operator
(identifier_count) identifier_count
(None) None
)comparison_operator
)parenthesized_expression
(list
(identifier_count) identifier_count
)list
)boolean_operator
(list
)list
)boolean_operator
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_options) identifier_options
(dictionary
(pair
(string_'withscores') string_'withscores'
(True) True
)pair
)dictionary
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_self) identifier_self
(identifier_execute_command) identifier_execute_command
)attribute
(argument_list
(string_'ZPOPMAX') string_'ZPOPMAX'
(identifier_name) identifier_name
(list_splat
(identifier_args) identifier_args
)list_splat
(dictionary_splat
(identifier_options) identifier_options
)dictionary_splat
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Remove and return up to ``count`` members with the highest scores
from the sorted set ``name``.
|
(module
(function_definition
(function_name_restart) function_name_restart
(parameters
(identifier_request) identifier_request
)parameters
(block
(function_definition
(function_name_wait_and_restart) function_name_wait_and_restart
(parameters
)parameters
(block
(expression_statement
(call
(attribute
(identifier_log) identifier_log
(identifier_info) identifier_info
)attribute
(argument_list
(string_'Restarting server') string_'Restarting server'
)argument_list
)call
)expression_statement
(expression_statement
(call
(identifier_sleep) identifier_sleep
(argument_list
(integer_1) integer_1
)argument_list
)call
)expression_statement
(expression_statement
(call
(attribute
(identifier_os) identifier_os
(identifier_system) identifier_system
)attribute
(argument_list
(string_'kill 1') string_'kill 1'
)argument_list
)call
)expression_statement
)block
)function_definition
(expression_statement
(call
(attribute
(call
(identifier_Thread) identifier_Thread
(argument_list
(keyword_argument
(identifier_target) identifier_target
(identifier_wait_and_restart) identifier_wait_and_restart
)keyword_argument
)argument_list
)call
(identifier_start) identifier_start
)attribute
(argument_list
)argument_list
)call
)expression_statement
(return_statement
(call
(attribute
(identifier_web) identifier_web
(identifier_json_response) identifier_json_response
)attribute
(argument_list
(dictionary
(pair
(string_"message") string_"message"
(string_"restarting") string_"restarting"
)pair
)dictionary
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Returns OK, then waits approximately 1 second and restarts container
|
(module
(function_definition
(function_name_com_google_fonts_check_glyf_unused_data) function_name_com_google_fonts_check_glyf_unused_data
(parameters
(identifier_ttFont) identifier_ttFont
)parameters
(block
(try_statement
(block
(expression_statement
(assignment
(identifier_expected_glyphs) identifier_expected_glyphs
(call
(identifier_len) identifier_len
(argument_list
(call
(attribute
(identifier_ttFont) identifier_ttFont
(identifier_getGlyphOrder) identifier_getGlyphOrder
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_actual_glyphs) identifier_actual_glyphs
(call
(identifier_len) identifier_len
(argument_list
(attribute
(subscript
(identifier_ttFont) identifier_ttFont
(string_'glyf') string_'glyf'
)subscript
(identifier_glyphs) identifier_glyphs
)attribute
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_diff) identifier_diff
(binary_operator
(identifier_actual_glyphs) identifier_actual_glyphs
(identifier_expected_glyphs) identifier_expected_glyphs
)binary_operator
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_diff) identifier_diff
(integer_0) integer_0
)comparison_operator
(block
(expression_statement
(yield
(expression_list
(identifier_FAIL) identifier_FAIL
(call
(identifier_Message) identifier_Message
(argument_list
(string_"unreachable-data") string_"unreachable-data"
(call
(attribute
(parenthesized_expression
(concatenated_string
(string_"Glyf table has unreachable data at the end of ") string_"Glyf table has unreachable data at the end of "
(string_" the table. Expected glyf table length {}") string_" the table. Expected glyf table length {}"
(string_" (from loca table), got length") string_" (from loca table), got length"
(string_" {} (difference: {})") string_" {} (difference: {})"
)concatenated_string
)parenthesized_expression
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_expected_glyphs) identifier_expected_glyphs
(identifier_actual_glyphs) identifier_actual_glyphs
(identifier_diff) identifier_diff
)argument_list
)call
)argument_list
)call
)expression_list
)yield
)expression_statement
)block
(elif_clause
(not_operator
(identifier_diff) identifier_diff
)not_operator
(block
(expression_statement
(yield
(expression_list
(identifier_PASS) identifier_PASS
(string_"There is no unused data at the end of the glyf table.") string_"There is no unused data at the end of the glyf table."
)expression_list
)yield
)expression_statement
)block
)elif_clause
(else_clause
(block
(raise_statement
(call
(identifier_Exception) identifier_Exception
(argument_list
(string_"Bug: fontTools did not raise an expected exception.") string_"Bug: fontTools did not raise an expected exception."
)argument_list
)call
)raise_statement
)block
)else_clause
)if_statement
)block
(except_clause
(as_pattern
(attribute
(attribute
(identifier_fontTools) identifier_fontTools
(identifier_ttLib) identifier_ttLib
)attribute
(identifier_TTLibError) identifier_TTLibError
)attribute
(as_pattern_target
(identifier_error) identifier_error
)as_pattern_target
)as_pattern
(block
(if_statement
(comparison_operator
(string_"not enough 'glyf' table data") string_"not enough 'glyf' table data"
(call
(identifier_format) identifier_format
(argument_list
(identifier_error) identifier_error
)argument_list
)call
)comparison_operator
(block
(expression_statement
(yield
(expression_list
(identifier_FAIL) identifier_FAIL
(call
(identifier_Message) identifier_Message
(argument_list
(string_"missing-data") string_"missing-data"
(call
(attribute
(parenthesized_expression
(concatenated_string
(string_"Loca table references data beyond") string_"Loca table references data beyond"
(string_" the end of the glyf table.") string_" the end of the glyf table."
(string_" Expected glyf table length {}") string_" Expected glyf table length {}"
(string_" (from loca table).") string_" (from loca table)."
)concatenated_string
)parenthesized_expression
(identifier_format) identifier_format
)attribute
(argument_list
(identifier_expected_glyphs) identifier_expected_glyphs
)argument_list
)call
)argument_list
)call
)expression_list
)yield
)expression_statement
)block
(else_clause
(block
(raise_statement
(call
(identifier_Exception) identifier_Exception
(argument_list
(string_"Bug: Unexpected fontTools exception.") string_"Bug: Unexpected fontTools exception."
)argument_list
)call
)raise_statement
)block
)else_clause
)if_statement
)block
)except_clause
)try_statement
)block
)function_definition
)module
|
Is there any unused data at the end of the glyf table?
|
(module
(function_definition
(function_name_create_with_dst_resource_provisioning) function_name_create_with_dst_resource_provisioning
(parameters
(identifier_cls) identifier_cls
(identifier_cli) identifier_cli
(identifier_src_resource_id) identifier_src_resource_id
(identifier_dst_resource_config) identifier_dst_resource_config
(identifier_max_time_out_of_sync) identifier_max_time_out_of_sync
(default_parameter
(identifier_name) identifier_name
(None) None
)default_parameter
(default_parameter
(identifier_remote_system) identifier_remote_system
(None) None
)default_parameter
(default_parameter
(identifier_src_spa_interface) identifier_src_spa_interface
(None) None
)default_parameter
(default_parameter
(identifier_src_spb_interface) identifier_src_spb_interface
(None) None
)default_parameter
(default_parameter
(identifier_dst_spa_interface) identifier_dst_spa_interface
(None) None
)default_parameter
(default_parameter
(identifier_dst_spb_interface) identifier_dst_spb_interface
(None) None
)default_parameter
(default_parameter
(identifier_dst_resource_element_configs) identifier_dst_resource_element_configs
(None) None
)default_parameter
(default_parameter
(identifier_auto_initiate) identifier_auto_initiate
(None) None
)default_parameter
(default_parameter
(identifier_hourly_snap_replication_policy) identifier_hourly_snap_replication_policy
(None) None
)default_parameter
(default_parameter
(identifier_daily_snap_replication_policy) identifier_daily_snap_replication_policy
(None) None
)default_parameter
(default_parameter
(identifier_replicate_existing_snaps) identifier_replicate_existing_snaps
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_req_body) identifier_req_body
(call
(attribute
(identifier_cli) identifier_cli
(identifier_make_body) identifier_make_body
)attribute
(argument_list
(keyword_argument
(identifier_srcResourceId) identifier_srcResourceId
(identifier_src_resource_id) identifier_src_resource_id
)keyword_argument
(keyword_argument
(identifier_dstResourceConfig) identifier_dstResourceConfig
(identifier_dst_resource_config) identifier_dst_resource_config
)keyword_argument
(keyword_argument
(identifier_maxTimeOutOfSync) identifier_maxTimeOutOfSync
(identifier_max_time_out_of_sync) identifier_max_time_out_of_sync
)keyword_argument
(keyword_argument
(identifier_name) identifier_name
(identifier_name) identifier_name
)keyword_argument
(keyword_argument
(identifier_remoteSystem) identifier_remoteSystem
(identifier_remote_system) identifier_remote_system
)keyword_argument
(keyword_argument
(identifier_srcSPAInterface) identifier_srcSPAInterface
(identifier_src_spa_interface) identifier_src_spa_interface
)keyword_argument
(keyword_argument
(identifier_srcSPBInterface) identifier_srcSPBInterface
(identifier_src_spb_interface) identifier_src_spb_interface
)keyword_argument
(keyword_argument
(identifier_dstSPAInterface) identifier_dstSPAInterface
(identifier_dst_spa_interface) identifier_dst_spa_interface
)keyword_argument
(keyword_argument
(identifier_dstSPBInterface) identifier_dstSPBInterface
(identifier_dst_spb_interface) identifier_dst_spb_interface
)keyword_argument
(keyword_argument
(identifier_dstResourceElementConfigs) identifier_dstResourceElementConfigs
(identifier_dst_resource_element_configs) identifier_dst_resource_element_configs
)keyword_argument
(keyword_argument
(identifier_autoInitiate) identifier_autoInitiate
(identifier_auto_initiate) identifier_auto_initiate
)keyword_argument
(keyword_argument
(identifier_hourlySnapReplicationPolicy) identifier_hourlySnapReplicationPolicy
(identifier_hourly_snap_replication_policy) identifier_hourly_snap_replication_policy
)keyword_argument
(keyword_argument
(identifier_dailySnapReplicationPolicy) identifier_dailySnapReplicationPolicy
(identifier_daily_snap_replication_policy) identifier_daily_snap_replication_policy
)keyword_argument
(keyword_argument
(identifier_replicateExistingSnaps) identifier_replicateExistingSnaps
(identifier_replicate_existing_snaps) identifier_replicate_existing_snaps
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_resp) identifier_resp
(call
(attribute
(identifier_cli) identifier_cli
(identifier_type_action) identifier_type_action
)attribute
(argument_list
(attribute
(call
(identifier_cls) identifier_cls
(argument_list
)argument_list
)call
(identifier_resource_class) identifier_resource_class
)attribute
(string_'createReplicationSessionWDestResProvisioning') string_'createReplicationSessionWDestResProvisioning'
(dictionary_splat
(identifier_req_body) identifier_req_body
)dictionary_splat
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_resp) identifier_resp
(identifier_raise_if_err) identifier_raise_if_err
)attribute
(argument_list
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_session_resp) identifier_session_resp
(subscript
(attribute
(identifier_resp) identifier_resp
(identifier_first_content) identifier_first_content
)attribute
(string_'id') string_'id'
)subscript
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_cls) identifier_cls
(identifier_get) identifier_get
)attribute
(argument_list
(identifier_cli) identifier_cli
(keyword_argument
(identifier__id) identifier__id
(subscript
(identifier_session_resp) identifier_session_resp
(string_'id') string_'id'
)subscript
)keyword_argument
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Create a replication session along with destination resource
provisioning.
:param cli: the rest cli.
:param src_resource_id: id of the replication source, could be
lun/fs/cg.
:param dst_resource_config: `UnityResourceConfig` object. The user
chosen config for destination resource provisioning. `pool_id` and
`size` are required for creation.
:param max_time_out_of_sync: maximum time to wait before syncing the
source and destination. Value `-1` means the automatic sync is not
performed. `0` means it is a sync replication.
:param name: name of the replication.
:param remote_system: `UnityRemoteSystem` object. The remote system to
which the replication is being configured. When not specified, it
defaults to local system.
:param src_spa_interface: `UnityRemoteInterface` object. The
replication interface for source SPA.
:param src_spb_interface: `UnityRemoteInterface` object. The
replication interface for source SPB.
:param dst_spa_interface: `UnityRemoteInterface` object. The
replication interface for destination SPA.
:param dst_spb_interface: `UnityRemoteInterface` object. The
replication interface for destination SPB.
:param dst_resource_element_configs: List of `UnityResourceConfig`
objects. The user chose config for each of the member element of
the destination resource.
:param auto_initiate: indicates whether to perform the first
replication sync automatically.
True - perform the first replication sync automatically.
False - perform the first replication sync manually.
:param hourly_snap_replication_policy: `UnitySnapReplicationPolicy`
object. The policy for replicating hourly scheduled snaps of the
source resource.
:param daily_snap_replication_policy: `UnitySnapReplicationPolicy`
object. The policy for replicating daily scheduled snaps of the
source resource.
:param replicate_existing_snaps: indicates whether or not to replicate
snapshots already existing on the resource.
:return: the newly created replication session.
|
(module
(function_definition
(function_name_render_tree) function_name_render_tree
(parameters
(identifier_root) identifier_root
(identifier_child_func) identifier_child_func
(default_parameter
(identifier_prune) identifier_prune
(integer_0) integer_0
)default_parameter
(default_parameter
(identifier_margin) identifier_margin
(list
(integer_0) integer_0
)list
)default_parameter
(default_parameter
(identifier_visited) identifier_visited
(None) None
)default_parameter
)parameters
(block
(expression_statement
(assignment
(identifier_rname) identifier_rname
(call
(identifier_str) identifier_str
(argument_list
(identifier_root) identifier_root
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier_visited) identifier_visited
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(identifier_visited) identifier_visited
(dictionary
)dictionary
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_children) identifier_children
(call
(identifier_child_func) identifier_child_func
(argument_list
(identifier_root) identifier_root
)argument_list
)call
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_retval) identifier_retval
(string_"") string_""
)assignment
)expression_statement
(for_statement
(identifier_pipe) identifier_pipe
(subscript
(identifier_margin) identifier_margin
(slice
(colon) colon
(unary_operator
(integer_1) integer_1
)unary_operator
)slice
)subscript
(block
(if_statement
(identifier_pipe) identifier_pipe
(block
(expression_statement
(assignment
(identifier_retval) identifier_retval
(binary_operator
(identifier_retval) identifier_retval
(string_"| ") string_"| "
)binary_operator
)assignment
)expression_statement
)block
(else_clause
(block
(expression_statement
(assignment
(identifier_retval) identifier_retval
(binary_operator
(identifier_retval) identifier_retval
(string_" ") string_" "
)binary_operator
)assignment
)expression_statement
)block
)else_clause
)if_statement
)block
)for_statement
(if_statement
(comparison_operator
(identifier_rname) identifier_rname
(identifier_visited) identifier_visited
)comparison_operator
(block
(return_statement
(binary_operator
(binary_operator
(binary_operator
(identifier_retval) identifier_retval
(string_"+-[") string_"+-["
)binary_operator
(identifier_rname) identifier_rname
)binary_operator
(string_"]\n") string_"]\n"
)binary_operator
)return_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_retval) identifier_retval
(binary_operator
(binary_operator
(binary_operator
(identifier_retval) identifier_retval
(string_"+-") string_"+-"
)binary_operator
(identifier_rname) identifier_rname
)binary_operator
(string_"\n") string_"\n"
)binary_operator
)assignment
)expression_statement
(if_statement
(not_operator
(identifier_prune) identifier_prune
)not_operator
(block
(expression_statement
(assignment
(identifier_visited) identifier_visited
(call
(attribute
(identifier_copy) identifier_copy
(identifier_copy) identifier_copy
)attribute
(argument_list
(identifier_visited) identifier_visited
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(subscript
(identifier_visited) identifier_visited
(identifier_rname) identifier_rname
)subscript
(integer_1) integer_1
)assignment
)expression_statement
(for_statement
(identifier_i) identifier_i
(call
(identifier_range) identifier_range
(argument_list
(call
(identifier_len) identifier_len
(argument_list
(identifier_children) identifier_children
)argument_list
)call
)argument_list
)call
(block
(expression_statement
(call
(attribute
(identifier_margin) identifier_margin
(identifier_append) identifier_append
)attribute
(argument_list
(comparison_operator
(identifier_i) identifier_i
(binary_operator
(call
(identifier_len) identifier_len
(argument_list
(identifier_children) identifier_children
)argument_list
)call
(integer_1) integer_1
)binary_operator
)comparison_operator
)argument_list
)call
)expression_statement
(expression_statement
(assignment
(identifier_retval) identifier_retval
(binary_operator
(identifier_retval) identifier_retval
(call
(identifier_render_tree) identifier_render_tree
(argument_list
(subscript
(identifier_children) identifier_children
(identifier_i) identifier_i
)subscript
(identifier_child_func) identifier_child_func
(identifier_prune) identifier_prune
(identifier_margin) identifier_margin
(identifier_visited) identifier_visited
)argument_list
)call
)binary_operator
)assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_margin) identifier_margin
(identifier_pop) identifier_pop
)attribute
(argument_list
)argument_list
)call
)expression_statement
)block
)for_statement
(return_statement
(identifier_retval) identifier_retval
)return_statement
)block
)function_definition
)module
|
Render a tree of nodes into an ASCII tree view.
:Parameters:
- `root`: the root node of the tree
- `child_func`: the function called to get the children of a node
- `prune`: don't visit the same node twice
- `margin`: the format of the left margin to use for children of root. 1 results in a pipe, and 0 results in no pipe.
- `visited`: a dictionary of visited nodes in the current branch if not prune, or in the whole tree if prune.
|
(module
(function_definition
(function_name_setups) function_name_setups
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_result) identifier_result
(list
)list
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_has_options) identifier_has_options
(attribute
(attribute
(identifier_self) identifier_self
(identifier_base_object) identifier_base_object
)attribute
(identifier_is_optionhandler) identifier_is_optionhandler
)attribute
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_enm) identifier_enm
(call
(attribute
(identifier_javabridge) identifier_javabridge
(identifier_get_enumeration_wrapper) identifier_get_enumeration_wrapper
)attribute
(argument_list
(call
(attribute
(identifier_javabridge) identifier_javabridge
(identifier_call) identifier_call
)attribute
(argument_list
(attribute
(identifier_self) identifier_self
(identifier_jobject) identifier_jobject
)attribute
(string_"setups") string_"setups"
(string_"()Ljava/util/Enumeration;") string_"()Ljava/util/Enumeration;"
)argument_list
)call
)argument_list
)call
)assignment
)expression_statement
(while_statement
(call
(attribute
(identifier_enm) identifier_enm
(identifier_hasMoreElements) identifier_hasMoreElements
)attribute
(argument_list
)argument_list
)call
(block
(if_statement
(identifier_has_options) identifier_has_options
(block
(expression_statement
(call
(attribute
(identifier_result) identifier_result
(identifier_append) identifier_append
)attribute
(argument_list
(call
(identifier_OptionHandler) identifier_OptionHandler
(argument_list
(call
(attribute
(identifier_enm) identifier_enm
(identifier_nextElement) identifier_nextElement
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)argument_list
)call
)expression_statement
)block
(else_clause
(block
(expression_statement
(call
(attribute
(identifier_result) identifier_result
(identifier_append) identifier_append
)attribute
(argument_list
(call
(identifier_JavaObject) identifier_JavaObject
(argument_list
(call
(attribute
(identifier_enm) identifier_enm
(identifier_nextElement) identifier_nextElement
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
)argument_list
)call
)expression_statement
)block
)else_clause
)if_statement
)block
)while_statement
(return_statement
(identifier_result) identifier_result
)return_statement
)block
)function_definition
)module
|
Generates and returns all the setups according to the parameter search space.
:return: the list of configured objects (of type JavaObject)
:rtype: list
|
(module
(function_definition
(function_name_solution_violations) function_name_solution_violations
(parameters
(identifier_solution) identifier_solution
(identifier_events) identifier_events
(identifier_slots) identifier_slots
)parameters
(block
(expression_statement
(assignment
(identifier_array) identifier_array
(call
(attribute
(identifier_converter) identifier_converter
(identifier_solution_to_array) identifier_solution_to_array
)attribute
(argument_list
(identifier_solution) identifier_solution
(identifier_events) identifier_events
(identifier_slots) identifier_slots
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(identifier_array_violations) identifier_array_violations
(argument_list
(identifier_array) identifier_array
(identifier_events) identifier_events
(identifier_slots) identifier_slots
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Take a solution and return a list of violated constraints
Parameters
----------
solution: list or tuple
a schedule in solution form
events : list or tuple
of resources.Event instances
slots : list or tuple
of resources.Slot instances
Returns
-------
Generator
of a list of strings indicating the nature of the violated
constraints
|
(module
(function_definition
(function_name_temp_path) function_name_temp_path
(parameters
(default_parameter
(identifier_file_name) identifier_file_name
(None) None
)default_parameter
)parameters
(block
(if_statement
(comparison_operator
(identifier_file_name) identifier_file_name
(None) None
)comparison_operator
(block
(expression_statement
(assignment
(identifier_file_name) identifier_file_name
(call
(identifier_generate_timestamped_string) identifier_generate_timestamped_string
(argument_list
(string_"wtf_temp_file") string_"wtf_temp_file"
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
(return_statement
(call
(attribute
(attribute
(identifier_os) identifier_os
(identifier_path) identifier_path
)attribute
(identifier_join) identifier_join
)attribute
(argument_list
(call
(attribute
(identifier_tempfile) identifier_tempfile
(identifier_gettempdir) identifier_gettempdir
)attribute
(argument_list
)argument_list
)call
(identifier_file_name) identifier_file_name
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Gets a temp path.
Kwargs:
file_name (str) : if file name is specified, it gets appended to the temp dir.
Usage::
temp_file_path = temp_path("myfile")
copyfile("myfile", temp_file_path) # copies 'myfile' to '/tmp/myfile'
|
(module
(function_definition
(function_name_flush) function_name_flush
(parameters
(identifier_self) identifier_self
)parameters
(block
(for_statement
(identifier_key) identifier_key
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_grouping_info) identifier_grouping_info
)attribute
(identifier_keys) identifier_keys
)attribute
(argument_list
)argument_list
)call
(block
(if_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__should_flush) identifier__should_flush
)attribute
(argument_list
(identifier_key) identifier_key
)argument_list
)call
(block
(expression_statement
(call
(attribute
(identifier_self) identifier_self
(identifier__write_current_buffer_for_group_key) identifier__write_current_buffer_for_group_key
)attribute
(argument_list
(identifier_key) identifier_key
)argument_list
)call
)expression_statement
)block
)if_statement
)block
)for_statement
)block
)function_definition
)module
|
Ensure all remaining buffers are written.
|
(module
(function_definition
(function_name_screenshot) function_name_screenshot
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_b64data) identifier_b64data
(attribute
(call
(attribute
(attribute
(identifier_self) identifier_self
(identifier_http) identifier_http
)attribute
(identifier_get) identifier_get
)attribute
(argument_list
(string_'/screenshot') string_'/screenshot'
)argument_list
)call
(identifier_value) identifier_value
)attribute
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_raw_data) identifier_raw_data
(call
(attribute
(identifier_base64) identifier_base64
(identifier_b64decode) identifier_b64decode
)attribute
(argument_list
(identifier_b64data) identifier_b64data
)argument_list
)call
)assignment
)expression_statement
(import_from_statement
(dotted_name
(identifier_PIL) identifier_PIL
)dotted_name
(dotted_name
(identifier_Image) identifier_Image
)dotted_name
)import_from_statement
(expression_statement
(assignment
(identifier_buff) identifier_buff
(call
(attribute
(identifier_io) identifier_io
(identifier_BytesIO) identifier_BytesIO
)attribute
(argument_list
(identifier_raw_data) identifier_raw_data
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(attribute
(identifier_Image) identifier_Image
(identifier_open) identifier_open
)attribute
(argument_list
(identifier_buff) identifier_buff
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Take screenshot with session check
Returns:
PIL.Image
|
(module
(function_definition
(function_name_load) function_name_load
(parameters
(identifier_path) identifier_path
(default_parameter
(identifier_service) identifier_service
(None) None
)default_parameter
(default_parameter
(identifier_hostport) identifier_hostport
(None) None
)default_parameter
(default_parameter
(identifier_module_name) identifier_module_name
(None) None
)default_parameter
)parameters
(block
(if_statement
(not_operator
(call
(attribute
(identifier_path) identifier_path
(identifier_endswith) identifier_endswith
)attribute
(argument_list
(string_'.thrift') string_'.thrift'
)argument_list
)call
)not_operator
(block
(expression_statement
(assignment
(pattern_list
(identifier_service) identifier_service
(identifier_path) identifier_path
)pattern_list
(expression_list
(identifier_path) identifier_path
(identifier_service) identifier_service
)expression_list
)assignment
)expression_statement
)block
)if_statement
(expression_statement
(assignment
(identifier_module) identifier_module
(call
(attribute
(identifier_thriftrw) identifier_thriftrw
(identifier_load) identifier_load
)attribute
(argument_list
(keyword_argument
(identifier_path) identifier_path
(identifier_path) identifier_path
)keyword_argument
(keyword_argument
(identifier_name) identifier_name
(identifier_module_name) identifier_module_name
)keyword_argument
)argument_list
)call
)assignment
)expression_statement
(return_statement
(call
(identifier_TChannelThriftModule) identifier_TChannelThriftModule
(argument_list
(identifier_service) identifier_service
(identifier_module) identifier_module
(identifier_hostport) identifier_hostport
)argument_list
)call
)return_statement
)block
)function_definition
)module
|
Loads the Thrift file at the specified path.
The file is compiled in-memory and a Python module containing the result
is returned. It may be used with ``TChannel.thrift``. For example,
.. code-block:: python
from tchannel import TChannel, thrift
# Load our server's interface definition.
donuts = thrift.load(path='donuts.thrift')
# We need to specify a service name or hostport because this is a
# downstream service we'll be calling.
coffee = thrift.load(path='coffee.thrift', service='coffee')
tchannel = TChannel('donuts')
@tchannel.thrift.register(donuts.DonutsService)
@tornado.gen.coroutine
def submitOrder(request):
args = request.body
if args.coffee:
yield tchannel.thrift(
coffee.CoffeeService.order(args.coffee)
)
# ...
The returned module contains, one top-level type for each struct, enum,
union, exeption, and service defined in the Thrift file. For each service,
the corresponding class contains a classmethod for each function defined
in that service that accepts the arguments for that function and returns a
``ThriftRequest`` capable of being sent via ``TChannel.thrift``.
For more information on what gets generated by ``load``, see `thriftrw
<http://thriftrw.readthedocs.org/en/latest/>`_.
Note that the ``path`` accepted by ``load`` must be either an absolute
path or a path relative to the *the current directory*. If you need to
refer to Thrift files relative to the Python module in which ``load`` was
called, use the ``__file__`` magic variable.
.. code-block:: python
# Given,
#
# foo/
# myservice.thrift
# bar/
# x.py
#
# Inside foo/bar/x.py,
path = os.path.join(
os.path.dirname(__file__), '../myservice.thrift'
)
The returned value is a valid Python module. You can install the module by
adding it to the ``sys.modules`` dictionary. This will allow importing
items from this module directly. You can use the ``__name__`` magic
variable to make the generated module a submodule of the current module.
For example,
.. code-block:: python
# foo/bar.py
import sys
from tchannel import thrift
donuts = = thrift.load('donuts.thrift')
sys.modules[__name__ + '.donuts'] = donuts
This installs the module generated for ``donuts.thrift`` as the module
``foo.bar.donuts``. Callers can then import items from that module
directly. For example,
.. code-block:: python
# foo/baz.py
from foo.bar.donuts import DonutsService, Order
def baz(tchannel):
return tchannel.thrift(
DonutsService.submitOrder(Order(..))
)
:param str service:
Name of the service that the Thrift file represents. This name will be
used to route requests through Hyperbahn.
:param str path:
Path to the Thrift file. If this is a relative path, it must be
relative to the current directory.
:param str hostport:
Clients can use this to specify the hostport at which the service can
be found. If omitted, TChannel will route the requests through known
peers. This value is ignored by servers.
:param str module_name:
Name used for the generated Python module. Defaults to the name of the
Thrift file.
|
(module
(function_definition
(function_name_fix_facets) function_name_fix_facets
(parameters
(identifier_self) identifier_self
)parameters
(block
(expression_statement
(assignment
(identifier_facets) identifier_facets
(attribute
(identifier_self) identifier_self
(identifier_facets) identifier_facets
)attribute
)assignment
)expression_statement
(for_statement
(identifier_key) identifier_key
(call
(identifier_list) identifier_list
(argument_list
(call
(attribute
(identifier_facets) identifier_facets
(identifier_keys) identifier_keys
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
(block
(expression_statement
(assignment
(identifier__type) identifier__type
(call
(attribute
(subscript
(identifier_facets) identifier_facets
(identifier_key) identifier_key
)subscript
(identifier_get) identifier_get
)attribute
(argument_list
(string_"_type") string_"_type"
(string_"unknown") string_"unknown"
)argument_list
)call
)assignment
)expression_statement
(if_statement
(comparison_operator
(identifier__type) identifier__type
(string_"date_histogram") string_"date_histogram"
)comparison_operator
(block
(for_statement
(identifier_entry) identifier_entry
(call
(attribute
(subscript
(identifier_facets) identifier_facets
(identifier_key) identifier_key
)subscript
(identifier_get) identifier_get
)attribute
(argument_list
(string_"entries") string_"entries"
(list
)list
)argument_list
)call
(block
(for_statement
(pattern_list
(identifier_k) identifier_k
(identifier_v) identifier_v
)pattern_list
(call
(identifier_list) identifier_list
(argument_list
(call
(attribute
(identifier_entry) identifier_entry
(identifier_items) identifier_items
)attribute
(argument_list
)argument_list
)call
)argument_list
)call
(block
(if_statement
(comparison_operator
(identifier_k) identifier_k
(list
(string_"count") string_"count"
(string_"max") string_"max"
(string_"min") string_"min"
(string_"total_count") string_"total_count"
(string_"mean") string_"mean"
(string_"total") string_"total"
)list
)comparison_operator
(block
(continue_statement
)continue_statement
)block
)if_statement
(if_statement
(not_operator
(call
(identifier_isinstance) identifier_isinstance
(argument_list
(subscript
(identifier_entry) identifier_entry
(identifier_k) identifier_k
)subscript
(identifier_datetime) identifier_datetime
)argument_list
)call
)not_operator
(block
(expression_statement
(assignment
(subscript
(identifier_entry) identifier_entry
(identifier_k) identifier_k
)subscript
(call
(attribute
(identifier_datetime) identifier_datetime
(identifier_utcfromtimestamp) identifier_utcfromtimestamp
)attribute
(argument_list
(binary_operator
(identifier_v) identifier_v
(float_1e3) float_1e3
)binary_operator
)argument_list
)call
)assignment
)expression_statement
)block
)if_statement
)block
)for_statement
)block
)for_statement
)block
)if_statement
)block
)for_statement
)block
)function_definition
)module
|
This function convert date_histogram facets to datetime
|
(module
(function_definition
(function_name_convert_units_to_base_units) function_name_convert_units_to_base_units
(parameters
(identifier_units) identifier_units
)parameters
(block
(expression_statement
(assignment
(identifier_total_factor) identifier_total_factor
(integer_1) integer_1
)assignment
)expression_statement
(expression_statement
(assignment
(identifier_new_units) identifier_new_units
(list
)list
)assignment
)expression_statement
(for_statement
(identifier_unit) identifier_unit
(identifier_units) identifier_units
(block
(if_statement
(comparison_operator
(identifier_unit) identifier_unit
(identifier_BASE_UNIT_CONVERSIONS) identifier_BASE_UNIT_CONVERSIONS
)comparison_operator
(block
(continue_statement
)continue_statement
)block
)if_statement
(expression_statement
(assignment
(pattern_list
(identifier_factor) identifier_factor
(identifier_new_unit) identifier_new_unit
)pattern_list
(subscript
(identifier_BASE_UNIT_CONVERSIONS) identifier_BASE_UNIT_CONVERSIONS
(identifier_unit) identifier_unit
)subscript
)assignment
)expression_statement
(expression_statement
(augmented_assignment
(identifier_total_factor) identifier_total_factor
(identifier_factor) identifier_factor
)augmented_assignment
)expression_statement
(expression_statement
(call
(attribute
(identifier_new_units) identifier_new_units
(identifier_append) identifier_append
)attribute
(argument_list
(identifier_new_unit) identifier_new_unit
)argument_list
)call
)expression_statement
)block
)for_statement
(expression_statement
(call
(attribute
(identifier_new_units) identifier_new_units
(identifier_sort) identifier_sort
)attribute
(argument_list
)argument_list
)call
)expression_statement
(return_statement
(expression_list
(identifier_total_factor) identifier_total_factor
(call
(identifier_tuple) identifier_tuple
(argument_list
(identifier_new_units) identifier_new_units
)argument_list
)call
)expression_list
)return_statement
)block
)function_definition
)module
|
Convert a set of units into a set of "base" units.
Returns a 2-tuple of `factor, new_units`.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.