sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_end_poll) function_name_end_poll (parameters (identifier_args) identifier_args )parameters (block (if_statement (not_operator (attribute (identifier_args) identifier_args (identifier_isadmin) identifier_isadmin )attribute )not_operator (block (return_statement (string_"Nope, not gonna do it.") string_"Nope, not gonna do it." )return_statement )block )if_statement (if_statement (not_operator (attribute (identifier_args) identifier_args (identifier_msg) identifier_msg )attribute )not_operator (block (return_statement (string_"Syntax: !vote end <pollnum>") string_"Syntax: !vote end <pollnum>" )return_statement )block )if_statement (if_statement (not_operator (call (attribute (attribute (identifier_args) identifier_args (identifier_msg) identifier_msg )attribute (identifier_isdigit) identifier_isdigit )attribute (argument_list )argument_list )call )not_operator (block (return_statement (string_"Not A Valid Positive Integer.") string_"Not A Valid Positive Integer." )return_statement )block )if_statement (expression_statement (assignment (identifier_poll) identifier_poll (call (identifier_get_open_poll) identifier_get_open_poll (argument_list (attribute (identifier_args) identifier_args (identifier_session) identifier_session )attribute (call (identifier_int) identifier_int (argument_list (attribute (identifier_args) identifier_args (identifier_msg) identifier_msg )attribute )argument_list )call )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_poll) identifier_poll (None) None )comparison_operator (block (return_statement (string_"That poll doesn't exist or has already been deleted!") string_"That poll doesn't exist or has already been deleted!" )return_statement )block )if_statement (if_statement (comparison_operator (attribute (identifier_poll) identifier_poll (identifier_active) identifier_active )attribute (integer_0) integer_0 )comparison_operator (block (return_statement (string_"Poll already ended!") string_"Poll already ended!" )return_statement )block )if_statement (expression_statement (assignment (attribute (identifier_poll) identifier_poll (identifier_active) identifier_active )attribute (integer_0) integer_0 )assignment )expression_statement (return_statement (string_"Poll ended!") string_"Poll ended!" )return_statement )block )function_definition )module
Ends a poll.
(module (function_definition (function_name__update) function_name__update (parameters (identifier_self) identifier_self (identifier_uri) identifier_uri (identifier_body) identifier_body (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_run_hooks) identifier_run_hooks )attribute (argument_list (string_"modify_body_for_update") string_"modify_body_for_update" (identifier_body) identifier_body (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_resp) identifier_resp (identifier_resp_body) identifier_resp_body )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_api) identifier_api )attribute (identifier_method_put) identifier_method_put )attribute (argument_list (identifier_uri) identifier_uri (keyword_argument (identifier_body) identifier_body (identifier_body) identifier_body )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (identifier_resp_body) identifier_resp_body )return_statement )block )function_definition )module
Handles the communication with the API when updating a specific resource managed by this class.
(module (function_definition (function_name_get_release_id) function_name_get_release_id (parameters (identifier_self) identifier_self (typed_parameter (identifier_package_name) identifier_package_name (type (identifier_str) identifier_str )type )typed_parameter (typed_parameter (identifier_version) identifier_version (type (identifier_str) identifier_str )type )typed_parameter )parameters (type (identifier_bytes) identifier_bytes )type (block (expression_statement (call (identifier_validate_package_name) identifier_validate_package_name (argument_list (identifier_package_name) identifier_package_name )argument_list )call )expression_statement (expression_statement (call (identifier_validate_package_version) identifier_validate_package_version (argument_list (identifier_version) identifier_version )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__validate_set_registry) identifier__validate_set_registry )attribute (argument_list )argument_list )call )expression_statement (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_registry) identifier_registry )attribute (identifier__get_release_id) identifier__get_release_id )attribute (argument_list (identifier_package_name) identifier_package_name (identifier_version) identifier_version )argument_list )call )return_statement )block )function_definition )module
Returns the 32 byte identifier of a release for the given package name and version, if they are available on the current registry.
(module (function_definition (function_name_collect_ip6table) function_name_collect_ip6table (parameters (identifier_self) identifier_self (identifier_tablename) identifier_tablename )parameters (block (expression_statement (assignment (identifier_modname) identifier_modname (binary_operator (string_"ip6table_") string_"ip6table_" (identifier_tablename) identifier_tablename )binary_operator )assignment )expression_statement (if_statement (call (attribute (identifier_self) identifier_self (identifier_check_ext_prog) identifier_check_ext_prog )attribute (argument_list (binary_operator (string_"grep -q %s /proc/modules") string_"grep -q %s /proc/modules" (identifier_modname) identifier_modname )binary_operator )argument_list )call (block (expression_statement (assignment (identifier_cmd) identifier_cmd (binary_operator (binary_operator (string_"ip6tables -t ") string_"ip6tables -t " (identifier_tablename) identifier_tablename )binary_operator (string_" -nvL") string_" -nvL" )binary_operator )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_cmd_output) identifier_add_cmd_output )attribute (argument_list (identifier_cmd) identifier_cmd )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Same as function above, but for ipv6
(module (function_definition (function_name_validate_known_curve) function_name_validate_known_curve (parameters )parameters (block (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_figure) identifier_figure )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_N) identifier_N (integer_100) integer_100 )assignment )expression_statement (expression_statement (assignment (identifier_x) identifier_x (call (attribute (identifier_numpy) identifier_numpy (identifier_linspace) identifier_linspace )attribute (argument_list (unary_operator (integer_1) integer_1 )unary_operator (integer_1) integer_1 (identifier_N) identifier_N )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_y) identifier_y (call (attribute (identifier_numpy) identifier_numpy (identifier_sin) identifier_sin )attribute (argument_list (binary_operator (integer_4) integer_4 (identifier_x) identifier_x )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_smoother) identifier_smoother (identifier_DEFAULT_BASIC_SMOOTHER) identifier_DEFAULT_BASIC_SMOOTHER )attribute (attribute (identifier_smoother) identifier_smoother (identifier_BasicFixedSpanSmootherSlowUpdate) identifier_BasicFixedSpanSmootherSlowUpdate )attribute )assignment )expression_statement (expression_statement (assignment (identifier_smooth) identifier_smooth (call (attribute (identifier_smoother) identifier_smoother (identifier_perform_smooth) identifier_perform_smooth )attribute (argument_list (identifier_x) identifier_x (identifier_y) identifier_y (keyword_argument (identifier_smoother_cls) identifier_smoother_cls (attribute (identifier_supersmoother) identifier_supersmoother (identifier_SuperSmoother) identifier_SuperSmoother )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_plot) identifier_plot )attribute (argument_list (identifier_x) identifier_x (attribute (identifier_smooth) identifier_smooth (identifier_smooth_result) identifier_smooth_result )attribute (keyword_argument (identifier_label) identifier_label (string_'Slow') string_'Slow' )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_smoother) identifier_smoother (identifier_DEFAULT_BASIC_SMOOTHER) identifier_DEFAULT_BASIC_SMOOTHER )attribute (attribute (identifier_smoother) identifier_smoother (identifier_BasicFixedSpanSmoother) identifier_BasicFixedSpanSmoother )attribute )assignment )expression_statement (expression_statement (assignment (identifier_smooth) identifier_smooth (call (attribute (identifier_smoother) identifier_smoother (identifier_perform_smooth) identifier_perform_smooth )attribute (argument_list (identifier_x) identifier_x (identifier_y) identifier_y (keyword_argument (identifier_smoother_cls) identifier_smoother_cls (attribute (identifier_supersmoother) identifier_supersmoother (identifier_SuperSmoother) identifier_SuperSmoother )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_plot) identifier_plot )attribute (argument_list (identifier_x) identifier_x (attribute (identifier_smooth) identifier_smooth (identifier_smooth_result) identifier_smooth_result )attribute (keyword_argument (identifier_label) identifier_label (string_'Fast') string_'Fast' )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_plot) identifier_plot )attribute (argument_list (identifier_x) identifier_x (identifier_y) identifier_y (string_'.') string_'.' (keyword_argument (identifier_label) identifier_label (string_'data') string_'data' )keyword_argument )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_legend) identifier_legend )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_plt) identifier_plt (identifier_show) identifier_show )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Validate on a sin function.
(module (function_definition (function_name__micro_service_filter) function_name__micro_service_filter (parameters (identifier_cls) identifier_cls )parameters (block (expression_statement (assignment (identifier_is_microservice_module) identifier_is_microservice_module (call (identifier_issubclass) identifier_issubclass (argument_list (identifier_cls) identifier_cls (identifier_MicroService) identifier_MicroService )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_is_correct_subclass) identifier_is_correct_subclass (boolean_operator (boolean_operator (comparison_operator (identifier_cls) identifier_cls (identifier_MicroService) identifier_MicroService )comparison_operator (comparison_operator (identifier_cls) identifier_cls (identifier_ResponseMicroService) identifier_ResponseMicroService )comparison_operator )boolean_operator (comparison_operator (identifier_cls) identifier_cls (identifier_RequestMicroService) identifier_RequestMicroService )comparison_operator )boolean_operator )assignment )expression_statement (return_statement (boolean_operator (identifier_is_microservice_module) identifier_is_microservice_module (identifier_is_correct_subclass) identifier_is_correct_subclass )boolean_operator )return_statement )block )function_definition )module
Will only give a find on classes that is a subclass of MicroService, with the exception that the class is not allowed to be a direct ResponseMicroService or RequestMicroService. :type cls: type :rtype: bool :param cls: A class object :return: True if match, else false
(module (function_definition (function_name_infos) function_name_infos (parameters (identifier_self) identifier_self (default_parameter (identifier_type) identifier_type (None) None )default_parameter (default_parameter (identifier_failed) identifier_failed (False) False )default_parameter )parameters (block (if_statement (comparison_operator (identifier_type) identifier_type (None) None )comparison_operator (block (expression_statement (assignment (identifier_type) identifier_type (identifier_Info) identifier_Info )assignment )expression_statement )block )if_statement (if_statement (not_operator (call (identifier_issubclass) identifier_issubclass (argument_list (identifier_type) identifier_type (identifier_Info) identifier_Info )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (concatenated_string (string_"Cannot get infos of type {} ") string_"Cannot get infos of type {} " (string_"as it is not a valid type.") string_"as it is not a valid type." )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_type) identifier_type )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_failed) identifier_failed (list (string_"all") string_"all" (False) False (True) True )list )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"{} is not a valid vector failed") string_"{} is not a valid vector failed" (identifier_format) identifier_format )attribute (argument_list (identifier_failed) identifier_failed )argument_list )call )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_failed) identifier_failed (string_"all") string_"all" )comparison_operator (block (return_statement (call (attribute (call (attribute (attribute (identifier_type) identifier_type (identifier_query) identifier_query )attribute (identifier_filter_by) identifier_filter_by )attribute (argument_list (keyword_argument (identifier_origin_id) identifier_origin_id (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )keyword_argument )argument_list )call (identifier_all) identifier_all )attribute (argument_list )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (call (attribute (attribute (identifier_type) identifier_type (identifier_query) identifier_query )attribute (identifier_filter_by) identifier_filter_by )attribute (argument_list (keyword_argument (identifier_origin_id) identifier_origin_id (attribute (identifier_self) identifier_self (identifier_id) identifier_id )attribute )keyword_argument (keyword_argument (identifier_failed) identifier_failed (identifier_failed) identifier_failed )keyword_argument )argument_list )call (identifier_all) identifier_all )attribute (argument_list )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Get infos that originate from this node. Type must be a subclass of :class:`~dallinger.models.Info`, the default is ``Info``. Failed can be True, False or "all".
(module (function_definition (function_name_with_lock) function_name_with_lock (parameters (identifier_lock) identifier_lock (identifier_func) identifier_func (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_d) identifier_d (call (attribute (identifier_lock) identifier_lock (identifier_acquire) identifier_acquire )attribute (argument_list )argument_list )call )assignment )expression_statement (function_definition (function_name_release_lock) function_name_release_lock (parameters (identifier_result) identifier_result )parameters (block (expression_statement (assignment (identifier_deferred) identifier_deferred (call (attribute (identifier_lock) identifier_lock (identifier_release) identifier_release )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_deferred) identifier_deferred (identifier_addCallback) identifier_addCallback )attribute (argument_list (lambda (lambda_parameters (identifier_x) identifier_x )lambda_parameters (identifier_result) identifier_result )lambda )argument_list )call )return_statement )block )function_definition (function_definition (function_name_lock_acquired) function_name_lock_acquired (parameters (identifier_lock) identifier_lock )parameters (block (return_statement (call (attribute (call (attribute (identifier_defer) identifier_defer (identifier_maybeDeferred) identifier_maybeDeferred )attribute (argument_list (identifier_func) identifier_func (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (identifier_addBoth) identifier_addBoth )attribute (argument_list (identifier_release_lock) identifier_release_lock )argument_list )call )return_statement )block )function_definition (expression_statement (call (attribute (identifier_d) identifier_d (identifier_addCallback) identifier_addCallback )attribute (argument_list (identifier_lock_acquired) identifier_lock_acquired )argument_list )call )expression_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
A 'context manager' for performing operations requiring a lock. :param lock: A BasicLock instance :type lock: silverberg.lock.BasicLock :param func: A callable to execute while the lock is held. :type func: function
(module (function_definition (function_name__convert_char_to_type) function_name__convert_char_to_type (parameters (identifier_self) identifier_self (identifier_type_char) identifier_type_char )parameters (block (expression_statement (assignment (identifier_typecode) identifier_typecode (identifier_type_char) identifier_type_char )assignment )expression_statement (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_type_char) identifier_type_char )argument_list )call (identifier_int) identifier_int )comparison_operator (block (expression_statement (assignment (identifier_typecode) identifier_typecode (call (identifier_chr) identifier_chr (argument_list (identifier_type_char) identifier_type_char )argument_list )call )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_typecode) identifier_typecode (attribute (identifier_self) identifier_self (identifier_TYPECODES_LIST) identifier_TYPECODES_LIST )attribute )comparison_operator (block (return_statement (identifier_typecode) identifier_typecode )return_statement )block (else_clause (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (call (attribute (string_"Typecode {0} ({1}) isn't supported.") string_"Typecode {0} ({1}) isn't supported." (identifier_format) identifier_format )attribute (argument_list (identifier_type_char) identifier_type_char (identifier_typecode) identifier_typecode )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Ensures a read character is a typecode. :param type_char: Read typecode :return: The typecode as a string (using chr) :raise RuntimeError: Unknown typecode
(module (function_definition (function_name_bitlist_to_int) function_name_bitlist_to_int (parameters (typed_parameter (identifier_bitlist) identifier_bitlist (type (generic_type (identifier_Sequence) identifier_Sequence (type_parameter (type (identifier_int) identifier_int )type )type_parameter )generic_type )type )typed_parameter )parameters (type (identifier_int) identifier_int )type (block (return_statement (call (identifier_int) identifier_int (argument_list (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (list_comprehension (call (identifier_str) identifier_str (argument_list (identifier_d) identifier_d )argument_list )call (for_in_clause (identifier_d) identifier_d (identifier_bitlist) identifier_bitlist )for_in_clause )list_comprehension )argument_list )call (integer_2) integer_2 )argument_list )call )return_statement )block )function_definition )module
Converts a sequence of bits to an integer. >>> from quantumflow.utils import bitlist_to_int >>> bitlist_to_int([1, 0, 0]) 4
(module (function_definition (function_name_get_game_id) function_name_get_game_id (parameters (identifier_self) identifier_self (identifier_date) identifier_date )parameters (block (expression_statement (assignment (identifier_df) identifier_df (call (attribute (identifier_self) identifier_self (identifier_get_game_logs) identifier_get_game_logs )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_game_id) identifier_game_id (subscript (attribute (attribute (subscript (identifier_df) identifier_df (comparison_operator (attribute (identifier_df) identifier_df (identifier_GAME_DATE) identifier_GAME_DATE )attribute (identifier_date) identifier_date )comparison_operator )subscript (identifier_Game_ID) identifier_Game_ID )attribute (identifier_values) identifier_values )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (return_statement (identifier_game_id) identifier_game_id )return_statement )block )function_definition )module
Returns the Game ID associated with the date that is passed in. Parameters ---------- date : str The date associated with the game whose Game ID. The date that is passed in can take on a numeric format of MM/DD/YY (like "01/06/16" or "01/06/2016") or the expanded Month Day, Year format (like "Jan 06, 2016" or "January 06, 2016"). Returns ------- game_id : str The desired Game ID.
(module (function_definition (function_name_phisheye_term_list) function_name_phisheye_term_list (parameters (identifier_self) identifier_self (default_parameter (identifier_include_inactive) identifier_include_inactive (False) False )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier__results) identifier__results )attribute (argument_list (string_'phisheye_term_list') string_'phisheye_term_list' (string_'/v1/phisheye/term-list') string_'/v1/phisheye/term-list' (keyword_argument (identifier_include_inactive) identifier_include_inactive (identifier_include_inactive) identifier_include_inactive )keyword_argument (keyword_argument (identifier_items_path) identifier_items_path (tuple (string_'terms') string_'terms' )tuple )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Provides a list of terms that are set up for this account. This call is not charged against your API usage limit. NOTE: The terms must be configured in the PhishEye web interface: https://research.domaintools.com/phisheye. There is no API call to set up the terms.
(module (function_definition (function_name_store_extra_keys) function_name_store_extra_keys (parameters (identifier_self) identifier_self (typed_parameter (identifier_d) identifier_d (type (generic_type (identifier_Dict) identifier_Dict (type_parameter (type (identifier_str) identifier_str )type (type (identifier_Any) identifier_Any )type )type_parameter )generic_type )type )typed_parameter )parameters (type (None) None )type (block (expression_statement (assignment (identifier_new_dict) identifier_new_dict (call (identifier_dict) identifier_dict (argument_list (attribute (identifier_self) identifier_self (identifier_extra_keys) identifier_extra_keys )attribute (dictionary_splat (identifier_d) identifier_d )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_extra_keys) identifier_extra_keys )attribute (call (attribute (identifier_new_dict) identifier_new_dict (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement )block )function_definition )module
Store several extra values in the messaging storage. :param d: dictionary entry to merge with current self.extra_keys. :returns: None
(module (function_definition (function_name_get_edge) function_name_get_edge (parameters (identifier_self) identifier_self (identifier_src_or_list) identifier_src_or_list (default_parameter (identifier_dst) identifier_dst (None) None )default_parameter )parameters (block (if_statement (boolean_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_src_or_list) identifier_src_or_list (tuple (identifier_list) identifier_list (identifier_tuple) identifier_tuple )tuple )argument_list )call (comparison_operator (identifier_dst) identifier_dst (None) None )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_edge_points) identifier_edge_points (call (identifier_tuple) identifier_tuple (argument_list (identifier_src_or_list) identifier_src_or_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_edge_points_reverse) identifier_edge_points_reverse (tuple (subscript (identifier_edge_points) identifier_edge_points (integer_1) integer_1 )subscript (subscript (identifier_edge_points) identifier_edge_points (integer_0) integer_0 )subscript )tuple )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_edge_points) identifier_edge_points (tuple (identifier_src_or_list) identifier_src_or_list (identifier_dst) identifier_dst )tuple )assignment )expression_statement (expression_statement (assignment (identifier_edge_points_reverse) identifier_edge_points_reverse (tuple (identifier_dst) identifier_dst (identifier_src_or_list) identifier_src_or_list )tuple )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_match) identifier_match (call (identifier_list) identifier_list (argument_list )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_edge_points) identifier_edge_points (subscript (attribute (identifier_self) identifier_self (identifier_obj_dict) identifier_obj_dict )attribute (string_'edges') string_'edges' )subscript )comparison_operator (parenthesized_expression (boolean_operator (comparison_operator (call (attribute (identifier_self) identifier_self (identifier_get_top_graph_type) identifier_get_top_graph_type )attribute (argument_list )argument_list )call (string_'graph') string_'graph' )comparison_operator (comparison_operator (identifier_edge_points_reverse) identifier_edge_points_reverse (subscript (attribute (identifier_self) identifier_self (identifier_obj_dict) identifier_obj_dict )attribute (string_'edges') string_'edges' )subscript )comparison_operator )boolean_operator )parenthesized_expression )boolean_operator (block (expression_statement (assignment (identifier_edges_obj_dict) identifier_edges_obj_dict (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_obj_dict) identifier_obj_dict )attribute (string_'edges') string_'edges' )subscript (identifier_get) identifier_get )attribute (argument_list (identifier_edge_points) identifier_edge_points (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_obj_dict) identifier_obj_dict )attribute (string_'edges') string_'edges' )subscript (identifier_get) identifier_get )attribute (argument_list (identifier_edge_points_reverse) identifier_edge_points_reverse (None) None )argument_list )call )argument_list )call )assignment )expression_statement (for_statement (identifier_edge_obj_dict) identifier_edge_obj_dict (identifier_edges_obj_dict) identifier_edges_obj_dict (block (expression_statement (call (attribute (identifier_match) identifier_match (identifier_append) identifier_append )attribute (argument_list (call (identifier_Edge) identifier_Edge (argument_list (subscript (identifier_edge_points) identifier_edge_points (integer_0) integer_0 )subscript (subscript (identifier_edge_points) identifier_edge_points (integer_1) integer_1 )subscript (keyword_argument (identifier_obj_dict) identifier_obj_dict (identifier_edge_obj_dict) identifier_edge_obj_dict )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )for_statement )block )if_statement (return_statement (identifier_match) identifier_match )return_statement )block )function_definition )module
Retrieved an edge from the graph. Given an edge's source and destination the corresponding Edge instance(s) will be returned. If one or more edges exist with that source and destination a list of Edge instances is returned. An empty list is returned otherwise.
(module (function_definition (function_name_print_search_results) function_name_print_search_results (parameters (identifier_self) identifier_self (identifier_search_results) identifier_search_results (default_parameter (identifier_buf) identifier_buf (attribute (identifier_sys) identifier_sys (identifier_stdout) identifier_stdout )attribute )default_parameter )parameters (block (expression_statement (assignment (identifier_formatted_lines) identifier_formatted_lines (call (attribute (identifier_self) identifier_self (identifier_format_search_results) identifier_format_search_results )attribute (argument_list (identifier_search_results) identifier_search_results )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_pr) identifier_pr (call (identifier_Printer) identifier_Printer (argument_list (identifier_buf) identifier_buf )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_txt) identifier_txt (identifier_style) identifier_style )pattern_list (identifier_formatted_lines) identifier_formatted_lines (block (expression_statement (call (identifier_pr) identifier_pr (argument_list (identifier_txt) identifier_txt (identifier_style) identifier_style )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Print formatted search results. Args: search_results (list of `ResourceSearchResult`): Search to format.
(module (function_definition (function_name_backend_from_mime) function_name_backend_from_mime (parameters (identifier_mime) identifier_mime )parameters (block (try_statement (block (expression_statement (assignment (identifier_mod_name) identifier_mod_name (subscript (identifier_MIMETYPE_TO_BACKENDS) identifier_MIMETYPE_TO_BACKENDS (identifier_mime) identifier_mime )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_msg) identifier_msg (binary_operator (string_"No handler for %r, defaulting to %r") string_"No handler for %r, defaulting to %r" (tuple (identifier_mime) identifier_mime (identifier_DEFAULT_MIME) identifier_DEFAULT_MIME )tuple )binary_operator )assignment )expression_statement (if_statement (comparison_operator (string_'FULLTEXT_TESTING') string_'FULLTEXT_TESTING' (attribute (identifier_os) identifier_os (identifier_environ) identifier_environ )attribute )comparison_operator (block (expression_statement (call (identifier_warn) identifier_warn (argument_list (identifier_msg) identifier_msg )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_LOGGER) identifier_LOGGER (identifier_debug) identifier_debug )attribute (argument_list (identifier_msg) identifier_msg )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_mod_name) identifier_mod_name (subscript (identifier_MIMETYPE_TO_BACKENDS) identifier_MIMETYPE_TO_BACKENDS (identifier_DEFAULT_MIME) identifier_DEFAULT_MIME )subscript )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_mod) identifier_mod (call (identifier_import_mod) identifier_import_mod (argument_list (identifier_mod_name) identifier_mod_name )argument_list )call )assignment )expression_statement (return_statement (identifier_mod) identifier_mod )return_statement )block )function_definition )module
Determine backend module object from a mime string.
(module (function_definition (function_name__register_converter) function_name__register_converter (parameters (identifier_cls) identifier_cls (identifier_conv_func) identifier_conv_func (identifier_conv_type) identifier_conv_type )parameters (block (expression_statement (call (attribute (attribute (identifier_cls) identifier_cls (identifier_converters) identifier_converters )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_ConverterFunctionInfo) identifier_ConverterFunctionInfo (argument_list (identifier_conv_func) identifier_conv_func (identifier_conv_type) identifier_conv_type (call (identifier_len) identifier_len (argument_list (attribute (identifier_cls) identifier_cls (identifier_converters) identifier_converters )attribute )argument_list )call )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_cls) identifier_cls (identifier__sort_converters) identifier__sort_converters )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Triggered by the @converter_function decorator
(module (function_definition (function_name_get_dict) function_name_get_dict (parameters (list_splat_pattern (identifier_keys) identifier_keys )list_splat_pattern (dictionary_splat_pattern (identifier_extras) identifier_extras )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier__keys) identifier__keys (tuple (string_'url') string_'url' (string_'args') string_'args' (string_'form') string_'form' (string_'data') string_'data' (string_'origin') string_'origin' (string_'headers') string_'headers' (string_'files') string_'files' (string_'json') string_'json' (string_'method') string_'method' )tuple )assignment )expression_statement (assert_statement (call (identifier_all) identifier_all (argument_list (call (identifier_map) identifier_map (argument_list (attribute (identifier__keys) identifier__keys (identifier___contains__) identifier___contains__ )attribute (identifier_keys) identifier_keys )argument_list )call )argument_list )call )assert_statement (expression_statement (assignment (identifier_data) identifier_data (attribute (identifier_request) identifier_request (identifier_data) identifier_data )attribute )assignment )expression_statement (expression_statement (assignment (identifier_form) identifier_form (call (identifier_semiflatten) identifier_semiflatten (argument_list (attribute (identifier_request) identifier_request (identifier_form) identifier_form )attribute )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier__json) identifier__json (call (attribute (identifier_json) identifier_json (identifier_loads) identifier_loads )attribute (argument_list (call (attribute (identifier_data) identifier_data (identifier_decode) identifier_decode )attribute (argument_list (string_'utf-8') string_'utf-8' )argument_list )call )argument_list )call )assignment )expression_statement )block (except_clause (tuple (identifier_ValueError) identifier_ValueError (identifier_TypeError) identifier_TypeError )tuple (block (expression_statement (assignment (identifier__json) identifier__json (None) None )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_d) identifier_d (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_url) identifier_url (call (identifier_get_url) identifier_get_url (argument_list (identifier_request) identifier_request )argument_list )call )keyword_argument (keyword_argument (identifier_args) identifier_args (call (identifier_semiflatten) identifier_semiflatten (argument_list (attribute (identifier_request) identifier_request (identifier_args) identifier_args )attribute )argument_list )call )keyword_argument (keyword_argument (identifier_form) identifier_form (identifier_form) identifier_form )keyword_argument (keyword_argument (identifier_data) identifier_data (call (identifier_json_safe) identifier_json_safe (argument_list (identifier_data) identifier_data )argument_list )call )keyword_argument (keyword_argument (identifier_origin) identifier_origin (call (attribute (attribute (identifier_request) identifier_request (identifier_headers) identifier_headers )attribute (identifier_get) identifier_get )attribute (argument_list (string_'X-Forwarded-For') string_'X-Forwarded-For' (attribute (identifier_request) identifier_request (identifier_remote_addr) identifier_remote_addr )attribute )argument_list )call )keyword_argument (keyword_argument (identifier_headers) identifier_headers (call (identifier_get_headers) identifier_get_headers (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_files) identifier_files (call (identifier_get_files) identifier_get_files (argument_list )argument_list )call )keyword_argument (keyword_argument (identifier_json) identifier_json (identifier__json) identifier__json )keyword_argument (keyword_argument (identifier_method) identifier_method (attribute (identifier_request) identifier_request (identifier_method) identifier_method )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_out_d) identifier_out_d (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_keys) identifier_keys (block (expression_statement (assignment (subscript (identifier_out_d) identifier_out_d (identifier_key) identifier_key )subscript (call (attribute (identifier_d) identifier_d (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key )argument_list )call )assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_out_d) identifier_out_d (identifier_update) identifier_update )attribute (argument_list (identifier_extras) identifier_extras )argument_list )call )expression_statement (return_statement (identifier_out_d) identifier_out_d )return_statement )block )function_definition )module
Returns request dict of given keys.
(module (function_definition (function_name__reply_json) function_name__reply_json (parameters (identifier_self) identifier_self (identifier_json_payload) identifier_json_payload (default_parameter (identifier_status_code) identifier_status_code (integer_200) integer_200 )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__send_headers) identifier__send_headers )attribute (argument_list (keyword_argument (identifier_status_code) identifier_status_code (identifier_status_code) identifier_status_code )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_json_str) identifier_json_str (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_json_payload) identifier_json_payload )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_wfile) identifier_wfile )attribute (identifier_write) identifier_write )attribute (argument_list (identifier_json_str) identifier_json_str )argument_list )call )expression_statement )block )function_definition )module
Return a JSON-serializable data structure
(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_UserBindingInstance) identifier_UserBindingInstance (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_payload) identifier_payload (keyword_argument (identifier_service_sid) identifier_service_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'service_sid') string_'service_sid' )subscript )keyword_argument (keyword_argument (identifier_user_sid) identifier_user_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'user_sid') string_'user_sid' )subscript )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Build an instance of UserBindingInstance :param dict payload: Payload response from the API :returns: twilio.rest.chat.v2.service.user.user_binding.UserBindingInstance :rtype: twilio.rest.chat.v2.service.user.user_binding.UserBindingInstance
(module (function_definition (function_name_get_authenticated_person) function_name_get_authenticated_person (parameters (identifier_self) identifier_self )parameters (block (try_statement (block (expression_statement (assignment (identifier_output) identifier_output (call (attribute (identifier_self) identifier_self (identifier__get_data) identifier__get_data )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__logger) identifier__logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (identifier_output) identifier_output )argument_list )call )expression_statement (expression_statement (assignment (identifier_person) identifier_person (call (identifier_Person) identifier_Person (argument_list (list (attribute (identifier_self) identifier_self (identifier_email) identifier_email )attribute (subscript (subscript (identifier_output) identifier_output (integer_9) integer_9 )subscript (integer_1) integer_1 )subscript (None) None (None) None (None) None (None) None (list (None) None (None) None (attribute (identifier_self) identifier_self (identifier_email) identifier_email )attribute (attribute (identifier_self) identifier_self (identifier_email) identifier_email )attribute )list (None) None (None) None (None) None (None) None (None) None (None) None (None) None )list )argument_list )call )assignment )expression_statement )block (except_clause (tuple (identifier_IndexError) identifier_IndexError (identifier_TypeError) identifier_TypeError (identifier_InvalidData) identifier_InvalidData )tuple (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__logger) identifier__logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (string_'Missing essential info, cannot instantiate authenticated person') string_'Missing essential info, cannot instantiate authenticated person' )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )except_clause )try_statement (return_statement (identifier_person) identifier_person )return_statement )block )function_definition )module
Retrieves the person associated with this account
(module (function_definition (function_name_user_roles_exists) function_name_user_roles_exists (parameters (identifier_name) identifier_name (identifier_roles) identifier_roles (identifier_database) identifier_database (default_parameter (identifier_user) identifier_user (None) None )default_parameter (default_parameter (identifier_password) identifier_password (None) None )default_parameter (default_parameter (identifier_host) identifier_host (None) None )default_parameter (default_parameter (identifier_port) identifier_port (None) None )default_parameter (default_parameter (identifier_authdb) identifier_authdb (None) None )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_roles) identifier_roles (call (identifier__to_dict) identifier__to_dict (argument_list (identifier_roles) identifier_roles )argument_list )call )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (return_statement (string_'Roles provided in wrong format') string_'Roles provided in wrong format' )return_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_users) identifier_users (call (identifier_user_list) identifier_user_list (argument_list (identifier_user) identifier_user (identifier_password) identifier_password (identifier_host) identifier_host (identifier_port) identifier_port (identifier_database) identifier_database (identifier_authdb) identifier_authdb )argument_list )call )assignment )expression_statement (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_users) identifier_users (attribute (identifier_six) identifier_six (identifier_string_types) identifier_string_types )attribute )argument_list )call (block (return_statement (string_'Failed to connect to mongo database') string_'Failed to connect to mongo database' )return_statement )block )if_statement (for_statement (identifier_user) identifier_user (identifier_users) identifier_users (block (if_statement (comparison_operator (identifier_name) identifier_name (call (attribute (call (identifier_dict) identifier_dict (argument_list (identifier_user) identifier_user )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'user') string_'user' )argument_list )call )comparison_operator (block (for_statement (identifier_role) identifier_role (identifier_roles) identifier_roles (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_role) identifier_role (identifier_dict) identifier_dict )argument_list )call )not_operator (block (expression_statement (assignment (identifier_role) identifier_role (dictionary (pair (string_'role') string_'role' (identifier_role) identifier_role )pair (pair (string_'db') string_'db' (identifier_database) identifier_database )pair )dictionary )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_role) identifier_role (call (attribute (call (identifier_dict) identifier_dict (argument_list (identifier_user) identifier_user )argument_list )call (identifier_get) identifier_get )attribute (argument_list (string_'roles') string_'roles' (list )list )argument_list )call )comparison_operator (block (return_statement (False) False )return_statement )block )if_statement )block )for_statement (return_statement (True) True )return_statement )block )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Checks if a user of a MongoDB database has specified roles CLI Examples: .. code-block:: bash salt '*' mongodb.user_roles_exists johndoe '["readWrite"]' dbname admin adminpwd localhost 27017 .. code-block:: bash salt '*' mongodb.user_roles_exists johndoe '[{"role": "readWrite", "db": "dbname" }, {"role": "read", "db": "otherdb"}]' dbname admin adminpwd localhost 27017
(module (function_definition (function_name__with_env) function_name__with_env (parameters (identifier_self) identifier_self (identifier_env) identifier_env )parameters (block (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_self) identifier_self (identifier__browse) identifier__browse )attribute (argument_list (identifier_env) identifier_env (attribute (identifier_self) identifier_self (identifier__ids) identifier__ids )attribute )argument_list )call )assignment )expression_statement (return_statement (identifier_res) identifier_res )return_statement )block )function_definition )module
As the `with_env` class method but for recordset.
(module (function_definition (function_name_canonical_query_string) function_name_canonical_query_string (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_results) identifier_results (list )list )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_values) identifier_values )pattern_list (call (identifier_iteritems) identifier_iteritems (argument_list (attribute (identifier_self) identifier_self (identifier_query_parameters) identifier_query_parameters )attribute )argument_list )call (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier__x_amz_signature) identifier__x_amz_signature )comparison_operator (block (continue_statement )continue_statement )block )if_statement (for_statement (identifier_value) identifier_value (identifier_values) identifier_values (block (expression_statement (call (attribute (identifier_results) identifier_results (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_"%s=%s") string_"%s=%s" (tuple (identifier_key) identifier_key (identifier_value) identifier_value )tuple )binary_operator )argument_list )call )expression_statement )block )for_statement )block )for_statement (return_statement (call (attribute (string_"&") string_"&" (identifier_join) identifier_join )attribute (argument_list (call (identifier_sorted) identifier_sorted (argument_list (identifier_results) identifier_results )argument_list )call )argument_list )call )return_statement )block )function_definition )module
The canonical query string from the query parameters. This takes the query string from the request and orders the parameters in
(module (function_definition (function_name_readCfgJson) function_name_readCfgJson (parameters (identifier_cls) identifier_cls (identifier_working_path) identifier_working_path )parameters (block (expression_statement (assignment (identifier_cfg_json_filename) identifier_cfg_json_filename (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_working_path) identifier_working_path (attribute (identifier_cls) identifier_cls (identifier_CFG_JSON_FILENAME) identifier_CFG_JSON_FILENAME )attribute )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_cfg_json_filename) identifier_cfg_json_filename )argument_list )call (block (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_cfg_json_filename) identifier_cfg_json_filename )argument_list )call (as_pattern_target (identifier_json_file) identifier_json_file )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_cfg) identifier_cfg (call (attribute (identifier_json) identifier_json (identifier_load) identifier_load )attribute (argument_list (identifier_json_file) identifier_json_file )argument_list )call )assignment )expression_statement (return_statement (identifier_cfg) identifier_cfg )return_statement )block )with_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Read cmWalk configuration data of a working directory from a json file. :param working_path: working path for reading the configuration data. :return: the configuration data represented in a json object, None if the configuration files does not exist.
(module (function_definition (function_name_GetRandomDatetime) function_name_GetRandomDatetime (parameters )parameters (block (expression_statement (assignment (identifier_seconds_offset) identifier_seconds_offset (call (attribute (identifier_random) identifier_random (identifier_randint) identifier_randint )attribute (argument_list (integer_0) integer_0 (binary_operator (binary_operator (binary_operator (integer_60) integer_60 (integer_60) integer_60 )binary_operator (integer_24) integer_24 )binary_operator (integer_7) integer_7 )binary_operator )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dt) identifier_dt (binary_operator (call (attribute (identifier_datetime) identifier_datetime (identifier_today) identifier_today )attribute (argument_list )argument_list )call (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_seconds) identifier_seconds (identifier_seconds_offset) identifier_seconds_offset )keyword_argument )argument_list )call )binary_operator )assignment )expression_statement (return_statement (call (attribute (identifier_dt) identifier_dt (identifier_replace) identifier_replace )attribute (argument_list (keyword_argument (identifier_second) identifier_second (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_microsecond) identifier_microsecond (integer_0) integer_0 )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return a datetime in the next week.
(module (function_definition (function_name_stats) function_name_stats (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_self) identifier_self (identifier__fetch_cmd) identifier__fetch_cmd )attribute (argument_list (string_b'stats') string_b'stats' (identifier_args) identifier_args (False) False )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (call (attribute (identifier_six) identifier_six (identifier_iteritems) identifier_iteritems )attribute (argument_list (identifier_result) identifier_result )argument_list )call (block (expression_statement (assignment (identifier_converter) identifier_converter (call (attribute (identifier_STAT_TYPES) identifier_STAT_TYPES (identifier_get) identifier_get )attribute (argument_list (identifier_key) identifier_key (identifier_int) identifier_int )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (subscript (identifier_result) identifier_result (identifier_key) identifier_key )subscript (call (identifier_converter) identifier_converter (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block (except_clause (identifier_Exception) identifier_Exception (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
The memcached "stats" command. The returned keys depend on what the "stats" command returns. A best effort is made to convert values to appropriate Python types, defaulting to strings when a conversion cannot be made. Args: *arg: extra string arguments to the "stats" command. See the memcached protocol documentation for more information. Returns: A dict of the returned stats.
(module (function_definition (function_name_analyze) function_name_analyze (parameters (identifier_self) identifier_self (identifier_scratch) identifier_scratch (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_results) identifier_results (call (identifier_Counter) identifier_Counter (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_script) identifier_script (call (attribute (identifier_self) identifier_self (identifier_iter_scripts) identifier_iter_scripts )attribute (argument_list (identifier_scratch) identifier_scratch )argument_list )call (block (expression_statement (assignment (identifier_gen) identifier_gen (call (attribute (identifier_self) identifier_self (identifier_iter_blocks) identifier_iter_blocks )attribute (argument_list (attribute (identifier_script) identifier_script (identifier_blocks) identifier_blocks )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_name) identifier_name (string_'start') string_'start' )assignment )expression_statement (expression_statement (assignment (identifier_level) identifier_level (None) None )assignment )expression_statement (while_statement (comparison_operator (identifier_name) identifier_name (string_'') string_'' )comparison_operator (block (if_statement (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_ANIMATION) identifier_ANIMATION )attribute )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_gen) identifier_gen (identifier_count) identifier_count )pattern_list (call (attribute (identifier_self) identifier_self (identifier__check_animation) identifier__check_animation )attribute (argument_list (identifier_name) identifier_name (identifier_level) identifier_level (identifier_gen) identifier_gen )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_results) identifier_results (identifier_update) identifier_update )attribute (argument_list (identifier_count) identifier_count )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (pattern_list (identifier_name) identifier_name (identifier_level) identifier_level (identifier__) identifier__ )pattern_list (call (identifier_next) identifier_next (argument_list (identifier_gen) identifier_gen (tuple (string_'') string_'' (integer_0) integer_0 (string_'') string_'' )tuple )argument_list )call )assignment )expression_statement )block )while_statement )block )for_statement (return_statement (dictionary (pair (string_'animation') string_'animation' (identifier_results) identifier_results )pair )dictionary )return_statement )block )function_definition )module
Run and return the results from the Animation plugin.
(module (function_definition (function_name_parse_top_level) function_name_parse_top_level (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_contacts) identifier_contacts (list )list )assignment )expression_statement (while_statement (not_operator (attribute (identifier_self) identifier_self (identifier_eos) identifier_eos )attribute )not_operator (block (expression_statement (assignment (identifier_contact) identifier_contact (call (attribute (identifier_self) identifier_self (identifier_parse_contact) identifier_parse_contact )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_contact) identifier_contact )not_operator (block (break_statement )break_statement )block )if_statement (expression_statement (call (attribute (identifier_contacts) identifier_contacts (identifier_append) identifier_append )attribute (argument_list (identifier_contact) identifier_contact )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_parse_whitespace) identifier_parse_whitespace )attribute (argument_list )argument_list )call )expression_statement )block )while_statement (expression_statement (assignment (identifier_output) identifier_output (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_key) identifier_key (identifier_value) identifier_value )pattern_list (identifier_contacts) identifier_contacts (block (expression_statement (assignment (subscript (identifier_output) identifier_output (identifier_key) identifier_key )subscript (identifier_value) identifier_value )assignment )expression_statement )block )for_statement (return_statement (identifier_output) identifier_output )return_statement )block )function_definition )module
The top level parser will do a loop where it looks for a single contact parse and then eats all whitespace until there is no more input left or another contact is found to be parsed and stores them.
(module (function_definition (function_name_is_in_shard) function_name_is_in_shard (parameters (identifier_self) identifier_self (identifier_s) identifier_s )parameters (block (return_statement (comparison_operator (call (attribute (identifier_self) identifier_self (identifier_compute_shard) identifier_compute_shard )attribute (argument_list (identifier_s) identifier_s (attribute (identifier_self) identifier_self (identifier__nshards) identifier__nshards )attribute )argument_list )call (attribute (identifier_self) identifier_self (identifier__shard) identifier__shard )attribute )comparison_operator )return_statement )block )function_definition )module
Returns True iff the string s is in this shard. :param string s: The string to check.
(module (function_definition (function_name__symlink_remote_lib) function_name__symlink_remote_lib (parameters (identifier_self) identifier_self (identifier_gopath) identifier_gopath (identifier_go_remote_lib) identifier_go_remote_lib (identifier_required_links) identifier_required_links )parameters (block (function_definition (function_name_source_iter) function_name_source_iter (parameters )parameters (block (expression_statement (assignment (identifier_remote_lib_source_dir) identifier_remote_lib_source_dir (subscript (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_context) identifier_context )attribute (identifier_products) identifier_products )attribute (identifier_get_data) identifier_get_data )attribute (argument_list (string_'go_remote_lib_src') string_'go_remote_lib_src' )argument_list )call (identifier_go_remote_lib) identifier_go_remote_lib )subscript )assignment )expression_statement (for_statement (identifier_path) identifier_path (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (identifier_remote_lib_source_dir) identifier_remote_lib_source_dir )argument_list )call (block (expression_statement (assignment (identifier_remote_src) identifier_remote_src (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_remote_lib_source_dir) identifier_remote_lib_source_dir (identifier_path) identifier_path )argument_list )call )assignment )expression_statement (if_statement (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_remote_src) identifier_remote_src )argument_list )call (block (expression_statement (yield (tuple (identifier_remote_src) identifier_remote_src (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_basename) identifier_basename )attribute (argument_list (identifier_path) identifier_path )argument_list )call )tuple )yield )expression_statement )block )if_statement )block )for_statement )block )function_definition (return_statement (call (attribute (identifier_self) identifier_self (identifier__symlink_lib) identifier__symlink_lib )attribute (argument_list (identifier_gopath) identifier_gopath (identifier_go_remote_lib) identifier_go_remote_lib (call (identifier_source_iter) identifier_source_iter (argument_list )argument_list )call (identifier_required_links) identifier_required_links )argument_list )call )return_statement )block )function_definition )module
Creates symlinks from the given gopath to the source files of the given remote lib. Also duplicates directory structure leading to source files of package within gopath, in order to provide isolation to the package. Adds the symlinks to the source files to required_links.
(module (function_definition (function_name_get_command_line) function_name_get_command_line (parameters (identifier_instance_type) identifier_instance_type (identifier_env) identifier_env (identifier_message) identifier_message (identifier_data) identifier_data (identifier_mode) identifier_mode (identifier_open_notebook) identifier_open_notebook (identifier_command_str) identifier_command_str )parameters (block (expression_statement (assignment (identifier_floyd_command) identifier_floyd_command (list (string_"floyd") string_"floyd" (string_"run") string_"run" )list )assignment )expression_statement (if_statement (identifier_instance_type) identifier_instance_type (block (expression_statement (call (attribute (identifier_floyd_command) identifier_floyd_command (identifier_append) identifier_append )attribute (argument_list (binary_operator (string_'--') string_'--' (subscript (identifier_INSTANCE_NAME_MAP) identifier_INSTANCE_NAME_MAP (identifier_instance_type) identifier_instance_type )subscript )binary_operator )argument_list )call )expression_statement )block )if_statement (if_statement (boolean_operator (identifier_env) identifier_env (not_operator (comparison_operator (identifier_env) identifier_env (identifier_DEFAULT_ENV) identifier_DEFAULT_ENV )comparison_operator )not_operator )boolean_operator (block (expression_statement (augmented_assignment (identifier_floyd_command) identifier_floyd_command (list (string_"--env") string_"--env" (identifier_env) identifier_env )list )augmented_assignment )expression_statement )block )if_statement (if_statement (identifier_message) identifier_message (block (expression_statement (augmented_assignment (identifier_floyd_command) identifier_floyd_command (list (string_"--message") string_"--message" (call (identifier_shell_quote) identifier_shell_quote (argument_list (identifier_message) identifier_message )argument_list )call )list )augmented_assignment )expression_statement )block )if_statement (if_statement (identifier_data) identifier_data (block (for_statement (identifier_data_item) identifier_data_item (identifier_data) identifier_data (block (expression_statement (assignment (identifier_parts) identifier_parts (call (attribute (identifier_data_item) identifier_data_item (identifier_split) identifier_split )attribute (argument_list (string_':') string_':' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_parts) identifier_parts )argument_list )call (integer_1) integer_1 )comparison_operator (block (expression_statement (assignment (identifier_data_item) identifier_data_item (binary_operator (binary_operator (call (identifier_normalize_data_name) identifier_normalize_data_name (argument_list (subscript (identifier_parts) identifier_parts (integer_0) integer_0 )subscript (keyword_argument (identifier_use_data_config) identifier_use_data_config (False) False )keyword_argument )argument_list )call (string_':') string_':' )binary_operator (subscript (identifier_parts) identifier_parts (integer_1) integer_1 )subscript )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (augmented_assignment (identifier_floyd_command) identifier_floyd_command (list (string_"--data") string_"--data" (identifier_data_item) identifier_data_item )list )augmented_assignment )expression_statement )block )for_statement )block )if_statement (if_statement (boolean_operator (identifier_mode) identifier_mode (comparison_operator (identifier_mode) identifier_mode (string_"job") string_"job" )comparison_operator )boolean_operator (block (expression_statement (augmented_assignment (identifier_floyd_command) identifier_floyd_command (list (string_"--mode") string_"--mode" (identifier_mode) identifier_mode )list )augmented_assignment )expression_statement (if_statement (comparison_operator (identifier_mode) identifier_mode (string_'jupyter') string_'jupyter' )comparison_operator (block (if_statement (not_operator (identifier_open_notebook) identifier_open_notebook )not_operator (block (expression_statement (call (attribute (identifier_floyd_command) identifier_floyd_command (identifier_append) identifier_append )attribute (argument_list (string_"--no-open") string_"--no-open" )argument_list )call )expression_statement )block )if_statement )block )if_statement )block (else_clause (block (if_statement (identifier_command_str) identifier_command_str (block (expression_statement (call (attribute (identifier_floyd_command) identifier_floyd_command (identifier_append) identifier_append )attribute (argument_list (call (identifier_shell_quote) identifier_shell_quote (argument_list (identifier_command_str) identifier_command_str )argument_list )call )argument_list )call )expression_statement )block )if_statement )block )else_clause )if_statement (return_statement (call (attribute (string_' ') string_' ' (identifier_join) identifier_join )attribute (argument_list (identifier_floyd_command) identifier_floyd_command )argument_list )call )return_statement )block )function_definition )module
Return a string representing the full floyd command entered in the command line
(module (function_definition (function_name__create_injector) function_name__create_injector (parameters (identifier_self) identifier_self (identifier_injector) identifier_injector )parameters (block (if_statement (comparison_operator (identifier_injector) identifier_injector (string_"block_info") string_"block_info" )comparison_operator (block (expression_statement (assignment (identifier_block_info_injector) identifier_block_info_injector (call (attribute (identifier_importlib) identifier_importlib (identifier_import_module) identifier_import_module )attribute (argument_list (string_"sawtooth_validator.journal.block_info_injector") string_"sawtooth_validator.journal.block_info_injector" )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_block_info_injector) identifier_block_info_injector (identifier_BlockInfoInjector) identifier_BlockInfoInjector )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__state_view_factory) identifier__state_view_factory )attribute (attribute (identifier_self) identifier_self (identifier__signer) identifier__signer )attribute )argument_list )call )return_statement )block )if_statement (raise_statement (call (identifier_UnknownBatchInjectorError) identifier_UnknownBatchInjectorError (argument_list (identifier_injector) identifier_injector )argument_list )call )raise_statement )block )function_definition )module
Returns a new batch injector
(module (function_definition (function_name_make_avro_schema) function_name_make_avro_schema (parameters (identifier_i) identifier_i (identifier_loader) identifier_loader )parameters (block (expression_statement (assignment (identifier_names) identifier_names (call (identifier_Names) identifier_Names (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_avro) identifier_avro (call (identifier_make_avro) identifier_make_avro (argument_list (identifier_i) identifier_i (identifier_loader) identifier_loader )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_make_avsc_object) identifier_make_avsc_object (argument_list (call (identifier_convert_to_dict) identifier_convert_to_dict (argument_list (identifier_avro) identifier_avro )argument_list )call (identifier_names) identifier_names )argument_list )call )expression_statement (return_statement (identifier_names) identifier_names )return_statement )block )function_definition )module
All in one convenience function. Call make_avro() and make_avro_schema_from_avro() separately if you need the intermediate result for diagnostic output.
(module (function_definition (function_name_to_positions) function_name_to_positions (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_coords_are_displacement) identifier_coords_are_displacement )attribute (block (expression_statement (assignment (identifier_cumulative_displacements) identifier_cumulative_displacements (call (attribute (identifier_np) identifier_np (identifier_cumsum) identifier_cumsum )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_frac_coords) identifier_frac_coords )attribute (keyword_argument (identifier_axis) identifier_axis (integer_0) integer_0 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_positions) identifier_positions (binary_operator (attribute (identifier_self) identifier_self (identifier_base_positions) identifier_base_positions )attribute (identifier_cumulative_displacements) identifier_cumulative_displacements )binary_operator )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_frac_coords) identifier_frac_coords )attribute (identifier_positions) identifier_positions )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_coords_are_displacement) identifier_coords_are_displacement )attribute (False) False )assignment )expression_statement )block )if_statement (return_statement )return_statement )block )function_definition )module
Converts fractional coordinates of trajectory into positions
(module (function_definition (function_name_verify_counter) function_name_verify_counter (parameters (identifier_self) identifier_self (identifier_signature) identifier_signature (identifier_counter) identifier_counter )parameters (block (expression_statement (assignment (identifier_devices) identifier_devices (call (attribute (identifier_self) identifier_self (identifier___get_u2f_devices) identifier___get_u2f_devices )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_device) identifier_device (identifier_devices) identifier_devices (block (if_statement (comparison_operator (subscript (identifier_device) identifier_device (string_'keyHandle') string_'keyHandle' )subscript (subscript (identifier_signature) identifier_signature (string_'keyHandle') string_'keyHandle' )subscript )comparison_operator (block (if_statement (comparison_operator (identifier_counter) identifier_counter (subscript (identifier_device) identifier_device (string_'counter') string_'counter' )subscript )comparison_operator (block (expression_statement (assignment (subscript (identifier_device) identifier_device (string_'counter') string_'counter' )subscript (identifier_counter) identifier_counter )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier___save_u2f_devices) identifier___save_u2f_devices )attribute (argument_list (identifier_devices) identifier_devices )argument_list )call )expression_statement (return_statement (True) True )return_statement )block (else_clause (block (return_statement (False) False )return_statement )block )else_clause )if_statement )block )if_statement )block )for_statement )block )function_definition )module
Verifies that counter value is greater than previous signature
(module (function_definition (function_name_use_service) function_name_use_service (parameters (identifier_bundle_context) identifier_bundle_context (identifier_svc_reference) identifier_svc_reference )parameters (block (if_statement (comparison_operator (identifier_svc_reference) identifier_svc_reference (None) None )comparison_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (string_"Invalid ServiceReference") string_"Invalid ServiceReference" )argument_list )call )raise_statement )block )if_statement (try_statement (block (expression_statement (yield (call (attribute (identifier_bundle_context) identifier_bundle_context (identifier_get_service) identifier_get_service )attribute (argument_list (identifier_svc_reference) identifier_svc_reference )argument_list )call )yield )expression_statement )block (finally_clause (block (try_statement (block (expression_statement (call (attribute (identifier_bundle_context) identifier_bundle_context (identifier_unget_service) identifier_unget_service )attribute (argument_list (identifier_svc_reference) identifier_svc_reference )argument_list )call )expression_statement )block (except_clause (attribute (attribute (identifier_pelix) identifier_pelix (identifier_constants) identifier_constants )attribute (identifier_BundleException) identifier_BundleException )attribute (block (pass_statement )pass_statement )block )except_clause )try_statement )block )finally_clause )try_statement )block )function_definition )module
Utility context to safely use a service in a "with" block. It looks after the the given service and releases its reference when exiting the context. :param bundle_context: The calling bundle context :param svc_reference: The reference of the service to use :return: The requested service :raise BundleException: Service not found :raise TypeError: Invalid service reference
(module (function_definition (function_name__remove_dependency) function_name__remove_dependency (parameters (identifier_self) identifier_self (identifier_dependlist) identifier_dependlist (identifier_i) identifier_i (identifier_isSubroutine) identifier_isSubroutine (identifier_anexec) identifier_anexec )parameters (block (if_statement (comparison_operator (subscript (identifier_dependlist) identifier_dependlist (identifier_i) identifier_i )subscript (attribute (identifier_anexec) identifier_anexec (identifier_dependencies) identifier_dependencies )attribute )comparison_operator (block (expression_statement (assignment (identifier_all_depends) identifier_all_depends (subscript (attribute (identifier_anexec) identifier_anexec (identifier_dependencies) identifier_dependencies )attribute (subscript (identifier_dependlist) identifier_dependlist (identifier_i) identifier_i )subscript )subscript )assignment )expression_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_all_depends) identifier_all_depends )argument_list )call (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_clean_args) identifier_clean_args (call (attribute (subscript (identifier_all_depends) identifier_all_depends (integer_0) integer_0 )subscript (identifier_clean) identifier_clean )attribute (argument_list (subscript (identifier_dependlist) identifier_dependlist (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator )subscript )argument_list )call )assignment )expression_statement (for_statement (identifier_idepend) identifier_idepend (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_all_depends) identifier_all_depends )argument_list )call )argument_list )call (block (if_statement (parenthesized_expression (boolean_operator (comparison_operator (attribute (subscript (identifier_all_depends) identifier_all_depends (identifier_idepend) identifier_idepend )subscript (identifier_argslist) identifier_argslist )attribute (identifier_clean_args) identifier_clean_args )comparison_operator (comparison_operator (attribute (subscript (identifier_all_depends) identifier_all_depends (identifier_idepend) identifier_idepend )subscript (identifier_isSubroutine) identifier_isSubroutine )attribute (identifier_isSubroutine) identifier_isSubroutine )comparison_operator )boolean_operator )parenthesized_expression (block (delete_statement (subscript (subscript (attribute (identifier_anexec) identifier_anexec (identifier_dependencies) identifier_dependencies )attribute (subscript (identifier_dependlist) identifier_dependlist (identifier_i) identifier_i )subscript )subscript (identifier_idepend) identifier_idepend )subscript )delete_statement (break_statement )break_statement )block )if_statement )block )for_statement )block )if_statement )block )if_statement )block )function_definition )module
Removes the specified dependency from the executable if it exists and matches the call signature.
(module (function_definition (function_name_get_distance_matrix) function_name_get_distance_matrix (parameters (identifier_self) identifier_self )parameters (block (assert_statement (comparison_operator (attribute (attribute (identifier_self) identifier_self (identifier_lons) identifier_lons )attribute (identifier_ndim) identifier_ndim )attribute (integer_1) integer_1 )comparison_operator )assert_statement (expression_statement (assignment (identifier_distances) identifier_distances (call (attribute (identifier_geodetic) identifier_geodetic (identifier_geodetic_distance) identifier_geodetic_distance )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_lons) identifier_lons )attribute (identifier_reshape) identifier_reshape )attribute (argument_list (binary_operator (attribute (attribute (identifier_self) identifier_self (identifier_lons) identifier_lons )attribute (identifier_shape) identifier_shape )attribute (tuple (integer_1) integer_1 )tuple )binary_operator )argument_list )call (call (attribute (attribute (identifier_self) identifier_self (identifier_lats) identifier_lats )attribute (identifier_reshape) identifier_reshape )attribute (argument_list (binary_operator (attribute (attribute (identifier_self) identifier_self (identifier_lats) identifier_lats )attribute (identifier_shape) identifier_shape )attribute (tuple (integer_1) integer_1 )tuple )binary_operator )argument_list )call (attribute (identifier_self) identifier_self (identifier_lons) identifier_lons )attribute (attribute (identifier_self) identifier_self (identifier_lats) identifier_lats )attribute )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_numpy) identifier_numpy (identifier_matrix) identifier_matrix )attribute (argument_list (identifier_distances) identifier_distances (keyword_argument (identifier_copy) identifier_copy (False) False )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Compute and return distances between each pairs of points in the mesh. This method requires that the coordinate arrays are one-dimensional. NB: the depth of the points is ignored .. warning:: Because of its quadratic space and time complexity this method is safe to use for meshes of up to several thousand points. For mesh of 10k points it needs ~800 Mb for just the resulting matrix and four times that much for intermediate storage. :returns: Two-dimensional numpy array, square matrix of distances. The matrix has zeros on main diagonal and positive distances in kilometers on all other cells. That is, value in cell (3, 5) is the distance between mesh's points 3 and 5 in km, and it is equal to value in cell (5, 3). Uses :func:`openquake.hazardlib.geo.geodetic.geodetic_distance`.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (identifier_sid) identifier_sid )parameters (block (return_statement (call (identifier_FieldContext) identifier_FieldContext (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (keyword_argument (identifier_assistant_sid) identifier_assistant_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'assistant_sid') string_'assistant_sid' )subscript )keyword_argument (keyword_argument (identifier_task_sid) identifier_task_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'task_sid') string_'task_sid' )subscript )keyword_argument (keyword_argument (identifier_sid) identifier_sid (identifier_sid) identifier_sid )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Constructs a FieldContext :param sid: The unique string that identifies the resource :returns: twilio.rest.autopilot.v1.assistant.task.field.FieldContext :rtype: twilio.rest.autopilot.v1.assistant.task.field.FieldContext
(module (function_definition (function_name_external_answer) function_name_external_answer (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_sequences) identifier_sequences )list_splat_pattern )parameters (block (if_statement (not_operator (call (identifier_getattr) identifier_getattr (argument_list (identifier_self) identifier_self (string_'external') string_'external' (False) False )argument_list )call )not_operator (block (return_statement )return_statement )block )if_statement (if_statement (boolean_operator (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_self) identifier_self (string_'test_func') string_'test_func' )argument_list )call (comparison_operator (attribute (identifier_self) identifier_self (identifier_test_func) identifier_test_func )attribute (attribute (identifier_self) identifier_self (identifier__ident) identifier__ident )attribute )comparison_operator )boolean_operator (block (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_libs) identifier_libs (call (attribute (identifier_libraries) identifier_libraries (identifier_get_libs) identifier_get_libs )attribute (argument_list (attribute (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )argument_list )call )assignment )expression_statement (for_statement (identifier_lib) identifier_lib (identifier_libs) identifier_libs (block (if_statement (not_operator (call (attribute (identifier_lib) identifier_lib (identifier_check_conditions) identifier_check_conditions )attribute (argument_list (identifier_self) identifier_self (list_splat (identifier_sequences) identifier_sequences )list_splat )argument_list )call )not_operator (block (continue_statement )continue_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_lib) identifier_lib (identifier_get_function) identifier_get_function )attribute (argument_list )argument_list )call )not_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_prepared_sequences) identifier_prepared_sequences (call (attribute (identifier_lib) identifier_lib (identifier_prepare) identifier_prepare )attribute (argument_list (list_splat (identifier_sequences) identifier_sequences )list_splat )argument_list )call )assignment )expression_statement (try_statement (block (return_statement (call (attribute (identifier_lib) identifier_lib (identifier_func) identifier_func )attribute (argument_list (list_splat (identifier_prepared_sequences) identifier_prepared_sequences )list_splat )argument_list )call )return_statement )block (except_clause (identifier_Exception) identifier_Exception (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement )block )function_definition )module
Try to get answer from known external libraries.
(module (function_definition (function_name__snapshot) function_name__snapshot (parameters (identifier_self) identifier_self )parameters (type (generic_type (identifier_Dict) identifier_Dict (type_parameter (type (identifier_str) identifier_str )type (type (identifier_Any) identifier_Any )type )type_parameter )generic_type )type (block (try_statement (block (return_statement (dictionary_comprehension (pair (identifier_name) identifier_name (attribute (identifier_item) identifier_item (identifier__snapshot) identifier__snapshot )attribute )pair (for_in_clause (pattern_list (identifier_name) identifier_name (identifier_item) identifier_item )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier__nested_items) identifier__nested_items )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )for_in_clause )dictionary_comprehension )return_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_SnapshotError) identifier_SnapshotError (argument_list (call (attribute (string_'Error while creating snapshot for {}') string_'Error while creating snapshot for {}' (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__name) identifier__name )attribute )argument_list )call )argument_list )call (identifier_e) identifier_e )raise_statement )block )except_clause )try_statement )block )function_definition )module
Implements snapshot for collections by recursively invoking snapshot of all child items
(module (function_definition (function_name_voronoi) function_name_voronoi (parameters (identifier_data) identifier_data (default_parameter (identifier_line_color) identifier_line_color (None) None )default_parameter (default_parameter (identifier_line_width) identifier_line_width (integer_2) integer_2 )default_parameter (default_parameter (identifier_f_tooltip) identifier_f_tooltip (None) None )default_parameter (default_parameter (identifier_cmap) identifier_cmap (None) None )default_parameter (default_parameter (identifier_max_area) identifier_max_area (float_1e4) float_1e4 )default_parameter (default_parameter (identifier_alpha) identifier_alpha (integer_220) integer_220 )default_parameter )parameters (block (import_from_statement (dotted_name (identifier_geoplotlib) identifier_geoplotlib (identifier_layers) identifier_layers )dotted_name (dotted_name (identifier_VoronoiLayer) identifier_VoronoiLayer )dotted_name )import_from_statement (expression_statement (call (attribute (attribute (identifier__global_config) identifier__global_config (identifier_layers) identifier_layers )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_VoronoiLayer) identifier_VoronoiLayer (argument_list (identifier_data) identifier_data (identifier_line_color) identifier_line_color (identifier_line_width) identifier_line_width (identifier_f_tooltip) identifier_f_tooltip (identifier_cmap) identifier_cmap (identifier_max_area) identifier_max_area (identifier_alpha) identifier_alpha )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Draw the voronoi tesselation of the points :param data: data access object :param line_color: line color :param line_width: line width :param f_tooltip: function to generate a tooltip on mouseover :param cmap: color map :param max_area: scaling constant to determine the color of the voronoi areas :param alpha: color alpha
(module (function_definition (function_name_nvrtcCompileProgram) function_name_nvrtcCompileProgram (parameters (identifier_self) identifier_self (identifier_prog) identifier_prog (identifier_options) identifier_options )parameters (block (expression_statement (assignment (identifier_options_array) identifier_options_array (call (parenthesized_expression (binary_operator (identifier_c_char_p) identifier_c_char_p (call (identifier_len) identifier_len (argument_list (identifier_options) identifier_options )argument_list )call )binary_operator )parenthesized_expression (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_options_array) identifier_options_array (slice (colon) colon )slice )subscript (call (identifier_encode_str_list) identifier_encode_str_list (argument_list (identifier_options) identifier_options )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_code) identifier_code (call (attribute (attribute (identifier_self) identifier_self (identifier__lib) identifier__lib )attribute (identifier_nvrtcCompileProgram) identifier_nvrtcCompileProgram )attribute (argument_list (identifier_prog) identifier_prog (call (identifier_len) identifier_len (argument_list (identifier_options) identifier_options )argument_list )call (identifier_options_array) identifier_options_array )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__throw_on_error) identifier__throw_on_error )attribute (argument_list (identifier_code) identifier_code )argument_list )call )expression_statement (return_statement )return_statement )block )function_definition )module
Compiles the NVRTC program object into PTX, using the provided options array. See the NVRTC API documentation for accepted options.
(module (function_definition (function_name_make_article_info_correspondences) function_name_make_article_info_correspondences (parameters (identifier_self) identifier_self (identifier_article_info_div) identifier_article_info_div )parameters (block (expression_statement (assignment (identifier_corresps) identifier_corresps (call (attribute (attribute (attribute (identifier_self) identifier_self (identifier_article) identifier_article )attribute (identifier_root) identifier_root )attribute (identifier_xpath) identifier_xpath )attribute (argument_list (string_'./front/article-meta/author-notes/corresp') string_'./front/article-meta/author-notes/corresp' )argument_list )call )assignment )expression_statement (if_statement (identifier_corresps) identifier_corresps (block (expression_statement (assignment (identifier_corresp_div) identifier_corresp_div (call (attribute (identifier_etree) identifier_etree (identifier_SubElement) identifier_SubElement )attribute (argument_list (identifier_article_info_div) identifier_article_info_div (string_'div') string_'div' (dictionary (pair (string_'id') string_'id' (string_'correspondence') string_'correspondence' )pair )dictionary )argument_list )call )assignment )expression_statement )block )if_statement (for_statement (identifier_corresp) identifier_corresp (identifier_corresps) identifier_corresps (block (expression_statement (assignment (identifier_sub_div) identifier_sub_div (call (attribute (identifier_etree) identifier_etree (identifier_SubElement) identifier_SubElement )attribute (argument_list (identifier_corresp_div) identifier_corresp_div (string_'div') string_'div' (dictionary (pair (string_'id') string_'id' (subscript (attribute (identifier_corresp) identifier_corresp (identifier_attrib) identifier_attrib )attribute (string_'id') string_'id' )subscript )pair )dictionary )argument_list )call )assignment )expression_statement (expression_statement (call (identifier_append_all_below) identifier_append_all_below (argument_list (identifier_sub_div) identifier_sub_div (identifier_corresp) identifier_corresp )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Articles generally provide a first contact, typically an email address for one of the authors. This will supply that content.
(module (function_definition (function_name__check_ubridge_version) function_name__check_ubridge_version (parameters (identifier_self) identifier_self (default_parameter (identifier_env) identifier_env (None) None )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_output) identifier_output (yield (call (identifier_subprocess_check_output) identifier_subprocess_check_output (argument_list (attribute (identifier_self) identifier_self (identifier__path) identifier__path )attribute (string_"-v") string_"-v" (keyword_argument (identifier_cwd) identifier_cwd (attribute (identifier_self) identifier_self (identifier__working_dir) identifier__working_dir )attribute )keyword_argument (keyword_argument (identifier_env) identifier_env (identifier_env) identifier_env )keyword_argument )argument_list )call )yield )assignment )expression_statement (expression_statement (assignment (identifier_match) identifier_match (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_"ubridge version ([0-9a-z\.]+)") string_"ubridge version ([0-9a-z\.]+)" (identifier_output) identifier_output )argument_list )call )assignment )expression_statement (if_statement (identifier_match) identifier_match (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (call (attribute (identifier_match) identifier_match (identifier_group) identifier_group )attribute (argument_list (integer_1) integer_1 )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (attribute (attribute (identifier_sys) identifier_sys (identifier_platform) identifier_platform )attribute (identifier_startswith) identifier_startswith )attribute (argument_list (string_"win") string_"win" )argument_list )call (call (attribute (attribute (identifier_sys) identifier_sys (identifier_platform) identifier_platform )attribute (identifier_startswith) identifier_startswith )attribute (argument_list (string_"darwin") string_"darwin" )argument_list )call )boolean_operator (block (expression_statement (assignment (identifier_minimum_required_version) identifier_minimum_required_version (string_"0.9.12") string_"0.9.12" )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_minimum_required_version) identifier_minimum_required_version (string_"0.9.14") string_"0.9.14" )assignment )expression_statement )block )else_clause )if_statement (if_statement (comparison_operator (call (identifier_parse_version) identifier_parse_version (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute )argument_list )call (call (identifier_parse_version) identifier_parse_version (argument_list (identifier_minimum_required_version) identifier_minimum_required_version )argument_list )call )comparison_operator (block (raise_statement (call (identifier_UbridgeError) identifier_UbridgeError (argument_list (call (attribute (string_"uBridge executable version must be >= {}") string_"uBridge executable version must be >= {}" (identifier_format) identifier_format )attribute (argument_list (identifier_minimum_required_version) identifier_minimum_required_version )argument_list )call )argument_list )call )raise_statement )block )if_statement )block (else_clause (block (raise_statement (call (identifier_UbridgeError) identifier_UbridgeError (argument_list (call (attribute (string_"Could not determine uBridge version for {}") string_"Could not determine uBridge version for {}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__path) identifier__path )attribute )argument_list )call )argument_list )call )raise_statement )block )else_clause )if_statement )block (except_clause (as_pattern (tuple (identifier_OSError) identifier_OSError (attribute (identifier_subprocess) identifier_subprocess (identifier_SubprocessError) identifier_SubprocessError )attribute )tuple (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_UbridgeError) identifier_UbridgeError (argument_list (call (attribute (string_"Error while looking for uBridge version: {}") string_"Error while looking for uBridge version: {}" (identifier_format) identifier_format )attribute (argument_list (identifier_e) identifier_e )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement )block )function_definition )module
Checks if the ubridge executable version
(module (function_definition (function_name_edit_section) function_name_edit_section (parameters (identifier_self) identifier_self (identifier_id) identifier_id (default_parameter (identifier_course_section_end_at) identifier_course_section_end_at (None) None )default_parameter (default_parameter (identifier_course_section_name) identifier_course_section_name (None) None )default_parameter (default_parameter (identifier_course_section_restrict_enrollments_to_section_dates) identifier_course_section_restrict_enrollments_to_section_dates (None) None )default_parameter (default_parameter (identifier_course_section_sis_section_id) identifier_course_section_sis_section_id (None) None )default_parameter (default_parameter (identifier_course_section_start_at) identifier_course_section_start_at (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_path) identifier_path (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_data) identifier_data (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (expression_statement (assignment (subscript (identifier_path) identifier_path (string_"id") string_"id" )subscript (identifier_id) identifier_id )assignment )expression_statement (if_statement (comparison_operator (identifier_course_section_name) identifier_course_section_name (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_"course_section[name]") string_"course_section[name]" )subscript (identifier_course_section_name) identifier_course_section_name )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_course_section_sis_section_id) identifier_course_section_sis_section_id (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_"course_section[sis_section_id]") string_"course_section[sis_section_id]" )subscript (identifier_course_section_sis_section_id) identifier_course_section_sis_section_id )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_course_section_start_at) identifier_course_section_start_at (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_"course_section[start_at]") string_"course_section[start_at]" )subscript (identifier_course_section_start_at) identifier_course_section_start_at )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_course_section_end_at) identifier_course_section_end_at (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_"course_section[end_at]") string_"course_section[end_at]" )subscript (identifier_course_section_end_at) identifier_course_section_end_at )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_course_section_restrict_enrollments_to_section_dates) identifier_course_section_restrict_enrollments_to_section_dates (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_data) identifier_data (string_"course_section[restrict_enrollments_to_section_dates]") string_"course_section[restrict_enrollments_to_section_dates]" )subscript (identifier_course_section_restrict_enrollments_to_section_dates) identifier_course_section_restrict_enrollments_to_section_dates )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_logger) identifier_logger )attribute (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"PUT /api/v1/sections/{id} with query params: {params} and form data: {data}") string_"PUT /api/v1/sections/{id} with query params: {params} and form data: {data}" (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (dictionary_splat (identifier_path) identifier_path )dictionary_splat )argument_list )call )argument_list )call )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_generic_request) identifier_generic_request )attribute (argument_list (string_"PUT") string_"PUT" (call (attribute (string_"/api/v1/sections/{id}") string_"/api/v1/sections/{id}" (identifier_format) identifier_format )attribute (argument_list (dictionary_splat (identifier_path) identifier_path )dictionary_splat )argument_list )call (keyword_argument (identifier_data) identifier_data (identifier_data) identifier_data )keyword_argument (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument (keyword_argument (identifier_single_item) identifier_single_item (True) True )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Edit a section. Modify an existing section.
(module (function_definition (function_name__readResponse) function_name__readResponse (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_traps) identifier_traps (list )list )assignment )expression_statement (expression_statement (assignment (identifier_reply_word) identifier_reply_word (None) None )assignment )expression_statement (while_statement (comparison_operator (identifier_reply_word) identifier_reply_word (string_'!done') string_'!done' )comparison_operator (block (expression_statement (assignment (pattern_list (identifier_reply_word) identifier_reply_word (identifier_words) identifier_words )pattern_list (call (attribute (identifier_self) identifier_self (identifier__readSentence) identifier__readSentence )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_reply_word) identifier_reply_word (string_'!trap') string_'!trap' )comparison_operator (block (expression_statement (call (attribute (identifier_traps) identifier_traps (identifier_append) identifier_append )attribute (argument_list (call (identifier_TrapError) identifier_TrapError (argument_list (dictionary_splat (identifier_words) identifier_words )dictionary_splat )argument_list )call )argument_list )call )expression_statement )block (elif_clause (boolean_operator (comparison_operator (identifier_reply_word) identifier_reply_word (tuple (string_'!re') string_'!re' (string_'!done') string_'!done' )tuple )comparison_operator (identifier_words) identifier_words )boolean_operator (block (expression_statement (yield (identifier_words) identifier_words )yield )expression_statement )block )elif_clause )if_statement )block )while_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_traps) identifier_traps )argument_list )call (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_MultiTrapError) identifier_MultiTrapError (argument_list (list_splat (identifier_traps) identifier_traps )list_splat )argument_list )call )raise_statement )block (elif_clause (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_traps) identifier_traps )argument_list )call (integer_1) integer_1 )comparison_operator (block (raise_statement (subscript (identifier_traps) identifier_traps (integer_0) integer_0 )subscript )raise_statement )block )elif_clause )if_statement )block )function_definition )module
Yield each row of response untill !done is received. :throws TrapError: If one !trap is received. :throws MultiTrapError: If > 1 !trap is received.
(module (function_definition (function_name_occurrence) function_name_occurrence (parameters (identifier_self) identifier_self (default_parameter (identifier_file_name) identifier_file_name (None) None )default_parameter (default_parameter (identifier_path) identifier_path (None) None )default_parameter (default_parameter (identifier_date) identifier_date (None) None )default_parameter )parameters (block (if_statement (comparison_operator (call (attribute (attribute (identifier_self) identifier_self (identifier__indicator_data) identifier__indicator_data )attribute (identifier_get) identifier_get )attribute (argument_list (string_'type') string_'type' )argument_list )call (string_'File') string_'File' )comparison_operator (block (return_statement (None) None )return_statement )block )if_statement (expression_statement (assignment (identifier_occurrence_obj) identifier_occurrence_obj (call (identifier_FileOccurrence) identifier_FileOccurrence (argument_list (identifier_file_name) identifier_file_name (identifier_path) identifier_path (identifier_date) identifier_date )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__occurrences) identifier__occurrences )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_occurrence_obj) identifier_occurrence_obj )argument_list )call )expression_statement (return_statement (identifier_occurrence_obj) identifier_occurrence_obj )return_statement )block )function_definition )module
Add a file Occurrence. Args: file_name (str, optional): The file name for this occurrence. path (str, optional): The file path for this occurrence. date (str, optional): The datetime expression for this occurrence. Returns: obj: An instance of Occurrence.
(module (function_definition (function_name_get_answer_mdata) function_name_get_answer_mdata (parameters )parameters (block (return_statement (dictionary (pair (string_'item') string_'item' (dictionary (pair (string_'element_label') string_'element_label' (dictionary (pair (string_'text') string_'text' (string_'item') string_'item' )pair (pair (string_'languageTypeId') string_'languageTypeId' (call (identifier_str) identifier_str (argument_list (identifier_DEFAULT_LANGUAGE_TYPE) identifier_DEFAULT_LANGUAGE_TYPE )argument_list )call )pair (pair (string_'scriptTypeId') string_'scriptTypeId' (call (identifier_str) identifier_str (argument_list (identifier_DEFAULT_SCRIPT_TYPE) identifier_DEFAULT_SCRIPT_TYPE )argument_list )call )pair (pair (string_'formatTypeId') string_'formatTypeId' (call (identifier_str) identifier_str (argument_list (identifier_DEFAULT_FORMAT_TYPE) identifier_DEFAULT_FORMAT_TYPE )argument_list )call )pair )dictionary )pair (pair (string_'instructions') string_'instructions' (dictionary (pair (string_'text') string_'text' (string_'accepts an osid.id.Id object') string_'accepts an osid.id.Id object' )pair (pair (string_'languageTypeId') string_'languageTypeId' (call (identifier_str) identifier_str (argument_list (identifier_DEFAULT_LANGUAGE_TYPE) identifier_DEFAULT_LANGUAGE_TYPE )argument_list )call )pair (pair (string_'scriptTypeId') string_'scriptTypeId' (call (identifier_str) identifier_str (argument_list (identifier_DEFAULT_SCRIPT_TYPE) identifier_DEFAULT_SCRIPT_TYPE )argument_list )call )pair (pair (string_'formatTypeId') string_'formatTypeId' (call (identifier_str) identifier_str (argument_list (identifier_DEFAULT_FORMAT_TYPE) identifier_DEFAULT_FORMAT_TYPE )argument_list )call )pair )dictionary )pair (pair (string_'required') string_'required' (False) False )pair (pair (string_'read_only') string_'read_only' (False) False )pair (pair (string_'linked') string_'linked' (False) False )pair (pair (string_'array') string_'array' (False) False )pair (pair (string_'default_id_values') string_'default_id_values' (list (string_'') string_'' )list )pair (pair (string_'syntax') string_'syntax' (string_'ID') string_'ID' )pair (pair (string_'id_set') string_'id_set' (list )list )pair )dictionary )pair )dictionary )return_statement )block )function_definition )module
Return default mdata map for Answer
(module (function_definition (function_name_get_scheduling_block) function_name_get_scheduling_block (parameters (identifier_sub_array_id) identifier_sub_array_id (identifier_block_id) identifier_block_id )parameters (block (expression_statement (assignment (identifier_block_ids) identifier_block_ids (call (attribute (identifier_DB) identifier_DB (identifier_get_sub_array_sbi_ids) identifier_get_sub_array_sbi_ids )attribute (argument_list (identifier_sub_array_id) identifier_sub_array_id )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_block_id) identifier_block_id (identifier_block_ids) identifier_block_ids )comparison_operator (block (expression_statement (assignment (identifier_block) identifier_block (call (attribute (call (attribute (identifier_DB) identifier_DB (identifier_get_block_details) identifier_get_block_details )attribute (argument_list (list (identifier_block_id) identifier_block_id )list )argument_list )call (identifier___next__) identifier___next__ )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (expression_list (identifier_block) identifier_block (attribute (identifier_HTTPStatus) identifier_HTTPStatus (identifier_OK) identifier_OK )attribute )expression_list )return_statement )block )if_statement (return_statement (expression_list (call (identifier_dict) identifier_dict (argument_list (keyword_argument (identifier_error) identifier_error (string_"unknown id") string_"unknown id" )keyword_argument )argument_list )call (attribute (identifier_HTTPStatus) identifier_HTTPStatus (identifier_NOT_FOUND) identifier_NOT_FOUND )attribute )expression_list )return_statement )block )function_definition )module
Return the list of scheduling blocks instances associated with the sub array
(module (function_definition (function_name_insert) function_name_insert (parameters (identifier_self) identifier_self (typed_parameter (identifier_text) identifier_text (type (identifier_str) identifier_str )type )typed_parameter )parameters (block (expression_statement (assignment (identifier_undoObj) identifier_undoObj (call (identifier_UndoInsert) identifier_UndoInsert (argument_list (identifier_self) identifier_self (identifier_text) identifier_text )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_qteUndoStack) identifier_qteUndoStack )attribute (identifier_push) identifier_push )attribute (argument_list (identifier_undoObj) identifier_undoObj )argument_list )call )expression_statement )block )function_definition )module
Undo safe wrapper for the native ``insert`` method. |Args| * ``text`` (**str**): text to insert at the current position. |Returns| **None** |Raises| * **QtmacsArgumentError** if at least one argument has an invalid type.
(module (function_definition (function_name_ratio_to_delta) function_name_ratio_to_delta (parameters (identifier_self) identifier_self (identifier_isos_ss) identifier_isos_ss (identifier_ratio) identifier_ratio (default_parameter (identifier_oneover) identifier_oneover (False) False )default_parameter )parameters (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_isos_ss) identifier_isos_ss )argument_list )call (identifier_float) identifier_float )comparison_operator (block (expression_statement (assignment (identifier_ss_ratio) identifier_ss_ratio (identifier_isos_ss) identifier_isos_ss )assignment )expression_statement )block (elif_clause (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_isos_ss) identifier_isos_ss )argument_list )call (identifier_list) identifier_list )comparison_operator (block (expression_statement (assignment (identifier_ss_ratio) identifier_ss_ratio (call (attribute (attribute (identifier_self) identifier_self (identifier_inut) identifier_inut )attribute (identifier_isoratio_init) identifier_isoratio_init )attribute (argument_list (identifier_isos_ss) identifier_isos_ss )argument_list )call )assignment )expression_statement )block )elif_clause (else_clause (block (expression_statement (call (identifier_print) identifier_print (argument_list (string_'Check input of isos_ss into ratio_to_delta routine') string_'Check input of isos_ss into ratio_to_delta routine' )argument_list )call )expression_statement (return_statement (None) None )return_statement )block )else_clause )if_statement (if_statement (identifier_oneover) identifier_oneover (block (expression_statement (assignment (identifier_ratio) identifier_ratio (call (identifier_old_div) identifier_old_div (argument_list (integer_1) integer_1 (identifier_ratio) identifier_ratio )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_delta) identifier_delta (binary_operator (parenthesized_expression (binary_operator (call (identifier_old_div) identifier_old_div (argument_list (identifier_ratio) identifier_ratio (identifier_ss_ratio) identifier_ss_ratio )argument_list )call (float_1.) float_1. )binary_operator )parenthesized_expression (float_1000.) float_1000. )binary_operator )assignment )expression_statement (return_statement (identifier_delta) identifier_delta )return_statement )block )function_definition )module
Transforms an isotope ratio into a delta value Parameters ---------- isos_ss: list or float list w/ isotopes, e.g., ['N-14','N-15'] OR the solar system ratio. ratio : float ratio of the isotopes to transform. oneover : boolean take the inverse of the ratio before transforming (never inverse of delta value!). The default is False. Returns ------- float delta value
(module (function_definition (function_name_union) function_name_union (parameters (default_parameter (identifier_seq1) identifier_seq1 (tuple )tuple )default_parameter (list_splat_pattern (identifier_seqs) identifier_seqs )list_splat_pattern )parameters (block (expression_statement (identifier_r) identifier_r )expression_statement (if_statement (not_operator (identifier_seqs) identifier_seqs )not_operator (block (return_statement (call (identifier_list) identifier_list (argument_list (identifier_seq1) identifier_seq1 )argument_list )call )return_statement )block )if_statement (expression_statement (assignment (identifier_res) identifier_res (call (identifier_set) identifier_set (argument_list (identifier_seq1) identifier_seq1 )argument_list )call )assignment )expression_statement (for_statement (identifier_seq) identifier_seq (identifier_seqs) identifier_seqs (block (expression_statement (call (attribute (identifier_res) identifier_res (identifier_update) identifier_update )attribute (argument_list (call (identifier_set) identifier_set (argument_list (identifier_seq) identifier_seq )argument_list )call )argument_list )call )expression_statement )block )for_statement (return_statement (call (identifier_list) identifier_list (argument_list (identifier_res) identifier_res )argument_list )call )return_statement )block )function_definition )module
r"""Return the set union of `seq1` and `seqs`, duplicates removed, order random. Examples: >>> union() [] >>> union([1,2,3]) [1, 2, 3] >>> union([1,2,3], {1:2, 5:1}) [1, 2, 3, 5] >>> union((1,2,3), ['a'], "bcd") ['a', 1, 2, 3, 'd', 'b', 'c'] >>> union([1,2,3], iter([0,1,1,1])) [0, 1, 2, 3]
(module (function_definition (function_name_extra_html_properties) function_name_extra_html_properties (parameters (identifier_self) identifier_self (default_parameter (identifier_prefix) identifier_prefix (None) None )default_parameter (default_parameter (identifier_postfix) identifier_postfix (None) None )default_parameter (default_parameter (identifier_template_type) identifier_template_type (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_prefix) identifier_prefix (conditional_expression (identifier_prefix) identifier_prefix (identifier_prefix) identifier_prefix (string_"django-plotly-dash") string_"django-plotly-dash" )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_post_part) identifier_post_part (conditional_expression (binary_operator (string_"-%s") string_"-%s" (identifier_postfix) identifier_postfix )binary_operator (identifier_postfix) identifier_postfix (string_"") string_"" )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_template_type) identifier_template_type (conditional_expression (identifier_template_type) identifier_template_type (identifier_template_type) identifier_template_type (string_"iframe") string_"iframe" )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_slugified_id) identifier_slugified_id (call (attribute (identifier_self) identifier_self (identifier_slugified_id) identifier_slugified_id )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (binary_operator (string_"%(prefix)s %(prefix)s-%(template_type)s %(prefix)s-app-%(slugified_id)s%(post_part)s") string_"%(prefix)s %(prefix)s-%(template_type)s %(prefix)s-app-%(slugified_id)s%(post_part)s" (dictionary (pair (string_'slugified_id') string_'slugified_id' (identifier_slugified_id) identifier_slugified_id )pair (pair (string_'post_part') string_'post_part' (identifier_post_part) identifier_post_part )pair (pair (string_'template_type') string_'template_type' (identifier_template_type) identifier_template_type )pair (pair (string_'prefix') string_'prefix' (identifier_prefix) identifier_prefix )pair )dictionary )binary_operator )return_statement )block )function_definition )module
Return extra html properties to allow individual apps to be styled separately. The content returned from this function is injected unescaped into templates.
(module (function_definition (function_name_merge_variables) function_name_merge_variables (parameters (identifier_variables) identifier_variables (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_var_dict) identifier_var_dict (call (identifier_OrderedDict) identifier_OrderedDict (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_v) identifier_v (identifier_variables) identifier_variables (block (if_statement (comparison_operator (attribute (identifier_v) identifier_v (identifier_name) identifier_name )attribute (identifier_var_dict) identifier_var_dict )comparison_operator (block (expression_statement (assignment (subscript (identifier_var_dict) identifier_var_dict (attribute (identifier_v) identifier_v (identifier_name) identifier_name )attribute )subscript (list )list )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (subscript (identifier_var_dict) identifier_var_dict (attribute (identifier_v) identifier_v (identifier_name) identifier_name )attribute )subscript (identifier_append) identifier_append )attribute (argument_list (identifier_v) identifier_v )argument_list )call )expression_statement )block )for_statement (return_statement (list_comprehension (call (identifier_merge_variables) identifier_merge_variables (argument_list (identifier_vars_) identifier_vars_ (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call (for_in_clause (identifier_vars_) identifier_vars_ (call (identifier_list) identifier_list (argument_list (call (attribute (identifier_var_dict) identifier_var_dict (identifier_values) identifier_values )attribute (argument_list )argument_list )call )argument_list )call )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Concatenates Variables along row axis. Args: variables (list): List of Variables to merge. Variables can have different names (and all Variables that share a name will be concatenated together). Returns: A list of Variables.
(module (function_definition (function_name_delete_user_from_group) function_name_delete_user_from_group (parameters (identifier_self) identifier_self (identifier_GroupID) identifier_GroupID (identifier_UserID) identifier_UserID )parameters (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (binary_operator (string_'Delete user %s from group %s') string_'Delete user %s from group %s' (tuple (identifier_UserID) identifier_UserID (identifier_GroupID) identifier_GroupID )tuple )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_put) identifier_put )attribute (argument_list (binary_operator (string_'groups/%s/delete_user/%s.json') string_'groups/%s/delete_user/%s.json' (tuple (identifier_GroupID) identifier_GroupID (identifier_UserID) identifier_UserID )tuple )binary_operator )argument_list )call )expression_statement )block )function_definition )module
Delete a user from a group.
(module (function_definition (function_name_hour) function_name_hour (parameters (identifier_self) identifier_self (default_parameter (identifier_value) identifier_value (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_value) identifier_value (None) None )comparison_operator (block (try_statement (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_int) identifier_int (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (concatenated_string (string_'value {} need to be of type int ') string_'value {} need to be of type int ' (string_'for field `hour`') string_'for field `hour`' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_value) identifier_value )argument_list )call )argument_list )call )raise_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_value) identifier_value (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_'value need to be greater or equal 1 ') string_'value need to be greater or equal 1 ' (string_'for field `hour`') string_'for field `hour`' )concatenated_string )argument_list )call )raise_statement )block )if_statement (if_statement (comparison_operator (identifier_value) identifier_value (integer_24) integer_24 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_'value need to be smaller 24 ') string_'value need to be smaller 24 ' (string_'for field `hour`') string_'for field `hour`' )concatenated_string )argument_list )call )raise_statement )block )if_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__hour) identifier__hour )attribute (identifier_value) identifier_value )assignment )expression_statement )block )function_definition )module
Corresponds to IDD Field `hour` Args: value (int): value for IDD Field `hour` value >= 1 value <= 24 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value
(module (function_definition (function_name_check_staged) function_name_check_staged (parameters (default_parameter (identifier_filename) identifier_filename (None) None )default_parameter )parameters (block (expression_statement (assignment (pattern_list (identifier_retcode) identifier_retcode (identifier__) identifier__ (identifier_stdout) identifier_stdout )pattern_list (call (attribute (subscript (identifier_git) identifier_git (string_'diff-index') string_'diff-index' (string_'--quiet') string_'--quiet' (string_'--cached') string_'--cached' (string_'HEAD') string_'HEAD' (identifier_filename) identifier_filename )subscript (identifier_run) identifier_run )attribute (argument_list (keyword_argument (identifier_retcode) identifier_retcode (None) None )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_retcode) identifier_retcode (integer_1) integer_1 )comparison_operator (block (return_statement (True) True )return_statement )block (elif_clause (comparison_operator (identifier_retcode) identifier_retcode (integer_0) integer_0 )comparison_operator (block (return_statement (False) False )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (identifier_stdout) identifier_stdout )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Check if there are 'changes to be committed' in the index.
(module (function_definition (function_name__update_Prxy_diag) function_name__update_Prxy_diag (parameters (identifier_self) identifier_self )parameters (block (for_statement (identifier_r) identifier_r (call (identifier_range) identifier_range (argument_list (attribute (identifier_self) identifier_self (identifier_nsites) identifier_nsites )attribute )argument_list )call (block (expression_statement (assignment (identifier_pr_half) identifier_pr_half (binary_operator (subscript (attribute (identifier_self) identifier_self (identifier_prx) identifier_prx )attribute (identifier_r) identifier_r )subscript (float_0.5) float_0.5 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_pr_neghalf) identifier_pr_neghalf (binary_operator (subscript (attribute (identifier_self) identifier_self (identifier_prx) identifier_prx )attribute (identifier_r) identifier_r )subscript (unary_operator (float_0.5) float_0.5 )unary_operator )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_symm_pr) identifier_symm_pr (call (attribute (parenthesized_expression (binary_operator (identifier_pr_half) identifier_pr_half (call (attribute (parenthesized_expression (binary_operator (subscript (attribute (identifier_self) identifier_self (identifier_Prxy) identifier_Prxy )attribute (identifier_r) identifier_r )subscript (identifier_pr_neghalf) identifier_pr_neghalf )binary_operator )parenthesized_expression (identifier_transpose) identifier_transpose )attribute (argument_list )argument_list )call )binary_operator )parenthesized_expression (identifier_transpose) identifier_transpose )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (tuple_pattern (identifier_evals) identifier_evals (identifier_evecs) identifier_evecs )tuple_pattern (call (attribute (attribute (identifier_scipy) identifier_scipy (identifier_linalg) identifier_linalg )attribute (identifier_eigh) identifier_eigh )attribute (argument_list (identifier_symm_pr) identifier_symm_pr )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_D) identifier_D )attribute (identifier_r) identifier_r )subscript (identifier_evals) identifier_evals )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_Ainv) identifier_Ainv )attribute (identifier_r) identifier_r )subscript (binary_operator (call (attribute (identifier_evecs) identifier_evecs (identifier_transpose) identifier_transpose )attribute (argument_list )argument_list )call (identifier_pr_half) identifier_pr_half )binary_operator )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier_A) identifier_A )attribute (identifier_r) identifier_r )subscript (call (attribute (parenthesized_expression (binary_operator (identifier_pr_neghalf) identifier_pr_neghalf (call (attribute (identifier_evecs) identifier_evecs (identifier_transpose) identifier_transpose )attribute (argument_list )argument_list )call )binary_operator )parenthesized_expression (identifier_transpose) identifier_transpose )attribute (argument_list )argument_list )call )assignment )expression_statement )block )for_statement )block )function_definition )module
Update `D`, `A`, `Ainv` from `Prxy`, `prx`.
(module (function_definition (function_name_get_face_colors) function_name_get_face_colors (parameters (identifier_self) identifier_self (default_parameter (identifier_indexed) identifier_indexed (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_indexed) identifier_indexed (None) None )comparison_operator (block (return_statement (attribute (identifier_self) identifier_self (identifier__face_colors) identifier__face_colors )attribute )return_statement )block (elif_clause (comparison_operator (identifier_indexed) identifier_indexed (string_'faces') string_'faces' )comparison_operator (block (if_statement (parenthesized_expression (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier__face_colors_indexed_by_faces) identifier__face_colors_indexed_by_faces )attribute (None) None )comparison_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier__face_colors) identifier__face_colors )attribute (None) None )comparison_operator )boolean_operator )parenthesized_expression (block (expression_statement (assignment (identifier_Nf) identifier_Nf (subscript (attribute (attribute (identifier_self) identifier_self (identifier__face_colors) identifier__face_colors )attribute (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__face_colors_indexed_by_faces) identifier__face_colors_indexed_by_faces )attribute (line_continuation_\) line_continuation_\ (call (attribute (identifier_np) identifier_np (identifier_empty) identifier_empty )attribute (argument_list (tuple (identifier_Nf) identifier_Nf (integer_3) integer_3 (integer_4) integer_4 )tuple (keyword_argument (identifier_dtype) identifier_dtype (attribute (attribute (identifier_self) identifier_self (identifier__face_colors) identifier__face_colors )attribute (identifier_dtype) identifier_dtype )attribute )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (attribute (identifier_self) identifier_self (identifier__face_colors_indexed_by_faces) identifier__face_colors_indexed_by_faces )attribute (slice (colon) colon )slice )subscript (line_continuation_\) line_continuation_\ (call (attribute (attribute (identifier_self) identifier_self (identifier__face_colors) identifier__face_colors )attribute (identifier_reshape) identifier_reshape )attribute (argument_list (identifier_Nf) identifier_Nf (integer_1) integer_1 (integer_4) integer_4 )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__face_colors_indexed_by_faces) identifier__face_colors_indexed_by_faces )attribute )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"Invalid indexing mode. Accepts: None, 'faces'") string_"Invalid indexing mode. Accepts: None, 'faces'" )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Get the face colors Parameters ---------- indexed : str | None If indexed is None, return (Nf, 4) array of face colors. If indexed=='faces', then instead return an indexed array (Nf, 3, 4) (note this is just the same array with each color repeated three times). Returns ------- colors : ndarray The colors.
(module (function_definition (function_name_get_all_children) function_name_get_all_children (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_children) identifier_children (subscript (attribute (identifier_self) identifier_self (identifier__children) identifier__children )attribute (slice (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_oldlen) identifier_oldlen (integer_0) integer_0 )assignment )expression_statement (expression_statement (assignment (identifier_newlen) identifier_newlen (call (identifier_len) identifier_len (argument_list (identifier_children) identifier_children )argument_list )call )assignment )expression_statement (while_statement (comparison_operator (identifier_oldlen) identifier_oldlen (identifier_newlen) identifier_newlen )comparison_operator (block (expression_statement (assignment (identifier_start) identifier_start (identifier_oldlen) identifier_oldlen )assignment )expression_statement (expression_statement (assignment (identifier_oldlen) identifier_oldlen (call (identifier_len) identifier_len (argument_list (identifier_children) identifier_children )argument_list )call )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (identifier_start) identifier_start (call (identifier_len) identifier_len (argument_list (identifier_children) identifier_children )argument_list )call )argument_list )call (block (expression_statement (call (attribute (identifier_children) identifier_children (identifier_extend) identifier_extend )attribute (argument_list (attribute (subscript (identifier_children) identifier_children (identifier_i) identifier_i )subscript (identifier__children) identifier__children )attribute )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier_newlen) identifier_newlen (call (identifier_len) identifier_len (argument_list (identifier_children) identifier_children )argument_list )call )assignment )expression_statement )block )while_statement (return_statement (identifier_children) identifier_children )return_statement )block )function_definition )module
Get all children including children of children :returns: all children including children of children :rtype: list of :class:`Reftrack` :raises: None
(module (function_definition (function_name_add) function_name_add (parameters (identifier_self) identifier_self (identifier_fact) identifier_fact )parameters (block (expression_statement (assignment (identifier_token) identifier_token (call (attribute (identifier_Token) identifier_Token (identifier_valid) identifier_valid )attribute (argument_list (identifier_fact) identifier_fact )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_MATCHER) identifier_MATCHER (identifier_debug) identifier_debug )attribute (argument_list (string_"<BusNode> added %r") string_"<BusNode> added %r" (identifier_token) identifier_token )argument_list )call )expression_statement (for_statement (identifier_child) identifier_child (attribute (identifier_self) identifier_self (identifier_children) identifier_children )attribute (block (expression_statement (call (attribute (identifier_child) identifier_child (identifier_callback) identifier_callback )attribute (argument_list (identifier_token) identifier_token )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Create a VALID token and send it to all children.
(module (function_definition (function_name_stop_sync) function_name_stop_sync (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_conn_ids) identifier_conn_ids (call (attribute (attribute (identifier_self) identifier_self (identifier_conns) identifier_conns )attribute (identifier_get_connections) identifier_get_connections )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (identifier_conn) identifier_conn (call (identifier_list) identifier_list (argument_list (identifier_conn_ids) identifier_conn_ids )argument_list )call (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_disconnect_sync) identifier_disconnect_sync )attribute (argument_list (identifier_conn) identifier_conn )argument_list )call )expression_statement )block (except_clause (identifier_HardwareError) identifier_HardwareError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )for_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_client) identifier_client )attribute (identifier_disconnect) identifier_disconnect )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_conns) identifier_conns )attribute (identifier_stop) identifier_stop )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Synchronously stop this adapter
(module (function_definition (function_name__start_check_timer) function_name__start_check_timer (parameters (identifier_self) identifier_self )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier_timer) identifier_timer )attribute (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_timer) identifier_timer )attribute (identifier_cancel) identifier_cancel )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_timer) identifier_timer )attribute (call (attribute (identifier_threading) identifier_threading (identifier_Timer) identifier_Timer )attribute (argument_list (float_2.5) float_2.5 (attribute (identifier_self) identifier_self (identifier_check_complete) identifier_check_complete )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (attribute (identifier_self) identifier_self (identifier_timer) identifier_timer )attribute (identifier_daemon) identifier_daemon )attribute (True) True )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_timer) identifier_timer )attribute (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Periodically checks to see if the task has completed.
(module (function_definition (function_name_under_attack) function_name_under_attack (parameters (identifier_col) identifier_col (identifier_queens) identifier_queens )parameters (block (expression_statement (assignment (identifier_left) identifier_left (assignment (identifier_right) identifier_right (identifier_col) identifier_col )assignment )assignment )expression_statement (for_statement (pattern_list (identifier__) identifier__ (identifier_column) identifier_column )pattern_list (call (identifier_reversed) identifier_reversed (argument_list (identifier_queens) identifier_queens )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_left) identifier_left (identifier_right) identifier_right )pattern_list (expression_list (binary_operator (identifier_left) identifier_left (integer_1) integer_1 )binary_operator (binary_operator (identifier_right) identifier_right (integer_1) integer_1 )binary_operator )expression_list )assignment )expression_statement (if_statement (comparison_operator (identifier_column) identifier_column (tuple (identifier_left) identifier_left (identifier_col) identifier_col (identifier_right) identifier_right )tuple )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement )block )for_statement (return_statement (False) False )return_statement )block )function_definition )module
Checks if queen is under attack :param col: Column number :param queens: list of queens :return: True iff queen is under attack
(module (function_definition (function_name_transformer_big) function_name_transformer_big (parameters )parameters (block (expression_statement (assignment (identifier_hparams) identifier_hparams (call (identifier_transformer_base) identifier_transformer_base (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_hidden_size) identifier_hidden_size )attribute (integer_1024) integer_1024 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_filter_size) identifier_filter_size )attribute (integer_4096) integer_4096 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_batch_size) identifier_batch_size )attribute (integer_2048) integer_2048 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_num_heads) identifier_num_heads )attribute (integer_16) integer_16 )assignment )expression_statement (expression_statement (assignment (attribute (identifier_hparams) identifier_hparams (identifier_layer_prepostprocess_dropout) identifier_layer_prepostprocess_dropout )attribute (float_0.3) float_0.3 )assignment )expression_statement (return_statement (identifier_hparams) identifier_hparams )return_statement )block )function_definition )module
HParams for transformer big model on WMT.
(module (function_definition (function_name_roll_mean) function_name_roll_mean (parameters (identifier_input) identifier_input (identifier_window) identifier_window )parameters (block (expression_statement (assignment (pattern_list (identifier_nobs) identifier_nobs (identifier_i) identifier_i (identifier_j) identifier_j (identifier_sum_x) identifier_sum_x )pattern_list (expression_list (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 (float_0.) float_0. )expression_list )assignment )expression_statement (expression_statement (assignment (identifier_N) identifier_N (call (identifier_len) identifier_len (argument_list (identifier_input) identifier_input )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_window) identifier_window (identifier_N) identifier_N )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_'Out of bound') string_'Out of bound' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_output) identifier_output (call (attribute (identifier_np) identifier_np (identifier_ndarray) identifier_ndarray )attribute (argument_list (binary_operator (binary_operator (identifier_N) identifier_N (identifier_window) identifier_window )binary_operator (integer_1) integer_1 )binary_operator (keyword_argument (identifier_dtype) identifier_dtype (attribute (identifier_input) identifier_input (identifier_dtype) identifier_dtype )attribute )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_val) identifier_val (subscript (identifier_input) identifier_input (slice (colon) colon (identifier_window) identifier_window )slice )subscript (block (if_statement (comparison_operator (identifier_val) identifier_val (identifier_val) identifier_val )comparison_operator (block (expression_statement (augmented_assignment (identifier_nobs) identifier_nobs (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_sum_x) identifier_sum_x (identifier_val) identifier_val )augmented_assignment )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (subscript (identifier_output) identifier_output (identifier_j) identifier_j )subscript (conditional_expression (identifier_NaN) identifier_NaN (not_operator (identifier_nobs) identifier_nobs )not_operator (binary_operator (identifier_sum_x) identifier_sum_x (identifier_nobs) identifier_nobs )binary_operator )conditional_expression )assignment )expression_statement (for_statement (identifier_val) identifier_val (subscript (identifier_input) identifier_input (slice (identifier_window) identifier_window (colon) colon )slice )subscript (block (expression_statement (assignment (identifier_prev) identifier_prev (subscript (identifier_input) identifier_input (identifier_j) identifier_j )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_prev) identifier_prev (identifier_prev) identifier_prev )comparison_operator (block (expression_statement (augmented_assignment (identifier_sum_x) identifier_sum_x (identifier_prev) identifier_prev )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_nobs) identifier_nobs (integer_1) integer_1 )augmented_assignment )expression_statement )block )if_statement (if_statement (comparison_operator (identifier_val) identifier_val (identifier_val) identifier_val )comparison_operator (block (expression_statement (augmented_assignment (identifier_nobs) identifier_nobs (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_sum_x) identifier_sum_x (identifier_val) identifier_val )augmented_assignment )expression_statement )block )if_statement (expression_statement (augmented_assignment (identifier_j) identifier_j (integer_1) integer_1 )augmented_assignment )expression_statement (expression_statement (assignment (subscript (identifier_output) identifier_output (identifier_j) identifier_j )subscript (conditional_expression (identifier_NaN) identifier_NaN (not_operator (identifier_nobs) identifier_nobs )not_operator (binary_operator (identifier_sum_x) identifier_sum_x (identifier_nobs) identifier_nobs )binary_operator )conditional_expression )assignment )expression_statement )block )for_statement (return_statement (identifier_output) identifier_output )return_statement )block )function_definition )module
Apply a rolling mean function to an array. This is a simple rolling aggregation.
(module (function_definition (function_name_match_set) function_name_match_set (parameters (identifier_self) identifier_self (identifier_tokens) identifier_tokens (identifier_item) identifier_item )parameters (block (expression_statement (assignment (pattern_list (identifier_match) identifier_match )pattern_list (identifier_tokens) identifier_tokens )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_check) identifier_add_check )attribute (argument_list (binary_operator (binary_operator (string_"_coconut.isinstance(") string_"_coconut.isinstance(" (identifier_item) identifier_item )binary_operator (string_", _coconut.abc.Set)") string_", _coconut.abc.Set)" )binary_operator )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_check) identifier_add_check )attribute (argument_list (binary_operator (binary_operator (binary_operator (string_"_coconut.len(") string_"_coconut.len(" (identifier_item) identifier_item )binary_operator (string_") == ") string_") == " )binary_operator (call (identifier_str) identifier_str (argument_list (call (identifier_len) identifier_len (argument_list (identifier_match) identifier_match )argument_list )call )argument_list )call )binary_operator )argument_list )call )expression_statement (for_statement (identifier_const) identifier_const (identifier_match) identifier_match (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_check) identifier_add_check )attribute (argument_list (binary_operator (binary_operator (identifier_const) identifier_const (string_" in ") string_" in " )binary_operator (identifier_item) identifier_item )binary_operator )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Matches a set.
(module (function_definition (function_name_process_python_symbol_data) function_name_process_python_symbol_data (parameters (identifier_oedata) identifier_oedata )parameters (block (expression_statement (assignment (identifier_symbol_list) identifier_symbol_list (list )list )assignment )expression_statement (for_statement (identifier_key) identifier_key (identifier_oedata) identifier_oedata (block (expression_statement (assignment (identifier_val) identifier_val (subscript (identifier_oedata) identifier_oedata (identifier_key) identifier_key )subscript )assignment )expression_statement (if_statement (boolean_operator (identifier_val) identifier_val (comparison_operator (identifier_key) identifier_key (string_'found_cell_separators') string_'found_cell_separators' )comparison_operator )boolean_operator (block (if_statement (call (attribute (identifier_val) identifier_val (identifier_is_class_or_function) identifier_is_class_or_function )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (identifier_symbol_list) identifier_symbol_list (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_key) identifier_key (attribute (identifier_val) identifier_val (identifier_def_name) identifier_def_name )attribute (attribute (identifier_val) identifier_val (identifier_fold_level) identifier_fold_level )attribute (call (attribute (identifier_val) identifier_val (identifier_get_token) identifier_get_token )attribute (argument_list )argument_list )call )tuple )argument_list )call )expression_statement )block )if_statement )block )if_statement )block )for_statement (return_statement (call (identifier_sorted) identifier_sorted (argument_list (identifier_symbol_list) identifier_symbol_list )argument_list )call )return_statement )block )function_definition )module
Returns a list with line number, definition name, fold and token.
(module (function_definition (function_name_chars) function_name_chars (parameters (identifier_self) identifier_self (identifier_length) identifier_length (identifier_name) identifier_name (default_parameter (identifier_value) identifier_value (None) None )default_parameter (default_parameter (identifier_terminator) identifier_terminator (None) None )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_field) identifier__add_field )attribute (argument_list (call (identifier_Char) identifier_Char (argument_list (identifier_length) identifier_length (identifier_name) identifier_name (identifier_value) identifier_value (identifier_terminator) identifier_terminator )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Add a char array to template. `length` is given in bytes and can refer to earlier numeric fields in template. Special value '*' in length means that length is encoded to length of value and decoded as all available bytes. `value` is optional. `value` could be either a "String" or a "Regular Expression" and if it is a Regular Expression it must be prefixed by 'REGEXP:'. Examples: | chars | 16 | field | Hello World! | | u8 | charLength | | chars | charLength | field | | chars | * | field | Hello World! | | chars | * | field | REGEXP:^{[a-zA-Z ]+}$ |
(module (function_definition (function_name_add_argument) function_name_add_argument (parameters (identifier_self) identifier_self (identifier_dest) identifier_dest (default_parameter (identifier_nargs) identifier_nargs (integer_1) integer_1 )default_parameter (default_parameter (identifier_obj) identifier_obj (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_obj) identifier_obj (None) None )comparison_operator (block (expression_statement (assignment (identifier_obj) identifier_obj (identifier_dest) identifier_dest )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__args) identifier__args )attribute (identifier_append) identifier_append )attribute (argument_list (call (identifier_Argument) identifier_Argument (argument_list (keyword_argument (identifier_dest) identifier_dest (identifier_dest) identifier_dest )keyword_argument (keyword_argument (identifier_nargs) identifier_nargs (identifier_nargs) identifier_nargs )keyword_argument (keyword_argument (identifier_obj) identifier_obj (identifier_obj) identifier_obj )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Adds a positional argument named `dest` to the parser. The `obj` can be used to identify the option in the order list that is returned from the parser.
(module (function_definition (function_name_set_cover) function_name_set_cover (parameters (identifier_self) identifier_self (identifier_file_name) identifier_file_name (identifier_content) identifier_content (default_parameter (identifier_create_page) identifier_create_page (True) True )default_parameter )parameters (block (expression_statement (assignment (identifier_c0) identifier_c0 (call (identifier_EpubCover) identifier_EpubCover (argument_list (keyword_argument (identifier_file_name) identifier_file_name (identifier_file_name) identifier_file_name )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_c0) identifier_c0 (identifier_content) identifier_content )attribute (identifier_content) identifier_content )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_item) identifier_add_item )attribute (argument_list (identifier_c0) identifier_c0 )argument_list )call )expression_statement (if_statement (identifier_create_page) identifier_create_page (block (expression_statement (assignment (identifier_c1) identifier_c1 (call (identifier_EpubCoverHtml) identifier_EpubCoverHtml (argument_list (keyword_argument (identifier_image_name) identifier_image_name (identifier_file_name) identifier_file_name )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_item) identifier_add_item )attribute (argument_list (identifier_c1) identifier_c1 )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_add_metadata) identifier_add_metadata )attribute (argument_list (None) None (string_'meta') string_'meta' (string_'') string_'' (call (identifier_OrderedDict) identifier_OrderedDict (argument_list (list (tuple (string_'name') string_'name' (string_'cover') string_'cover' )tuple (tuple (string_'content') string_'content' (string_'cover-img') string_'cover-img' )tuple )list )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Set cover and create cover document if needed. :Args: - file_name: file name of the cover page - content: Content for the cover image - create_page: Should cover page be defined. Defined as bool value (optional). Default value is True.
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self (identifier_fptr) identifier_fptr )parameters (block (expression_statement (call (attribute (identifier_fptr) identifier_fptr (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_'>I4s') string_'>I4s' (integer_12) integer_12 (string_b'jP ') string_b'jP ' )argument_list )call )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_fptr) identifier_fptr (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_struct) identifier_struct (identifier_pack) identifier_pack )attribute (argument_list (string_'>BBBB') string_'>BBBB' (list_splat (attribute (identifier_self) identifier_self (identifier_signature) identifier_signature )attribute )list_splat )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Write a JPEG 2000 Signature box to file.
(module (function_definition (function_name_get_candidate_electoral_votes) function_name_get_candidate_electoral_votes (parameters (identifier_self) identifier_self (identifier_candidate) identifier_candidate )parameters (block (expression_statement (assignment (identifier_candidate_election) identifier_candidate_election (call (attribute (attribute (identifier_CandidateElection) identifier_CandidateElection (identifier_objects) identifier_objects )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_candidate) identifier_candidate (identifier_candidate) identifier_candidate )keyword_argument (keyword_argument (identifier_election) identifier_election (identifier_self) identifier_self )keyword_argument )argument_list )call )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_candidate_election) identifier_candidate_election (identifier_electoral_votes) identifier_electoral_votes )attribute (identifier_all) identifier_all )attribute (argument_list )argument_list )call )return_statement )block )function_definition )module
Get all electoral votes for a candidate in this election.
(module (function_definition (function_name__get_service_connection) function_name__get_service_connection (parameters (identifier_self) identifier_self (identifier_service) identifier_service (default_parameter (identifier_service_command) identifier_service_command (None) None )default_parameter (default_parameter (identifier_create) identifier_create (True) True )default_parameter (default_parameter (identifier_timeout_ms) identifier_timeout_ms (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_connection) identifier_connection (call (attribute (attribute (identifier_self) identifier_self (identifier__service_connections) identifier__service_connections )attribute (identifier_get) identifier_get )attribute (argument_list (identifier_service) identifier_service (None) None )argument_list )call )assignment )expression_statement (if_statement (identifier_connection) identifier_connection (block (return_statement (identifier_connection) identifier_connection )return_statement )block )if_statement (if_statement (boolean_operator (not_operator (identifier_connection) identifier_connection )not_operator (not_operator (identifier_create) identifier_create )not_operator )boolean_operator (block (return_statement (None) None )return_statement )block )if_statement (if_statement (identifier_service_command) identifier_service_command (block (expression_statement (assignment (identifier_destination_str) identifier_destination_str (binary_operator (string_b'%s:%s') string_b'%s:%s' (tuple (identifier_service) identifier_service (identifier_service_command) identifier_service_command )tuple )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_destination_str) identifier_destination_str (identifier_service) identifier_service )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_connection) identifier_connection (call (attribute (attribute (identifier_self) identifier_self (identifier_protocol_handler) identifier_protocol_handler )attribute (identifier_Open) identifier_Open )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__handle) identifier__handle )attribute (keyword_argument (identifier_destination) identifier_destination (identifier_destination_str) identifier_destination_str )keyword_argument (keyword_argument (identifier_timeout_ms) identifier_timeout_ms (identifier_timeout_ms) identifier_timeout_ms )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__service_connections) identifier__service_connections )attribute (identifier_update) identifier_update )attribute (argument_list (dictionary (pair (identifier_service) identifier_service (identifier_connection) identifier_connection )pair )dictionary )argument_list )call )expression_statement (return_statement (identifier_connection) identifier_connection )return_statement )block )function_definition )module
Based on the service, get the AdbConnection for that service or create one if it doesnt exist :param service: :param service_command: Additional service parameters to append :param create: If False, dont create a connection if it does not exist :return:
(module (function_definition (function_name_hide) function_name_hide (parameters (identifier_self) identifier_self )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier__prev_contrast) identifier__prev_contrast )attribute (None) None )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__prev_contrast) identifier__prev_contrast )attribute (attribute (identifier_self) identifier_self (identifier__contrast) identifier__contrast )attribute )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_contrast) identifier_contrast )attribute (argument_list (integer_0x00) integer_0x00 )argument_list )call )expression_statement )block )if_statement )block )function_definition )module
Simulates switching the display mode OFF; this is achieved by setting the contrast level to zero.
(module (function_definition (function_name_AND) function_name_AND (parameters (identifier_classical_reg1) identifier_classical_reg1 (identifier_classical_reg2) identifier_classical_reg2 )parameters (block (expression_statement (assignment (pattern_list (identifier_left) identifier_left (identifier_right) identifier_right )pattern_list (call (identifier_unpack_reg_val_pair) identifier_unpack_reg_val_pair (argument_list (identifier_classical_reg1) identifier_classical_reg1 (identifier_classical_reg2) identifier_classical_reg2 )argument_list )call )assignment )expression_statement (return_statement (call (identifier_ClassicalAnd) identifier_ClassicalAnd (argument_list (identifier_left) identifier_left (identifier_right) identifier_right )argument_list )call )return_statement )block )function_definition )module
Produce an AND instruction. NOTE: The order of operands was reversed in pyQuil <=1.9 . :param classical_reg1: The first classical register, which gets modified. :param classical_reg2: The second classical register or immediate value. :return: A ClassicalAnd instance.
(module (function_definition (function_name_createObjectMachine) function_name_createObjectMachine (parameters (identifier_machineType) identifier_machineType (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (if_statement (comparison_operator (identifier_machineType) identifier_machineType (call (attribute (identifier_ObjectMachineTypes) identifier_ObjectMachineTypes (identifier_getTypes) identifier_getTypes )attribute (argument_list )argument_list )call )comparison_operator (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (binary_operator (string_"Unknown model type: ") string_"Unknown model type: " (identifier_machineType) identifier_machineType )binary_operator )argument_list )call )raise_statement )block )if_statement (return_statement (call (call (identifier_getattr) identifier_getattr (argument_list (identifier_ObjectMachineTypes) identifier_ObjectMachineTypes (identifier_machineType) identifier_machineType )argument_list )call (argument_list (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )function_definition )module
Return an object machine of the appropriate type. @param machineType (str) A supported ObjectMachine type @param kwargs (dict) Constructor argument for the class that will be instantiated. Keyword parameters specific to each model type should be passed in here.
(module (function_definition (function_name_find_best_matching_node) function_name_find_best_matching_node (parameters (identifier_self) identifier_self (identifier_new) identifier_new (identifier_old_nodes) identifier_old_nodes )parameters (block (expression_statement (assignment (identifier_name) identifier_name (attribute (attribute (identifier_new) identifier_new (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )assignment )expression_statement (expression_statement (assignment (identifier_matches) identifier_matches (list_comprehension (identifier_c) identifier_c (for_in_clause (identifier_c) identifier_c (identifier_old_nodes) identifier_old_nodes )for_in_clause (if_clause (comparison_operator (identifier_name) identifier_name (attribute (attribute (identifier_c) identifier_c (identifier___class__) identifier___class__ )attribute (identifier___name__) identifier___name__ )attribute )comparison_operator )if_clause )list_comprehension )assignment )expression_statement (if_statement (attribute (identifier_self) identifier_self (identifier_debug) identifier_debug )attribute (block (expression_statement (call (identifier_print) identifier_print (argument_list (call (attribute (string_"Found matches for {}: {} ") string_"Found matches for {}: {} " (identifier_format) identifier_format )attribute (argument_list (identifier_new) identifier_new (identifier_matches) identifier_matches )argument_list )call )argument_list )call )expression_statement )block )if_statement (return_statement (conditional_expression (subscript (identifier_matches) identifier_matches (integer_0) integer_0 )subscript (identifier_matches) identifier_matches (None) None )conditional_expression )return_statement )block )function_definition )module
Find the node that best matches the new node given the old nodes. If no good match exists return `None`.
(module (function_definition (function_name__call) function_name__call (parameters (identifier_self) identifier_self (identifier_x) identifier_x )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_prior) identifier_prior )attribute (None) None )comparison_operator (block (expression_statement (assignment (identifier_tmp) identifier_tmp (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_domain) identifier_domain )attribute (identifier_element) identifier_element )attribute (argument_list (parenthesized_expression (binary_operator (call (attribute (identifier_np) identifier_np (identifier_exp) identifier_exp )attribute (argument_list (identifier_x) identifier_x )argument_list )call (integer_1) integer_1 )binary_operator )parenthesized_expression )argument_list )call (identifier_inner) identifier_inner )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_domain) identifier_domain )attribute (identifier_one) identifier_one )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_tmp) identifier_tmp (call (attribute (parenthesized_expression (binary_operator (attribute (identifier_self) identifier_self (identifier_prior) identifier_prior )attribute (parenthesized_expression (binary_operator (call (attribute (identifier_np) identifier_np (identifier_exp) identifier_exp )attribute (argument_list (identifier_x) identifier_x )argument_list )call (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )parenthesized_expression (identifier_inner) identifier_inner )attribute (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_domain) identifier_domain )attribute (identifier_one) identifier_one )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_tmp) identifier_tmp )return_statement )block )function_definition )module
Return the value in the point ``x``.
(module (function_definition (function_name_periods) function_name_periods (parameters (identifier_ts) identifier_ts (default_parameter (identifier_phi) identifier_phi (float_0.0) float_0.0 )default_parameter )parameters (block (expression_statement (assignment (identifier_ts) identifier_ts (call (attribute (identifier_np) identifier_np (identifier_squeeze) identifier_squeeze )attribute (argument_list (identifier_ts) identifier_ts )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_ts) identifier_ts (identifier_ndim) identifier_ndim )attribute (integer_1) integer_1 )comparison_operator (block (return_statement (call (attribute (identifier_np) identifier_np (identifier_diff) identifier_diff )attribute (argument_list (call (identifier_phase_crossings) identifier_phase_crossings (argument_list (identifier_ts) identifier_ts (identifier_phi) identifier_phi )argument_list )call )argument_list )call )return_statement )block (else_clause (block (return_statement (call (attribute (identifier_np) identifier_np (identifier_hstack) identifier_hstack )attribute (argument_list (list_comprehension (call (attribute (subscript (identifier_ts) identifier_ts (ellipsis_...) ellipsis_... (identifier_i) identifier_i )subscript (identifier_periods) identifier_periods )attribute (argument_list (identifier_phi) identifier_phi )argument_list )call (for_in_clause (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (subscript (attribute (identifier_ts) identifier_ts (identifier_shape) identifier_shape )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript )argument_list )call )for_in_clause )list_comprehension )argument_list )call )return_statement )block )else_clause )if_statement )block )function_definition )module
For a single variable timeseries representing the phase of an oscillator, measure the period of each successive oscillation. An individual oscillation is defined to start and end when the phase passes phi (by default zero) after completing a full cycle. If the timeseries begins (or ends) exactly at phi, then the first (or last) oscillation will be included. Arguments: ts: Timeseries (single variable) The timeseries of an angle variable (radians) phi (float): A single oscillation starts and ends at phase phi (by default zero).
(module (function_definition (function_name_get_device_elements) function_name_get_device_elements (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_plain) identifier_plain (call (attribute (identifier_self) identifier_self (identifier__aha_request) identifier__aha_request )attribute (argument_list (string_'getdevicelistinfos') string_'getdevicelistinfos' )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dom) identifier_dom (call (attribute (attribute (attribute (identifier_xml) identifier_xml (identifier_dom) identifier_dom )attribute (identifier_minidom) identifier_minidom )attribute (identifier_parseString) identifier_parseString )attribute (argument_list (identifier_plain) identifier_plain )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier__LOGGER) identifier__LOGGER (identifier_debug) identifier_debug )attribute (argument_list (identifier_dom) identifier_dom )argument_list )call )expression_statement (return_statement (call (attribute (identifier_dom) identifier_dom (identifier_getElementsByTagName) identifier_getElementsByTagName )attribute (argument_list (string_"device") string_"device" )argument_list )call )return_statement )block )function_definition )module
Get the DOM elements for the device list.
(module (function_definition (function_name_compose_args) function_name_compose_args (parameters (identifier_self) identifier_self (identifier_action_name) identifier_action_name (identifier_in_argdict) identifier_in_argdict )parameters (block (for_statement (identifier_action) identifier_action (attribute (identifier_self) identifier_self (identifier_actions) identifier_actions )attribute (block (if_statement (comparison_operator (attribute (identifier_action) identifier_action (identifier_name) identifier_name )attribute (identifier_action_name) identifier_action_name )comparison_operator (block (break_statement )break_statement )block )if_statement )block (else_clause (block (raise_statement (call (identifier_AttributeError) identifier_AttributeError (argument_list (call (attribute (string_'Unknown Action: {0}') string_'Unknown Action: {0}' (identifier_format) identifier_format )attribute (argument_list (identifier_action_name) identifier_action_name )argument_list )call )argument_list )call )raise_statement )block )else_clause )for_statement (expression_statement (assignment (identifier_unexpected) identifier_unexpected (binary_operator (call (identifier_set) identifier_set (argument_list (identifier_in_argdict) identifier_in_argdict )argument_list )call (line_continuation_\) line_continuation_\ (call (identifier_set) identifier_set (generator_expression (attribute (identifier_argument) identifier_argument (identifier_name) identifier_name )attribute (for_in_clause (identifier_argument) identifier_argument (attribute (identifier_action) identifier_action (identifier_in_args) identifier_in_args )attribute )for_in_clause )generator_expression )call )binary_operator )assignment )expression_statement (if_statement (identifier_unexpected) identifier_unexpected (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Unexpected argument '{0}'. Method signature: {1}") string_"Unexpected argument '{0}'. Method signature: {1}" (identifier_format) identifier_format )attribute (argument_list (call (identifier_next) identifier_next (argument_list (call (identifier_iter) identifier_iter (argument_list (identifier_unexpected) identifier_unexpected )argument_list )call )argument_list )call (call (identifier_str) identifier_str (argument_list (identifier_action) identifier_action )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_composed) identifier_composed (list )list )assignment )expression_statement (for_statement (identifier_argument) identifier_argument (attribute (identifier_action) identifier_action (identifier_in_args) identifier_in_args )attribute (block (expression_statement (assignment (identifier_name) identifier_name (attribute (identifier_argument) identifier_argument (identifier_name) identifier_name )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_name) identifier_name (identifier_in_argdict) identifier_in_argdict )comparison_operator (block (expression_statement (call (attribute (identifier_composed) identifier_composed (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_name) identifier_name (subscript (identifier_in_argdict) identifier_in_argdict (identifier_name) identifier_name )subscript )tuple )argument_list )call )expression_statement (continue_statement )continue_statement )block )if_statement (if_statement (comparison_operator (identifier_name) identifier_name (attribute (identifier_self) identifier_self (identifier_DEFAULT_ARGS) identifier_DEFAULT_ARGS )attribute )comparison_operator (block (expression_statement (call (attribute (identifier_composed) identifier_composed (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_name) identifier_name (subscript (attribute (identifier_self) identifier_self (identifier_DEFAULT_ARGS) identifier_DEFAULT_ARGS )attribute (identifier_name) identifier_name )subscript )tuple )argument_list )call )expression_statement (continue_statement )continue_statement )block )if_statement (if_statement (comparison_operator (attribute (attribute (identifier_argument) identifier_argument (identifier_vartype) identifier_vartype )attribute (identifier_default) identifier_default )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_composed) identifier_composed (identifier_append) identifier_append )attribute (argument_list (tuple (identifier_name) identifier_name (attribute (attribute (identifier_argument) identifier_argument (identifier_vartype) identifier_vartype )attribute (identifier_default) identifier_default )attribute )tuple )argument_list )call )expression_statement )block )if_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (call (attribute (string_"Missing argument '{0}'. Method signature: {1}") string_"Missing argument '{0}'. Method signature: {1}" (identifier_format) identifier_format )attribute (argument_list (attribute (identifier_argument) identifier_argument (identifier_name) identifier_name )attribute (call (identifier_str) identifier_str (argument_list (identifier_action) identifier_action )argument_list )call )argument_list )call )argument_list )call )raise_statement )block )for_statement (return_statement (identifier_composed) identifier_composed )return_statement )block )function_definition )module
Compose the argument list from an argument dictionary, with respect for default values. Args: action_name (str): The name of the action to be performed. in_argdict (dict): Arguments as a dict, eg ``{'InstanceID': 0, 'Speed': 1}. The values can be a string or something with a string representation. Returns: list: a list of ``(name, value)`` tuples. Raises: `AttributeError`: If this service does not support the action. `ValueError`: If the argument lists do not match the action signature.
(module (function_definition (function_name__current_size) function_name__current_size (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (pattern_list (identifier_deletes) identifier_deletes (identifier_adds) identifier_adds (identifier__) identifier__ )pattern_list (call (attribute (identifier_Watch) identifier_Watch (identifier__extract_changes) identifier__extract_changes )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_doc_map) identifier_doc_map )attribute (attribute (identifier_self) identifier_self (identifier_change_map) identifier_change_map )attribute (None) None )argument_list )call )assignment )expression_statement (return_statement (binary_operator (binary_operator (call (identifier_len) identifier_len (argument_list (attribute (identifier_self) identifier_self (identifier_doc_map) identifier_doc_map )attribute )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_adds) identifier_adds )argument_list )call )binary_operator (call (identifier_len) identifier_len (argument_list (identifier_deletes) identifier_deletes )argument_list )call )binary_operator )return_statement )block )function_definition )module
Returns the current count of all documents, including the changes from the current changeMap.
(module (function_definition (function_name_pass_control_back) function_name_pass_control_back (parameters (identifier_self) identifier_self (identifier_primary) identifier_primary (identifier_secondary) identifier_secondary )parameters (block (if_statement (comparison_operator (identifier_secondary) identifier_secondary (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__write) identifier__write )attribute (argument_list (tuple (string_'*PCB') string_'*PCB' (call (identifier_Integer) identifier_Integer (argument_list (keyword_argument (identifier_min) identifier_min (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_max) identifier_max (integer_30) integer_30 )keyword_argument )argument_list )call )tuple (identifier_primary) identifier_primary )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier__write) identifier__write )attribute (argument_list (tuple (string_'*PCB') string_'*PCB' (list (call (identifier_Integer) identifier_Integer (argument_list (keyword_argument (identifier_min) identifier_min (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_max) identifier_max (integer_30) integer_30 )keyword_argument )argument_list )call (call (identifier_Integer) identifier_Integer (argument_list (keyword_argument (identifier_min) identifier_min (integer_0) integer_0 )keyword_argument (keyword_argument (identifier_max) identifier_max (integer_30) integer_30 )keyword_argument )argument_list )call )list )tuple (identifier_primary) identifier_primary (identifier_secondary) identifier_secondary )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
The address to which the controll is to be passed back. Tells a potential controller device the address to which the control is to be passed back. :param primary: An integer in the range 0 to 30 representing the primary address of the controller sending the command. :param secondary: An integer in the range of 0 to 30 representing the secondary address of the controller sending the command. If it is missing, it indicates that the controller sending this command does not have extended addressing.
(module (function_definition (function_name_return_type) function_name_return_type (parameters (identifier_rettype) identifier_rettype )parameters (block (function_definition (function_name_wrap) function_name_wrap (parameters (identifier_f) identifier_f )parameters (block (decorated_definition (decorator (call (attribute (identifier_functools) identifier_functools (identifier_wraps) identifier_wraps )attribute (argument_list (identifier_f) identifier_f )argument_list )call )decorator (function_definition (function_name_converter) function_name_converter (parameters (list_splat_pattern (identifier_pargs) identifier_pargs )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_result) identifier_result (call (identifier_f) identifier_f (argument_list (list_splat (identifier_pargs) identifier_pargs )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_result) identifier_result (call (identifier_rettype) identifier_rettype (argument_list (identifier_result) identifier_result )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_ValueError) identifier_ValueError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (identifier_http_status) identifier_http_status (argument_list (integer_500) integer_500 (string_"Return Value Conversion Failed") string_"Return Value Conversion Failed" )argument_list )call )expression_statement (expression_statement (call (identifier_content_type) identifier_content_type (argument_list (string_"application/json") string_"application/json" )argument_list )call )expression_statement (return_statement (dictionary (pair (string_"error") string_"error" (call (identifier_str) identifier_str (argument_list (identifier_e) identifier_e )argument_list )call )pair )dictionary )return_statement )block )except_clause )try_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )decorated_definition (return_statement (identifier_converter) identifier_converter )return_statement )block )function_definition (return_statement (identifier_wrap) identifier_wrap )return_statement )block )function_definition )module
Decorate a function to automatically convert its return type to a string using a custom function. Web-based service functions must return text to the client. Tangelo contains default logic to convert many kinds of values into string, but this decorator allows the service writer to specify custom behavior falling outside of the default. If the conversion fails, an appropriate server error will be raised.
(module (function_definition (function_name_read) function_name_read (parameters (identifier_self) identifier_self (keyword_separator )keyword_separator (default_parameter (identifier_level) identifier_level (integer_0) integer_0 )default_parameter (default_parameter (identifier_alignment) identifier_alignment (integer_1) integer_1 )default_parameter )parameters (type (identifier_bytes) identifier_bytes )type (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_mglo) identifier_mglo )attribute (identifier_read) identifier_read )attribute (argument_list (identifier_level) identifier_level (identifier_alignment) identifier_alignment )argument_list )call )return_statement )block )function_definition )module
Read the content of the texture into a buffer. Keyword Args: level (int): The mipmap level. alignment (int): The byte alignment of the pixels. Returns: bytes
(module (function_definition (function_name__get_real_instance_if_mismatch) function_name__get_real_instance_if_mismatch (parameters (identifier_vpc_info) identifier_vpc_info (identifier_ipaddr) identifier_ipaddr (identifier_instance) identifier_instance (identifier_eni) identifier_eni )parameters (block (expression_statement (assignment (identifier_inst_id) identifier_inst_id (conditional_expression (attribute (identifier_instance) identifier_instance (identifier_id) identifier_id )attribute (identifier_instance) identifier_instance (string_"") string_"" )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_eni_id) identifier_eni_id (conditional_expression (attribute (identifier_eni) identifier_eni (identifier_id) identifier_id )attribute (identifier_eni) identifier_eni (string_"") string_"" )conditional_expression )assignment )expression_statement (if_statement (identifier_ipaddr) identifier_ipaddr (block (expression_statement (assignment (pattern_list (identifier_real_instance) identifier_real_instance (identifier_real_eni) identifier_real_eni )pattern_list (line_continuation_\) line_continuation_\ (call (identifier_find_instance_and_eni_by_ip) identifier_find_instance_and_eni_by_ip (argument_list (identifier_vpc_info) identifier_vpc_info (identifier_ipaddr) identifier_ipaddr )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (attribute (identifier_real_instance) identifier_real_instance (identifier_id) identifier_id )attribute (identifier_inst_id) identifier_inst_id )comparison_operator (comparison_operator (attribute (identifier_real_eni) identifier_real_eni (identifier_id) identifier_id )attribute (identifier_eni_id) identifier_eni_id )comparison_operator )boolean_operator (block (return_statement (identifier_real_instance) identifier_real_instance )return_statement )block )if_statement )block )if_statement (return_statement (None) None )return_statement )block )function_definition )module
Return the real instance for the given IP address, if that instance is different than the passed in instance or has a different eni. If the ipaddr belongs to the same instance and eni that was passed in then this returns None.
(module (function_definition (function_name_write) function_name_write (parameters (identifier_self) identifier_self (identifier_face) identifier_face (identifier_data) identifier_data (default_parameter (identifier_viewport) identifier_viewport (None) None )default_parameter (keyword_separator )keyword_separator (default_parameter (identifier_alignment) identifier_alignment (integer_1) integer_1 )default_parameter )parameters (type (None) None )type (block (if_statement (comparison_operator (call (identifier_type) identifier_type (argument_list (identifier_data) identifier_data )argument_list )call (identifier_Buffer) identifier_Buffer )comparison_operator (block (expression_statement (assignment (identifier_data) identifier_data (attribute (identifier_data) identifier_data (identifier_mglo) identifier_mglo )attribute )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_mglo) identifier_mglo )attribute (identifier_write) identifier_write )attribute (argument_list (identifier_face) identifier_face (identifier_data) identifier_data (identifier_viewport) identifier_viewport (identifier_alignment) identifier_alignment )argument_list )call )expression_statement )block )function_definition )module
Update the content of the texture. Args: face (int): The face to update. data (bytes): The pixel data. viewport (tuple): The viewport. Keyword Args: alignment (int): The byte alignment of the pixels.
(module (function_definition (function_name_random_ipv4) function_name_random_ipv4 (parameters (default_parameter (identifier_cidr) identifier_cidr (string_'10.0.0.0/8') string_'10.0.0.0/8' )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_u_cidr) identifier_u_cidr (call (identifier_unicode) identifier_unicode (argument_list (identifier_cidr) identifier_cidr )argument_list )call )assignment )expression_statement )block (except_clause (identifier_NameError) identifier_NameError (block (expression_statement (assignment (identifier_u_cidr) identifier_u_cidr (identifier_cidr) identifier_cidr )assignment )expression_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_network) identifier_network (call (attribute (identifier_ipaddress) identifier_ipaddress (identifier_ip_network) identifier_ip_network )attribute (argument_list (identifier_u_cidr) identifier_u_cidr )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_start) identifier_start (binary_operator (call (identifier_int) identifier_int (argument_list (attribute (identifier_network) identifier_network (identifier_network_address) identifier_network_address )attribute )argument_list )call (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_end) identifier_end (call (identifier_int) identifier_int (argument_list (attribute (identifier_network) identifier_network (identifier_broadcast_address) identifier_broadcast_address )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_randint) identifier_randint (call (attribute (identifier_random) identifier_random (identifier_randrange) identifier_randrange )attribute (argument_list (identifier_start) identifier_start (identifier_end) identifier_end )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_ipaddress) identifier_ipaddress (identifier_ip_address) identifier_ip_address )attribute (argument_list (identifier_randint) identifier_randint )argument_list )call )return_statement )block )function_definition )module
Return a random IPv4 address from the given CIDR block. :key str cidr: CIDR block :returns: An IPv4 address from the given CIDR block :rtype: ipaddress.IPv4Address
(module (function_definition (function_name__WriteOutputValues) function_name__WriteOutputValues (parameters (identifier_self) identifier_self (identifier_output_values) identifier_output_values )parameters (block (for_statement (pattern_list (identifier_index) identifier_index (identifier_value) identifier_value )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_output_values) identifier_output_values )argument_list )call (block (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (attribute (identifier_py2to3) identifier_py2to3 (identifier_STRING_TYPES) identifier_STRING_TYPES )attribute )argument_list )call )not_operator (block (expression_statement (assignment (identifier_value) identifier_value (string_'') string_'' )assignment )expression_statement )block )if_statement (expression_statement (assignment (subscript (identifier_output_values) identifier_output_values (identifier_index) identifier_index )subscript (call (attribute (identifier_value) identifier_value (identifier_replace) identifier_replace )attribute (argument_list (string_',') string_',' (string_' ') string_' ' )argument_list )call )assignment )expression_statement )block )for_statement (expression_statement (assignment (identifier_output_line) identifier_output_line (call (attribute (string_',') string_',' (identifier_join) identifier_join )attribute (argument_list (identifier_output_values) identifier_output_values )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output_line) identifier_output_line (call (attribute (string_'{0:s}\n') string_'{0:s}\n' (identifier_format) identifier_format )attribute (argument_list (identifier_output_line) identifier_output_line )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__output_writer) identifier__output_writer )attribute (identifier_Write) identifier_Write )attribute (argument_list (identifier_output_line) identifier_output_line )argument_list )call )expression_statement )block )function_definition )module
Writes values to the output. Args: output_values (list[str]): output values.
(module (function_definition (function_name_is_valid_sid_for_new_standalone) function_name_is_valid_sid_for_new_standalone (parameters (identifier_sysmeta_pyxb) identifier_sysmeta_pyxb )parameters (block (expression_statement (assignment (identifier_sid) identifier_sid (call (attribute (attribute (identifier_d1_common) identifier_d1_common (identifier_xml) identifier_xml )attribute (identifier_get_opt_val) identifier_get_opt_val )attribute (argument_list (identifier_sysmeta_pyxb) identifier_sysmeta_pyxb (string_'seriesId') string_'seriesId' )argument_list )call )assignment )expression_statement (if_statement (not_operator (call (attribute (attribute (attribute (identifier_d1_gmn) identifier_d1_gmn (identifier_app) identifier_app )attribute (identifier_did) identifier_did )attribute (identifier_is_valid_sid_for_new_standalone) identifier_is_valid_sid_for_new_standalone )attribute (argument_list (identifier_sid) identifier_sid )argument_list )call )not_operator (block (raise_statement (call (attribute (attribute (attribute (identifier_d1_common) identifier_d1_common (identifier_types) identifier_types )attribute (identifier_exceptions) identifier_exceptions )attribute (identifier_IdentifierNotUnique) identifier_IdentifierNotUnique )attribute (argument_list (integer_0) integer_0 (call (attribute (string_'Identifier is already in use as {}. did="{}"') string_'Identifier is already in use as {}. did="{}"' (identifier_format) identifier_format )attribute (argument_list (call (attribute (attribute (attribute (identifier_d1_gmn) identifier_d1_gmn (identifier_app) identifier_app )attribute (identifier_did) identifier_did )attribute (identifier_classify_identifier) identifier_classify_identifier )attribute (argument_list (identifier_sid) identifier_sid )argument_list )call (identifier_sid) identifier_sid )argument_list )call (keyword_argument (identifier_identifier) identifier_identifier (identifier_sid) identifier_sid )keyword_argument )argument_list )call )raise_statement )block )if_statement )block )function_definition )module
Assert that any SID in ``sysmeta_pyxb`` can be assigned to a new standalone object.
(module (function_definition (function_name_iter_ROOT_classes) function_name_iter_ROOT_classes (parameters )parameters (block (expression_statement (assignment (identifier_class_index) identifier_class_index (string_"http://root.cern.ch/root/html/ClassIndex.html") string_"http://root.cern.ch/root/html/ClassIndex.html" )assignment )expression_statement (for_statement (identifier_s) identifier_s (call (attribute (call (attribute (identifier_minidom) identifier_minidom (identifier_parse) identifier_parse )attribute (argument_list (call (identifier_urlopen) identifier_urlopen (argument_list (identifier_class_index) identifier_class_index )argument_list )call )argument_list )call (identifier_getElementsByTagName) identifier_getElementsByTagName )attribute (argument_list (string_"span") string_"span" )argument_list )call (block (if_statement (comparison_operator (tuple (string_"class") string_"class" (string_"typename") string_"typename" )tuple (call (attribute (attribute (identifier_s) identifier_s (identifier_attributes) identifier_attributes )attribute (identifier_items) identifier_items )attribute (argument_list )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_class_name) identifier_class_name (attribute (subscript (attribute (identifier_s) identifier_s (identifier_childNodes) identifier_childNodes )attribute (integer_0) integer_0 )subscript (identifier_nodeValue) identifier_nodeValue )attribute )assignment )expression_statement (try_statement (block (expression_statement (yield (call (identifier_getattr) identifier_getattr (argument_list (identifier_QROOT) identifier_QROOT (identifier_class_name) identifier_class_name )argument_list )call )yield )expression_statement )block (except_clause (identifier_AttributeError) identifier_AttributeError (block (pass_statement )pass_statement )block )except_clause )try_statement )block )if_statement )block )for_statement )block )function_definition )module
Iterator over all available ROOT classes
(module (function_definition (function_name_prune_volumes) function_name_prune_volumes (parameters (identifier_self) identifier_self (default_parameter (identifier_filters) identifier_filters (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (if_statement (identifier_filters) identifier_filters (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'filters') string_'filters' )subscript (call (attribute (identifier_utils) identifier_utils (identifier_convert_filters) identifier_convert_filters )attribute (argument_list (identifier_filters) identifier_filters )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_url) identifier_url (call (attribute (identifier_self) identifier_self (identifier__url) identifier__url )attribute (argument_list (string_'/volumes/prune') string_'/volumes/prune' )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__result) identifier__result )attribute (argument_list (call (attribute (identifier_self) identifier_self (identifier__post) identifier__post )attribute (argument_list (identifier_url) identifier_url (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call (True) True )argument_list )call )return_statement )block )function_definition )module
Delete unused volumes Args: filters (dict): Filters to process on the prune list. Returns: (dict): A dict containing a list of deleted volume names and the amount of disk space reclaimed in bytes. Raises: :py:class:`docker.errors.APIError` If the server returns an error.
(module (function_definition (function_name__upload) function_name__upload (parameters (identifier_self) identifier_self (typed_parameter (identifier_items) identifier_items (type (generic_type (identifier_Iterable) identifier_Iterable (type_parameter (type (generic_type (identifier_Tuple) identifier_Tuple (type_parameter (type (identifier_str) identifier_str )type (type (identifier_str) identifier_str )type )type_parameter )generic_type )type )type_parameter )generic_type )type )typed_parameter )parameters (type (None) None )type (block (for_statement (pattern_list (identifier_src) identifier_src (identifier_key) identifier_key )pattern_list (identifier_items) identifier_items (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_f'Uploading {src} to {key}') string_f'Uploading {src} to {key}' )argument_list )call )expression_statement (expression_statement (assignment (pattern_list (identifier_mimetype) identifier_mimetype (identifier__) identifier__ )pattern_list (call (attribute (identifier_mimetypes) identifier_mimetypes (identifier_guess_type) identifier_guess_type )attribute (argument_list (identifier_src) identifier_src )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_mimetype) identifier_mimetype (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_warning) identifier_warning )attribute (argument_list (string_f'Could not guess MIME type for {src}') string_f'Could not guess MIME type for {src}' )argument_list )call )expression_statement (expression_statement (assignment (identifier_mimetype) identifier_mimetype (string_'application/octet-stream') string_'application/octet-stream' )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_debug) identifier_debug )attribute (argument_list (string_f'Deduced MIME type: {mimetype}') string_f'Deduced MIME type: {mimetype}' )argument_list )call )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__bucket) identifier__bucket )attribute (identifier_upload_file) identifier_upload_file )attribute (argument_list (identifier_src) identifier_src (identifier_key) identifier_key (keyword_argument (identifier_ExtraArgs) identifier_ExtraArgs (dictionary (pair (string_'ContentType') string_'ContentType' (identifier_mimetype) identifier_mimetype )pair )dictionary )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
Upload a collection of paths to S3. :param items: An iterable of pairs containing the local path of the file to upload, and the remote path to upload it to. The prefix will be appended to each remote path.
(module (function_definition (function_name_user) function_name_user (parameters (identifier_self) identifier_self (identifier_id) identifier_id (default_parameter (identifier_expand) identifier_expand (None) None )default_parameter )parameters (block (expression_statement (assignment (identifier_user) identifier_user (call (identifier_User) identifier_User (argument_list (attribute (identifier_self) identifier_self (identifier__options) identifier__options )attribute (attribute (identifier_self) identifier_self (identifier__session) identifier__session )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (dictionary )dictionary )assignment )expression_statement (if_statement (comparison_operator (identifier_expand) identifier_expand (None) None )comparison_operator (block (expression_statement (assignment (subscript (identifier_params) identifier_params (string_'expand') string_'expand' )subscript (identifier_expand) identifier_expand )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_user) identifier_user (identifier_find) identifier_find )attribute (argument_list (identifier_id) identifier_id (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )expression_statement (return_statement (identifier_user) identifier_user )return_statement )block )function_definition )module
Get a user Resource from the server. :param id: ID of the user to get :param id: str :param expand: Extra information to fetch inside each resource :type expand: Optional[Any] :rtype: User
(module (function_definition (function_name_write_pad_codewords) function_name_write_pad_codewords (parameters (identifier_buff) identifier_buff (identifier_version) identifier_version (identifier_capacity) identifier_capacity (identifier_length) identifier_length )parameters (block (expression_statement (assignment (identifier_write) identifier_write (attribute (identifier_buff) identifier_buff (identifier_extend) identifier_extend )attribute )assignment )expression_statement (if_statement (comparison_operator (identifier_version) identifier_version (tuple (attribute (identifier_consts) identifier_consts (identifier_VERSION_M1) identifier_VERSION_M1 )attribute (attribute (identifier_consts) identifier_consts (identifier_VERSION_M3) identifier_VERSION_M3 )attribute )tuple )comparison_operator (block (expression_statement (call (identifier_write) identifier_write (argument_list (binary_operator (list (integer_0) integer_0 )list (parenthesized_expression (binary_operator (identifier_capacity) identifier_capacity (identifier_length) identifier_length )binary_operator )parenthesized_expression )binary_operator )argument_list )call )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_pad_codewords) identifier_pad_codewords (tuple (tuple (integer_1) integer_1 (integer_1) integer_1 (integer_1) integer_1 (integer_0) integer_0 (integer_1) integer_1 (integer_1) integer_1 (integer_0) integer_0 (integer_0) integer_0 )tuple (tuple (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 (integer_1) integer_1 (integer_0) integer_0 (integer_0) integer_0 (integer_0) integer_0 (integer_1) integer_1 )tuple )tuple )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (binary_operator (binary_operator (identifier_capacity) identifier_capacity (integer_8) integer_8 )binary_operator (binary_operator (identifier_length) identifier_length (integer_8) integer_8 )binary_operator )binary_operator )argument_list )call (block (expression_statement (call (identifier_write) identifier_write (argument_list (subscript (identifier_pad_codewords) identifier_pad_codewords (binary_operator (identifier_i) identifier_i (integer_2) integer_2 )binary_operator )subscript )argument_list )call )expression_statement )block )for_statement )block )else_clause )if_statement )block )function_definition )module
\ Writes the pad codewords iff the data does not fill the capacity of the symbol. :param buff: The byte buffer. :param int version: The (Micro) QR Code version. :param int capacity: The total capacity of the symbol (incl. error correction) :param int length: Length of the data bit stream.
(module (function_definition (function_name__unzip_handle) function_name__unzip_handle (parameters (identifier_handle) identifier_handle )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_handle) identifier_handle (identifier_basestring) identifier_basestring )argument_list )call (block (expression_statement (assignment (identifier_handle) identifier_handle (call (identifier__gzip_open_filename) identifier__gzip_open_filename (argument_list (identifier_handle) identifier_handle )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_handle) identifier_handle (call (identifier__gzip_open_handle) identifier__gzip_open_handle (argument_list (identifier_handle) identifier_handle )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_handle) identifier_handle )return_statement )block )function_definition )module
Transparently unzip the file handle
(module (function_definition (function_name_on_origin) function_name_on_origin (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern )parameters (block (if_statement (comparison_operator (attribute (identifier_self) identifier_self (identifier_origin) identifier_origin )attribute (None) None )comparison_operator (block (expression_statement (call (attribute (identifier_Clock) identifier_Clock (identifier_schedule_once) identifier_schedule_once )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_on_origin) identifier_on_origin )attribute (integer_0) integer_0 )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_origin) identifier_origin )attribute (identifier_bind) identifier_bind )attribute (argument_list (keyword_argument (identifier_pos) identifier_pos (attribute (identifier_self) identifier_self (identifier__trigger_repoint) identifier__trigger_repoint )attribute )keyword_argument (keyword_argument (identifier_size) identifier_size (attribute (identifier_self) identifier_self (identifier__trigger_repoint) identifier__trigger_repoint )attribute )keyword_argument )argument_list )call )expression_statement )block )function_definition )module
Make sure to redraw whenever the origin moves.