sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_activate_network_interface) function_name_activate_network_interface (parameters (identifier_iface) identifier_iface )parameters (block (expression_statement (assignment (identifier_iface) identifier_iface (call (attribute (identifier_iface) identifier_iface (identifier_encode) identifier_encode )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_SIOCGIFFLAGS) identifier_SIOCGIFFLAGS (integer_0x8913) integer_0x8913 )assignment )expression_statement (expression_statement (assignment (identifier_SIOCSIFFLAGS) identifier_SIOCSIFFLAGS (integer_0x8914) integer_0x8914 )assignment )expression_statement (expression_statement (assignment (identifier_IFF_UP) identifier_IFF_UP (integer_0x1) integer_0x1 )assignment )expression_statement (expression_statement (assignment (identifier_STRUCT_IFREQ_LAYOUT_IFADDR_SAFAMILY) identifier_STRUCT_IFREQ_LAYOUT_IFADDR_SAFAMILY (string_b"16sH14s") string_b"16sH14s" )assignment )expression_statement (expression_statement (assignment (identifier_STRUCT_IFREQ_LAYOUT_IFFLAGS) identifier_STRUCT_IFREQ_LAYOUT_IFFLAGS (string_b"16sH14s") string_b"16sH14s" )assignment )expression_statement (expression_statement (assignment (identifier_sock) identifier_sock (call (attribute (identifier_socket) identifier_socket (identifier_socket) identifier_socket )attribute (argument_list (attribute (identifier_socket) identifier_socket (identifier_AF_INET) identifier_AF_INET )attribute (attribute (identifier_socket) identifier_socket (identifier_SOCK_DGRAM) identifier_SOCK_DGRAM )attribute (attribute (identifier_socket) identifier_socket (identifier_IPPROTO_IP) identifier_IPPROTO_IP )attribute )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_ifreq) identifier_ifreq (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (identifier_STRUCT_IFREQ_LAYOUT_IFADDR_SAFAMILY) identifier_STRUCT_IFREQ_LAYOUT_IFADDR_SAFAMILY (identifier_iface) identifier_iface (attribute (identifier_socket) identifier_socket (identifier_AF_INET) identifier_AF_INET )attribute (binary_operator (string_b'0') string_b'0' (integer_14) integer_14 )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ifreq) identifier_ifreq (call (attribute (identifier_fcntl) identifier_fcntl (identifier_ioctl) identifier_ioctl )attribute (argument_list (identifier_sock) identifier_sock (identifier_SIOCGIFFLAGS) identifier_SIOCGIFFLAGS (identifier_ifreq) identifier_ifreq )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_if_flags) identifier_if_flags (subscript (call (attribute (identifier_struct) identifier_struct (identifier_unpack) identifier_unpack )attribute (argument_list (identifier_STRUCT_IFREQ_LAYOUT_IFFLAGS) identifier_STRUCT_IFREQ_LAYOUT_IFFLAGS (identifier_ifreq) identifier_ifreq )argument_list )call (integer_1) integer_1 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_ifreq) identifier_ifreq (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (identifier_STRUCT_IFREQ_LAYOUT_IFFLAGS) identifier_STRUCT_IFREQ_LAYOUT_IFFLAGS (identifier_iface) identifier_iface (binary_operator (identifier_if_flags) identifier_if_flags (identifier_IFF_UP) identifier_IFF_UP )binary_operator (binary_operator (string_b'0') string_b'0' (integer_14) integer_14 )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_fcntl) identifier_fcntl (identifier_ioctl) identifier_ioctl )attribute (argument_list (identifier_sock) identifier_sock (identifier_SIOCSIFFLAGS) identifier_SIOCSIFFLAGS (identifier_ifreq) identifier_ifreq )argument_list )call )expression_statement )block (finally_clause (block (expression_statement (call (attribute (identifier_sock) identifier_sock (identifier_close) identifier_close )attribute (argument_list )argument_list )call )expression_statement )block )finally_clause )try_statement )block )function_definition )module
Bring up the given network interface. @raise OSError: if interface does not exist or permissions are missing
(module (function_definition (function_name_fit_transform) function_name_fit_transform (parameters (identifier_self) identifier_self (identifier_X) identifier_X (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_tasklogger) identifier_tasklogger (identifier_log_start) identifier_log_start )attribute (argument_list (string_'PHATE') string_'PHATE' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_fit) identifier_fit )attribute (argument_list (identifier_X) identifier_X )argument_list )call )expression_statement (expression_statement (assignment (identifier_embedding) identifier_embedding (call (attribute (identifier_self) identifier_self (identifier_transform) identifier_transform )attribute (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_tasklogger) identifier_tasklogger (identifier_log_complete) identifier_log_complete )attribute (argument_list (string_'PHATE') string_'PHATE' )argument_list )call )expression_statement (return_statement (identifier_embedding) identifier_embedding )return_statement )block )function_definition )module
Computes the diffusion operator and the position of the cells in the embedding space Parameters ---------- X : array, shape=[n_samples, n_features] input data with `n_samples` samples and `n_dimensions` dimensions. Accepted data types: `numpy.ndarray`, `scipy.sparse.spmatrix`, `pd.DataFrame`, `anndata.AnnData` If `knn_dist` is 'precomputed', `data` should be a n_samples x n_samples distance or affinity matrix kwargs : further arguments for `PHATE.transform()` Keyword arguments as specified in :func:`~phate.PHATE.transform` Returns ------- embedding : array, shape=[n_samples, n_dimensions] The cells embedded in a lower dimensional space using PHATE
(module (function_definition (function_name_str_extract) function_name_str_extract (parameters (identifier_arr) identifier_arr (identifier_pat) identifier_pat (default_parameter (identifier_flags) identifier_flags (integer_0) integer_0 )default_parameter (default_parameter (identifier_expand) identifier_expand (True) True )default_parameter )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_expand) identifier_expand (identifier_bool) identifier_bool )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"expand must be True or False") string_"expand must be True or False" )argument_list )call )raise_statement )block )if_statement (if_statement (identifier_expand) identifier_expand (block (return_statement (call (identifier__str_extract_frame) identifier__str_extract_frame (argument_list (attribute (identifier_arr) identifier_arr (identifier__orig) identifier__orig )attribute (identifier_pat) identifier_pat (keyword_argument (identifier_flags) identifier_flags (identifier_flags) identifier_flags )keyword_argument )argument_list )call )return_statement )block (else_clause (block (expression_statement (assignment (pattern_list (identifier_result) identifier_result (identifier_name) identifier_name )pattern_list (call (identifier__str_extract_noexpand) identifier__str_extract_noexpand (argument_list (attribute (identifier_arr) identifier_arr (identifier__parent) identifier__parent )attribute (identifier_pat) identifier_pat (keyword_argument (identifier_flags) identifier_flags (identifier_flags) identifier_flags )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_arr) identifier_arr (identifier__wrap_result) identifier__wrap_result )attribute (argument_list (identifier_result) identifier_result (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_expand) identifier_expand (identifier_expand) identifier_expand )keyword_argument )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
r""" Extract capture groups in the regex `pat` as columns in a DataFrame. For each subject string in the Series, extract groups from the first match of regular expression `pat`. Parameters ---------- pat : str Regular expression pattern with capturing groups. flags : int, default 0 (no flags) Flags from the ``re`` module, e.g. ``re.IGNORECASE``, that modify regular expression matching for things like case, spaces, etc. For more details, see :mod:`re`. expand : bool, default True If True, return DataFrame with one column per capture group. If False, return a Series/Index if there is one capture group or DataFrame if there are multiple capture groups. .. versionadded:: 0.18.0 Returns ------- DataFrame or Series or Index A DataFrame with one row for each subject string, and one column for each group. Any capture group names in regular expression pat will be used for column names; otherwise capture group numbers will be used. The dtype of each result column is always object, even when no match is found. If ``expand=False`` and pat has only one capture group, then return a Series (if subject is a Series) or Index (if subject is an Index). See Also -------- extractall : Returns all matches (not just the first match). Examples -------- A pattern with two groups will return a DataFrame with two columns. Non-matches will be NaN. >>> s = pd.Series(['a1', 'b2', 'c3']) >>> s.str.extract(r'([ab])(\d)') 0 1 0 a 1 1 b 2 2 NaN NaN A pattern may contain optional groups. >>> s.str.extract(r'([ab])?(\d)') 0 1 0 a 1 1 b 2 2 NaN 3 Named groups will become column names in the result. >>> s.str.extract(r'(?P<letter>[ab])(?P<digit>\d)') letter digit 0 a 1 1 b 2 2 NaN NaN A pattern with one group will return a DataFrame with one column if expand=True. >>> s.str.extract(r'[ab](\d)', expand=True) 0 0 1 1 2 2 NaN A pattern with one group will return a Series if expand=False. >>> s.str.extract(r'[ab](\d)', expand=False) 0 1 1 2 2 NaN dtype: object
(module (function_definition (function_name_start) function_name_start (parameters (identifier_self) identifier_self )parameters (block (while_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_is_start) identifier_is_start )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_current_tag) identifier_current_tag )attribute )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_next) identifier_next )attribute (argument_list )argument_list )call )expression_statement )block )while_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_new_entry) identifier_new_entry )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Find the first data entry and prepare to parse.
(module (function_definition (function_name_check_status) function_name_check_status (parameters (identifier_self) identifier_self (default_parameter (identifier_delay) identifier_delay (integer_0) integer_0 )default_parameter )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_item_id) identifier_item_id )attribute )not_operator (block (while_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier__request_status) identifier__request_status )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (yield (expression_list (attribute (identifier_self) identifier_self (identifier_status) identifier_status )attribute (attribute (identifier_self) identifier_self (identifier_completion_percentage) identifier_completion_percentage )attribute )expression_list )yield )expression_statement (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_item_id) identifier_item_id )attribute (None) None )comparison_operator (block (expression_statement (call (identifier_sleep) identifier_sleep (argument_list (identifier_delay) identifier_delay )argument_list )call )expression_statement )block )if_statement )block )while_statement )block (else_clause (block (expression_statement (yield (expression_list (attribute (identifier_self) identifier_self (identifier_status) identifier_status )attribute (attribute (identifier_self) identifier_self (identifier_completion_percentage) identifier_completion_percentage )attribute )expression_list )yield )expression_statement )block )else_clause )if_statement )block )function_definition )module
Checks the api endpoint in a loop :param delay: number of seconds to wait between api calls. Note Connection 'requests_delay' also apply. :return: tuple of status and percentage complete :rtype: tuple(str, float)
(module (function_definition (function_name_level) function_name_level (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_m) identifier_m (call (attribute (identifier_re) identifier_re (identifier_match) identifier_match )attribute (argument_list (binary_operator (binary_operator (binary_operator (attribute (identifier_self) identifier_self (identifier_compliance_prefix) identifier_compliance_prefix )attribute (string_r'(\d)') string_r'(\d)' )binary_operator (attribute (identifier_self) identifier_self (identifier_compliance_suffix) identifier_compliance_suffix )attribute )binary_operator (string_r'$') string_r'$' )binary_operator (attribute (identifier_self) identifier_self (identifier_compliance) identifier_compliance )attribute )argument_list )call )assignment )expression_statement (if_statement (parenthesized_expression (identifier_m) identifier_m )parenthesized_expression (block (return_statement (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_m) identifier_m (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )argument_list )call )return_statement )block )if_statement (raise_statement (call (identifier_IIIFInfoError) identifier_IIIFInfoError (argument_list (string_"Bad compliance profile URI, failed to extract level number") string_"Bad compliance profile URI, failed to extract level number" )argument_list )call )raise_statement )block )function_definition )module
Extract level number from compliance profile URI. Returns integer level number or raises IIIFInfoError
(module (function_definition (function_name_bitwise_dot_product) function_name_bitwise_dot_product (parameters (typed_parameter (identifier_bs0) identifier_bs0 (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_bs1) identifier_bs1 (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_str) identifier_str )type (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_bs0) identifier_bs0 )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_bs1) identifier_bs1 )argument_list )call )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Bit strings are not of equal length") string_"Bit strings are not of equal length" )argument_list )call )raise_statement )block )if_statement (return_statement (call (identifier_str) identifier_str (argument_list (binary_operator (call (identifier_sum) identifier_sum (argument_list (list_comprehension (binary_operator (call (identifier_int) identifier_int (argument_list (subscript (identifier_bs0) identifier_bs0 (identifier_i) identifier_i )subscript )argument_list )call (call (identifier_int) identifier_int (argument_list (subscript (identifier_bs1) identifier_bs1 (identifier_i) identifier_i )subscript )argument_list )call )binary_operator (for_in_clause (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_bs0) identifier_bs0 )argument_list )call )argument_list )call )for_in_clause )list_comprehension )argument_list )call (integer_2) integer_2 )binary_operator )argument_list )call )return_statement )block )function_definition )module
A helper to calculate the bitwise dot-product between two string representing bit-vectors :param bs0: String of 0's and 1's representing a number in binary representations :param bs1: String of 0's and 1's representing a number in binary representations :return: 0 or 1 as a string corresponding to the dot-product value
(module (function_definition (function_name_data_file) function_name_data_file (parameters (identifier_file_fmt) identifier_file_fmt (default_parameter (identifier_info) identifier_info (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_info) identifier_info (identifier_dict) identifier_dict )argument_list )call (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'hash_key') string_'hash_key' )subscript (call (attribute (call (attribute (identifier_hashlib) identifier_hashlib (identifier_sha256) identifier_sha256 )attribute (argument_list (call (attribute (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_info) identifier_info )argument_list )call (identifier_encode) identifier_encode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )argument_list )call (identifier_hexdigest) identifier_hexdigest )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_kwargs) identifier_kwargs (identifier_update) identifier_update )attribute (argument_list (identifier_info) identifier_info )argument_list )call )expression_statement )block )if_statement (return_statement (call (attribute (identifier_utils) identifier_utils (identifier_fstr) identifier_fstr )attribute (argument_list (keyword_argument (identifier_fmt) identifier_fmt (identifier_file_fmt) identifier_file_fmt )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Data file name for given infomation Args: file_fmt: file format in terms of f-strings info: dict, to be hashed and then pass to f-string using 'hash_key' these info will also be passed to f-strings **kwargs: arguments for f-strings Returns: str: data file name
(module (function_definition (function_name_row_is_filtered) function_name_row_is_filtered (parameters (identifier_self) identifier_self (identifier_row_subs) identifier_row_subs (identifier_filters) identifier_filters )parameters (block (for_statement (identifier_filtername) identifier_filtername (identifier_filters) identifier_filters (block (expression_statement (assignment (identifier_filtervalue) identifier_filtervalue (subscript (identifier_filters) identifier_filters (identifier_filtername) identifier_filtername )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_filtername) identifier_filtername (identifier_row_subs) identifier_row_subs )comparison_operator (block (expression_statement (assignment (identifier_row_subs_value) identifier_row_subs_value (subscript (identifier_row_subs) identifier_row_subs (identifier_filtername) identifier_filtername )subscript )assignment )expression_statement (if_statement (comparison_operator (call (identifier_str) identifier_str (argument_list (identifier_row_subs_value) identifier_row_subs_value )argument_list )call (call (identifier_str) identifier_str (argument_list (identifier_filtervalue) identifier_filtervalue )argument_list )call )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement )block (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"fw: Unknown filter keyword (%s)") string_"fw: Unknown filter keyword (%s)" (tuple (identifier_filtername) identifier_filtername )tuple )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
returns True if row should NOT be included according to filters
(module (function_definition (function_name_repeat) function_name_repeat (parameters (identifier_self) identifier_self (identifier_count) identifier_count )parameters (block (expression_statement (assignment (identifier_x) identifier_x (call (identifier_HSeq) identifier_HSeq (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_count) identifier_count )argument_list )call (block (expression_statement (assignment (identifier_x) identifier_x (call (attribute (identifier_x) identifier_x (identifier_concatenate) identifier_concatenate )attribute (argument_list (identifier_self) identifier_self )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_x) identifier_x )return_statement )block )function_definition )module
repeat sequence given number of times to produce a new sequence
(module (function_definition (function_name_getfirstline) function_name_getfirstline (parameters (identifier_file) identifier_file (identifier_default) identifier_default )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_file) identifier_file (string_'rb') string_'rb' )argument_list )call (as_pattern_target (identifier_fh) identifier_fh )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_content) identifier_content (call (attribute (identifier_fh) identifier_fh (identifier_readlines) identifier_readlines )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_content) identifier_content )argument_list )call (integer_1) integer_1 )comparison_operator (block (return_statement (call (attribute (call (attribute (subscript (identifier_content) identifier_content (integer_0) integer_0 )subscript (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call (identifier_strip) identifier_strip )attribute (argument_list (string_'\n') string_'\n' )argument_list )call )return_statement )block )if_statement )block )with_statement (return_statement (identifier_default) identifier_default )return_statement )block )function_definition )module
Returns the first line of a file.
(module (function_definition (function_name__handle_archive) function_name__handle_archive (parameters (identifier_archive) identifier_archive (identifier_command) identifier_command (default_parameter (identifier_verbosity) identifier_verbosity (integer_0) integer_0 )default_parameter (default_parameter (identifier_interactive) identifier_interactive (True) True )default_parameter (default_parameter (identifier_program) identifier_program (None) None )default_parameter (default_parameter (identifier_format) identifier_format (None) None )default_parameter (default_parameter (identifier_compression) identifier_compression (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_format) identifier_format (None) None )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_format) identifier_format (identifier_compression) identifier_compression )pattern_list (call (identifier_get_archive_format) identifier_get_archive_format (argument_list (identifier_archive) identifier_archive )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (identifier_check_archive_format) identifier_check_archive_format (argument_list (identifier_format) identifier_format (identifier_compression) identifier_compression )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_command) identifier_command (tuple (string_'list') string_'list' (string_'test') string_'test' )tuple )comparison_operator (block (raise_statement (call (attribute (identifier_util) identifier_util (identifier_PatoolError) identifier_PatoolError )attribute (argument_list (binary_operator (string_"invalid archive command `%s'") string_"invalid archive command `%s'" (identifier_command) identifier_command )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_program) identifier_program (call (identifier_find_archive_program) identifier_find_archive_program (argument_list (identifier_format) identifier_format (identifier_command) identifier_command (keyword_argument (identifier_program) identifier_program (identifier_program) identifier_program )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_check_program_compression) identifier_check_program_compression (argument_list (identifier_archive) identifier_archive (identifier_command) identifier_command (identifier_program) identifier_program (identifier_compression) identifier_compression )argument_list )call )expression_statement (expression_statement (assignment (identifier_get_archive_cmdlist) identifier_get_archive_cmdlist (call (identifier_get_archive_cmdlist_func) identifier_get_archive_cmdlist_func (argument_list (identifier_program) identifier_program (identifier_command) identifier_command (identifier_format) identifier_format )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cmdlist) identifier_cmdlist (call (identifier_get_archive_cmdlist) identifier_get_archive_cmdlist (argument_list (identifier_archive) identifier_archive (identifier_compression) identifier_compression (identifier_program) identifier_program (identifier_verbosity) identifier_verbosity (identifier_interactive) identifier_interactive )argument_list )call )assignment )expression_statement (if_statement (identifier_cmdlist) identifier_cmdlist (block (expression_statement (call (identifier_run_archive_cmdlist) identifier_run_archive_cmdlist (argument_list (identifier_cmdlist) identifier_cmdlist (keyword_argument (identifier_verbosity) identifier_verbosity (identifier_verbosity) identifier_verbosity )keyword_argument )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Test and list archives.
(module (function_definition (function_name_finish_assessment) function_name_finish_assessment (parameters (identifier_self) identifier_self (identifier_assessment_taken_id) identifier_assessment_taken_id )parameters (block (expression_statement (assignment (identifier_assessment_taken) identifier_assessment_taken (call (attribute (identifier_self) identifier_self (identifier__get_assessment_taken) identifier__get_assessment_taken )attribute (argument_list (identifier_assessment_taken_id) identifier_assessment_taken_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_assessment_taken_map) identifier_assessment_taken_map (attribute (identifier_assessment_taken) identifier_assessment_taken (identifier__my_map) identifier__my_map )attribute )assignment )expression_statement (if_statement (boolean_operator (call (attribute (identifier_assessment_taken) identifier_assessment_taken (identifier_has_started) identifier_has_started )attribute (argument_list )argument_list )call (not_operator (call (attribute (identifier_assessment_taken) identifier_assessment_taken (identifier_has_ended) identifier_has_ended )attribute (argument_list )argument_list )call )not_operator )boolean_operator (block (expression_statement (assignment (subscript (identifier_assessment_taken_map) identifier_assessment_taken_map (string_'completionTime') string_'completionTime' )subscript (call (attribute (identifier_DateTime) identifier_DateTime (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_assessment_taken_map) identifier_assessment_taken_map (string_'ended') string_'ended' )subscript (True) True )assignment )expression_statement (expression_statement (assignment (identifier_collection) identifier_collection (call (identifier_JSONClientValidated) identifier_JSONClientValidated (argument_list (string_'assessment') string_'assessment' (keyword_argument (identifier_collection) identifier_collection (string_'AssessmentTaken') string_'AssessmentTaken' )keyword_argument (keyword_argument (identifier_runtime) identifier_runtime (attribute (identifier_self) identifier_self (identifier__runtime) identifier__runtime )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_collection) identifier_collection (identifier_save) identifier_save )attribute (argument_list (identifier_assessment_taken_map) identifier_assessment_taken_map )argument_list )call )expression_statement )block (else_clause (block (raise_statement (call (attribute (identifier_errors) identifier_errors (identifier_IllegalState) identifier_IllegalState )attribute (argument_list )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Indicates the entire assessment is complete. arg: assessment_taken_id (osid.id.Id): ``Id`` of the ``AssessmentTaken`` raise: IllegalState - ``has_begun()`` is ``false or is_over()`` is ``true`` raise: NotFound - ``assessment_taken_id`` is not found raise: NullArgument - ``assessment_taken_id`` is ``null`` raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method must be implemented.*
(module (function_definition (function_name_connected_edges) function_name_connected_edges (parameters (identifier_G) identifier_G (identifier_nodes) identifier_nodes )parameters (block (expression_statement (assignment (identifier_nodes_in_G) identifier_nodes_in_G (call (attribute (identifier_collections) identifier_collections (identifier_deque) identifier_deque )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_node) identifier_node (identifier_nodes) identifier_nodes (block (if_statement (not_operator (call (attribute (identifier_G) identifier_G (identifier_has_node) identifier_has_node )attribute (argument_list (identifier_node) identifier_node )argument_list )call )not_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (call (attribute (identifier_nodes_in_G) identifier_nodes_in_G (identifier_extend) identifier_extend )attribute (argument_list (call (attribute (identifier_nx) identifier_nx (identifier_node_connected_component) identifier_node_connected_component )attribute (argument_list (identifier_G) identifier_G (identifier_node) identifier_node )argument_list )call )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_edges) identifier_edges (call (attribute (call (attribute (identifier_G) identifier_G (identifier_subgraph) identifier_subgraph )attribute (argument_list (identifier_nodes_in_G) identifier_nodes_in_G )argument_list )call (identifier_edges) identifier_edges )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (identifier_edges) identifier_edges )return_statement )block )function_definition )module
Given graph G and list of nodes, return the list of edges that are connected to nodes
(module (function_definition (function_name_add_event) function_name_add_event (parameters (identifier_request) identifier_request (default_parameter (identifier_template) identifier_template (string_'swingtime/add_event.html') string_'swingtime/add_event.html' )default_parameter (default_parameter (identifier_event_form_class) identifier_event_form_class (attribute (identifier_forms) identifier_forms (identifier_EventForm) identifier_EventForm )attribute )default_parameter (default_parameter (identifier_recurrence_form_class) identifier_recurrence_form_class (attribute (identifier_forms) identifier_forms (identifier_MultipleOccurrenceForm) identifier_MultipleOccurrenceForm )attribute )default_parameter )parameters (block (expression_statement (assignment (identifier_dtstart) identifier_dtstart (None) None )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_request) identifier_request (identifier_method) identifier_method )attribute (string_'POST') string_'POST' )comparison_operator (block (expression_statement (assignment (identifier_event_form) identifier_event_form (call (identifier_event_form_class) identifier_event_form_class (argument_list (attribute (identifier_request) identifier_request (identifier_POST) identifier_POST )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_recurrence_form) identifier_recurrence_form (call (identifier_recurrence_form_class) identifier_recurrence_form_class (argument_list (attribute (identifier_request) identifier_request (identifier_POST) identifier_POST )attribute )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (attribute (identifier_event_form) identifier_event_form (identifier_is_valid) identifier_is_valid )attribute (argument_list )argument_list )call (call (attribute (identifier_recurrence_form) identifier_recurrence_form (identifier_is_valid) identifier_is_valid )attribute (argument_list )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_event) identifier_event (call (attribute (identifier_event_form) identifier_event_form (identifier_save) identifier_save )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_recurrence_form) identifier_recurrence_form (identifier_save) identifier_save )attribute (argument_list (identifier_event) identifier_event )argument_list )call )expression_statement (return_statement (call (attribute (identifier_http) identifier_http (identifier_HttpResponseRedirect) identifier_HttpResponseRedirect )attribute (argument_list (call (attribute (identifier_event) identifier_event (identifier_get_absolute_url) identifier_get_absolute_url )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )if_statement )block (else_clause (block (if_statement (comparison_operator (string_'dtstart') string_'dtstart' (attribute (identifier_request) identifier_request (identifier_GET) identifier_GET )attribute )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_dtstart) identifier_dtstart (call (attribute (identifier_parser) identifier_parser (identifier_parse) identifier_parse )attribute (argument_list (subscript (attribute (identifier_request) identifier_request (identifier_GET) identifier_GET )attribute (string_'dtstart') string_'dtstart' )subscript )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (tuple (identifier_TypeError) identifier_TypeError (identifier_ValueError) identifier_ValueError )tuple (as_pattern_target (identifier_exc) identifier_exc )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_warning) identifier_warning )attribute (argument_list (identifier_exc) identifier_exc )argument_list )call )expression_statement )block )except_clause )try_statement )block )if_statement (expression_statement (assignment (identifier_dtstart) identifier_dtstart (boolean_operator (identifier_dtstart) identifier_dtstart (call (attribute (identifier_datetime) identifier_datetime (identifier_now) identifier_now )attribute (argument_list )argument_list )call )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_event_form) identifier_event_form (call (identifier_event_form_class) identifier_event_form_class (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_recurrence_form) identifier_recurrence_form (call (identifier_recurrence_form_class) identifier_recurrence_form_class (argument_list (keyword_argument (identifier_initial) identifier_initial (dictionary (pair (string_'dtstart') string_'dtstart' (identifier_dtstart) identifier_dtstart )pair )dictionary )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_render) identifier_render (argument_list (identifier_request) identifier_request (identifier_template) identifier_template (dictionary (pair (string_'dtstart') string_'dtstart' (identifier_dtstart) identifier_dtstart )pair (pair (string_'event_form') string_'event_form' (identifier_event_form) identifier_event_form )pair (pair (string_'recurrence_form') string_'recurrence_form' (identifier_recurrence_form) identifier_recurrence_form )pair )dictionary )argument_list )call )return_statement )block )function_definition )module
Add a new ``Event`` instance and 1 or more associated ``Occurrence``s. Context parameters: ``dtstart`` a datetime.datetime object representing the GET request value if present, otherwise None ``event_form`` a form object for updating the event ``recurrence_form`` a form object for adding occurrences
(module (function_definition (function_name_rollback_app) function_name_rollback_app (parameters (identifier_self) identifier_self (identifier_app_id) identifier_app_id (identifier_version) identifier_version (default_parameter (identifier_force) identifier_force (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary (pair (string_'force') string_'force' (identifier_force) identifier_force )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (dictionary (pair (string_'version') string_'version' (identifier_version) identifier_version )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier__do_request) identifier__do_request )attribute (argument_list (string_'PUT') string_'PUT' (call (attribute (string_'/v2/apps/{app_id}') string_'/v2/apps/{app_id}' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_app_id) identifier_app_id (identifier_app_id) identifier_app_id )keyword_argument )argument_list )call (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_response) identifier_response (identifier_json) identifier_json )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Roll an app back to a previous version. :param str app_id: application ID :param str version: application version :param bool force: apply even if a deployment is in progress :returns: a dict containing the deployment id and version :rtype: dict
(module (function_definition (function_name_delete_unused) function_name_delete_unused (parameters (identifier_self) identifier_self (default_parameter (identifier_keyword_ids) identifier_keyword_ids (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_keyword_ids) identifier_keyword_ids (None) None )comparison_operator (block (expression_statement (assignment (identifier_keywords) identifier_keywords (call (attribute (identifier_self) identifier_self (identifier_all) identifier_all )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_keywords) identifier_keywords (call (attribute (identifier_self) identifier_self (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_id__in) identifier_id__in (identifier_keyword_ids) identifier_keyword_ids )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (call (attribute (call (attribute (identifier_keywords) identifier_keywords (identifier_filter) identifier_filter )attribute (argument_list (keyword_argument (identifier_assignments__isnull) identifier_assignments__isnull (True) True )keyword_argument )argument_list )call (identifier_delete) identifier_delete )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Removes all instances that are not assigned to any object. Limits processing to ``keyword_ids`` if given.
(module (function_definition (function_name__flush) function_name__flush (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_classes_names) identifier_classes_names )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___cache_methods) identifier___cache_methods )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___cached_methods_idx) identifier___cached_methods_idx )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___cache_fields) identifier___cache_fields )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___cache_all_methods) identifier___cache_all_methods )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier___cache_all_fields) identifier___cache_all_fields )attribute (None) None )assignment )expression_statement )block )function_definition )module
Flush all caches Might be used after classes, methods or fields are added.
(module (function_definition (function_name_add) function_name_add (parameters (identifier_a) identifier_a (identifier_b) identifier_b )parameters (block (if_statement (comparison_operator (identifier_a) identifier_a (None) None )comparison_operator (block (if_statement (comparison_operator (identifier_b) identifier_b (None) None )comparison_operator (block (return_statement (None) None )return_statement )block (else_clause (block (return_statement (identifier_b) identifier_b )return_statement )block )else_clause )if_statement )block (elif_clause (comparison_operator (identifier_b) identifier_b (None) None )comparison_operator (block (return_statement (identifier_a) identifier_a )return_statement )block )elif_clause )if_statement (return_statement (binary_operator (identifier_a) identifier_a (identifier_b) identifier_b )binary_operator )return_statement )block )function_definition )module
Add two values, ignoring None
(module (function_definition (function_name_get_instance) function_name_get_instance (parameters (identifier_self) identifier_self (identifier_payload) identifier_payload )parameters (block (return_statement (call (identifier_TranscriptionInstance) identifier_TranscriptionInstance (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_payload) identifier_payload (keyword_argument (identifier_account_sid) identifier_account_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'account_sid') string_'account_sid' )subscript )keyword_argument (keyword_argument (identifier_recording_sid) identifier_recording_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'recording_sid') string_'recording_sid' )subscript )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Build an instance of TranscriptionInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.recording.transcription.TranscriptionInstance :rtype: twilio.rest.api.v2010.account.recording.transcription.TranscriptionInstance
(module (function_definition (function_name__retrieve) function_name__retrieve (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_criterion) identifier_criterion )list_splat_pattern )parameters (block (try_statement (block (return_statement (call (attribute (call (attribute (identifier_self) identifier_self (identifier__query) identifier__query )attribute (argument_list (list_splat (identifier_criterion) identifier_criterion )list_splat )argument_list )call (identifier_one) identifier_one )attribute (argument_list )argument_list )call )return_statement )block (except_clause (as_pattern (identifier_NoResultFound) identifier_NoResultFound (as_pattern_target (identifier_error) identifier_error )as_pattern_target )as_pattern (block (raise_statement (call (identifier_ModelNotFoundError) identifier_ModelNotFoundError (argument_list (call (attribute (string_"{} not found") string_"{} not found" (identifier_format) identifier_format )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier_model_class) identifier_model_class )attribute (identifier___name__) identifier___name__ )attribute )argument_list )call (identifier_error) identifier_error )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Retrieve a model by some criteria. :raises `ModelNotFoundError` if the row cannot be deleted.
(module (function_definition (function_name_callable_name) function_name_callable_name (parameters (identifier_callable_obj) identifier_callable_obj )parameters (block (try_statement (block (if_statement (parenthesized_expression (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_callable_obj) identifier_callable_obj (identifier_type) identifier_type )argument_list )call (call (identifier_issubclass) identifier_issubclass (argument_list (identifier_callable_obj) identifier_callable_obj (attribute (identifier_param) identifier_param (identifier_ParameterizedFunction) identifier_ParameterizedFunction )attribute )argument_list )call )boolean_operator )parenthesized_expression (block (return_statement (attribute (identifier_callable_obj) identifier_callable_obj (identifier___name__) identifier___name__ )attribute )return_statement )block (elif_clause (parenthesized_expression (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_callable_obj) identifier_callable_obj (attribute (identifier_param) identifier_param (identifier_Parameterized) identifier_Parameterized )attribute )argument_list )call (comparison_operator (string_'operation') string_'operation' (call (attribute (identifier_callable_obj) identifier_callable_obj (identifier_params) identifier_params )attribute (argument_list )argument_list )call )comparison_operator )boolean_operator )parenthesized_expression (block (return_statement (attribute (attribute (identifier_callable_obj) identifier_callable_obj (identifier_operation) identifier_operation )attribute (identifier___name__) identifier___name__ )attribute )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_callable_obj) identifier_callable_obj (identifier_partial) identifier_partial )argument_list )call (block (return_statement (call (identifier_str) identifier_str (argument_list (identifier_callable_obj) identifier_callable_obj )argument_list )call )return_statement )block )elif_clause (elif_clause (call (attribute (identifier_inspect) identifier_inspect (identifier_isfunction) identifier_isfunction )attribute (argument_list (identifier_callable_obj) identifier_callable_obj )argument_list )call (block (return_statement (attribute (identifier_callable_obj) identifier_callable_obj (identifier___name__) identifier___name__ )attribute )return_statement )block )elif_clause (elif_clause (call (attribute (identifier_inspect) identifier_inspect (identifier_ismethod) identifier_ismethod )attribute (argument_list (identifier_callable_obj) identifier_callable_obj )argument_list )call (block (expression_statement (assignment (identifier_meth) identifier_meth (identifier_callable_obj) identifier_callable_obj )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_sys) identifier_sys (identifier_version_info) identifier_version_info )attribute (tuple (integer_3) integer_3 (integer_0) integer_0 )tuple )comparison_operator (block (expression_statement (assignment (identifier_owner) identifier_owner (conditional_expression (attribute (identifier_meth) identifier_meth (identifier_im_class) identifier_im_class )attribute (comparison_operator (attribute (identifier_meth) identifier_meth (identifier_im_self) identifier_im_self )attribute (None) None )comparison_operator (attribute (identifier_meth) identifier_meth (identifier_im_self) identifier_im_self )attribute )conditional_expression )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_owner) identifier_owner (attribute (identifier_meth) identifier_meth (identifier___self__) identifier___self__ )attribute )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (attribute (identifier_meth) identifier_meth (identifier___name__) identifier___name__ )attribute (string_'__call__') string_'__call__' )comparison_operator (block (return_statement (attribute (call (identifier_type) identifier_type (argument_list (identifier_owner) identifier_owner )argument_list )call (identifier___name__) identifier___name__ )attribute )return_statement )block )if_statement (return_statement (call (attribute (string_'.') string_'.' (identifier_join) identifier_join )attribute (argument_list (list (attribute (identifier_owner) identifier_owner (identifier___name__) identifier___name__ )attribute (attribute (identifier_meth) identifier_meth (identifier___name__) identifier___name__ )attribute )list )argument_list )call )return_statement )block )elif_clause (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_callable_obj) identifier_callable_obj (attribute (identifier_types) identifier_types (identifier_GeneratorType) identifier_GeneratorType )attribute )argument_list )call (block (return_statement (attribute (identifier_callable_obj) identifier_callable_obj (identifier___name__) identifier___name__ )attribute )return_statement )block )elif_clause (else_clause (block (return_statement (attribute (call (identifier_type) identifier_type (argument_list (identifier_callable_obj) identifier_callable_obj )argument_list )call (identifier___name__) identifier___name__ )attribute )return_statement )block )else_clause )if_statement )block (except_clause (block (return_statement (call (identifier_str) identifier_str (argument_list (identifier_callable_obj) identifier_callable_obj )argument_list )call )return_statement )block )except_clause )try_statement )block )function_definition )module
Attempt to return a meaningful name identifying a callable or generator
(module (function_definition (function_name_truncate_table) function_name_truncate_table (parameters (identifier_self) identifier_self (identifier_tablename) identifier_tablename )parameters (block (expression_statement (call (attribute (call (attribute (identifier_self) identifier_self (identifier_get) identifier_get )attribute (argument_list (identifier_tablename) identifier_tablename )argument_list )call (identifier_remove) identifier_remove )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_db) identifier_db )attribute (identifier_commit) identifier_commit )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
SQLite3 doesn't support direct truncate, so we just use delete here
(module (function_definition (function_name__ref_bib) function_name__ref_bib (parameters (identifier_key) identifier_key (identifier_ref) identifier_ref )parameters (block (expression_statement (assignment (identifier_s) identifier_s (string_'') string_'' )assignment )expression_statement (expression_statement (augmented_assignment (identifier_s) identifier_s (call (attribute (string_'@{}{{{},\n') string_'@{}{{{},\n' (identifier_format) identifier_format )attribute (argument_list (subscript (identifier_ref) identifier_ref (string_'type') string_'type' )subscript (identifier_key) identifier_key )argument_list )call )augmented_assignment )expression_statement (expression_statement (assignment (identifier_entry_lines) identifier_entry_lines (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_ref) identifier_ref (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_k) identifier_k (string_'type') string_'type' )comparison_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (comparison_operator (identifier_k) identifier_k (string_'authors') string_'authors' )comparison_operator (block (expression_statement (call (attribute (identifier_entry_lines) identifier_entry_lines (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_' author = {{{}}}') string_' author = {{{}}}' (identifier_format) identifier_format )attribute (argument_list (call (attribute (string_' and ') string_' and ' (identifier_join) identifier_join )attribute (argument_list (identifier_v) identifier_v )argument_list )call )argument_list )call )argument_list )call )expression_statement )block (elif_clause (comparison_operator (identifier_k) identifier_k (string_'editors') string_'editors' )comparison_operator (block (expression_statement (call (attribute (identifier_entry_lines) identifier_entry_lines (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_' editor = {{{}}}') string_' editor = {{{}}}' (identifier_format) identifier_format )attribute (argument_list (call (attribute (string_' and ') string_' and ' (identifier_join) identifier_join )attribute (argument_list (identifier_v) identifier_v )argument_list )call )argument_list )call )argument_list )call )expression_statement )block )elif_clause (else_clause (block (expression_statement (call (attribute (identifier_entry_lines) identifier_entry_lines (identifier_append) identifier_append )attribute (argument_list (call (attribute (string_' {} = {{{}}}') string_' {} = {{{}}}' (identifier_format) identifier_format )attribute (argument_list (identifier_k) identifier_k (identifier_v) identifier_v )argument_list )call )argument_list )call )expression_statement )block )else_clause )if_statement )block )for_statement (expression_statement (augmented_assignment (identifier_s) identifier_s (call (attribute (string_',\n') string_',\n' (identifier_join) identifier_join )attribute (argument_list (identifier_entry_lines) identifier_entry_lines )argument_list )call )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_s) identifier_s (string_'\n}') string_'\n}' )augmented_assignment )expression_statement (return_statement (identifier_s) identifier_s )return_statement )block )function_definition )module
Convert a single reference to bibtex format
(module (function_definition (function_name_attach) function_name_attach (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_s) identifier_s (attribute (identifier_self) identifier_self (identifier__sensor) identifier__sensor )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update) identifier_update )attribute (argument_list (identifier_s) identifier_s (call (attribute (identifier_s) identifier_s (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__sensor) identifier__sensor )attribute (identifier_attach) identifier_attach )attribute (argument_list (identifier_self) identifier_self )argument_list )call )expression_statement )block )function_definition )module
Attach strategy to its sensor and send initial update.
(module (function_definition (function_name_add_injectable) function_name_add_injectable (parameters (identifier_name) identifier_name (identifier_value) identifier_value (default_parameter (identifier_autocall) identifier_autocall (True) True )default_parameter (default_parameter (identifier_cache) identifier_cache (False) False )default_parameter (default_parameter (identifier_cache_scope) identifier_cache_scope (identifier__CS_FOREVER) identifier__CS_FOREVER )default_parameter (default_parameter (identifier_memoize) identifier_memoize (False) False )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_Callable) identifier_Callable )argument_list )call (block (if_statement (identifier_autocall) identifier_autocall (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier__InjectableFuncWrapper) identifier__InjectableFuncWrapper (argument_list (identifier_name) identifier_name (identifier_value) identifier_value (keyword_argument (identifier_cache) identifier_cache (identifier_cache) identifier_cache )keyword_argument (keyword_argument (identifier_cache_scope) identifier_cache_scope (identifier_cache_scope) identifier_cache_scope )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_value) identifier_value (identifier_clear_cached) identifier_clear_cached )attribute (argument_list )argument_list )call )expression_statement )block (elif_clause (boolean_operator (not_operator (identifier_autocall) identifier_autocall )not_operator (identifier_memoize) identifier_memoize )boolean_operator (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier__memoize_function) identifier__memoize_function (argument_list (identifier_value) identifier_value (identifier_name) identifier_name (keyword_argument (identifier_cache_scope) identifier_cache_scope (identifier_cache_scope) identifier_cache_scope )keyword_argument )argument_list )call )assignment )expression_statement )block )elif_clause )if_statement )block )if_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_'registering injectable {!r}') string_'registering injectable {!r}' (identifier_format) identifier_format )attribute (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (subscript (identifier__INJECTABLES) identifier__INJECTABLES (identifier_name) identifier_name )subscript (identifier_value) identifier_value )assignment )expression_statement )block )function_definition )module
Add a value that will be injected into other functions. Parameters ---------- name : str value If a callable and `autocall` is True then the function's argument names and keyword argument values will be matched to registered variables when the function needs to be evaluated by Orca. The return value will be passed to any functions using this injectable. In all other cases, `value` will be passed through untouched. autocall : bool, optional Set to True to have injectable functions automatically called (with argument matching) and the result injected instead of the function itself. cache : bool, optional Whether to cache the return value of an injectable function. Only applies when `value` is a callable and `autocall` is True. cache_scope : {'step', 'iteration', 'forever'}, optional Scope for which to cache data. Default is to cache forever (or until manually cleared). 'iteration' caches data for each complete iteration of the pipeline, 'step' caches data for a single step of the pipeline. memoize : bool, optional If autocall is False it is still possible to cache function results by setting this flag to True. Cached values are stored in a dictionary keyed by argument values, so the argument values must be hashable. Memoized functions have their caches cleared according to the same rules as universal caching.
(module (function_definition (function_name_logs) function_name_logs (parameters (identifier_ctx) identifier_ctx (identifier_services) identifier_services (identifier_num) identifier_num (identifier_follow) identifier_follow )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"running command %s (%s)") string_"running command %s (%s)" (attribute (attribute (identifier_ctx) identifier_ctx (identifier_command) identifier_command )attribute (identifier_name) identifier_name )attribute (attribute (identifier_ctx) identifier_ctx (identifier_params) identifier_params )attribute (keyword_argument (identifier_extra) identifier_extra (dictionary (pair (string_"command") string_"command" (attribute (attribute (identifier_ctx) identifier_ctx (identifier_command) identifier_command )attribute (identifier_name) identifier_name )attribute )pair (pair (string_"params") string_"params" (attribute (identifier_ctx) identifier_ctx (identifier_params) identifier_params )attribute )pair )dictionary )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_home) identifier_home (subscript (attribute (identifier_ctx) identifier_ctx (identifier_obj) identifier_obj )attribute (string_"HOME") string_"HOME" )subscript )assignment )expression_statement (expression_statement (assignment (identifier_services_path) identifier_services_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_home) identifier_home (identifier_SERVICES) identifier_SERVICES )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tail_threads) identifier_tail_threads (list )list )assignment )expression_statement (for_statement (identifier_service) identifier_service (identifier_services) identifier_services (block (expression_statement (assignment (identifier_logpath) identifier_logpath (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_services_path) identifier_services_path (identifier_service) identifier_service (identifier_LOGS_DIR) identifier_LOGS_DIR (identifier_STDOUTLOG) identifier_STDOUTLOG )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_logpath) identifier_logpath )argument_list )call (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_"tailing %s") string_"tailing %s" (identifier_logpath) identifier_logpath )argument_list )call )expression_statement (expression_statement (assignment (identifier_t) identifier_t (call (attribute (identifier_threading) identifier_threading (identifier_Thread) identifier_Thread )attribute (argument_list (keyword_argument (identifier_target) identifier_target (identifier_Tailer) identifier_Tailer )keyword_argument (keyword_argument (identifier_kwargs) identifier_kwargs (dictionary (pair (string_"name") string_"name" (identifier_service) identifier_service )pair (pair (string_"nlines") string_"nlines" (identifier_num) identifier_num )pair (pair (string_"filepath") string_"filepath" (identifier_logpath) identifier_logpath )pair (pair (string_"follow") string_"follow" (identifier_follow) identifier_follow )pair )dictionary )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_t) identifier_t (identifier_daemon) identifier_daemon )attribute (True) True )assignment )expression_statement (expression_statement (call (attribute (identifier_t) identifier_t (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_tail_threads) identifier_tail_threads (identifier_append) identifier_append )attribute (argument_list (identifier_t) identifier_t )argument_list )call )expression_statement )block )if_statement )block )for_statement (if_statement (identifier_tail_threads) identifier_tail_threads (block (while_statement (call (attribute (subscript (identifier_tail_threads) identifier_tail_threads (integer_0) integer_0 )subscript (identifier_isAlive) identifier_isAlive )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (subscript (identifier_tail_threads) identifier_tail_threads (integer_0) integer_0 )subscript (identifier_join) identifier_join )attribute (argument_list (float_0.1) float_0.1 )argument_list )call )expression_statement )block )while_statement )block )if_statement )block )function_definition )module
Show logs of daemonized service.
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (expression_statement (string_"Delete a `key` from the keystore.") string_"Delete a `key` from the keystore." )expression_statement (if_statement (comparison_operator (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_delete_from_index) identifier_delete_from_index )attribute (argument_list (identifier_key) identifier_key )argument_list )call )expression_statement )block )if_statement (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_key) identifier_key )subscript )delete_statement )block )function_definition )module
Delete a `key` from the keystore.
(module (function_definition (function_name_data) function_name_data (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_Sequence) identifier_Sequence (type_parameter (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_int) identifier_int )type (type (identifier_float) identifier_float )type )type_parameter )generic_type )type )type_parameter )generic_type )type (block (return_statement (list_comprehension (tuple (identifier_num) identifier_num (identifier_prob) identifier_prob )tuple (for_in_clause (pattern_list (identifier_num) identifier_num (identifier_prob) identifier_prob )pattern_list (call (identifier_zip) identifier_zip (argument_list (attribute (identifier_self) identifier_self (identifier__num_cfds_seq) identifier__num_cfds_seq )attribute (attribute (identifier_self) identifier_self (identifier__gnd_state_probs) identifier__gnd_state_probs )attribute )argument_list )call )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Returns a sequence of tuple pairs with the first item being a number of Cliffords and the second item being the corresponding average ground state probability.
(module (function_definition (function_name_add_chain) function_name_add_chain (parameters (identifier_self) identifier_self (identifier_group_name) identifier_group_name (identifier_component_map) identifier_component_map )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_assert_writeable) identifier_assert_writeable )attribute (argument_list )argument_list )call )expression_statement (for_statement (pattern_list (identifier_component) identifier_component (identifier_path) identifier_path )pattern_list (call (attribute (identifier_component_map) identifier_component_map (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (not_operator (call (attribute (identifier_path) identifier_path (identifier_startswith) identifier_startswith )attribute (argument_list (string_'Analyses/') string_'Analyses/' )argument_list )call )not_operator (block (expression_statement (assignment (identifier_path) identifier_path (call (attribute (string_'Analyses/{}') string_'Analyses/{}' (identifier_format) identifier_format )attribute (argument_list (identifier_path) identifier_path )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_component_map) identifier_component_map (identifier_component) identifier_component )subscript (identifier_path) identifier_path )assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_analysis_attributes) identifier_add_analysis_attributes )attribute (argument_list (identifier_group_name) identifier_group_name (identifier_component_map) identifier_component_map )argument_list )call )expression_statement )block )function_definition )module
Adds the component chain to ``group_name`` in the fast5. These are added as attributes to the group. :param group_name: The group name you wish to add chaining data to, e.g. ``Test_000`` :param component_map: The set of components and corresponding group names or group paths that contribute data to the analysis. If group names are provided, these will be converted into group paths. If ``Test_000`` uses data from the results of ``first_component`` stored at ``Analyses/First_000/`` the component_map could be ``{'first_component': 'First_000'}`` or ``{'first_component': 'Analyses/First_000'}``.
(module (function_definition (function_name_pickle_to_param) function_name_pickle_to_param (parameters (identifier_obj) identifier_obj (identifier_name) identifier_name )parameters (block (return_statement (call (identifier_from_pyvalue) identifier_from_pyvalue (argument_list (binary_operator (string_u"pickle:%s") string_u"pickle:%s" (identifier_name) identifier_name )binary_operator (call (identifier_unicode) identifier_unicode (argument_list (call (attribute (identifier_pickle) identifier_pickle (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_obj) identifier_obj )argument_list )call )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Return the top-level element of a document sub-tree containing the pickled serialization of a Python object.
(module (function_definition (function_name_from_scf_input) function_name_from_scf_input (parameters (identifier_cls) identifier_cls (identifier_workdir) identifier_workdir (identifier_scf_input) identifier_scf_input (default_parameter (identifier_manager) identifier_manager (None) None )default_parameter (default_parameter (identifier_allocate) identifier_allocate (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_flow) identifier_flow (call (identifier_cls) identifier_cls (argument_list (identifier_workdir) identifier_workdir (keyword_argument (identifier_manager) identifier_manager (identifier_manager) identifier_manager )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_flow) identifier_flow (identifier_register_scf_task) identifier_register_scf_task )attribute (argument_list (identifier_scf_input) identifier_scf_input )argument_list )call )expression_statement (expression_statement (assignment (identifier_scf_task) identifier_scf_task (subscript (subscript (identifier_flow) identifier_flow (integer_0) integer_0 )subscript (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_nl_work) identifier_nl_work (call (attribute (identifier_DteWork) identifier_DteWork (identifier_from_scf_task) identifier_from_scf_task )attribute (argument_list (identifier_scf_task) identifier_scf_task )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_flow) identifier_flow (identifier_register_work) identifier_register_work )attribute (argument_list (identifier_nl_work) identifier_nl_work )argument_list )call )expression_statement (if_statement (identifier_allocate) identifier_allocate (block (expression_statement (call (attribute (identifier_flow) identifier_flow (identifier_allocate) identifier_allocate )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_flow) identifier_flow )return_statement )block )function_definition )module
Create a `NonlinearFlow` for second order susceptibility calculations from an `AbinitInput` defining a ground-state run. Args: workdir: Working directory of the flow. scf_input: :class:`AbinitInput` object with the parameters for the GS-SCF run. manager: :class:`TaskManager` object. Read from `manager.yml` if None. allocate: True if the flow should be allocated before returning. Return: :class:`NonlinearFlow` object.
(module (function_definition (function_name_is_np_compat) function_name_is_np_compat (parameters )parameters (block (expression_statement (assignment (identifier_curr) identifier_curr (call (attribute (identifier_ctypes) identifier_ctypes (identifier_c_bool) identifier_c_bool )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_check_call) identifier_check_call (argument_list (call (attribute (identifier__LIB) identifier__LIB (identifier_MXIsNumpyCompatible) identifier_MXIsNumpyCompatible )attribute (argument_list (call (attribute (identifier_ctypes) identifier_ctypes (identifier_byref) identifier_byref )attribute (argument_list (identifier_curr) identifier_curr )argument_list )call )argument_list )call )argument_list )call )expression_statement (return_statement (attribute (identifier_curr) identifier_curr (identifier_value) identifier_value )attribute )return_statement )block )function_definition )module
Checks whether the NumPy compatibility is currently turned on. NumPy-compatibility is turned off by default in backend. Returns ------- A bool value indicating whether the NumPy compatibility is currently on.
(module (function_definition (function_name_parse) function_name_parse (parameters (identifier_self) identifier_self (identifier_input_text) identifier_input_text (identifier_syncmap) identifier_syncmap )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_log_exc) identifier_log_exc )attribute (argument_list (binary_operator (string_u"%s is abstract and cannot be called directly") string_u"%s is abstract and cannot be called directly" (parenthesized_expression (attribute (identifier_self) identifier_self (identifier_TAG) identifier_TAG )attribute )parenthesized_expression )binary_operator (None) None (True) True (identifier_NotImplementedError) identifier_NotImplementedError )argument_list )call )expression_statement )block )function_definition )module
Parse the given ``input_text`` and append the extracted fragments to ``syncmap``. :param input_text: the input text as a Unicode string (read from file) :type input_text: string :param syncmap: the syncmap to append to :type syncmap: :class:`~aeneas.syncmap.SyncMap`
(module (function_definition (function_name__get_memory_contents) function_name__get_memory_contents (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__memory_contents) identifier__memory_contents )attribute (None) None )comparison_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier__memory_contents) identifier__memory_contents )attribute )return_statement )block )if_statement (expression_statement (assignment (identifier_schedule) identifier_schedule (call (attribute (identifier_scheduler) identifier_scheduler (identifier_minimize_peak_memory) identifier_minimize_peak_memory )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__graph) identifier__graph )attribute (attribute (identifier_self) identifier_self (identifier__scheduler_alg) identifier__scheduler_alg )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__memory_contents) identifier__memory_contents )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier__graph) identifier__graph )attribute (identifier_compute_memory_contents_under_schedule) identifier_compute_memory_contents_under_schedule )attribute (argument_list (identifier_schedule) identifier_schedule )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_self) identifier_self (identifier__memory_contents) identifier__memory_contents )attribute )return_statement )block )function_definition )module
Runs the scheduler to determine memory contents at every point in time. Returns: a list of frozenset of strings, where the ith entry describes the tensors in memory when executing operation i (where schedule[i] is an index into GetAllOperationNames()).
(module (function_definition (function_name_rivermap_update) function_name_rivermap_update (parameters (identifier_self) identifier_self (identifier_river) identifier_river (identifier_water_flow) identifier_water_flow (identifier_rivermap) identifier_rivermap (identifier_precipitations) identifier_precipitations )parameters (block (expression_statement (assignment (identifier_isSeed) identifier_isSeed (True) True )assignment )expression_statement (expression_statement (assignment (pattern_list (identifier_px) identifier_px (identifier_py) identifier_py )pattern_list (tuple (integer_0) integer_0 (integer_0) integer_0 )tuple )assignment )expression_statement (for_statement (pattern_list (identifier_x) identifier_x (identifier_y) identifier_y )pattern_list (identifier_river) identifier_river (block (if_statement (identifier_isSeed) identifier_isSeed (block (expression_statement (assignment (subscript (identifier_rivermap) identifier_rivermap (identifier_y) identifier_y (identifier_x) identifier_x )subscript (subscript (identifier_water_flow) identifier_water_flow (identifier_y) identifier_y (identifier_x) identifier_x )subscript )assignment )expression_statement (expression_statement (assignment (identifier_isSeed) identifier_isSeed (False) False )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_rivermap) identifier_rivermap (identifier_y) identifier_y (identifier_x) identifier_x )subscript (binary_operator (subscript (identifier_precipitations) identifier_precipitations (identifier_y) identifier_y (identifier_x) identifier_x )subscript (subscript (identifier_rivermap) identifier_rivermap (identifier_py) identifier_py (identifier_px) identifier_px )subscript )binary_operator )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (pattern_list (identifier_px) identifier_px (identifier_py) identifier_py )pattern_list (expression_list (identifier_x) identifier_x (identifier_y) identifier_y )expression_list )assignment )expression_statement )block )for_statement )block )function_definition )module
Update the rivermap with the rainfall that is to become the waterflow
(module (function_definition (function_name_load_config) function_name_load_config (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_config) identifier_config (call (identifier_Config) identifier_Config (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_config_obj) identifier_config_obj )attribute (call (attribute (identifier_config) identifier_config (identifier_load) identifier_load )attribute (argument_list (string_'awsshellrc') string_'awsshellrc' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_config_section) identifier_config_section )attribute (subscript (attribute (identifier_self) identifier_self (identifier_config_obj) identifier_config_obj )attribute (string_'aws-shell') string_'aws-shell' )subscript )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_model_completer) identifier_model_completer )attribute (identifier_match_fuzzy) identifier_match_fuzzy )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_config_section) identifier_config_section )attribute (identifier_as_bool) identifier_as_bool )attribute (argument_list (string_'match_fuzzy') string_'match_fuzzy' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_enable_vi_bindings) identifier_enable_vi_bindings )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_config_section) identifier_config_section )attribute (identifier_as_bool) identifier_as_bool )attribute (argument_list (string_'enable_vi_bindings') string_'enable_vi_bindings' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_show_completion_columns) identifier_show_completion_columns )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_config_section) identifier_config_section )attribute (identifier_as_bool) identifier_as_bool )attribute (argument_list (string_'show_completion_columns') string_'show_completion_columns' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_show_help) identifier_show_help )attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_config_section) identifier_config_section )attribute (identifier_as_bool) identifier_as_bool )attribute (argument_list (string_'show_help') string_'show_help' )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_theme) identifier_theme )attribute (subscript (attribute (identifier_self) identifier_self (identifier_config_section) identifier_config_section )attribute (string_'theme') string_'theme' )subscript )assignment )expression_statement )block )function_definition )module
Load the config from the config file or template.
(module (function_definition (function_name_remove_ipv4addr) function_name_remove_ipv4addr (parameters (identifier_self) identifier_self (identifier_ipv4addr) identifier_ipv4addr )parameters (block (for_statement (identifier_addr) identifier_addr (attribute (identifier_self) identifier_self (identifier_ipv4addrs) identifier_ipv4addrs )attribute (block (if_statement (parenthesized_expression (boolean_operator (parenthesized_expression (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_addr) identifier_addr (identifier_dict) identifier_dict )argument_list )call (comparison_operator (subscript (identifier_addr) identifier_addr (string_'ipv4addr') string_'ipv4addr' )subscript (identifier_ipv4addr) identifier_ipv4addr )comparison_operator )boolean_operator )parenthesized_expression (parenthesized_expression (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_addr) identifier_addr (identifier_HostIPv4) identifier_HostIPv4 )argument_list )call (comparison_operator (attribute (identifier_addr) identifier_addr (identifier_ipv4addr) identifier_ipv4addr )attribute (identifier_ipv4addr) identifier_ipv4addr )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator )parenthesized_expression (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ipv4addrs) identifier_ipv4addrs )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_addr) identifier_addr )argument_list )call )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement )block )function_definition )module
Remove an IPv4 address from the host. :param str ipv4addr: The IP address to remove
(module (function_definition (function_name_get_bitcoind_client) function_name_get_bitcoind_client (parameters )parameters (block (expression_statement (assignment (identifier_bitcoind_opts) identifier_bitcoind_opts (call (identifier_get_bitcoin_opts) identifier_get_bitcoin_opts (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bitcoind_host) identifier_bitcoind_host (subscript (identifier_bitcoind_opts) identifier_bitcoind_opts (string_'bitcoind_server') string_'bitcoind_server' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_bitcoind_port) identifier_bitcoind_port (subscript (identifier_bitcoind_opts) identifier_bitcoind_opts (string_'bitcoind_port') string_'bitcoind_port' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_bitcoind_user) identifier_bitcoind_user (subscript (identifier_bitcoind_opts) identifier_bitcoind_opts (string_'bitcoind_user') string_'bitcoind_user' )subscript )assignment )expression_statement (expression_statement (assignment (identifier_bitcoind_passwd) identifier_bitcoind_passwd (subscript (identifier_bitcoind_opts) identifier_bitcoind_opts (string_'bitcoind_passwd') string_'bitcoind_passwd' )subscript )assignment )expression_statement (return_statement (call (identifier_create_bitcoind_service_proxy) identifier_create_bitcoind_service_proxy (argument_list (identifier_bitcoind_user) identifier_bitcoind_user (identifier_bitcoind_passwd) identifier_bitcoind_passwd (keyword_argument (identifier_server) identifier_server (identifier_bitcoind_host) identifier_bitcoind_host )keyword_argument (keyword_argument (identifier_port) identifier_port (identifier_bitcoind_port) identifier_bitcoind_port )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Connect to the bitcoind node
(module (function_definition (function_name_datetime) function_name_datetime (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (string_'dt_scale') string_'dt_scale' (call (attribute (attribute (identifier_self) identifier_self (identifier__cache) identifier__cache )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__cache) identifier__cache )attribute (string_'dt_scale') string_'dt_scale' )subscript (binary_operator (attribute (identifier_self) identifier_self (identifier__datetime) identifier__datetime )attribute (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_seconds) identifier_seconds (attribute (identifier_self) identifier_self (identifier__offset) identifier__offset )attribute )keyword_argument )argument_list )call )binary_operator )assignment )expression_statement )block )if_statement (return_statement (subscript (attribute (identifier_self) identifier_self (identifier__cache) identifier__cache )attribute (string_'dt_scale') string_'dt_scale' )subscript )return_statement )block )function_definition )module
Conversion of the Date object into a ``datetime.datetime`` The resulting object is a timezone-naive instance with the same scale as the originating Date object.
(module (function_definition (function_name_com_daltonmaag_check_required_fields) function_name_com_daltonmaag_check_required_fields (parameters (identifier_ufo_font) identifier_ufo_font )parameters (block (expression_statement (assignment (identifier_recommended_fields) identifier_recommended_fields (list )list )assignment )expression_statement (for_statement (identifier_field) identifier_field (list (string_"unitsPerEm") string_"unitsPerEm" (string_"ascender") string_"ascender" (string_"descender") string_"descender" (string_"xHeight") string_"xHeight" (string_"capHeight") string_"capHeight" (string_"familyName") string_"familyName" )list (block (if_statement (comparison_operator (call (attribute (attribute (attribute (identifier_ufo_font) identifier_ufo_font (identifier_info) identifier_info )attribute (identifier___dict__) identifier___dict__ )attribute (identifier_get) identifier_get )attribute (argument_list (binary_operator (string_"_") string_"_" (identifier_field) identifier_field )binary_operator )argument_list )call (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_recommended_fields) identifier_recommended_fields (identifier_append) identifier_append )attribute (argument_list (identifier_field) identifier_field )argument_list )call )expression_statement )block )if_statement )block )for_statement (if_statement (identifier_recommended_fields) identifier_recommended_fields (block (expression_statement (yield (expression_list (identifier_FAIL) identifier_FAIL (string_f"Required field(s) missing: {recommended_fields}") string_f"Required field(s) missing: {recommended_fields}" )expression_list )yield )expression_statement )block (else_clause (block (expression_statement (yield (expression_list (identifier_PASS) identifier_PASS (string_"Required fields present.") string_"Required fields present." )expression_list )yield )expression_statement )block )else_clause )if_statement )block )function_definition )module
Check that required fields are present in the UFO fontinfo. ufo2ft requires these info fields to compile a font binary: unitsPerEm, ascender, descender, xHeight, capHeight and familyName.
(module (function_definition (function_name_remove_polygons) function_name_remove_polygons (parameters (identifier_self) identifier_self (identifier_test) identifier_test )parameters (block (expression_statement (assignment (identifier_empty) identifier_empty (list )list )assignment )expression_statement (for_statement (identifier_element) identifier_element (attribute (identifier_self) identifier_self (identifier_elements) identifier_elements )attribute (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_element) identifier_element (identifier_PolygonSet) identifier_PolygonSet )argument_list )call (block (expression_statement (assignment (identifier_ii) identifier_ii (integer_0) integer_0 )assignment )expression_statement (while_statement (comparison_operator (identifier_ii) identifier_ii (call (identifier_len) identifier_len (argument_list (attribute (identifier_element) identifier_element (identifier_polygons) identifier_polygons )attribute )argument_list )call )comparison_operator (block (if_statement (call (identifier_test) identifier_test (argument_list (subscript (attribute (identifier_element) identifier_element (identifier_polygons) identifier_polygons )attribute (identifier_ii) identifier_ii )subscript (subscript (attribute (identifier_element) identifier_element (identifier_layers) identifier_layers )attribute (identifier_ii) identifier_ii )subscript (subscript (attribute (identifier_element) identifier_element (identifier_datatypes) identifier_datatypes )attribute (identifier_ii) identifier_ii )subscript )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_element) identifier_element (identifier_polygons) identifier_polygons )attribute (identifier_pop) identifier_pop )attribute (argument_list (identifier_ii) identifier_ii )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_element) identifier_element (identifier_layers) identifier_layers )attribute (identifier_pop) identifier_pop )attribute (argument_list (identifier_ii) identifier_ii )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_element) identifier_element (identifier_datatypes) identifier_datatypes )attribute (identifier_pop) identifier_pop )attribute (argument_list (identifier_ii) identifier_ii )argument_list )call )expression_statement )block (else_clause (block (expression_statement (augmented_assignment (identifier_ii) identifier_ii (integer_1) integer_1 )augmented_assignment )expression_statement )block )else_clause )if_statement )block )while_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_element) identifier_element (identifier_polygons) identifier_polygons )attribute )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (identifier_empty) identifier_empty (identifier_append) identifier_append )attribute (argument_list (identifier_element) identifier_element )argument_list )call )expression_statement )block )if_statement )block )if_statement )block )for_statement (for_statement (identifier_element) identifier_element (identifier_empty) identifier_empty (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_elements) identifier_elements )attribute (identifier_remove) identifier_remove )attribute (argument_list (identifier_element) identifier_element )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Remove polygons from this cell. The function or callable ``test`` is called for each polygon in the cell. If its return value evaluates to ``True``, the corresponding polygon is removed from the cell. Parameters ---------- test : callable Test function to query whether a polygon should be removed. The function is called with arguments: ``(points, layer, datatype)`` Returns ------- out : ``Cell`` This cell. Examples -------- Remove polygons in layer 1: >>> cell.remove_polygons(lambda pts, layer, datatype: ... layer == 1) Remove polygons with negative x coordinates: >>> cell.remove_polygons(lambda pts, layer, datatype: ... any(pts[:, 0] < 0))
(module (function_definition (function_name_as_list_data) function_name_as_list_data (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_element) identifier_element (call (attribute (identifier_ElementTree) identifier_ElementTree (identifier_Element) identifier_Element )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_list_type) identifier_list_type )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_id_) identifier_id_ (call (attribute (identifier_ElementTree) identifier_ElementTree (identifier_SubElement) identifier_SubElement )attribute (argument_list (identifier_element) identifier_element (string_"id") string_"id" )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_id_) identifier_id_ (identifier_text) identifier_text )attribute (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )assignment )expression_statement (expression_statement (assignment (identifier_name) identifier_name (call (attribute (identifier_ElementTree) identifier_ElementTree (identifier_SubElement) identifier_SubElement )attribute (argument_list (identifier_element) identifier_element (string_"name") string_"name" )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_name) identifier_name (identifier_text) identifier_text )attribute (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )assignment )expression_statement (return_statement (identifier_element) identifier_element )return_statement )block )function_definition )module
Return an Element to be used in a list. Most lists want an element with tag of list_type, and subelements of id and name. Returns: Element: list representation of object.
(module (function_definition (function_name_pull_cfg_from_parameters_out_file) function_name_pull_cfg_from_parameters_out_file (parameters (identifier_parameters_out_file) identifier_parameters_out_file (default_parameter (identifier_namelist_to_read) identifier_namelist_to_read (string_"nml_allcfgs") string_"nml_allcfgs" )default_parameter )parameters (block (expression_statement (assignment (identifier_parameters_out) identifier_parameters_out (call (identifier_read_cfg_file) identifier_read_cfg_file (argument_list (identifier_parameters_out_file) identifier_parameters_out_file )argument_list )call )assignment )expression_statement (return_statement (call (identifier_pull_cfg_from_parameters_out) identifier_pull_cfg_from_parameters_out (argument_list (identifier_parameters_out) identifier_parameters_out (keyword_argument (identifier_namelist_to_read) identifier_namelist_to_read (identifier_namelist_to_read) identifier_namelist_to_read )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Pull out a single config set from a MAGICC ``PARAMETERS.OUT`` file. This function reads in the ``PARAMETERS.OUT`` file and returns a single file with the config that needs to be passed to MAGICC in order to do the same run as is represented by the values in ``PARAMETERS.OUT``. Parameters ---------- parameters_out_file : str The ``PARAMETERS.OUT`` file to read namelist_to_read : str The namelist to read from the file. Returns ------- :obj:`f90nml.Namelist` An f90nml object with the cleaned, read out config. Examples -------- >>> cfg = pull_cfg_from_parameters_out_file("PARAMETERS.OUT") >>> cfg.write("/somewhere/else/ANOTHERNAME.cfg")
(module (function_definition (function_name_as_ordered_dict) function_name_as_ordered_dict (parameters (identifier_self) identifier_self (typed_default_parameter (identifier_preference_orders) identifier_preference_orders (type (generic_type (identifier_List) identifier_List (type_parameter (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_str) identifier_str )type )type_parameter )generic_type )type )type_parameter )generic_type )type (None) None )typed_default_parameter )parameters (type (identifier_OrderedDict) identifier_OrderedDict )type (block (expression_statement (assignment (identifier_params_dict) identifier_params_dict (call (attribute (identifier_self) identifier_self (identifier_as_dict) identifier_as_dict )attribute (argument_list (keyword_argument (identifier_quiet) identifier_quiet (True) True )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_preference_orders) identifier_preference_orders )not_operator (block (expression_statement (assignment (identifier_preference_orders) identifier_preference_orders (list )list )assignment )expression_statement (expression_statement (call (attribute (identifier_preference_orders) identifier_preference_orders (identifier_append) identifier_append )attribute (argument_list (list (string_"dataset_reader") string_"dataset_reader" (string_"iterator") string_"iterator" (string_"model") string_"model" (string_"train_data_path") string_"train_data_path" (string_"validation_data_path") string_"validation_data_path" (string_"test_data_path") string_"test_data_path" (string_"trainer") string_"trainer" (string_"vocabulary") string_"vocabulary" )list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_preference_orders) identifier_preference_orders (identifier_append) identifier_append )attribute (argument_list (list (string_"type") string_"type" )list )argument_list )call )expression_statement )block )if_statement (function_definition (function_name_order_func) function_name_order_func (parameters (identifier_key) identifier_key )parameters (block (expression_statement (assignment (identifier_order_tuple) identifier_order_tuple (list_comprehension (conditional_expression (call (attribute (identifier_order) identifier_order (identifier_index) identifier_index )attribute (argument_list (identifier_key) identifier_key )argument_list )call (comparison_operator (identifier_key) identifier_key (identifier_order) identifier_order )comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_order) identifier_order )argument_list )call )conditional_expression (for_in_clause (identifier_order) identifier_order (identifier_preference_orders) identifier_preference_orders )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (binary_operator (identifier_order_tuple) identifier_order_tuple (list (identifier_key) identifier_key )list )binary_operator )return_statement )block )function_definition (function_definition (function_name_order_dict) function_name_order_dict (parameters (identifier_dictionary) identifier_dictionary (identifier_order_func) identifier_order_func )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (identifier_OrderedDict) identifier_OrderedDict (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_val) identifier_val )pattern_list (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (identifier_dictionary) identifier_dictionary (identifier_items) identifier_items )attribute (argument_list )argument_list )call (keyword_argument (identifier_key) identifier_key (lambda (lambda_parameters (identifier_item) identifier_item )lambda_parameters (call (identifier_order_func) identifier_order_func (argument_list (subscript (identifier_item) identifier_item (integer_0) integer_0 )subscript )argument_list )call )lambda )keyword_argument )argument_list )call (block (expression_statement (assignment (subscript (identifier_result) identifier_result (identifier_key) identifier_key )subscript (conditional_expression (call (identifier_order_dict) identifier_order_dict (argument_list (identifier_val) identifier_val (identifier_order_func) identifier_order_func )argument_list )call (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (identifier_dict) identifier_dict )argument_list )call (identifier_val) identifier_val )conditional_expression )assignment )expression_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition (return_statement (call (identifier_order_dict) identifier_order_dict (argument_list (identifier_params_dict) identifier_params_dict (identifier_order_func) identifier_order_func )argument_list )call )return_statement )block )function_definition )module
Returns Ordered Dict of Params from list of partial order preferences. Parameters ---------- preference_orders: List[List[str]], optional ``preference_orders`` is list of partial preference orders. ["A", "B", "C"] means "A" > "B" > "C". For multiple preference_orders first will be considered first. Keys not found, will have last but alphabetical preference. Default Preferences: ``[["dataset_reader", "iterator", "model", "train_data_path", "validation_data_path", "test_data_path", "trainer", "vocabulary"], ["type"]]``
(module (function_definition (function_name_unserialize) function_name_unserialize (parameters (identifier_cls) identifier_cls (identifier_string) identifier_string )parameters (block (expression_statement (assignment (pattern_list (identifier_id_s) identifier_id_s (identifier_created_s) identifier_created_s )pattern_list (call (attribute (identifier_string) identifier_string (identifier_split) identifier_split )attribute (argument_list (string_'_') string_'_' )argument_list )call )assignment )expression_statement (return_statement (call (identifier_cls) identifier_cls (argument_list (call (identifier_int) identifier_int (argument_list (identifier_id_s) identifier_id_s (integer_16) integer_16 )argument_list )call (call (attribute (identifier_datetime) identifier_datetime (identifier_utcfromtimestamp) identifier_utcfromtimestamp )attribute (argument_list (call (identifier_int) identifier_int (argument_list (identifier_created_s) identifier_created_s (integer_16) integer_16 )argument_list )call )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Unserializes from a string. :param string: A string created by :meth:`serialize`.
(module (function_definition (function_name__read_sequences) function_name__read_sequences (parameters (identifier_self) identifier_self (identifier_graph) identifier_graph )parameters (block (for_statement (identifier_e) identifier_e (call (attribute (identifier_self) identifier_self (identifier__get_elements) identifier__get_elements )attribute (argument_list (identifier_graph) identifier_graph (attribute (identifier_SBOL) identifier_SBOL (identifier_Sequence) identifier_Sequence )attribute )argument_list )call (block (expression_statement (assignment (identifier_identity) identifier_identity (subscript (identifier_e) identifier_e (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_c) identifier_c (call (attribute (identifier_self) identifier_self (identifier__get_rdf_identified) identifier__get_rdf_identified )attribute (argument_list (identifier_graph) identifier_graph (identifier_identity) identifier_identity )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_c) identifier_c (string_'elements') string_'elements' )subscript (call (attribute (identifier_self) identifier_self (identifier__get_triplet_value) identifier__get_triplet_value )attribute (argument_list (identifier_graph) identifier_graph (identifier_identity) identifier_identity (attribute (identifier_SBOL) identifier_SBOL (identifier_elements) identifier_elements )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_c) identifier_c (string_'encoding') string_'encoding' )subscript (call (attribute (identifier_self) identifier_self (identifier__get_triplet_value) identifier__get_triplet_value )attribute (argument_list (identifier_graph) identifier_graph (identifier_identity) identifier_identity (attribute (identifier_SBOL) identifier_SBOL (identifier_encoding) identifier_encoding )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_seq) identifier_seq (call (identifier_Sequence) identifier_Sequence (argument_list (dictionary_splat (identifier_c) identifier_c )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__sequences) identifier__sequences )attribute (call (attribute (identifier_identity) identifier_identity (identifier_toPython) identifier_toPython )attribute (argument_list )argument_list )call )subscript (identifier_seq) identifier_seq )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__collection_store) identifier__collection_store )attribute (call (attribute (identifier_identity) identifier_identity (identifier_toPython) identifier_toPython )attribute (argument_list )argument_list )call )subscript (identifier_seq) identifier_seq )assignment )expression_statement )block )for_statement )block )function_definition )module
Read graph and add sequences to document
(module (function_definition (function_name_catch_exceptions) function_name_catch_exceptions (parameters (identifier_orig_func) identifier_orig_func )parameters (block (decorated_definition (decorator (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_orig_func) identifier_orig_func )argument_list )call )decorator (function_definition (function_name_catch_exceptions_wrapper) function_name_catch_exceptions_wrapper (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 (try_statement (block (return_statement (call (identifier_orig_func) identifier_orig_func (argument_list (identifier_self) identifier_self (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block (except_clause (as_pattern (attribute (attribute (identifier_arvados) identifier_arvados (identifier_errors) identifier_errors )attribute (identifier_ApiError) identifier_ApiError )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_exception) identifier_exception )attribute (argument_list (string_"Failure") string_"Failure" )argument_list )call )expression_statement (return_statement (expression_list (dictionary (pair (string_"msg") string_"msg" (call (attribute (identifier_e) identifier_e (identifier__get_reason) identifier__get_reason )attribute (argument_list )argument_list )call )pair (pair (string_"status_code") string_"status_code" (attribute (attribute (identifier_e) identifier_e (identifier_resp) identifier_resp )attribute (identifier_status) identifier_status )attribute )pair )dictionary (call (identifier_int) identifier_int (argument_list (attribute (attribute (identifier_e) identifier_e (identifier_resp) identifier_resp )attribute (identifier_status) identifier_status )attribute )argument_list )call )expression_list )return_statement )block )except_clause (except_clause (as_pattern (attribute (identifier_subprocess) identifier_subprocess (identifier_CalledProcessError) identifier_CalledProcessError )attribute (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (return_statement (expression_list (dictionary (pair (string_"msg") string_"msg" (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )pair (pair (string_"status_code") string_"status_code" (integer_500) integer_500 )pair )dictionary (integer_500) integer_500 )expression_list )return_statement )block )except_clause (except_clause (identifier_MissingAuthorization) identifier_MissingAuthorization (block (return_statement (expression_list (dictionary (pair (string_"msg") string_"msg" (string_"'Authorization' header is missing or empty, expecting Arvados API token") string_"'Authorization' header is missing or empty, expecting Arvados API token" )pair (pair (string_"status_code") string_"status_code" (integer_401) integer_401 )pair )dictionary (integer_401) integer_401 )expression_list )return_statement )block )except_clause (except_clause (as_pattern (identifier_ValueError) identifier_ValueError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (return_statement (expression_list (dictionary (pair (string_"msg") string_"msg" (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )pair (pair (string_"status_code") string_"status_code" (integer_400) integer_400 )pair )dictionary (integer_400) integer_400 )expression_list )return_statement )block )except_clause (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (return_statement (expression_list (dictionary (pair (string_"msg") string_"msg" (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )pair (pair (string_"status_code") string_"status_code" (integer_500) integer_500 )pair )dictionary (integer_500) integer_500 )expression_list )return_statement )block )except_clause )try_statement )block )function_definition )decorated_definition (return_statement (identifier_catch_exceptions_wrapper) identifier_catch_exceptions_wrapper )return_statement )block )function_definition )module
Catch uncaught exceptions and turn them into http errors
(module (function_definition (function_name_infer_declared) function_name_infer_declared (parameters (identifier_ms) identifier_ms (default_parameter (identifier_namespace) identifier_namespace (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_conditions) identifier_conditions (list )list )assignment )expression_statement (for_statement (identifier_m) identifier_m (identifier_ms) identifier_ms (block (for_statement (identifier_cav) identifier_cav (attribute (identifier_m) identifier_m (identifier_caveats) identifier_caveats )attribute (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_cav) identifier_cav (identifier_location) identifier_location )attribute (None) None )comparison_operator (comparison_operator (attribute (identifier_cav) identifier_cav (identifier_location) identifier_location )attribute (string_'') string_'' )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_conditions) identifier_conditions (identifier_append) identifier_append )attribute (argument_list (call (attribute (attribute (identifier_cav) identifier_cav (identifier_caveat_id_bytes) identifier_caveat_id_bytes )attribute (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )for_statement (return_statement (call (identifier_infer_declared_from_conditions) identifier_infer_declared_from_conditions (argument_list (identifier_conditions) identifier_conditions (identifier_namespace) identifier_namespace )argument_list )call )return_statement )block )function_definition )module
Retrieves any declared information from the given macaroons and returns it as a key-value map. Information is declared with a first party caveat as created by declared_caveat. If there are two caveats that declare the same key with different values, the information is omitted from the map. When the caveats are later checked, this will cause the check to fail. namespace is the Namespace used to retrieve the prefix associated to the uri, if None it will use the STD_NAMESPACE only.
(module (function_definition (function_name_to_datetime) function_name_to_datetime (parameters (identifier_value) identifier_value )parameters (block (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (attribute (identifier_six) identifier_six (identifier_integer_types) identifier_integer_types )attribute )argument_list )call (block (return_statement (call (attribute (identifier_parser) identifier_parser (identifier_parse) identifier_parse )attribute (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block )if_statement (return_statement (call (attribute (identifier_parser) identifier_parser (identifier_isoparse) identifier_isoparse )attribute (argument_list (identifier_value) identifier_value )argument_list )call )return_statement )block )function_definition )module
Converts a string to a datetime.
(module (function_definition (function_name_send_message) function_name_send_message (parameters (identifier_self) identifier_self (identifier_msg) identifier_msg )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_socket) identifier_socket )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_msg) identifier_msg (identifier_version) identifier_version )attribute (attribute (identifier_self) identifier_self (identifier_PROTOCOL_VERSION) identifier_PROTOCOL_VERSION )attribute )assignment )expression_statement (expression_statement (assignment (identifier_serialized) identifier_serialized (call (attribute (identifier_msg) identifier_msg (identifier_SerializeToString) identifier_SerializeToString )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (binary_operator (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_">I") string_">I" (call (identifier_len) identifier_len (argument_list (identifier_serialized) identifier_serialized )argument_list )call )argument_list )call (identifier_serialized) identifier_serialized )binary_operator )assignment )expression_statement (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_socket) identifier_socket )attribute (identifier_send) identifier_send )attribute (argument_list (identifier_data) identifier_data )argument_list )call )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement )block )function_definition )module
Internal method used to send messages through Clementine remote network protocol.
(module (function_definition (function_name_reftrack_version_data) function_name_reftrack_version_data (parameters (identifier_rt) identifier_rt (identifier_role) identifier_role )parameters (block (expression_statement (assignment (identifier_tfi) identifier_tfi (call (attribute (identifier_rt) identifier_rt (identifier_get_taskfileinfo) identifier_get_taskfileinfo )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_tfi) identifier_tfi )not_operator (block (return_statement )return_statement )block )if_statement (return_statement (call (attribute (identifier_filesysitemdata) identifier_filesysitemdata (identifier_taskfileinfo_version_data) identifier_taskfileinfo_version_data )attribute (argument_list (identifier_tfi) identifier_tfi (identifier_role) identifier_role )argument_list )call )return_statement )block )function_definition )module
Return the data for the version that is loaded by the reftrack :param rt: the :class:`jukeboxcore.reftrack.Reftrack` holds the data :type rt: :class:`jukeboxcore.reftrack.Reftrack` :param role: item data role :type role: QtCore.Qt.ItemDataRole :returns: data for the version :rtype: depending on role :raises: None
(module (function_definition (function_name_get_results) function_name_get_results (parameters (identifier_self) identifier_self (identifier_job_id) identifier_job_id )parameters (block (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier__url) identifier__url )attribute (argument_list (binary_operator (string_'%s/results') string_'%s/results' (identifier_job_id) identifier_job_id )binary_operator )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url )argument_list )call )return_statement )block )function_definition )module
Get results of a job Args: job_id (str): The ID of the job. See: https://auth0.com/docs/api/management/v2#!/Jobs/get_results
(module (function_definition (function_name_s3path) function_name_s3path (parameters (identifier_self) identifier_self (identifier_rel_path) identifier_rel_path )parameters (block (import_statement (dotted_name (identifier_urlparse) identifier_urlparse )dotted_name )import_statement (expression_statement (assignment (identifier_path) identifier_path (call (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (argument_list (identifier_rel_path) identifier_rel_path (keyword_argument (identifier_public_url) identifier_public_url (True) True )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_parts) identifier_parts (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_urlparse) identifier_urlparse (identifier_urlparse) identifier_urlparse )attribute (argument_list (identifier_path) identifier_path )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_parts) identifier_parts (integer_0) integer_0 )subscript (string_'s3') string_'s3' )assignment )expression_statement (expression_statement (assignment (subscript (identifier_parts) identifier_parts (integer_1) integer_1 )subscript (attribute (identifier_self) identifier_self (identifier_bucket_name) identifier_bucket_name )attribute )assignment )expression_statement (return_statement (call (attribute (identifier_urlparse) identifier_urlparse (identifier_urlunparse) identifier_urlunparse )attribute (argument_list (identifier_parts) identifier_parts )argument_list )call )return_statement )block )function_definition )module
Return the path as an S3 schema
(module (function_definition (function_name_postActivate_) function_name_postActivate_ (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_tmpfile) identifier_tmpfile )attribute (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_constant) identifier_constant (identifier_tmpdir) identifier_tmpdir )attribute (binary_operator (string_"valkka-") string_"valkka-" (call (identifier_str) identifier_str (argument_list (call (attribute (identifier_os) identifier_os (identifier_getpid) identifier_getpid )attribute (argument_list )argument_list )call )argument_list )call )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_analyzer) identifier_analyzer )attribute (call (identifier_ExternalDetector) identifier_ExternalDetector (argument_list (keyword_argument (identifier_executable) identifier_executable (attribute (identifier_self) identifier_self (identifier_executable) identifier_executable )attribute )keyword_argument (keyword_argument (identifier_image_dimensions) identifier_image_dimensions (attribute (identifier_self) identifier_self (identifier_image_dimensions) identifier_image_dimensions )attribute )keyword_argument (keyword_argument (identifier_tmpfile) identifier_tmpfile (attribute (identifier_self) identifier_self (identifier_tmpfile) identifier_tmpfile )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )function_definition )module
Create temporary file for image dumps and the analyzer itself
(module (function_definition (function_name_group_id) function_name_group_id (parameters (identifier_self) identifier_self (identifier_resource_id) identifier_resource_id )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__name) identifier__name )attribute (string_'group') string_'group' )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__request_uri) identifier__request_uri )attribute (call (attribute (string_'{}/{}') string_'{}/{}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__api_uri) identifier__api_uri )attribute (identifier_resource_id) identifier_resource_id )argument_list )call )assignment )expression_statement )block )if_statement )block )function_definition )module
Update the request URI to include the Group ID for specific group retrieval. Args: resource_id (string): The group id.
(module (function_definition (function_name__setID) function_name__setID (parameters (identifier_self) identifier_self (identifier_id) identifier_id )parameters (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_id) identifier_id )argument_list )call (tuple (attribute (identifier_types) identifier_types (identifier_ListType) identifier_ListType )attribute (attribute (identifier_types) identifier_types (identifier_TupleType) identifier_TupleType )attribute )tuple )comparison_operator (block (try_statement (block (for_statement (identifier_key) identifier_key (attribute (identifier_self) identifier_self (identifier__sqlPrimary) identifier__sqlPrimary )attribute (block (expression_statement (assignment (identifier_value) identifier_value (subscript (identifier_id) identifier_id (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier___dict__) identifier___dict__ )attribute (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement (expression_statement (assignment (identifier_id) identifier_id (subscript (identifier_id) identifier_id (slice (integer_1) integer_1 (colon) colon )slice )subscript )assignment )expression_statement )block )for_statement )block (except_clause (identifier_IndexError) identifier_IndexError (block (raise_statement (binary_operator (string_'Not enough id fields, required: %s') string_'Not enough id fields, required: %s' (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__sqlPrimary) identifier__sqlPrimary )attribute )argument_list )call )binary_operator )raise_statement )block )except_clause )try_statement )block (elif_clause (comparison_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__sqlPrimary) identifier__sqlPrimary )attribute )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_key) identifier_key (subscript (attribute (identifier_self) identifier_self (identifier__sqlPrimary) identifier__sqlPrimary )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier___dict__) identifier___dict__ )attribute (identifier_key) identifier_key )subscript (identifier_id) identifier_id )assignment )expression_statement )block )elif_clause (else_clause (block (raise_statement (binary_operator (string_'Not enough id fields, required: %s') string_'Not enough id fields, required: %s' (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier__sqlPrimary) identifier__sqlPrimary )attribute )argument_list )call )binary_operator )raise_statement )block )else_clause )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__new) identifier__new )attribute (False) False )assignment )expression_statement )block )function_definition )module
Set the ID, ie. the values for primary keys. id can be either a list, following the _sqlPrimary, or some other type, that will be set as the singleton ID (requires 1-length sqlPrimary).
(module (function_definition (function_name_non_interactions) function_name_non_interactions (parameters (identifier_graph) identifier_graph (default_parameter (identifier_t) identifier_t (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_nodes) identifier_nodes (call (identifier_set) identifier_set (argument_list (identifier_graph) identifier_graph )argument_list )call )assignment )expression_statement (while_statement (identifier_nodes) identifier_nodes (block (expression_statement (assignment (identifier_u) identifier_u (call (attribute (identifier_nodes) identifier_nodes (identifier_pop) identifier_pop )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_v) identifier_v (binary_operator (identifier_nodes) identifier_nodes (call (identifier_set) identifier_set (argument_list (subscript (identifier_graph) identifier_graph (identifier_u) identifier_u )subscript )argument_list )call )binary_operator (block (expression_statement (yield (tuple (identifier_u) identifier_u (identifier_v) identifier_v )tuple )yield )expression_statement )block )for_statement )block )while_statement )block )function_definition )module
Returns the non-existent edges in the graph at time t. Parameters ---------- graph : NetworkX graph. Graph to find non-existent edges. t : snapshot id (default=None) If None the non-existent edges are identified on the flattened graph. Returns ------- non_edges : iterator Iterator of edges that are not in the graph.
(module (function_definition (function_name_group_list) function_name_group_list (parameters (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_ctx) identifier_ctx (call (identifier_Context) identifier_Context (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_ctx) identifier_ctx (identifier_execute_action) identifier_execute_action )attribute (argument_list (string_'group:list') string_'group:list' (dictionary_splat (dictionary (pair (string_'storage') string_'storage' (call (attribute (attribute (identifier_ctx) identifier_ctx (identifier_repo) identifier_repo )attribute (identifier_create_secure_service) identifier_create_secure_service )attribute (argument_list (string_'storage') string_'storage' )argument_list )call )pair )dictionary )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Show available routing groups.
(module (function_definition (function_name_get_hostinfo) function_name_get_hostinfo (parameters (identifier_self) identifier_self (default_parameter (identifier_callb) identifier_callb (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_self) identifier_self (identifier_req_with_resp) identifier_req_with_resp )attribute (argument_list (identifier_GetInfo) identifier_GetInfo (identifier_StateInfo) identifier_StateInfo (keyword_argument (identifier_callb) identifier_callb (identifier_callb) identifier_callb )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (None) None )return_statement )block )function_definition )module
Convenience method to request the device info from the device This will request the information from the device and request that callb be executed when a response is received. The is no default callback :param callb: Callable to be used when the response is received. If not set, self.resp_set_label will be used. :type callb: callable :returns: None :rtype: None
(module (function_definition (function_name_user_add_link) function_name_user_add_link (parameters (identifier_self) identifier_self )parameters (block (if_statement (subscript (call (attribute (identifier_self) identifier_self (identifier_check_post_role) identifier_check_post_role )attribute (argument_list )argument_list )call (string_'ADD') string_'ADD' )subscript (block (pass_statement )pass_statement )block (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_post_data) identifier_post_data (call (attribute (identifier_self) identifier_self (identifier_get_post_data) identifier_get_post_data )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_post_data) identifier_post_data (string_'user_name') string_'user_name' )subscript (call (attribute (identifier_self) identifier_self (identifier_get_current_user) identifier_get_current_user )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cur_uid) identifier_cur_uid (call (attribute (identifier_tools) identifier_tools (identifier_get_uudd) identifier_get_uudd )attribute (argument_list (integer_2) integer_2 )argument_list )call )assignment )expression_statement (while_statement (call (attribute (identifier_MLink) identifier_MLink (identifier_get_by_uid) identifier_get_by_uid )attribute (argument_list (identifier_cur_uid) identifier_cur_uid )argument_list )call (block (expression_statement (assignment (identifier_cur_uid) identifier_cur_uid (call (attribute (identifier_tools) identifier_tools (identifier_get_uudd) identifier_get_uudd )attribute (argument_list (integer_2) integer_2 )argument_list )call )assignment )expression_statement )block )while_statement (expression_statement (call (attribute (identifier_MLink) identifier_MLink (identifier_create_link) identifier_create_link )attribute (argument_list (identifier_cur_uid) identifier_cur_uid (identifier_post_data) identifier_post_data )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_redirect) identifier_redirect )attribute (argument_list (string_'/link/list') string_'/link/list' )argument_list )call )expression_statement )block )function_definition )module
Create link by user.
(module (function_definition (function_name_generate_command) function_name_generate_command (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_example) identifier_example (list )list )assignment )expression_statement (expression_statement (call (attribute (identifier_example) identifier_example (identifier_append) identifier_append )attribute (argument_list (string_f"{sys.argv[0]}") string_f"{sys.argv[0]}" )argument_list )call )expression_statement (for_statement (identifier_key) identifier_key (call (identifier_sorted) identifier_sorted (argument_list (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_spec) identifier_spec )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )argument_list )call (block (if_statement (comparison_operator (subscript (subscript (attribute (identifier_self) identifier_self (identifier_spec) identifier_spec )attribute (identifier_key) identifier_key )subscript (string_'type') string_'type' )subscript (identifier_list) identifier_list )comparison_operator (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (string_" ") string_" " (identifier_join) identifier_join )attribute (argument_list (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_spec) identifier_spec )attribute (identifier_key) identifier_key )subscript (identifier_get) identifier_get )attribute (argument_list (string_'example') string_'example' (string_'') string_'' )argument_list )call )argument_list )call )assignment )expression_statement )block (elif_clause (comparison_operator (subscript (subscript (attribute (identifier_self) identifier_self (identifier_spec) identifier_spec )attribute (identifier_key) identifier_key )subscript (string_'type') string_'type' )subscript (identifier_dict) identifier_dict )comparison_operator (block (expression_statement (assignment (identifier_value) identifier_value (string_f"\'{json.dumps(self.spec[key].get('example', ''))}\'") string_f"\'{json.dumps(self.spec[key].get('example', ''))}\'" )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_value) identifier_value (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_spec) identifier_spec )attribute (identifier_key) identifier_key )subscript (identifier_get) identifier_get )attribute (argument_list (string_'example') string_'example' (string_'') string_'' )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_string) identifier_string (string_f" --{key.lower()} {value}") string_f" --{key.lower()} {value}" )assignment )expression_statement (expression_statement (call (attribute (identifier_example) identifier_example (identifier_append) identifier_append )attribute (argument_list (identifier_string) identifier_string )argument_list )call )expression_statement )block )for_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_" \\\n") string_" \\\n" (identifier_join) identifier_join )attribute (argument_list (identifier_example) identifier_example )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Generate a sample command
(module (function_definition (function_name_vfolders) function_name_vfolders (parameters (identifier_access_key) identifier_access_key )parameters (block (expression_statement (assignment (identifier_fields) identifier_fields (list (tuple (string_'Name') string_'Name' (string_'name') string_'name' )tuple (tuple (string_'Created At') string_'Created At' (string_'created_at') string_'created_at' )tuple (tuple (string_'Last Used') string_'Last Used' (string_'last_used') string_'last_used' )tuple (tuple (string_'Max Files') string_'Max Files' (string_'max_files') string_'max_files' )tuple (tuple (string_'Max Size') string_'Max Size' (string_'max_size') string_'max_size' )tuple )list )assignment )expression_statement (if_statement (comparison_operator (identifier_access_key) identifier_access_key (None) None )comparison_operator (block (expression_statement (assignment (identifier_q) identifier_q (string_'query { vfolders { $fields } }') string_'query { vfolders { $fields } }' )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_q) identifier_q (string_'query($ak:String) { vfolders(access_key:$ak) { $fields } }') string_'query($ak:String) { vfolders(access_key:$ak) { $fields } }' )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_q) identifier_q (call (attribute (identifier_q) identifier_q (identifier_replace) identifier_replace )attribute (argument_list (string_'$fields') string_'$fields' (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (generator_expression (subscript (identifier_item) identifier_item (integer_1) integer_1 )subscript (for_in_clause (identifier_item) identifier_item (identifier_fields) identifier_fields )for_in_clause )generator_expression )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_v) identifier_v (dictionary (pair (string_'ak') string_'ak' (identifier_access_key) identifier_access_key )pair )dictionary )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_Session) identifier_Session (argument_list )argument_list )call (as_pattern_target (identifier_session) identifier_session )as_pattern_target )as_pattern )with_item )with_clause (block (try_statement (block (expression_statement (assignment (identifier_resp) identifier_resp (call (attribute (attribute (identifier_session) identifier_session (identifier_Admin) identifier_Admin )attribute (identifier_query) identifier_query )attribute (argument_list (identifier_q) identifier_q (identifier_v) identifier_v )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (identifier_print_error) identifier_print_error (argument_list (identifier_e) identifier_e )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )except_clause )try_statement (expression_statement (call (identifier_print) identifier_print (argument_list (call (identifier_tabulate) identifier_tabulate (argument_list (generator_expression (call (attribute (identifier_item) identifier_item (identifier_values) identifier_values )attribute (argument_list )argument_list )call (for_in_clause (identifier_item) identifier_item (subscript (identifier_resp) identifier_resp (string_'vfolders') string_'vfolders' )subscript )for_in_clause )generator_expression (keyword_argument (identifier_headers) identifier_headers (generator_expression (subscript (identifier_item) identifier_item (integer_0) integer_0 )subscript (for_in_clause (identifier_item) identifier_item (identifier_fields) identifier_fields )for_in_clause )generator_expression )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
List and manage virtual folders.
(module (function_definition (function_name_send) function_name_send (parameters (identifier_self) identifier_self (identifier_message) identifier_message )parameters (block (try_statement (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_ws) identifier_ws )attribute (identifier_send) identifier_send )attribute (argument_list (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_message) identifier_message )argument_list )call )argument_list )call )expression_statement )block (except_clause (attribute (attribute (identifier_websocket) identifier_websocket (identifier__exceptions) identifier__exceptions )attribute (identifier_WebSocketConnectionClosedException) identifier_WebSocketConnectionClosedException )attribute (block (raise_statement (call (identifier_SelenolWebSocketClosedException) identifier_SelenolWebSocketClosedException (argument_list )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Send a the defined message to the backend. :param message: Message to be send, usually a Python dictionary.
(module (function_definition (function_name_load_private_key) function_name_load_private_key (parameters (identifier_self) identifier_self (identifier_priv_key) identifier_priv_key )parameters (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_priv_key) identifier_priv_key )argument_list )call (as_pattern_target (identifier_fd) identifier_fd )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__private_key) identifier__private_key )attribute (call (attribute (attribute (identifier_paramiko) identifier_paramiko (identifier_RSAKey) identifier_RSAKey )attribute (identifier_from_private_key) identifier_from_private_key )attribute (argument_list (identifier_fd) identifier_fd )argument_list )call )assignment )expression_statement )block )with_statement )block )function_definition )module
Register the SSH private key.
(module (function_definition (function_name__fragment_one_level) function_name__fragment_one_level (parameters (identifier_self) identifier_self (identifier_mol_graphs) identifier_mol_graphs )parameters (block (expression_statement (assignment (identifier_unique_fragments_on_this_level) identifier_unique_fragments_on_this_level (list )list )assignment )expression_statement (for_statement (identifier_mol_graph) identifier_mol_graph (identifier_mol_graphs) identifier_mol_graphs (block (for_statement (identifier_edge) identifier_edge (attribute (attribute (identifier_mol_graph) identifier_mol_graph (identifier_graph) identifier_graph )attribute (identifier_edges) identifier_edges )attribute (block (expression_statement (assignment (identifier_bond) identifier_bond (list (tuple (subscript (identifier_edge) identifier_edge (integer_0) integer_0 )subscript (subscript (identifier_edge) identifier_edge (integer_1) integer_1 )subscript )tuple )list )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_fragments) identifier_fragments (call (attribute (identifier_mol_graph) identifier_mol_graph (identifier_split_molecule_subgraphs) identifier_split_molecule_subgraphs )attribute (argument_list (identifier_bond) identifier_bond (keyword_argument (identifier_allow_reverse) identifier_allow_reverse (True) True )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_fragment) identifier_fragment (identifier_fragments) identifier_fragments (block (expression_statement (assignment (identifier_found) identifier_found (False) False )assignment )expression_statement (for_statement (identifier_unique_fragment) identifier_unique_fragment (attribute (identifier_self) identifier_self (identifier_unique_fragments) identifier_unique_fragments )attribute (block (if_statement (call (attribute (identifier_unique_fragment) identifier_unique_fragment (identifier_isomorphic_to) identifier_isomorphic_to )attribute (argument_list (identifier_fragment) identifier_fragment )argument_list )call (block (expression_statement (assignment (identifier_found) identifier_found (True) True )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement (if_statement (not_operator (identifier_found) identifier_found )not_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_unique_fragments) identifier_unique_fragments )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_fragment) identifier_fragment )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_unique_fragments_on_this_level) identifier_unique_fragments_on_this_level (identifier_append) identifier_append )attribute (argument_list (identifier_fragment) identifier_fragment )argument_list )call )expression_statement )block )if_statement )block )for_statement )block (except_clause (identifier_MolGraphSplitError) identifier_MolGraphSplitError (block (if_statement (attribute (identifier_self) identifier_self (identifier_open_rings) identifier_open_rings )attribute (block (expression_statement (assignment (identifier_fragment) identifier_fragment (call (identifier_open_ring) identifier_open_ring (argument_list (identifier_mol_graph) identifier_mol_graph (identifier_bond) identifier_bond (attribute (identifier_self) identifier_self (identifier_opt_steps) identifier_opt_steps )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_found) identifier_found (False) False )assignment )expression_statement (for_statement (identifier_unique_fragment) identifier_unique_fragment (attribute (identifier_self) identifier_self (identifier_unique_fragments) identifier_unique_fragments )attribute (block (if_statement (call (attribute (identifier_unique_fragment) identifier_unique_fragment (identifier_isomorphic_to) identifier_isomorphic_to )attribute (argument_list (identifier_fragment) identifier_fragment )argument_list )call (block (expression_statement (assignment (identifier_found) identifier_found (True) True )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement (if_statement (not_operator (identifier_found) identifier_found )not_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_unique_fragments) identifier_unique_fragments )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_fragment) identifier_fragment )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_unique_fragments_from_ring_openings) identifier_unique_fragments_from_ring_openings )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_fragment) identifier_fragment )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_unique_fragments_on_this_level) identifier_unique_fragments_on_this_level (identifier_append) identifier_append )attribute (argument_list (identifier_fragment) identifier_fragment )argument_list )call )expression_statement )block )if_statement )block )if_statement )block )except_clause )try_statement )block )for_statement )block )for_statement (return_statement (identifier_unique_fragments_on_this_level) identifier_unique_fragments_on_this_level )return_statement )block )function_definition )module
Perform one step of iterative fragmentation on a list of molecule graphs. Loop through the graphs, then loop through each graph's edges and attempt to remove that edge in order to obtain two disconnected subgraphs, aka two new fragments. If successful, check to see if the new fragments are already present in self.unique_fragments, and append them if not. If unsucessful, we know that edge belongs to a ring. If we are opening rings, do so with that bond, and then again check if the resulting fragment is present in self.unique_fragments and add it if it is not.
(module (function_definition (function_name__make_transitions) function_name__make_transitions (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_List) identifier_List (type_parameter (type (identifier_Transition) identifier_Transition )type )type_parameter )generic_type )type (block (expression_statement (assignment (identifier_module_name) identifier_module_name (attribute (identifier_settings) identifier_settings (identifier_TRANSITIONS_MODULE) identifier_TRANSITIONS_MODULE )attribute )assignment )expression_statement (expression_statement (assignment (identifier_module_) identifier_module_ (call (attribute (identifier_importlib) identifier_importlib (identifier_import_module) identifier_import_module )attribute (argument_list (identifier_module_name) identifier_module_name )argument_list )call )assignment )expression_statement (return_statement (attribute (identifier_module_) identifier_module_ (identifier_transitions) identifier_transitions )attribute )return_statement )block )function_definition )module
Load the transitions file.
(module (function_definition (function_name_last) function_name_last (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_start) identifier_start (binary_operator (call (identifier_max) identifier_max (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier_number) identifier_number )attribute (integer_1) integer_1 )binary_operator (integer_0) integer_0 )argument_list )call (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute )binary_operator )assignment )expression_statement (return_statement (call (identifier_Batch) identifier_Batch (argument_list (identifier_start) identifier_start (attribute (identifier_self) identifier_self (identifier_size) identifier_size )attribute (attribute (identifier_self) identifier_self (identifier_total_size) identifier_total_size )attribute )argument_list )call )return_statement )block )function_definition )module
Returns the last batch for the batched sequence. :rtype: :class:`Batch` instance.
(module (function_definition (function_name_worldview) function_name_worldview (parameters (identifier_self) identifier_self )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_views) identifier_views (subscript (attribute (identifier_self) identifier_self (identifier__data) identifier__data )attribute (string_'worldview') string_'worldview' )subscript )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_random) identifier_random )attribute (identifier_choice) identifier_choice )attribute (argument_list (identifier_views) identifier_views )argument_list )call )return_statement )block )function_definition )module
Get a random worldview. :return: Worldview. :Example: Pantheism.
(module (function_definition (function_name_get_obs_function) function_name_get_obs_function (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_obs_function) identifier_obs_function (list )list )assignment )expression_statement (for_statement (identifier_variable) identifier_variable (call (attribute (attribute (identifier_self) identifier_self (identifier_network) identifier_network )attribute (identifier_findall) identifier_findall )attribute (argument_list (string_'ObsFunction') string_'ObsFunction' )argument_list )call (block (for_statement (identifier_var) identifier_var (call (attribute (identifier_variable) identifier_variable (identifier_findall) identifier_findall )attribute (argument_list (string_'CondProb') string_'CondProb' )argument_list )call (block (expression_statement (assignment (identifier_cond_prob) identifier_cond_prob (call (identifier_defaultdict) identifier_defaultdict (argument_list (identifier_list) identifier_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_cond_prob) identifier_cond_prob (string_'Var') string_'Var' )subscript (attribute (call (attribute (identifier_var) identifier_var (identifier_find) identifier_find )attribute (argument_list (string_'Var') string_'Var' )argument_list )call (identifier_text) identifier_text )attribute )assignment )expression_statement (expression_statement (assignment (subscript (identifier_cond_prob) identifier_cond_prob (string_'Parent') string_'Parent' )subscript (call (attribute (attribute (call (attribute (identifier_var) identifier_var (identifier_find) identifier_find )attribute (argument_list (string_'Parent') string_'Parent' )argument_list )call (identifier_text) identifier_text )attribute (identifier_split) identifier_split )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (call (attribute (identifier_var) identifier_var (identifier_find) identifier_find )attribute (argument_list (string_'Parameter') string_'Parameter' )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'type') string_'type' )argument_list )call )not_operator (block (expression_statement (assignment (subscript (identifier_cond_prob) identifier_cond_prob (string_'Type') string_'Type' )subscript (string_'TBL') string_'TBL' )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (subscript (identifier_cond_prob) identifier_cond_prob (string_'Type') string_'Type' )subscript (call (attribute (call (attribute (identifier_var) identifier_var (identifier_find) identifier_find )attribute (argument_list (string_'Parameter') string_'Parameter' )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'type') string_'type' )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (subscript (identifier_cond_prob) identifier_cond_prob (string_'Parameter') string_'Parameter' )subscript (call (attribute (identifier_self) identifier_self (identifier_get_parameter) identifier_get_parameter )attribute (argument_list (identifier_var) identifier_var )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_obs_function) identifier_obs_function (identifier_append) identifier_append )attribute (argument_list (identifier_cond_prob) identifier_cond_prob )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (identifier_obs_function) identifier_obs_function )return_statement )block )function_definition )module
Returns the observation function as nested dict in the case of table- type parameter and a nested structure in case of decision diagram parameter Example -------- >>> reader = PomdpXReader('Test_PomdpX.xml') >>> reader.get_obs_function() [{'Var': 'obs_sensor', 'Parent': ['action_rover', 'rover_1', 'rock_1'], 'Type': 'TBL', 'Parameter': [{'Instance': ['amw', '*', '*', '-'], 'ProbTable': ['1.0', '0.0']}, ... ] }]
(module (function_definition (function_name__get_template_dirs) function_name__get_template_dirs (parameters )parameters (block (return_statement (call (identifier_filter) identifier_filter (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_x) identifier_x )argument_list )call )lambda (list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_expanduser) identifier_expanduser )attribute (argument_list (string_'~') string_'~' )argument_list )call (string_'.py2pack') string_'.py2pack' (string_'templates') string_'templates' )argument_list )call (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (string_'/') string_'/' (string_'usr') string_'usr' (string_'share') string_'share' (string_'py2pack') string_'py2pack' (string_'templates') string_'templates' )argument_list )call (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_abspath) identifier_abspath )attribute (argument_list (identifier___file__) identifier___file__ )argument_list )call )argument_list )call (string_'templates') string_'templates' )argument_list )call )list )argument_list )call )return_statement )block )function_definition )module
existing directories where to search for jinja2 templates. The order is important. The first found template from the first found dir wins!
(module (function_definition (function_name_in_unit_of) function_name_in_unit_of (parameters (identifier_self) identifier_self (identifier_unit) identifier_unit (default_parameter (identifier_as_quantity) identifier_as_quantity (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_new_unit) identifier_new_unit (call (attribute (identifier_u) identifier_u (identifier_Unit) identifier_Unit )attribute (argument_list (identifier_unit) identifier_unit )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_new_quantity) identifier_new_quantity (call (attribute (attribute (identifier_self) identifier_self (identifier_as_quantity) identifier_as_quantity )attribute (identifier_to) identifier_to )attribute (argument_list (identifier_new_unit) identifier_new_unit )argument_list )call )assignment )expression_statement (if_statement (identifier_as_quantity) identifier_as_quantity (block (return_statement (identifier_new_quantity) identifier_new_quantity )return_statement )block (else_clause (block (return_statement (attribute (identifier_new_quantity) identifier_new_quantity (identifier_value) identifier_value )attribute )return_statement )block )else_clause )if_statement )block )function_definition )module
Return the current value transformed to the new units :param unit: either an astropy.Unit instance, or a string which can be converted to an astropy.Unit instance, like "1 / (erg cm**2 s)" :param as_quantity: if True, the method return an astropy.Quantity, if False just a floating point number. Default is False :return: either a floating point or a astropy.Quantity depending on the value of "as_quantity"
(module (function_definition (function_name_pdf_row_limiter) function_name_pdf_row_limiter (parameters (identifier_rows) identifier_rows (default_parameter (identifier_limits) identifier_limits (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_limits) identifier_limits (boolean_operator (identifier_limits) identifier_limits (list (None) None (None) None )list )boolean_operator )assignment )expression_statement (expression_statement (assignment (identifier_upper_limit) identifier_upper_limit (conditional_expression (subscript (identifier_limits) identifier_limits (integer_0) integer_0 )subscript (identifier_limits) identifier_limits (None) None )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_lower_limit) identifier_lower_limit (conditional_expression (subscript (identifier_limits) identifier_limits (integer_1) integer_1 )subscript (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_limits) identifier_limits )argument_list )call (integer_1) integer_1 )comparison_operator (None) None )conditional_expression )assignment )expression_statement (return_statement (subscript (identifier_rows) identifier_rows (slice (identifier_upper_limit) identifier_upper_limit (colon) colon (identifier_lower_limit) identifier_lower_limit )slice )subscript )return_statement )block )function_definition )module
Limit row passing a value. In this case we dont implementate a best effort algorithm because the posibilities are infite with a data text structure from a pdf.
(module (function_definition (function_name_login) function_name_login (parameters (identifier_self) identifier_self (identifier_username) identifier_username (identifier_password) identifier_password )parameters (block (expression_statement (assignment (identifier_d) identifier_d (call (attribute (identifier_self) identifier_self (identifier_send_command) identifier_send_command )attribute (argument_list (string_'login') string_'login' (keyword_argument (identifier_keys) identifier_keys (dictionary (pair (string_'client_login_name') string_'client_login_name' (identifier_username) identifier_username )pair (pair (string_'client_login_password') string_'client_login_password' (identifier_password) identifier_password )pair )dictionary )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_d) identifier_d (integer_0) integer_0 )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__log) identifier__log )attribute (identifier_info) identifier_info )attribute (argument_list (string_'Login Successful') string_'Login Successful' )argument_list )call )expression_statement (return_statement (True) True )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Login to the TS3 Server @param username: Username @type username: str @param password: Password @type password: str
(module (function_definition (function_name_start) function_name_start (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_stop) identifier_stop )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__task) identifier__task )attribute (call (attribute (identifier_asyncio) identifier_asyncio (identifier_ensure_future) identifier_ensure_future )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__pinger) identifier__pinger )attribute (argument_list )argument_list )call (keyword_argument (identifier_loop) identifier_loop (attribute (identifier_self) identifier_self (identifier__loop) identifier__loop )attribute )keyword_argument )argument_list )call )assignment )expression_statement )block )function_definition )module
Start the pinging coroutine using the client and event loop which was passed to the constructor. :meth:`start` always behaves as if :meth:`stop` was called right before it.
(module (function_definition (function_name_callback) function_name_callback (parameters (identifier_self) identifier_self (identifier_cats) identifier_cats )parameters (block (expression_statement (assignment (identifier_enable) identifier_enable (call (identifier_bool) identifier_bool (argument_list (identifier_cats) identifier_cats )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_enable) identifier_enable )not_operator (block (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_search) identifier_search )attribute (identifier_visible) identifier_visible )attribute (False) False )assignment )expression_statement )block )if_statement (expression_statement (call (identifier_enable_widget) identifier_enable_widget (argument_list (attribute (identifier_self) identifier_self (identifier_search_widget) identifier_search_widget )attribute (identifier_enable) identifier_enable )argument_list )call )expression_statement (expression_statement (call (identifier_enable_widget) identifier_enable_widget (argument_list (attribute (identifier_self) identifier_self (identifier_remove_widget) identifier_remove_widget )attribute (identifier_enable) identifier_enable )argument_list )call )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_done_callback) identifier_done_callback )attribute (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_done_callback) identifier_done_callback )attribute (argument_list (identifier_cats) identifier_cats )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
When a catalog is selected, enable widgets that depend on that condition and do done_callback
(module (function_definition (function_name_secgroup_create) function_name_secgroup_create (parameters (identifier_self) identifier_self (identifier_name) identifier_name (identifier_description) identifier_description )parameters (block (expression_statement (assignment (identifier_nt_ks) identifier_nt_ks (attribute (identifier_self) identifier_self (identifier_compute_conn) identifier_compute_conn )attribute )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_nt_ks) identifier_nt_ks (identifier_security_groups) identifier_security_groups )attribute (identifier_create) identifier_create )attribute (argument_list (identifier_name) identifier_name (identifier_description) identifier_description )argument_list )call )expression_statement (expression_statement (assignment (identifier_ret) identifier_ret (dictionary (pair (string_'name') string_'name' (identifier_name) identifier_name )pair (pair (string_'description') string_'description' (identifier_description) identifier_description )pair )dictionary )assignment )expression_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Create a security group
(module (function_definition (function_name_add_section) function_name_add_section (parameters (identifier_self) identifier_self (identifier_section_name) identifier_section_name )parameters (block (if_statement (comparison_operator (identifier_section_name) identifier_section_name (string_"DEFAULT") string_"DEFAULT" )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"'DEFAULT' is reserved section name.") string_"'DEFAULT' is reserved section name." )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_section_name) identifier_section_name (attribute (identifier_self) identifier_self (identifier__sections) identifier__sections )attribute )comparison_operator (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (binary_operator (string_"Error! %s is already one of the sections") string_"Error! %s is already one of the sections" (identifier_section_name) identifier_section_name )binary_operator )argument_list )call )raise_statement )block (else_clause (block (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__sections) identifier__sections )attribute (identifier_section_name) identifier_section_name )subscript (call (identifier_Section) identifier_Section (argument_list (identifier_section_name) identifier_section_name )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )function_definition )module
Add an empty section.
(module (function_definition (function_name__filter_response) function_name__filter_response (parameters (identifier_self) identifier_self (identifier_response_dict) identifier_response_dict )parameters (block (expression_statement (assignment (identifier_filtered_dict) identifier_filtered_dict (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_response_dict) identifier_response_dict (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_key) identifier_key (string_"_jsns") string_"_jsns" )comparison_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (comparison_operator (identifier_key) identifier_key (string_"xmlns") string_"xmlns" )comparison_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_value) identifier_value )argument_list )call (identifier_list) identifier_list )comparison_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_value) identifier_value )argument_list )call (integer_1) integer_1 )comparison_operator )boolean_operator (block (expression_statement (assignment (subscript (identifier_filtered_dict) identifier_filtered_dict (identifier_key) identifier_key )subscript (subscript (identifier_value) identifier_value (integer_0) integer_0 )subscript )assignment )expression_statement )block (elif_clause (boolean_operator (boolean_operator (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_value) identifier_value )argument_list )call (identifier_dict) identifier_dict )comparison_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (call (attribute (identifier_value) identifier_value (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call (integer_1) integer_1 )comparison_operator )boolean_operator (comparison_operator (string_"_content") string_"_content" (line_continuation_\) line_continuation_\ (call (attribute (identifier_value) identifier_value (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )comparison_operator )boolean_operator (block (expression_statement (assignment (subscript (identifier_filtered_dict) identifier_filtered_dict (identifier_key) identifier_key )subscript (subscript (identifier_value) identifier_value (string_"_content") string_"_content" )subscript )assignment )expression_statement )block )elif_clause (elif_clause (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_value) identifier_value )argument_list )call (identifier_dict) identifier_dict )comparison_operator (block (expression_statement (assignment (identifier_tmp_dict) identifier_tmp_dict (call (attribute (identifier_self) identifier_self (identifier__filter_response) identifier__filter_response )attribute (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_filtered_dict) identifier_filtered_dict (identifier_key) identifier_key )subscript (identifier_tmp_dict) identifier_tmp_dict )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (assignment (subscript (identifier_filtered_dict) identifier_filtered_dict (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (return_statement (identifier_filtered_dict) identifier_filtered_dict )return_statement )block )function_definition )module
Add additional filters to the response dictionary Currently the response dictionary is filtered like this: * If a list only has one item, the list is replaced by that item * Namespace-Keys (_jsns and xmlns) are removed :param response_dict: the pregenerated, but unfiltered response dict :type response_dict: dict :return: The filtered dictionary :rtype: dict
(module (function_definition (function_name__call_config) function_name__call_config (parameters (identifier_self) identifier_self (identifier_method) identifier_method (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_self) identifier_self (identifier__config) identifier__config )attribute (identifier_method) identifier_method )argument_list )call (argument_list (attribute (identifier_self) identifier_self (identifier__section_name) identifier__section_name )attribute (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
Call the configuration at the given method which must take a section name as first argument
(module (function_definition (function_name__select_options) function_name__select_options (parameters (identifier_pat) identifier_pat )parameters (block (if_statement (comparison_operator (identifier_pat) identifier_pat (identifier__registered_options) identifier__registered_options )comparison_operator (block (return_statement (list (identifier_pat) identifier_pat )list )return_statement )block )if_statement (expression_statement (assignment (identifier_keys) identifier_keys (call (identifier_sorted) identifier_sorted (argument_list (call (attribute (identifier__registered_options) identifier__registered_options (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_pat) identifier_pat (string_'all') string_'all' )comparison_operator (block (return_statement (identifier_keys) identifier_keys )return_statement )block )if_statement (return_statement (list_comprehension (identifier_k) identifier_k (for_in_clause (identifier_k) identifier_k (identifier_keys) identifier_keys )for_in_clause (if_clause (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (identifier_pat) identifier_pat (identifier_k) identifier_k (attribute (identifier_re) identifier_re (identifier_I) identifier_I )attribute )argument_list )call )if_clause )list_comprehension )return_statement )block )function_definition )module
returns a list of keys matching `pat` if pat=="all", returns all registered options
(module (function_definition (function_name_findCampaignsByName) function_name_findCampaignsByName (parameters (identifier_target) identifier_target )parameters (block (try_statement (block (import_from_statement (dotted_name (identifier_astropy) identifier_astropy (identifier_coordinates) identifier_coordinates )dotted_name (dotted_name (identifier_SkyCoord) identifier_SkyCoord )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_astropy) identifier_astropy (identifier_coordinates) identifier_coordinates (identifier_name_resolve) identifier_name_resolve )dotted_name (dotted_name (identifier_NameResolveError) identifier_NameResolveError )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_astropy) identifier_astropy (identifier_utils) identifier_utils (identifier_data) identifier_data )dotted_name (dotted_name (identifier_conf) identifier_conf )dotted_name )import_from_statement (expression_statement (assignment (attribute (identifier_conf) identifier_conf (identifier_remote_timeout) identifier_remote_timeout )attribute (integer_90) integer_90 )assignment )expression_statement )block (except_clause (identifier_ImportError) identifier_ImportError (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Error: AstroPy needs to be installed for this feature.') string_'Error: AstroPy needs to be installed for this feature.' )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_sys) identifier_sys (identifier_exit) identifier_exit )attribute (argument_list (integer_1) integer_1 )argument_list )call )expression_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (identifier_crd) identifier_crd (call (attribute (identifier_SkyCoord) identifier_SkyCoord (identifier_from_name) identifier_from_name )attribute (argument_list (identifier_target) identifier_target )argument_list )call )assignment )expression_statement )block (except_clause (identifier_NameResolveError) identifier_NameResolveError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_'Could not find coordinates ') string_'Could not find coordinates ' (string_'for target "{0}".') string_'for target "{0}".' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_target) identifier_target )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (expression_list (call (identifier_findCampaigns) identifier_findCampaigns (argument_list (attribute (attribute (identifier_crd) identifier_crd (identifier_ra) identifier_ra )attribute (identifier_deg) identifier_deg )attribute (attribute (attribute (identifier_crd) identifier_crd (identifier_dec) identifier_dec )attribute (identifier_deg) identifier_deg )attribute )argument_list )call (attribute (attribute (identifier_crd) identifier_crd (identifier_ra) identifier_ra )attribute (identifier_deg) identifier_deg )attribute (attribute (attribute (identifier_crd) identifier_crd (identifier_dec) identifier_dec )attribute (identifier_deg) identifier_deg )attribute )expression_list )return_statement )block )function_definition )module
Returns a list of the campaigns that cover a given target. Parameters ---------- target : str Name of the celestial object. Returns ------- campaigns : list of int A list of the campaigns that cover the given target name. ra, dec : float, float Resolved coordinates in decimal degrees (J2000). Exceptions ---------- Raises an ImportError if AstroPy is not installed. Raises a ValueError if `name` cannot be resolved to coordinates.
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self (identifier_file_path) identifier_file_path (identifier_branch) identifier_branch (identifier_commit_message) identifier_commit_message (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_path) identifier_path (binary_operator (string_'%s/%s') string_'%s/%s' (tuple (attribute (identifier_self) identifier_self (identifier_path) identifier_path )attribute (call (attribute (identifier_file_path) identifier_file_path (identifier_replace) identifier_replace )attribute (argument_list (string_'/') string_'/' (string_'%2F') string_'%2F' )argument_list )call )tuple )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary (pair (string_'branch') string_'branch' (identifier_branch) identifier_branch )pair (pair (string_'commit_message') string_'commit_message' (identifier_commit_message) identifier_commit_message )pair )dictionary )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_gitlab) identifier_gitlab )attribute (identifier_http_delete) identifier_http_delete )attribute (argument_list (identifier_path) identifier_path (keyword_argument (identifier_query_data) identifier_query_data (identifier_data) identifier_data )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Delete a file on the server. Args: file_path (str): Path of the file to remove branch (str): Branch from which the file will be removed commit_message (str): Commit message for the deletion **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabDeleteError: If the server cannot perform the request
(module (function_definition (function_name_getDataPath) function_name_getDataPath (parameters (default_parameter (identifier__system) identifier__system (identifier_thisSystem) identifier_thisSystem )default_parameter (default_parameter (identifier__FilePath) identifier__FilePath (identifier_FilePath) identifier_FilePath )default_parameter )parameters (block (if_statement (comparison_operator (identifier__system) identifier__system (string_"Windows") string_"Windows" )comparison_operator (block (expression_statement (assignment (identifier_pathName) identifier_pathName (string_"~/Crypto101/") string_"~/Crypto101/" )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_pathName) identifier_pathName (string_"~/.crypto101/") string_"~/.crypto101/" )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_path) identifier_path (call (identifier__FilePath) identifier__FilePath (argument_list (call (identifier_expanduser) identifier_expanduser (argument_list (identifier_pathName) identifier_pathName )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (identifier_path) identifier_path (identifier_exists) identifier_exists )attribute (argument_list )argument_list )call )not_operator (block (expression_statement (call (attribute (identifier_path) identifier_path (identifier_makedirs) identifier_makedirs )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_path) identifier_path )return_statement )block )function_definition )module
Gets an appropriate path for storing some local data, such as TLS credentials. If the path doesn't exist, it is created.
(module (function_definition (function_name_p_startswith) function_name_p_startswith (parameters (identifier_self) identifier_self (identifier_st) identifier_st (default_parameter (identifier_ignorecase) identifier_ignorecase (False) False )default_parameter )parameters (block (expression_statement (string_"Return True if the input starts with `st` at current position") string_"Return True if the input starts with `st` at current position" )expression_statement (expression_statement (assignment (identifier_length) identifier_length (call (identifier_len) identifier_len (argument_list (identifier_st) identifier_st )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_matcher) identifier_matcher (assignment (identifier_result) identifier_result (subscript (attribute (identifier_self) identifier_self (identifier_input) identifier_input )attribute (slice (attribute (identifier_self) identifier_self (identifier_pos) identifier_pos )attribute (colon) colon (binary_operator (attribute (identifier_self) identifier_self (identifier_pos) identifier_pos )attribute (identifier_length) identifier_length )binary_operator )slice )subscript )assignment )assignment )expression_statement (if_statement (identifier_ignorecase) identifier_ignorecase (block (expression_statement (assignment (identifier_matcher) identifier_matcher (call (attribute (identifier_result) identifier_result (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_st) identifier_st (call (attribute (identifier_st) identifier_st (identifier_lower) identifier_lower )attribute (argument_list )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_matcher) identifier_matcher (identifier_st) identifier_st )comparison_operator (block (expression_statement (augmented_assignment (attribute (identifier_self) identifier_self (identifier_pos) identifier_pos )attribute (identifier_length) identifier_length )augmented_assignment )expression_statement (return_statement (identifier_result) identifier_result )return_statement )block )if_statement (return_statement (False) False )return_statement )block )function_definition )module
Return True if the input starts with `st` at current position
(module (function_definition (function_name_add_text) function_name_add_text (parameters (identifier_self) identifier_self (identifier_end) identifier_end (default_parameter (identifier_next) identifier_next (None) None )default_parameter )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_str_begin) identifier_str_begin )attribute (identifier_end) identifier_end )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_fmt) identifier_fmt )attribute (identifier_append_text) identifier_append_text )attribute (argument_list (subscript (attribute (identifier_self) identifier_self (identifier_format) identifier_format )attribute (slice (attribute (identifier_self) identifier_self (identifier_str_begin) identifier_str_begin )attribute (colon) colon (identifier_end) identifier_end )slice )subscript )argument_list )call )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_next) identifier_next (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_str_begin) identifier_str_begin )attribute (identifier_next) identifier_next )assignment )expression_statement )block )if_statement )block )function_definition )module
Adds the text from string beginning to the specified ending index to the format. :param end: The ending index of the string. :param next: The next string begin index. If None, the string index will not be updated.
(module (function_definition (function_name_hash) function_name_hash (parameters (list_splat_pattern (identifier_cols) identifier_cols )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_sc) identifier_sc (attribute (identifier_SparkContext) identifier_SparkContext (identifier__active_spark_context) identifier__active_spark_context )attribute )assignment )expression_statement (expression_statement (assignment (identifier_jc) identifier_jc (call (attribute (attribute (attribute (identifier_sc) identifier_sc (identifier__jvm) identifier__jvm )attribute (identifier_functions) identifier_functions )attribute (identifier_hash) identifier_hash )attribute (argument_list (call (identifier__to_seq) identifier__to_seq (argument_list (identifier_sc) identifier_sc (identifier_cols) identifier_cols (identifier__to_java_column) identifier__to_java_column )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (call (identifier_Column) identifier_Column (argument_list (identifier_jc) identifier_jc )argument_list )call )return_statement )block )function_definition )module
Calculates the hash code of given columns, and returns the result as an int column. >>> spark.createDataFrame([('ABC',)], ['a']).select(hash('a').alias('hash')).collect() [Row(hash=-757602832)]
(module (function_definition (function_name_delete) function_name_delete (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_"Current statement has no parent, so it cannot ") string_"Current statement has no parent, so it cannot " (string_"be deleted form a procmailrc structure") string_"be deleted form a procmailrc structure" )binary_operator )argument_list )call )raise_statement )block (elif_clause (comparison_operator (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute (None) None )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_"id not set but have a parent, this should not be happening") string_"id not set but have a parent, this should not be happening" )argument_list )call )raise_statement )block )elif_clause (else_clause (block (expression_statement (assignment (identifier_parent_id) identifier_parent_id (attribute (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (identifier_id) identifier_id )attribute )assignment )expression_statement (expression_statement (assignment (identifier_index) identifier_index (call (identifier_int) identifier_int (argument_list (subscript (call (attribute (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute (identifier_split) identifier_split )attribute (argument_list (string_'.') string_'.' )argument_list )call (unary_operator (integer_1) integer_1 )unary_operator )subscript )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (identifier_pop) identifier_pop )attribute (argument_list (identifier_index) identifier_index )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_parent) identifier_parent )attribute (None) None )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute (None) None )assignment )expression_statement (return_statement (identifier_parent_id) identifier_parent_id )return_statement )block )else_clause )if_statement )block )function_definition )module
Remove the statement from a ProcmailRC structure, raise a RuntimeError if the statement is not inside a ProcmailRC structure return the parent id
(module (function_definition (function_name_on_exception) function_name_on_exception (parameters (identifier_func) identifier_func )parameters (block (class_definition (identifier_OnExceptionDecorator) identifier_OnExceptionDecorator (argument_list (identifier_LambdaDecorator) identifier_LambdaDecorator )argument_list (block (function_definition (function_name_on_exception) function_name_on_exception (parameters (identifier_self) identifier_self (identifier_exception) identifier_exception )parameters (block (return_statement (call (identifier_func) identifier_func (argument_list (identifier_exception) identifier_exception )argument_list )call )return_statement )block )function_definition )block )class_definition (return_statement (identifier_OnExceptionDecorator) identifier_OnExceptionDecorator )return_statement )block )function_definition )module
Run a function when a handler thows an exception. It's return value is returned to AWS. Usage:: >>> # to create a reusable decorator >>> @on_exception ... def handle_errors(exception): ... print(exception) ... return {'statusCode': 500, 'body': 'uh oh'} >>> @handle_errors ... def handler(event, context): ... raise Exception('it broke!') >>> handler({}, object()) it broke! {'statusCode': 500, 'body': 'uh oh'} >>> # or a one off >>> @on_exception(lambda e: {'statusCode': 500}) ... def handler(body, context): ... raise Exception >>> handler({}, object()) {'statusCode': 500}
(module (function_definition (function_name_reflected_light_intensity) function_name_reflected_light_intensity (parameters (identifier_self) identifier_self )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__ensure_mode) identifier__ensure_mode )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_MODE_REFLECT) identifier_MODE_REFLECT )attribute )argument_list )call )expression_statement (return_statement (binary_operator (call (attribute (identifier_self) identifier_self (identifier_value) identifier_value )attribute (argument_list (integer_0) integer_0 )argument_list )call (call (attribute (identifier_self) identifier_self (identifier__scale) identifier__scale )attribute (argument_list (string_'REFLECT') string_'REFLECT' )argument_list )call )binary_operator )return_statement )block )function_definition )module
A measurement of the reflected light intensity, as a percentage.
(module (function_definition (function_name_call_requests) function_name_call_requests (parameters (typed_parameter (identifier_requests) identifier_requests (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_Request) identifier_Request )type (type (generic_type (identifier_Iterable) identifier_Iterable (type_parameter (type (identifier_Request) identifier_Request )type )type_parameter )generic_type )type )type_parameter )generic_type )type )typed_parameter (typed_parameter (identifier_methods) identifier_methods (type (identifier_Methods) identifier_Methods )type )typed_parameter (typed_parameter (identifier_debug) identifier_debug (type (identifier_bool) identifier_bool )type )typed_parameter )parameters (type (identifier_Response) identifier_Response )type (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_requests) identifier_requests (attribute (identifier_collections) identifier_collections (identifier_Iterable) identifier_Iterable )attribute )argument_list )call (block (return_statement (call (identifier_BatchResponse) identifier_BatchResponse (generator_expression (call (identifier_safe_call) identifier_safe_call (argument_list (identifier_r) identifier_r (identifier_methods) identifier_methods (keyword_argument (identifier_debug) identifier_debug (identifier_debug) identifier_debug )keyword_argument )argument_list )call (for_in_clause (identifier_r) identifier_r (identifier_requests) identifier_requests )for_in_clause )generator_expression )call )return_statement )block )if_statement (return_statement (call (identifier_safe_call) identifier_safe_call (argument_list (identifier_requests) identifier_requests (identifier_methods) identifier_methods (keyword_argument (identifier_debug) identifier_debug (identifier_debug) identifier_debug )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Takes a request or list of Requests and calls them. Args: requests: Request object, or a collection of them. methods: The list of methods that can be called. debug: Include more information in error responses.
(module (function_definition (function_name_update_terms_translations) function_name_update_terms_translations (parameters (identifier_self) identifier_self (identifier_project_id) identifier_project_id (default_parameter (identifier_file_path) identifier_file_path (None) None )default_parameter (default_parameter (identifier_language_code) identifier_language_code (None) None )default_parameter (default_parameter (identifier_overwrite) identifier_overwrite (False) False )default_parameter (default_parameter (identifier_sync_terms) identifier_sync_terms (False) False )default_parameter (default_parameter (identifier_tags) identifier_tags (None) None )default_parameter (default_parameter (identifier_fuzzy_trigger) identifier_fuzzy_trigger (None) None )default_parameter )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__upload) identifier__upload )attribute (argument_list (keyword_argument (identifier_project_id) identifier_project_id (identifier_project_id) identifier_project_id )keyword_argument (keyword_argument (identifier_updating) identifier_updating (attribute (identifier_self) identifier_self (identifier_UPDATING_TERMS_TRANSLATIONS) identifier_UPDATING_TERMS_TRANSLATIONS )attribute )keyword_argument (keyword_argument (identifier_file_path) identifier_file_path (identifier_file_path) identifier_file_path )keyword_argument (keyword_argument (identifier_language_code) identifier_language_code (identifier_language_code) identifier_language_code )keyword_argument (keyword_argument (identifier_overwrite) identifier_overwrite (identifier_overwrite) identifier_overwrite )keyword_argument (keyword_argument (identifier_sync_terms) identifier_sync_terms (identifier_sync_terms) identifier_sync_terms )keyword_argument (keyword_argument (identifier_tags) identifier_tags (identifier_tags) identifier_tags )keyword_argument (keyword_argument (identifier_fuzzy_trigger) identifier_fuzzy_trigger (identifier_fuzzy_trigger) identifier_fuzzy_trigger )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Updates terms translations overwrite: set it to True if you want to overwrite translations sync_terms: set it to True if you want to sync your terms (terms that are not found in the uploaded file will be deleted from project and the new ones added). Ignored if updating = translations tags: Add tags to the project terms; available when updating terms or terms_translations; you can use the following keys: "all" - for the all the imported terms, "new" - for the terms which aren't already in the project, "obsolete" - for the terms which are in the project but not in the imported file and "overwritten_translations" - for the terms for which translations change fuzzy_trigger: set it to True to mark corresponding translations from the other languages as fuzzy for the updated values
(module (function_definition (function_name_init_controller) function_name_init_controller (parameters (identifier_url) identifier_url )parameters (block (global_statement (identifier__VERA_CONTROLLER) identifier__VERA_CONTROLLER )global_statement (expression_statement (assignment (identifier_created) identifier_created (False) False )assignment )expression_statement (if_statement (comparison_operator (identifier__VERA_CONTROLLER) identifier__VERA_CONTROLLER (None) None )comparison_operator (block (expression_statement (assignment (identifier__VERA_CONTROLLER) identifier__VERA_CONTROLLER (call (identifier_VeraController) identifier_VeraController (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_created) identifier_created (True) True )assignment )expression_statement (expression_statement (call (attribute (identifier__VERA_CONTROLLER) identifier__VERA_CONTROLLER (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (return_statement (list (identifier__VERA_CONTROLLER) identifier__VERA_CONTROLLER (identifier_created) identifier_created )list )return_statement )block )function_definition )module
Initialize a controller. Provides a single global controller for applications that can't do this themselves
(module (function_definition (function_name_as_scipy_functional) function_name_as_scipy_functional (parameters (identifier_func) identifier_func (default_parameter (identifier_return_gradient) identifier_return_gradient (False) False )default_parameter )parameters (block (function_definition (function_name_func_call) function_name_func_call (parameters (identifier_arr) identifier_arr )parameters (block (return_statement (call (identifier_func) identifier_func (argument_list (call (attribute (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (identifier_arr) identifier_arr )argument_list )call (identifier_reshape) identifier_reshape )attribute (argument_list (attribute (attribute (identifier_func) identifier_func (identifier_domain) identifier_domain )attribute (identifier_shape) identifier_shape )attribute )argument_list )call )argument_list )call )return_statement )block )function_definition (if_statement (identifier_return_gradient) identifier_return_gradient (block (function_definition (function_name_func_gradient_call) function_name_func_gradient_call (parameters (identifier_arr) identifier_arr )parameters (block (return_statement (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (call (attribute (identifier_func) identifier_func (identifier_gradient) identifier_gradient )attribute (argument_list (call (attribute (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (identifier_arr) identifier_arr )argument_list )call (identifier_reshape) identifier_reshape )attribute (argument_list (attribute (attribute (identifier_func) identifier_func (identifier_domain) identifier_domain )attribute (identifier_shape) identifier_shape )attribute )argument_list )call )argument_list )call )argument_list )call )return_statement )block )function_definition (return_statement (expression_list (identifier_func_call) identifier_func_call (identifier_func_gradient_call) identifier_func_gradient_call )expression_list )return_statement )block (else_clause (block (return_statement (identifier_func_call) identifier_func_call )return_statement )block )else_clause )if_statement )block )function_definition )module
Wrap ``op`` as a function operating on linear arrays. This is intended to be used with the `scipy solvers <https://docs.scipy.org/doc/scipy/reference/optimize.html>`_. Parameters ---------- func : `Functional`. A functional that should be wrapped return_gradient : bool, optional ``True`` if the gradient of the functional should also be returned, ``False`` otherwise. Returns ------- function : ``callable`` The wrapped functional. gradient : ``callable``, optional The wrapped gradient. Only returned if ``return_gradient`` is true. Examples -------- Wrap functional and solve simple problem (here toy problem ``min_x ||x||^2``): >>> func = odl.solvers.L2NormSquared(odl.rn(3)) >>> scipy_func = odl.as_scipy_functional(func) >>> from scipy.optimize import minimize >>> result = minimize(scipy_func, x0=[0, 1, 0]) >>> np.allclose(result.x, [0, 0, 0]) True The gradient (jacobian) can also be provided: >>> func = odl.solvers.L2NormSquared(odl.rn(3)) >>> scipy_func, scipy_grad = odl.as_scipy_functional(func, True) >>> from scipy.optimize import minimize >>> result = minimize(scipy_func, x0=[0, 1, 0], jac=scipy_grad) >>> np.allclose(result.x, [0, 0, 0]) True Notes ----- If the data representation of ``op``'s domain is of type `NumpyTensorSpace`, this incurs no significant overhead. If the space type is ``CudaFn`` or some other nonlocal type, the overhead is significant.
(module (function_definition (function_name_webhook_handler) function_name_webhook_handler (parameters (identifier_request) identifier_request )parameters (block (expression_statement (assignment (identifier_body) identifier_body (call (attribute (call (attribute (attribute (identifier_request) identifier_request (identifier_stream) identifier_stream )attribute (identifier_read) identifier_read )attribute (argument_list )argument_list )call (identifier_decode) identifier_decode )attribute (argument_list (string_'utf8') string_'utf8' )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_'webhook handler saw:') string_'webhook handler saw:' (identifier_body) identifier_body )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_api) identifier_api (identifier_notify_webhook_received) identifier_notify_webhook_received )attribute (argument_list (keyword_argument (identifier_payload) identifier_payload (identifier_body) identifier_body )keyword_argument )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (string_'key store contains:') string_'key store contains:' (call (attribute (attribute (identifier_api) identifier_api (identifier__db) identifier__db )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Receives the webhook from mbed cloud services Passes the raw http body directly to mbed sdk, to notify that a webhook was received
(module (function_definition (function_name_is_superset) function_name_is_superset (parameters (identifier_reference_set) identifier_reference_set )parameters (block (function_definition (function_name_is_superset_of) function_name_is_superset_of (parameters (identifier_x) identifier_x )parameters (block (expression_statement (assignment (identifier_missing) identifier_missing (binary_operator (identifier_reference_set) identifier_reference_set (identifier_x) identifier_x )binary_operator )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_missing) identifier_missing )argument_list )call (integer_0) integer_0 )comparison_operator (block (return_statement (True) True )return_statement )block (else_clause (block (raise_statement (call (identifier_NotSuperset) identifier_NotSuperset (argument_list (keyword_argument (identifier_wrong_value) identifier_wrong_value (identifier_x) identifier_x )keyword_argument (keyword_argument (identifier_reference_set) identifier_reference_set (identifier_reference_set) identifier_reference_set )keyword_argument (keyword_argument (identifier_missing) identifier_missing (identifier_missing) identifier_missing )keyword_argument )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition (expression_statement (assignment (attribute (identifier_is_superset_of) identifier_is_superset_of (identifier___name__) identifier___name__ )attribute (call (attribute (string_'is_superset_of_{}') string_'is_superset_of_{}' (identifier_format) identifier_format )attribute (argument_list (identifier_reference_set) identifier_reference_set )argument_list )call )assignment )expression_statement (return_statement (identifier_is_superset_of) identifier_is_superset_of )return_statement )block )function_definition )module
'Is superset' validation_function generator. Returns a validation_function to check that x is a superset of reference_set :param reference_set: the reference set :return:
(module (function_definition (function_name_select_subscription) function_name_select_subscription (parameters (identifier_subs_code) identifier_subs_code (identifier_subscriptions) identifier_subscriptions )parameters (block (if_statement (boolean_operator (identifier_subs_code) identifier_subs_code (identifier_subscriptions) identifier_subscriptions )boolean_operator (block (for_statement (identifier_subs) identifier_subs (identifier_subscriptions) identifier_subscriptions (block (if_statement (parenthesized_expression (comparison_operator (attribute (identifier_subs) identifier_subs (identifier_subscription_code) identifier_subscription_code )attribute (identifier_subs_code) identifier_subs_code )comparison_operator )parenthesized_expression (block (return_statement (identifier_subs) identifier_subs )return_statement )block )if_statement )block )for_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Return the uwnetid.subscription object with the subs_code.
(module (function_definition (function_name_pickle_dict) function_name_pickle_dict (parameters (identifier_items) identifier_items )parameters (block (expression_statement (assignment (identifier_ret) identifier_ret (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_pickled_keys) identifier_pickled_keys (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_val) identifier_val )pattern_list (call (attribute (identifier_items) identifier_items (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_val) identifier_val (identifier_basestring) identifier_basestring )argument_list )call (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (identifier_key) identifier_key )subscript (identifier_val) identifier_val )assignment )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_pickled_keys) identifier_pickled_keys (identifier_append) identifier_append )attribute (argument_list (identifier_key) identifier_key )argument_list )call )expression_statement (expression_statement (assignment (subscript (identifier_ret) identifier_ret (identifier_key) identifier_key )subscript (call (attribute (identifier_pickle) identifier_pickle (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_val) identifier_val )argument_list )call )assignment )expression_statement )block )else_clause )if_statement )block )for_statement (if_statement (identifier_pickled_keys) identifier_pickled_keys (block (expression_statement (assignment (subscript (identifier_ret) identifier_ret (string_'_pickled') string_'_pickled' )subscript (call (attribute (string_',') string_',' (identifier_join) identifier_join )attribute (argument_list (identifier_pickled_keys) identifier_pickled_keys )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_ret) identifier_ret )return_statement )block )function_definition )module
Returns a new dictionary where values which aren't instances of basestring are pickled. Also, a new key '_pickled' contains a comma separated list of keys corresponding to the pickled values.
(module (function_definition (function_name_GET) function_name_GET (parameters (identifier_self) identifier_self (identifier_url) identifier_url )parameters (block (expression_statement (assignment (identifier_r) identifier_r (call (attribute (identifier_requests) identifier_requests (identifier_get) identifier_get )attribute (argument_list (identifier_url) identifier_url )argument_list )call )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_verbose) identifier_verbose )attribute (block (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_write) identifier_write )attribute (argument_list (binary_operator (string_"%s %s\n") string_"%s %s\n" (tuple (attribute (identifier_r) identifier_r (identifier_status_code) identifier_status_code )attribute (attribute (identifier_r) identifier_r (identifier_encoding) identifier_encoding )attribute )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute (identifier_write) identifier_write )attribute (argument_list (binary_operator (call (identifier_str) identifier_str (argument_list (attribute (identifier_r) identifier_r (identifier_headers) identifier_headers )attribute )argument_list )call (string_"\n") string_"\n" )binary_operator )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_encoding) identifier_encoding )attribute (attribute (identifier_r) identifier_r (identifier_encoding) identifier_encoding )attribute )assignment )expression_statement (return_statement (attribute (identifier_r) identifier_r (identifier_text) identifier_text )attribute )return_statement )block )function_definition )module
returns text content of HTTP GET response.
(module (function_definition (function_name__case_stmt) function_name__case_stmt (parameters (identifier_self) identifier_self (typed_parameter (identifier_stmt) identifier_stmt (type (identifier_Statement) identifier_Statement )type )typed_parameter (typed_parameter (identifier_sctx) identifier_sctx (type (identifier_SchemaContext) identifier_SchemaContext )type )typed_parameter )parameters (type (None) None )type (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__handle_child) identifier__handle_child )attribute (argument_list (call (identifier_CaseNode) identifier_CaseNode (argument_list )argument_list )call (identifier_stmt) identifier_stmt (identifier_sctx) identifier_sctx )argument_list )call )expression_statement )block )function_definition )module
Handle case statement.