sequence
stringlengths
557
12.7k
docstring
stringlengths
4
15.2k
(module (function_definition (function_name_plot_dot_graph) function_name_plot_dot_graph (parameters (identifier_graph) identifier_graph (default_parameter (identifier_filename) identifier_filename (None) None )default_parameter )parameters (block (if_statement (not_operator (attribute (identifier_plot) identifier_plot (identifier_pygraphviz_available) identifier_pygraphviz_available )attribute )not_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (string_"Pygraphviz is not installed, cannot generate graph plot!") string_"Pygraphviz is not installed, cannot generate graph plot!" )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (if_statement (not_operator (attribute (identifier_plot) identifier_plot (identifier_PIL_available) identifier_PIL_available )attribute )not_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (string_"PIL is not installed, cannot display graph plot!") string_"PIL is not installed, cannot display graph plot!" )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (expression_statement (assignment (identifier_agraph) identifier_agraph (call (identifier_AGraph) identifier_AGraph (argument_list (identifier_graph) identifier_graph )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_agraph) identifier_agraph (identifier_layout) identifier_layout )attribute (argument_list (keyword_argument (identifier_prog) identifier_prog (string_'dot') string_'dot' )keyword_argument )argument_list )call )expression_statement (if_statement (comparison_operator (identifier_filename) identifier_filename (None) None )comparison_operator (block (expression_statement (assignment (identifier_filename) identifier_filename (call (attribute (identifier_tempfile) identifier_tempfile (identifier_mktemp) identifier_mktemp )attribute (argument_list (keyword_argument (identifier_suffix) identifier_suffix (string_".png") string_".png" )keyword_argument )argument_list )call )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_agraph) identifier_agraph (identifier_draw) identifier_draw )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )expression_statement (expression_statement (assignment (identifier_image) identifier_image (call (attribute (identifier_Image) identifier_Image (identifier_open) identifier_open )attribute (argument_list (identifier_filename) identifier_filename )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_image) identifier_image (identifier_show) identifier_show )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Plots a graph in graphviz dot notation. :param graph: the dot notation graph :type graph: str :param filename: the (optional) file to save the generated plot to. The extension determines the file format. :type filename: str
(module (function_definition (function_name_from_point) function_name_from_point (parameters (identifier_cls) identifier_cls (identifier_point) identifier_point )parameters (block (return_statement (call (identifier_cls) identifier_cls (argument_list (attribute (identifier_point) identifier_point (identifier_latitude) identifier_latitude )attribute (attribute (identifier_point) identifier_point (identifier_longitude) identifier_longitude )attribute (attribute (identifier_point) identifier_point (identifier_altitude) identifier_altitude )attribute )argument_list )call )return_statement )block )function_definition )module
Create and return a new ``Point`` instance from another ``Point`` instance.
(module (function_definition (function_name_edit) function_name_edit (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_changed) identifier_changed )attribute (False) False )assignment )expression_statement (with_statement (with_clause (with_item (identifier_self) identifier_self )with_item )with_clause (block (expression_statement (assignment (identifier_editor) identifier_editor (call (attribute (identifier_self) identifier_self (identifier_get_editor) identifier_get_editor )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_cmd) identifier_cmd (list (identifier_editor) identifier_editor (attribute (identifier_self) identifier_self (identifier_name) identifier_name )attribute )list )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_res) identifier_res (call (attribute (identifier_subprocess) identifier_subprocess (identifier_call) identifier_call )attribute (argument_list (identifier_cmd) identifier_cmd )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (expression_statement (call (identifier_print) identifier_print (argument_list (binary_operator (string_"Error launching editor %(editor)s") string_"Error launching editor %(editor)s" (call (identifier_locals) identifier_locals (argument_list )argument_list )call )binary_operator )argument_list )call )expression_statement (expression_statement (call (identifier_print) identifier_print (argument_list (identifier_e) identifier_e )argument_list )call )expression_statement (return_statement )return_statement )block )except_clause )try_statement (if_statement (comparison_operator (identifier_res) identifier_res (integer_0) integer_0 )comparison_operator (block (expression_statement (assignment (identifier_msg) identifier_msg (binary_operator (string_'%(editor)s returned error status %(res)d') string_'%(editor)s returned error status %(res)d' (call (identifier_locals) identifier_locals (argument_list )argument_list )call )binary_operator )assignment )expression_statement (raise_statement (call (identifier_EditProcessException) identifier_EditProcessException (argument_list (identifier_msg) identifier_msg )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_new_data) identifier_new_data (call (attribute (identifier_self) identifier_self (identifier_read) identifier_read )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_new_data) identifier_new_data (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute )comparison_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_changed) identifier_changed )attribute (call (attribute (identifier_self) identifier_self (identifier__save_diff) identifier__save_diff )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_new_data) identifier_new_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_new_data) identifier_new_data )assignment )expression_statement )block )if_statement )block )with_statement )block )function_definition )module
Edit the file
(module (function_definition (function_name_acquire_value_set) function_name_acquire_value_set (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_tags) identifier_tags )list_splat_pattern )parameters (block (expression_statement (assignment (identifier_setname) identifier_setname (call (attribute (identifier_self) identifier_self (identifier__acquire_value_set) identifier__acquire_value_set )attribute (argument_list (list_splat (identifier_tags) identifier_tags )list_splat )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_setname) identifier_setname (None) None )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"Could not aquire a value set") string_"Could not aquire a value set" )argument_list )call )raise_statement )block )if_statement (return_statement (identifier_setname) identifier_setname )return_statement )block )function_definition )module
Reserve a set of values for this execution. No other process can reserve the same set of values while the set is reserved. Acquired value set needs to be released after use to allow other processes to access it. Add tags to limit the possible value sets that this returns.
(module (function_definition (function_name_asDict) function_name_asDict (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_d) identifier_d (dictionary )dictionary )assignment )expression_statement (for_statement (pattern_list (identifier_k) identifier_k (identifier_v) identifier_v )pattern_list (call (attribute (identifier_self) identifier_self (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_d) identifier_d (identifier_k) identifier_k )subscript (identifier_v) identifier_v )assignment )expression_statement )block )for_statement (return_statement (identifier_d) identifier_d )return_statement )block )function_definition )module
Return the Lib as a ``dict``. This is a backwards compatibility method.
(module (function_definition (function_name_maybe_infer_tz) function_name_maybe_infer_tz (parameters (identifier_tz) identifier_tz (identifier_inferred_tz) identifier_inferred_tz )parameters (block (if_statement (comparison_operator (identifier_tz) identifier_tz (None) None )comparison_operator (block (expression_statement (assignment (identifier_tz) identifier_tz (identifier_inferred_tz) identifier_inferred_tz )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_inferred_tz) identifier_inferred_tz (None) None )comparison_operator (block (pass_statement )pass_statement )block )elif_clause (elif_clause (not_operator (call (attribute (identifier_timezones) identifier_timezones (identifier_tz_compare) identifier_tz_compare )attribute (argument_list (identifier_tz) identifier_tz (identifier_inferred_tz) identifier_inferred_tz )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (call (attribute (concatenated_string (string_'data is already tz-aware {inferred_tz}, unable to ') string_'data is already tz-aware {inferred_tz}, unable to ' (string_'set specified tz: {tz}') string_'set specified tz: {tz}' )concatenated_string (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_inferred_tz) identifier_inferred_tz (identifier_inferred_tz) identifier_inferred_tz )keyword_argument (keyword_argument (identifier_tz) identifier_tz (identifier_tz) identifier_tz )keyword_argument )argument_list )call )argument_list )call )raise_statement )block )elif_clause )if_statement (return_statement (identifier_tz) identifier_tz )return_statement )block )function_definition )module
If a timezone is inferred from data, check that it is compatible with the user-provided timezone, if any. Parameters ---------- tz : tzinfo or None inferred_tz : tzinfo or None Returns ------- tz : tzinfo or None Raises ------ TypeError : if both timezones are present but do not match
(module (function_definition (function_name_boundary) function_name_boundary (parameters (identifier_self) identifier_self )parameters (block (return_statement (tuple (call (identifier_int) identifier_int (argument_list (attribute (identifier_self) identifier_self (identifier_WESTERNMOST_LONGITUDE) identifier_WESTERNMOST_LONGITUDE )attribute )argument_list )call (call (identifier_int) identifier_int (argument_list (attribute (identifier_self) identifier_self (identifier_EASTERNMOST_LONGITUDE) identifier_EASTERNMOST_LONGITUDE )attribute )argument_list )call (call (identifier_int) identifier_int (argument_list (attribute (identifier_self) identifier_self (identifier_MINIMUM_LATITUDE) identifier_MINIMUM_LATITUDE )attribute )argument_list )call (call (identifier_int) identifier_int (argument_list (attribute (identifier_self) identifier_self (identifier_MAXIMUM_LATITUDE) identifier_MAXIMUM_LATITUDE )attribute )argument_list )call )tuple )return_statement )block )function_definition )module
Get the image boundary Returns: A tupple composed by the westernmost_longitude, the westernmost_longitude, the minimum_latitude and the maximum_latitude.
(module (function_definition (function_name_get_ws_endpoint) function_name_get_ws_endpoint (parameters (identifier_self) identifier_self (default_parameter (identifier_private) identifier_private (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_path) identifier_path (string_'bullet-public') string_'bullet-public' )assignment )expression_statement (expression_statement (assignment (identifier_signed) identifier_signed (identifier_private) identifier_private )assignment )expression_statement (if_statement (identifier_private) identifier_private (block (expression_statement (assignment (identifier_path) identifier_path (string_'bullet-private') string_'bullet-private' )assignment )expression_statement )block )if_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier__post) identifier__post )attribute (argument_list (identifier_path) identifier_path (identifier_signed) identifier_signed )argument_list )call )return_statement )block )function_definition )module
Get websocket channel details :param private: Name of symbol e.g. KCS-BTC :type private: bool https://docs.kucoin.com/#websocket-feed .. code:: python ws_details = client.get_ws_endpoint(private=True) :returns: ApiResponse .. code:: python { "code": "200000", "data": { "instanceServers": [ { "pingInterval": 50000, "endpoint": "wss://push1-v2.kucoin.net/endpoint", "protocol": "websocket", "encrypt": true, "pingTimeout": 10000 } ], "token": "vYNlCtbz4XNJ1QncwWilJnBtmmfe4geLQDUA62kKJsDChc6I4bRDQc73JfIrlFaVYIAE0Gv2--MROnLAgjVsWkcDq_MuG7qV7EktfCEIphiqnlfpQn4Ybg==.IoORVxR2LmKV7_maOR9xOg==" } } :raises: KucoinResponseException, KucoinAPIException
(module (function_definition (function_name_getReference) function_name_getReference (parameters (identifier_self) identifier_self (identifier_id_) identifier_id_ )parameters (block (if_statement (comparison_operator (identifier_id_) identifier_id_ (attribute (identifier_self) identifier_self (identifier__referenceIdMap) identifier__referenceIdMap )attribute )comparison_operator (block (raise_statement (call (attribute (identifier_exceptions) identifier_exceptions (identifier_ReferenceNotFoundException) identifier_ReferenceNotFoundException )attribute (argument_list (identifier_id_) identifier_id_ )argument_list )call )raise_statement )block )if_statement (return_statement (subscript (attribute (identifier_self) identifier_self (identifier__referenceIdMap) identifier__referenceIdMap )attribute (identifier_id_) identifier_id_ )subscript )return_statement )block )function_definition )module
Returns the Reference with the specified ID or raises a ReferenceNotFoundException if it does not exist.
(module (function_definition (function_name_list_branch) function_name_list_branch (parameters (identifier_self) identifier_self (identifier_repo_name) identifier_repo_name )parameters (block (expression_statement (assignment (identifier_req) identifier_req (call (attribute (identifier_proto) identifier_proto (identifier_ListBranchRequest) identifier_ListBranchRequest )attribute (argument_list (keyword_argument (identifier_repo) identifier_repo (call (attribute (identifier_proto) identifier_proto (identifier_Repo) identifier_Repo )attribute (argument_list (keyword_argument (identifier_name) identifier_name (identifier_repo_name) identifier_repo_name )keyword_argument )argument_list )call )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_res) identifier_res (call (attribute (attribute (identifier_self) identifier_self (identifier_stub) identifier_stub )attribute (identifier_ListBranch) identifier_ListBranch )attribute (argument_list (identifier_req) identifier_req (keyword_argument (identifier_metadata) identifier_metadata (attribute (identifier_self) identifier_self (identifier_metadata) identifier_metadata )attribute )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (call (identifier_hasattr) identifier_hasattr (argument_list (identifier_res) identifier_res (string_'branch_info') string_'branch_info' )argument_list )call (block (return_statement (attribute (identifier_res) identifier_res (identifier_branch_info) identifier_branch_info )attribute )return_statement )block )if_statement (return_statement (list )list )return_statement )block )function_definition )module
Lists the active Branch objects on a Repo. Params: * repo_name: The name of the repo.
(module (function_definition (function_name_calc_expectation) function_name_calc_expectation (parameters (identifier_grad_dict) identifier_grad_dict (identifier_num_batches) identifier_num_batches )parameters (block (for_statement (identifier_key) identifier_key (call (attribute (identifier_grad_dict) identifier_grad_dict (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call (block (expression_statement (assignment (subscript (identifier_grad_dict) identifier_grad_dict (call (attribute (identifier_str) identifier_str (identifier_format) identifier_format )attribute (argument_list (binary_operator (identifier_key) identifier_key (string_"_expectation") string_"_expectation" )binary_operator )argument_list )call )subscript (binary_operator (call (attribute (attribute (identifier_mx) identifier_mx (identifier_ndarray) identifier_ndarray )attribute (identifier_sum) identifier_sum )attribute (argument_list (subscript (identifier_grad_dict) identifier_grad_dict (identifier_key) identifier_key )subscript (keyword_argument (identifier_axis) identifier_axis (integer_0) integer_0 )keyword_argument )argument_list )call (identifier_num_batches) identifier_num_batches )binary_operator )assignment )expression_statement )block )for_statement (return_statement (identifier_grad_dict) identifier_grad_dict )return_statement )block )function_definition )module
Calculates the expectation of the gradients per epoch for each parameter w.r.t number of batches Parameters ---------- grad_dict: dict dictionary that maps parameter name to gradients in the mod executor group num_batches: int number of batches Returns ---------- grad_dict: dict dictionary with new keys mapping to gradients expectations
(module (function_definition (function_name_to_dict) function_name_to_dict (parameters (identifier_self) identifier_self )parameters (block (return_statement (dictionary (pair (string_'primitives') string_'primitives' (attribute (identifier_self) identifier_self (identifier_primitives) identifier_primitives )attribute )pair (pair (string_'init_params') string_'init_params' (attribute (identifier_self) identifier_self (identifier_init_params) identifier_init_params )attribute )pair (pair (string_'input_names') string_'input_names' (attribute (identifier_self) identifier_self (identifier_input_names) identifier_input_names )attribute )pair (pair (string_'output_names') string_'output_names' (attribute (identifier_self) identifier_self (identifier_output_names) identifier_output_names )attribute )pair (pair (string_'hyperparameters') string_'hyperparameters' (call (attribute (identifier_self) identifier_self (identifier_get_hyperparameters) identifier_get_hyperparameters )attribute (argument_list )argument_list )call )pair (pair (string_'tunable_hyperparameters') string_'tunable_hyperparameters' (attribute (identifier_self) identifier_self (identifier__tunable_hyperparameters) identifier__tunable_hyperparameters )attribute )pair )dictionary )return_statement )block )function_definition )module
Return all the details of this MLPipeline in a dict. The dict structure contains all the `__init__` arguments of the MLPipeline, as well as the current hyperparameter values and the specification of the tunable_hyperparameters:: { "primitives": [ "a_primitive", "another_primitive" ], "init_params": { "a_primitive": { "an_argument": "a_value" } }, "hyperparameters": { "a_primitive#1": { "an_argument": "a_value", "another_argument": "another_value", }, "another_primitive#1": { "yet_another_argument": "yet_another_value" } }, "tunable_hyperparameters": { "another_primitive#1": { "yet_another_argument": { "type": "str", "default": "a_default_value", "values": [ "a_default_value", "yet_another_value" ] } } } }
(module (function_definition (function_name_get_dict_for_attrs) function_name_get_dict_for_attrs (parameters (identifier_obj) identifier_obj (identifier_attrs) identifier_attrs )parameters (block (expression_statement (assignment (identifier_data) identifier_data (dictionary )dictionary )assignment )expression_statement (for_statement (identifier_attr) identifier_attr (identifier_attrs) identifier_attrs (block (expression_statement (assignment (subscript (identifier_data) identifier_data (identifier_attr) identifier_attr )subscript (call (identifier_getattr) identifier_getattr (argument_list (identifier_obj) identifier_obj (identifier_attr) identifier_attr )argument_list )call )assignment )expression_statement )block )for_statement (return_statement (identifier_data) identifier_data )return_statement )block )function_definition )module
Returns dictionary for each attribute from given ``obj``.
(module (function_definition (function_name_is_pinned) function_name_is_pinned (parameters (identifier_self) identifier_self (typed_parameter (identifier_color) identifier_color (type (identifier_Color) identifier_Color )type )typed_parameter (typed_parameter (identifier_square) identifier_square (type (identifier_Square) identifier_Square )type )typed_parameter )parameters (type (identifier_bool) identifier_bool )type (block (return_statement (comparison_operator (call (attribute (identifier_self) identifier_self (identifier_pin_mask) identifier_pin_mask )attribute (argument_list (identifier_color) identifier_color (identifier_square) identifier_square )argument_list )call (identifier_BB_ALL) identifier_BB_ALL )comparison_operator )return_statement )block )function_definition )module
Detects if the given square is pinned to the king of the given color.
(module (function_definition (function_name_remove_small_objects) function_name_remove_small_objects (parameters (identifier_image) identifier_image (default_parameter (identifier_min_size) identifier_min_size (integer_50) integer_50 )default_parameter (default_parameter (identifier_connectivity) identifier_connectivity (integer_1) integer_1 )default_parameter )parameters (block (return_statement (call (attribute (attribute (identifier_skimage) identifier_skimage (identifier_morphology) identifier_morphology )attribute (identifier_remove_small_objects) identifier_remove_small_objects )attribute (argument_list (identifier_image) identifier_image (keyword_argument (identifier_min_size) identifier_min_size (identifier_min_size) identifier_min_size )keyword_argument (keyword_argument (identifier_connectivity) identifier_connectivity (identifier_connectivity) identifier_connectivity )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Remove small objects from an boolean image. :param image: boolean numpy array or :class:`jicbioimage.core.image.Image` :returns: boolean :class:`jicbioimage.core.image.Image`
(module (function_definition (function_name__create_argument_parser) function_name__create_argument_parser (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_parser) identifier_parser (call (attribute (identifier_self) identifier_self (identifier__new_argument_parser) identifier__new_argument_parser )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_base_arguments) identifier__add_base_arguments )attribute (argument_list (identifier_parser) identifier_parser )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__add_required_arguments) identifier__add_required_arguments )attribute (argument_list (identifier_parser) identifier_parser )argument_list )call )expression_statement (return_statement (identifier_parser) identifier_parser )return_statement )block )function_definition )module
Create and return the argument parser with all of the arguments and configuration ready to go. :rtype: argparse.ArgumentParser
(module (function_definition (function_name_iterall) function_name_iterall (parameters (identifier_cls) identifier_cls (default_parameter (identifier_connection) identifier_connection (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (try_statement (block (expression_statement (assignment (identifier_limit) identifier_limit (subscript (identifier_kwargs) identifier_kwargs (string_'limit') string_'limit' )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_limit) identifier_limit (None) None )assignment )expression_statement )block )except_clause )try_statement (try_statement (block (expression_statement (assignment (identifier_page) identifier_page (subscript (identifier_kwargs) identifier_kwargs (string_'page') string_'page' )subscript )assignment )expression_statement )block (except_clause (identifier_KeyError) identifier_KeyError (block (expression_statement (assignment (identifier_page) identifier_page (None) None )assignment )expression_statement )block )except_clause )try_statement (function_definition (function_name__all_responses) function_name__all_responses (parameters )parameters (block (expression_statement (assignment (identifier_page) identifier_page (integer_1) integer_1 )assignment )expression_statement (expression_statement (assignment (identifier_params) identifier_params (call (attribute (identifier_kwargs) identifier_kwargs (identifier_copy) identifier_copy )attribute (argument_list )argument_list )call )assignment )expression_statement (while_statement (True) True (block (expression_statement (call (attribute (identifier_params) identifier_params (identifier_update) identifier_update )attribute (argument_list (keyword_argument (identifier_page) identifier_page (identifier_page) identifier_page )keyword_argument (keyword_argument (identifier_limit) identifier_limit (integer_250) integer_250 )keyword_argument )argument_list )call )expression_statement (expression_statement (assignment (identifier_rsp) identifier_rsp (call (attribute (identifier_cls) identifier_cls (identifier__make_request) identifier__make_request )attribute (argument_list (string_'GET') string_'GET' (call (attribute (identifier_cls) identifier_cls (identifier__get_all_path) identifier__get_all_path )attribute (argument_list )argument_list )call (identifier_connection) identifier_connection (keyword_argument (identifier_params) identifier_params (identifier_params) identifier_params )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (identifier_rsp) identifier_rsp (block (expression_statement (yield (identifier_rsp) identifier_rsp )yield )expression_statement (expression_statement (augmented_assignment (identifier_page) identifier_page (integer_1) integer_1 )augmented_assignment )expression_statement )block (else_clause (block (expression_statement (yield (list )list )yield )expression_statement (break_statement )break_statement )block )else_clause )if_statement )block )while_statement )block )function_definition (if_statement (not_operator (parenthesized_expression (boolean_operator (identifier_limit) identifier_limit (identifier_page) identifier_page )boolean_operator )parenthesized_expression )not_operator (block (for_statement (identifier_rsp) identifier_rsp (call (identifier__all_responses) identifier__all_responses (argument_list )argument_list )call (block (for_statement (identifier_obj) identifier_obj (identifier_rsp) identifier_rsp (block (expression_statement (yield (call (attribute (identifier_cls) identifier_cls (identifier__create_object) identifier__create_object )attribute (argument_list (identifier_obj) identifier_obj (keyword_argument (identifier_connection) identifier_connection (identifier_connection) identifier_connection )keyword_argument )argument_list )call )yield )expression_statement )block )for_statement )block )for_statement )block (else_clause (block (expression_statement (assignment (identifier_response) identifier_response (call (attribute (identifier_cls) identifier_cls (identifier__make_request) identifier__make_request )attribute (argument_list (string_'GET') string_'GET' (call (attribute (identifier_cls) identifier_cls (identifier__get_all_path) identifier__get_all_path )attribute (argument_list )argument_list )call (identifier_connection) identifier_connection (keyword_argument (identifier_params) identifier_params (identifier_kwargs) identifier_kwargs )keyword_argument )argument_list )call )assignment )expression_statement (for_statement (identifier_obj) identifier_obj (call (attribute (identifier_cls) identifier_cls (identifier__create_object) identifier__create_object )attribute (argument_list (identifier_response) identifier_response (keyword_argument (identifier_connection) identifier_connection (identifier_connection) identifier_connection )keyword_argument )argument_list )call (block (expression_statement (yield (identifier_obj) identifier_obj )yield )expression_statement )block )for_statement )block )else_clause )if_statement )block )function_definition )module
Returns a autopaging generator that yields each object returned one by one.
(module (function_definition (function_name_dst_to_src) function_name_dst_to_src (parameters (identifier_self) identifier_self (identifier_dst_file) identifier_dst_file )parameters (block (for_statement (identifier_map) identifier_map (attribute (identifier_self) identifier_self (identifier_mappings) identifier_mappings )attribute (block (expression_statement (assignment (identifier_src_uri) identifier_src_uri (call (attribute (identifier_map) identifier_map (identifier_dst_to_src) identifier_dst_to_src )attribute (argument_list (identifier_dst_file) identifier_dst_file )argument_list )call )assignment )expression_statement (if_statement (parenthesized_expression (comparison_operator (identifier_src_uri) identifier_src_uri (None) None )comparison_operator )parenthesized_expression (block (return_statement (parenthesized_expression (identifier_src_uri) identifier_src_uri )parenthesized_expression )return_statement )block )if_statement )block )for_statement (raise_statement (call (identifier_MapperError) identifier_MapperError (argument_list (binary_operator (concatenated_string (string_"Unable to translate destination path (%s) ") string_"Unable to translate destination path (%s) " (string_"into a source URI.") string_"into a source URI." )concatenated_string (parenthesized_expression (identifier_dst_file) identifier_dst_file )parenthesized_expression )binary_operator )argument_list )call )raise_statement )block )function_definition )module
Map destination path to source URI.
(module (function_definition (function_name_setModified) function_name_setModified (parameters (identifier_self) identifier_self (typed_parameter (identifier_isModified) identifier_isModified (type (identifier_bool) identifier_bool )type )typed_parameter )parameters (block (if_statement (not_operator (identifier_isModified) identifier_isModified )not_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_qteUndoStack) identifier_qteUndoStack )attribute (identifier_saveState) identifier_saveState )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (call (identifier_super) identifier_super (argument_list )argument_list )call (identifier_setModified) identifier_setModified )attribute (argument_list (identifier_isModified) identifier_isModified )argument_list )call )expression_statement )block )function_definition )module
Set the modified state to ``isModified``. From a programmer's perspective this method does the same as the native ``QsciScintilla`` method but also ensures that the undo framework knows when the document state was changed. |Args| * ``isModified`` (**bool**): whether or not the document is considered unmodified. |Returns| **None** |Raises| * **QtmacsArgumentError** if at least one argument has an invalid type.
(module (function_definition (function_name_register_rate_producer) function_name_register_rate_producer (parameters (identifier_self) identifier_self (typed_parameter (identifier_rate_name) identifier_rate_name (type (identifier_str) identifier_str )type )typed_parameter (typed_default_parameter (identifier_source) identifier_source (type (generic_type (identifier_Callable) identifier_Callable (type_parameter (type (ellipsis_...) ellipsis_... )type (type (attribute (identifier_pd) identifier_pd (identifier_DataFrame) identifier_DataFrame )attribute )type )type_parameter )generic_type )type (None) None )typed_default_parameter )parameters (type (identifier_Pipeline) identifier_Pipeline )type (block (return_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__value_manager) identifier__value_manager )attribute (identifier_register_rate_producer) identifier_register_rate_producer )attribute (argument_list (identifier_rate_name) identifier_rate_name (identifier_source) identifier_source )argument_list )call )return_statement )block )function_definition )module
Marks a ``Callable`` as the producer of a named rate. This is a convenience wrapper around ``register_value_producer`` that makes sure rate data is appropriately scaled to the size of the simulation time step. It is equivalent to ``register_value_producer(value_name, source, preferred_combiner=replace_combiner, preferred_post_processor=rescale_post_processor)`` Parameters ---------- rate_name : The name of the new dynamic rate pipeline. source : A callable source for the dynamic rate pipeline. Returns ------- Callable A callable reference to the named dynamic rate pipeline.
(module (function_definition (function_name_update) function_name_update (parameters (identifier_self) identifier_self (identifier_folder) identifier_folder (identifier_git_repository) identifier_git_repository )parameters (block (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_clone) identifier_clone )attribute (argument_list (identifier_folder) identifier_folder (identifier_git_repository) identifier_git_repository )argument_list )call )expression_statement )block (except_clause (identifier_OSError) identifier_OSError (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_update_git_repository) identifier_update_git_repository )attribute (argument_list (identifier_folder) identifier_folder (identifier_git_repository) identifier_git_repository )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_pull) identifier_pull )attribute (argument_list (identifier_folder) identifier_folder )argument_list )call )expression_statement )block )except_clause )try_statement )block )function_definition )module
Creates or updates theme folder according given git repository. :param git_repository: git url of the theme folder :param folder: path of the git managed theme folder
(module (function_definition (function_name_copy_files) function_name_copy_files (parameters (identifier_src) identifier_src (identifier_ext) identifier_ext (identifier_dst) identifier_dst )parameters (block (expression_statement (assignment (identifier_src_path) identifier_src_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier___file__) identifier___file__ )argument_list )call (identifier_src) identifier_src )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_dst_path) identifier_dst_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_dirname) identifier_dirname )attribute (argument_list (identifier___file__) identifier___file__ )argument_list )call (identifier_dst) identifier_dst )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_file_list) identifier_file_list (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (identifier_src_path) identifier_src_path )argument_list )call )assignment )expression_statement (for_statement (identifier_f) identifier_f (identifier_file_list) identifier_file_list (block (if_statement (comparison_operator (identifier_f) identifier_f (string_'__init__.py') string_'__init__.py' )comparison_operator (block (continue_statement )continue_statement )block )if_statement (expression_statement (assignment (identifier_f_path) identifier_f_path (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (identifier_src_path) identifier_src_path (identifier_f) identifier_f )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_f_path) identifier_f_path )argument_list )call (call (attribute (identifier_f) identifier_f (identifier_endswith) identifier_endswith )attribute (argument_list (identifier_ext) identifier_ext )argument_list )call )boolean_operator (block (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_copy) identifier_copy )attribute (argument_list (identifier_f_path) identifier_f_path (identifier_dst_path) identifier_dst_path )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Copies files with extensions "ext" from "src" to "dst" directory.
(module (function_definition (function_name_get_widths) function_name_get_widths (parameters (identifier_self) identifier_self (identifier_estimation) identifier_estimation )parameters (block (expression_statement (assignment (identifier_widths) identifier_widths (call (attribute (subscript (identifier_estimation) identifier_estimation (slice (subscript (attribute (identifier_self) identifier_self (identifier_map_offset) identifier_map_offset )attribute (integer_1) integer_1 )subscript (colon) colon (subscript (attribute (identifier_self) identifier_self (identifier_map_offset) identifier_map_offset )attribute (integer_2) integer_2 )subscript )slice )subscript (line_continuation_\) line_continuation_\ (identifier_reshape) identifier_reshape )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_K) identifier_K )attribute (integer_1) integer_1 )argument_list )call )assignment )expression_statement (return_statement (identifier_widths) identifier_widths )return_statement )block )function_definition )module
Get estimation on widths Parameters ---------- estimation : 1D arrary Either prior of posterior estimation Returns ------- fields : 2D array, in shape [K, 1] Estimation of widths
(module (function_definition (function_name_run) function_name_run (parameters (identifier_self) identifier_self (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (import_from_statement (dotted_name (identifier_subprocess) identifier_subprocess )dotted_name (dotted_name (identifier_Popen) identifier_Popen )dotted_name (dotted_name (identifier_PIPE) identifier_PIPE )dotted_name )import_from_statement (function_definition (function_name_target) function_name_target (parameters (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (try_statement (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_process) identifier_process )attribute (call (identifier_Popen) identifier_Popen (argument_list (attribute (identifier_self) identifier_self (identifier_command) identifier_command )attribute (dictionary_splat (identifier_kw) identifier_kw )dictionary_splat )argument_list )call )assignment )expression_statement (expression_statement (assignment (pattern_list (attribute (identifier_self) identifier_self (identifier_output) identifier_output )attribute (attribute (identifier_self) identifier_self (identifier_error) identifier_error )attribute )pattern_list (call (attribute (attribute (identifier_self) identifier_self (identifier_process) identifier_process )attribute (identifier_communicate) identifier_communicate )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_retcode) identifier_retcode )attribute (attribute (attribute (identifier_self) identifier_self (identifier_process) identifier_process )attribute (identifier_returncode) identifier_returncode )attribute )assignment )expression_statement )block (except_clause (block (import_statement (dotted_name (identifier_traceback) identifier_traceback )dotted_name )import_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_error) identifier_error )attribute (call (attribute (identifier_traceback) identifier_traceback (identifier_format_exc) identifier_format_exc )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_retcode) identifier_retcode )attribute (unary_operator (integer_1) integer_1 )unary_operator )assignment )expression_statement )block )except_clause )try_statement )block )function_definition (if_statement (comparison_operator (string_'stdout') string_'stdout' (identifier_kwargs) identifier_kwargs )comparison_operator (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'stdout') string_'stdout' )subscript (identifier_PIPE) identifier_PIPE )assignment )expression_statement )block )if_statement (if_statement (comparison_operator (string_'stderr') string_'stderr' (identifier_kwargs) identifier_kwargs )comparison_operator (block (expression_statement (assignment (subscript (identifier_kwargs) identifier_kwargs (string_'stderr') string_'stderr' )subscript (identifier_PIPE) identifier_PIPE )assignment )expression_statement )block )if_statement (import_statement (dotted_name (identifier_threading) identifier_threading )dotted_name )import_statement (expression_statement (assignment (identifier_thread) identifier_thread (call (attribute (identifier_threading) identifier_threading (identifier_Thread) identifier_Thread )attribute (argument_list (keyword_argument (identifier_target) identifier_target (identifier_target) identifier_target )keyword_argument (keyword_argument (identifier_kwargs) identifier_kwargs (identifier_kwargs) identifier_kwargs )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_thread) identifier_thread (identifier_start) identifier_start )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_thread) identifier_thread (identifier_join) identifier_join )attribute (argument_list (identifier_timeout) identifier_timeout )argument_list )call )expression_statement (if_statement (call (attribute (identifier_thread) identifier_thread (identifier_is_alive) identifier_is_alive )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_process) identifier_process )attribute (identifier_terminate) identifier_terminate )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_killed) identifier_killed )attribute (True) True )assignment )expression_statement (expression_statement (call (attribute (identifier_thread) identifier_thread (identifier_join) identifier_join )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (return_statement (identifier_self) identifier_self )return_statement )block )function_definition )module
Run a command in a separated thread and wait timeout seconds. kwargs are keyword arguments passed to Popen. Return: self
(module (function_definition (function_name_as_tuple) function_name_as_tuple (parameters (identifier_self) identifier_self (identifier_value) identifier_value )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_value) identifier_value (identifier_list) identifier_list )argument_list )call (block (expression_statement (assignment (identifier_value) identifier_value (call (identifier_tuple) identifier_tuple (argument_list (identifier_value) identifier_value )argument_list )call )assignment )expression_statement )block )if_statement (return_statement (identifier_value) identifier_value )return_statement )block )function_definition )module
Utility function which converts lists to tuples.
(module (function_definition (function_name_restore_app_connection) function_name_restore_app_connection (parameters (identifier_self) identifier_self (default_parameter (identifier_port) identifier_port (None) None )default_parameter )parameters (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_host_port) identifier_host_port )attribute (boolean_operator (identifier_port) identifier_port (call (attribute (identifier_utils) identifier_utils (identifier_get_available_host_port) identifier_get_available_host_port )attribute (argument_list )argument_list )call )boolean_operator )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__adb) identifier__adb )attribute (identifier_forward) identifier_forward )attribute (argument_list (list (binary_operator (string_'tcp:%d') string_'tcp:%d' (attribute (identifier_self) identifier_self (identifier_host_port) identifier_host_port )attribute )binary_operator (binary_operator (string_'tcp:%d') string_'tcp:%d' (attribute (identifier_self) identifier_self (identifier_device_port) identifier_device_port )attribute )binary_operator )list )argument_list )call )expression_statement (try_statement (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_connect) identifier_connect )attribute (argument_list )argument_list )call )expression_statement )block (except_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_log) identifier_log )attribute (identifier_exception) identifier_exception )attribute (argument_list (string_'Failed to re-connect to app.') string_'Failed to re-connect to app.' )argument_list )call )expression_statement (raise_statement (call (attribute (identifier_jsonrpc_client_base) identifier_jsonrpc_client_base (identifier_AppRestoreConnectionError) identifier_AppRestoreConnectionError )attribute (argument_list (attribute (identifier_self) identifier_self (identifier__ad) identifier__ad )attribute (binary_operator (parenthesized_expression (concatenated_string (string_'Failed to restore app connection for %s at host port %s, ') string_'Failed to restore app connection for %s at host port %s, ' (string_'device port %s') string_'device port %s' )concatenated_string )parenthesized_expression (tuple (attribute (identifier_self) identifier_self (identifier_package) identifier_package )attribute (attribute (identifier_self) identifier_self (identifier_host_port) identifier_host_port )attribute (attribute (identifier_self) identifier_self (identifier_device_port) identifier_device_port )attribute )tuple )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__proc) identifier__proc )attribute (None) None )assignment )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__restore_event_client) identifier__restore_event_client )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Restores the app after device got reconnected. Instead of creating new instance of the client: - Uses the given port (or find a new available host_port if none is given). - Tries to connect to remote server with selected port. Args: port: If given, this is the host port from which to connect to remote device port. If not provided, find a new available port as host port. Raises: AppRestoreConnectionError: When the app was not able to be started.
(module (function_definition (function_name_saelgv) function_name_saelgv (parameters (identifier_vec1) identifier_vec1 (identifier_vec2) identifier_vec2 )parameters (block (expression_statement (assignment (identifier_vec1) identifier_vec1 (call (attribute (identifier_stypes) identifier_stypes (identifier_toDoubleVector) identifier_toDoubleVector )attribute (argument_list (identifier_vec1) identifier_vec1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_vec2) identifier_vec2 (call (attribute (identifier_stypes) identifier_stypes (identifier_toDoubleVector) identifier_toDoubleVector )attribute (argument_list (identifier_vec2) identifier_vec2 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_smajor) identifier_smajor (call (attribute (identifier_stypes) identifier_stypes (identifier_emptyDoubleVector) identifier_emptyDoubleVector )attribute (argument_list (integer_3) integer_3 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_sminor) identifier_sminor (call (attribute (identifier_stypes) identifier_stypes (identifier_emptyDoubleVector) identifier_emptyDoubleVector )attribute (argument_list (integer_3) integer_3 )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_libspice) identifier_libspice (identifier_saelgv_c) identifier_saelgv_c )attribute (argument_list (identifier_vec1) identifier_vec1 (identifier_vec2) identifier_vec2 (identifier_smajor) identifier_smajor (identifier_sminor) identifier_sminor )argument_list )call )expression_statement (return_statement (expression_list (call (attribute (identifier_stypes) identifier_stypes (identifier_cVectorToPython) identifier_cVectorToPython )attribute (argument_list (identifier_smajor) identifier_smajor )argument_list )call (call (attribute (identifier_stypes) identifier_stypes (identifier_cVectorToPython) identifier_cVectorToPython )attribute (argument_list (identifier_sminor) identifier_sminor )argument_list )call )expression_list )return_statement )block )function_definition )module
Find semi-axis vectors of an ellipse generated by two arbitrary three-dimensional vectors. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/saelgv_c.html :param vec1: First vector used to generate an ellipse. :type vec1: 3-Element Array of floats :param vec2: Second vector used to generate an ellipse. :type vec2: 3-Element Array of floats :return: Semi-major axis of ellipse, Semi-minor axis of ellipse. :rtype: tuple
(module (function_definition (function_name_quaternion_rotate) function_name_quaternion_rotate (parameters (identifier_X) identifier_X (identifier_Y) identifier_Y )parameters (block (expression_statement (assignment (identifier_N) identifier_N (subscript (attribute (identifier_X) identifier_X (identifier_shape) identifier_shape )attribute (integer_0) integer_0 )subscript )assignment )expression_statement (expression_statement (assignment (identifier_W) identifier_W (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (list_comprehension (call (identifier_makeW) identifier_makeW (argument_list (list_splat (subscript (identifier_Y) identifier_Y (identifier_k) identifier_k )subscript )list_splat )argument_list )call (for_in_clause (identifier_k) identifier_k (call (identifier_range) identifier_range (argument_list (identifier_N) identifier_N )argument_list )call )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_Q) identifier_Q (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (list_comprehension (call (identifier_makeQ) identifier_makeQ (argument_list (list_splat (subscript (identifier_X) identifier_X (identifier_k) identifier_k )subscript )list_splat )argument_list )call (for_in_clause (identifier_k) identifier_k (call (identifier_range) identifier_range (argument_list (identifier_N) identifier_N )argument_list )call )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_Qt_dot_W) identifier_Qt_dot_W (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (list_comprehension (call (attribute (identifier_np) identifier_np (identifier_dot) identifier_dot )attribute (argument_list (attribute (subscript (identifier_Q) identifier_Q (identifier_k) identifier_k )subscript (identifier_T) identifier_T )attribute (subscript (identifier_W) identifier_W (identifier_k) identifier_k )subscript )argument_list )call (for_in_clause (identifier_k) identifier_k (call (identifier_range) identifier_range (argument_list (identifier_N) identifier_N )argument_list )call )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_W_minus_Q) identifier_W_minus_Q (call (attribute (identifier_np) identifier_np (identifier_asarray) identifier_asarray )attribute (argument_list (list_comprehension (binary_operator (subscript (identifier_W) identifier_W (identifier_k) identifier_k )subscript (subscript (identifier_Q) identifier_Q (identifier_k) identifier_k )subscript )binary_operator (for_in_clause (identifier_k) identifier_k (call (identifier_range) identifier_range (argument_list (identifier_N) identifier_N )argument_list )call )for_in_clause )list_comprehension )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_A) identifier_A (call (attribute (identifier_np) identifier_np (identifier_sum) identifier_sum )attribute (argument_list (identifier_Qt_dot_W) identifier_Qt_dot_W (keyword_argument (identifier_axis) identifier_axis (integer_0) integer_0 )keyword_argument )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_eigen) identifier_eigen (call (attribute (attribute (identifier_np) identifier_np (identifier_linalg) identifier_linalg )attribute (identifier_eigh) identifier_eigh )attribute (argument_list (identifier_A) identifier_A )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_r) identifier_r (subscript (subscript (identifier_eigen) identifier_eigen (integer_1) integer_1 )subscript (slice (colon) colon )slice (call (attribute (subscript (identifier_eigen) identifier_eigen (integer_0) integer_0 )subscript (identifier_argmax) identifier_argmax )attribute (argument_list )argument_list )call )subscript )assignment )expression_statement (expression_statement (assignment (identifier_rot) identifier_rot (call (identifier_quaternion_transform) identifier_quaternion_transform (argument_list (identifier_r) identifier_r )argument_list )call )assignment )expression_statement (return_statement (identifier_rot) identifier_rot )return_statement )block )function_definition )module
Calculate the rotation Parameters ---------- X : array (N,D) matrix, where N is points and D is dimension. Y: array (N,D) matrix, where N is points and D is dimension. Returns ------- rot : matrix Rotation matrix (D,D)
(module (function_definition (function_name_get_ip_address_list) function_name_get_ip_address_list (parameters (identifier_list_name) identifier_list_name )parameters (block (expression_statement (assignment (identifier_payload) identifier_payload (dictionary (pair (string_"jsonrpc") string_"jsonrpc" (string_"2.0") string_"2.0" )pair (pair (string_"id") string_"id" (string_"ID0") string_"ID0" )pair (pair (string_"method") string_"method" (string_"get_policy_ip_addresses") string_"get_policy_ip_addresses" )pair (pair (string_"params") string_"params" (list (identifier_list_name) identifier_list_name (integer_0) integer_0 (integer_256) integer_256 )list )pair )dictionary )assignment )expression_statement (expression_statement (assignment (identifier_response) identifier_response (call (subscript (identifier___proxy__) identifier___proxy__ (string_'bluecoat_sslv.call') string_'bluecoat_sslv.call' )subscript (argument_list (identifier_payload) identifier_payload (False) False )argument_list )call )assignment )expression_statement (return_statement (call (identifier__convert_to_list) identifier__convert_to_list (argument_list (identifier_response) identifier_response (string_'item_name') string_'item_name' )argument_list )call )return_statement )block )function_definition )module
Retrieves a specific IP address list. list_name(str): The name of the specific policy IP address list to retrieve. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.get_ip_address_list MyIPAddressList
(module (function_definition (function_name_datetime) function_name_datetime (parameters (identifier_self) identifier_self (default_parameter (identifier_timezone) identifier_timezone (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_timezone) identifier_timezone (None) None )comparison_operator (block (expression_statement (assignment (identifier_timezone) identifier_timezone (attribute (identifier_self) identifier_self (identifier_timezone) identifier_timezone )attribute )assignment )expression_statement )block )if_statement (return_statement (call (identifier__dtfromtimestamp) identifier__dtfromtimestamp (argument_list (binary_operator (attribute (identifier_self) identifier_self (identifier___timestamp__) identifier___timestamp__ )attribute (identifier_timezone) identifier_timezone )binary_operator )argument_list )call )return_statement )block )function_definition )module
Returns a datetime object. This object retains all information, including timezones. :param timezone = self.timezone The timezone (in seconds west of UTC) to return the value in. By default, the timezone used when constructing the class is used (local one by default). To use UTC, use timezone = 0. To use the local tz, use timezone = chronyk.LOCALTZ.
(module (function_definition (function_name_table_names) function_name_table_names (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_query) identifier_query (string_"SELECT name FROM sqlite_master WHERE type='table'") string_"SELECT name FROM sqlite_master WHERE type='table'" )assignment )expression_statement (expression_statement (assignment (identifier_cursor) identifier_cursor (call (attribute (attribute (identifier_self) identifier_self (identifier_connection) identifier_connection )attribute (identifier_execute) identifier_execute )attribute (argument_list (identifier_query) identifier_query )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_results) identifier_results (call (attribute (identifier_cursor) identifier_cursor (identifier_fetchall) identifier_fetchall )attribute (argument_list )argument_list )call )assignment )expression_statement (return_statement (list_comprehension (subscript (identifier_result_tuple) identifier_result_tuple (integer_0) integer_0 )subscript (for_in_clause (identifier_result_tuple) identifier_result_tuple (identifier_results) identifier_results )for_in_clause )list_comprehension )return_statement )block )function_definition )module
Returns names of all tables in the database
(module (function_definition (function_name_batching) function_name_batching (parameters (identifier_size) identifier_size )parameters (block (if_statement (comparison_operator (identifier_size) identifier_size (integer_1) integer_1 )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"batching() size must be at least 1") string_"batching() size must be at least 1" )argument_list )call )raise_statement )block )if_statement (function_definition (function_name_batching_transducer) function_name_batching_transducer (parameters (identifier_reducer) identifier_reducer )parameters (block (return_statement (call (identifier_Batching) identifier_Batching (argument_list (identifier_reducer) identifier_reducer (identifier_size) identifier_size )argument_list )call )return_statement )block )function_definition (return_statement (identifier_batching_transducer) identifier_batching_transducer )return_statement )block )function_definition )module
Create a transducer which produces non-overlapping batches.
(module (function_definition (function_name_allDayForDate) function_name_allDayForDate (parameters (identifier_self) identifier_self (identifier_this_date) identifier_this_date (default_parameter (identifier_timeZone) identifier_timeZone (None) None )default_parameter )parameters (block (if_statement (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_this_date) identifier_this_date (identifier_datetime) identifier_datetime )argument_list )call (block (expression_statement (assignment (identifier_d) identifier_d (call (attribute (identifier_this_date) identifier_this_date (identifier_date) identifier_date )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_d) identifier_d (identifier_this_date) identifier_this_date )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_date_start) identifier_date_start (call (identifier_datetime) identifier_datetime (argument_list (attribute (identifier_d) identifier_d (identifier_year) identifier_year )attribute (attribute (identifier_d) identifier_d (identifier_month) identifier_month )attribute (attribute (identifier_d) identifier_d (identifier_day) identifier_day )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_naive_start) identifier_naive_start (conditional_expression (attribute (identifier_self) identifier_self (identifier_startTime) identifier_startTime )attribute (call (attribute (identifier_timezone) identifier_timezone (identifier_is_naive) identifier_is_naive )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_startTime) identifier_startTime )attribute )argument_list )call (call (attribute (identifier_timezone) identifier_timezone (identifier_make_naive) identifier_make_naive )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_startTime) identifier_startTime )attribute (keyword_argument (identifier_timezone) identifier_timezone (identifier_timeZone) identifier_timeZone )keyword_argument )argument_list )call )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_naive_end) identifier_naive_end (conditional_expression (attribute (identifier_self) identifier_self (identifier_endTime) identifier_endTime )attribute (call (attribute (identifier_timezone) identifier_timezone (identifier_is_naive) identifier_is_naive )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_endTime) identifier_endTime )attribute )argument_list )call (call (attribute (identifier_timezone) identifier_timezone (identifier_make_naive) identifier_make_naive )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_endTime) identifier_endTime )attribute (keyword_argument (identifier_timezone) identifier_timezone (identifier_timeZone) identifier_timeZone )keyword_argument )argument_list )call )conditional_expression )assignment )expression_statement (return_statement (parenthesized_expression (boolean_operator (comparison_operator (identifier_naive_start) identifier_naive_start (identifier_date_start) identifier_date_start )comparison_operator (comparison_operator (identifier_naive_end) identifier_naive_end (binary_operator (identifier_date_start) identifier_date_start (call (identifier_timedelta) identifier_timedelta (argument_list (keyword_argument (identifier_days) identifier_days (integer_1) integer_1 )keyword_argument (keyword_argument (identifier_minutes) identifier_minutes (unary_operator (integer_30) integer_30 )unary_operator )keyword_argument )argument_list )call )binary_operator )comparison_operator )boolean_operator )parenthesized_expression )return_statement )block )function_definition )module
This method determines whether the occurrence lasts the entirety of a specified day in the specified time zone. If no time zone is specified, then it uses the default time zone). Also, give a grace period of a few minutes to account for issues with the way events are sometimes entered.
(module (function_definition (function_name_gen_jid) function_name_gen_jid (parameters (default_parameter (identifier_opts) identifier_opts (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_opts) identifier_opts (None) None )comparison_operator (block (expression_statement (call (attribute (attribute (attribute (identifier_salt) identifier_salt (identifier_utils) identifier_utils )attribute (identifier_versions) identifier_versions )attribute (identifier_warn_until) identifier_warn_until )attribute (argument_list (string_'Sodium') string_'Sodium' (concatenated_string (string_'The `opts` argument was not passed into salt.utils.jid.gen_jid(). ') string_'The `opts` argument was not passed into salt.utils.jid.gen_jid(). ' (string_'This will be required starting in {version}.') string_'This will be required starting in {version}.' )concatenated_string )argument_list )call )expression_statement (expression_statement (assignment (identifier_opts) identifier_opts (dictionary )dictionary )assignment )expression_statement )block )if_statement (global_statement (identifier_LAST_JID_DATETIME) identifier_LAST_JID_DATETIME )global_statement (if_statement (call (attribute (identifier_opts) identifier_opts (identifier_get) identifier_get )attribute (argument_list (string_'utc_jid') string_'utc_jid' (False) False )argument_list )call (block (expression_statement (assignment (identifier_jid_dt) identifier_jid_dt (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_utcnow) identifier_utcnow )attribute (argument_list )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_jid_dt) identifier_jid_dt (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_now) identifier_now )attribute (argument_list )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (not_operator (call (attribute (identifier_opts) identifier_opts (identifier_get) identifier_get )attribute (argument_list (string_'unique_jid') string_'unique_jid' (False) False )argument_list )call )not_operator (block (return_statement (call (attribute (string_'{0:%Y%m%d%H%M%S%f}') string_'{0:%Y%m%d%H%M%S%f}' (identifier_format) identifier_format )attribute (argument_list (identifier_jid_dt) identifier_jid_dt )argument_list )call )return_statement )block )if_statement (if_statement (boolean_operator (identifier_LAST_JID_DATETIME) identifier_LAST_JID_DATETIME (comparison_operator (identifier_LAST_JID_DATETIME) identifier_LAST_JID_DATETIME (identifier_jid_dt) identifier_jid_dt )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_jid_dt) identifier_jid_dt (binary_operator (identifier_LAST_JID_DATETIME) identifier_LAST_JID_DATETIME (call (attribute (identifier_datetime) identifier_datetime (identifier_timedelta) identifier_timedelta )attribute (argument_list (keyword_argument (identifier_microseconds) identifier_microseconds (integer_1) integer_1 )keyword_argument )argument_list )call )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (assignment (identifier_LAST_JID_DATETIME) identifier_LAST_JID_DATETIME (identifier_jid_dt) identifier_jid_dt )assignment )expression_statement (return_statement (call (attribute (string_'{0:%Y%m%d%H%M%S%f}_{1}') string_'{0:%Y%m%d%H%M%S%f}_{1}' (identifier_format) identifier_format )attribute (argument_list (identifier_jid_dt) identifier_jid_dt (call (attribute (identifier_os) identifier_os (identifier_getpid) identifier_getpid )attribute (argument_list )argument_list )call )argument_list )call )return_statement )block )function_definition )module
Generate a jid
(module (function_definition (function_name__get_indentation) function_name__get_indentation (parameters (identifier_line) identifier_line )parameters (block (if_statement (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_non_whitespace_index) identifier_non_whitespace_index (binary_operator (call (identifier_len) identifier_len (argument_list (identifier_line) identifier_line )argument_list )call (call (identifier_len) identifier_len (argument_list (call (attribute (identifier_line) identifier_line (identifier_lstrip) identifier_lstrip )attribute (argument_list )argument_list )call )argument_list )call )binary_operator )assignment )expression_statement (return_statement (subscript (identifier_line) identifier_line (slice (colon) colon (identifier_non_whitespace_index) identifier_non_whitespace_index )slice )subscript )return_statement )block (else_clause (block (return_statement (string_'') string_'' )return_statement )block )else_clause )if_statement )block )function_definition )module
Return leading whitespace.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (assignment (identifier_id) identifier_id (None) None )assignment )expression_statement (if_statement (comparison_operator (string_"id") string_"id" (identifier_kwargs) identifier_kwargs )comparison_operator (block (expression_statement (assignment (identifier_id) identifier_id (subscript (identifier_kwargs) identifier_kwargs (string_"id") string_"id" )subscript )assignment )expression_statement (delete_statement (subscript (identifier_kwargs) identifier_kwargs (string_"id") string_"id" )subscript )delete_statement )block (elif_clause (comparison_operator (string_"pk") string_"pk" (identifier_kwargs) identifier_kwargs )comparison_operator (block (expression_statement (assignment (identifier_id) identifier_id (subscript (identifier_kwargs) identifier_kwargs (string_"pk") string_"pk" )subscript )assignment )expression_statement (delete_statement (subscript (identifier_kwargs) identifier_kwargs (string_"pk") string_"pk" )subscript )delete_statement )block )elif_clause (else_clause (block (raise_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (identifier_DoesNotExist) identifier_DoesNotExist )attribute (argument_list (string_"You must provide an id to find") string_"You must provide an id to find" )argument_list )call )raise_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_es) identifier_es (call (attribute (identifier_connections) identifier_connections (identifier_get_connection) identifier_get_connection )attribute (argument_list (string_"default") string_"default" )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_doc_type) identifier_doc_type (attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (identifier_search_objects) identifier_search_objects )attribute (identifier_mapping) identifier_mapping )attribute (identifier_doc_type) identifier_doc_type )attribute )assignment )expression_statement (expression_statement (assignment (identifier_index) identifier_index (attribute (attribute (attribute (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (identifier_search_objects) identifier_search_objects )attribute (identifier_mapping) identifier_mapping )attribute (identifier_index) identifier_index )attribute )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_doc) identifier_doc (call (attribute (identifier_es) identifier_es (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_index) identifier_index (identifier_index) identifier_index )keyword_argument (keyword_argument (identifier_doc_type) identifier_doc_type (identifier_doc_type) identifier_doc_type )keyword_argument (keyword_argument (identifier_id) identifier_id (identifier_id) identifier_id )keyword_argument (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )assignment )expression_statement )block (except_clause (identifier_NotFoundError) identifier_NotFoundError (block (expression_statement (assignment (identifier_message) identifier_message (call (attribute (string_"Can't find a document for {}, using id {}") string_"Can't find a document for {}, using id {}" (identifier_format) identifier_format )attribute (argument_list (identifier_doc_type) identifier_doc_type (identifier_id) identifier_id )argument_list )call )assignment )expression_statement (raise_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_model) identifier_model )attribute (identifier_DoesNotExist) identifier_DoesNotExist )attribute (argument_list (identifier_message) identifier_message )argument_list )call )raise_statement )block )except_clause )try_statement (return_statement (call (attribute (identifier_self) identifier_self (identifier_from_es) identifier_from_es )attribute (argument_list (identifier_doc) identifier_doc )argument_list )call )return_statement )block )function_definition )module
Get a object from Elasticsearch by id
(module (function_definition (function_name_snake_to_pascal) function_name_snake_to_pascal (parameters (identifier_name) identifier_name (default_parameter (identifier_singularize) identifier_singularize (False) False )default_parameter )parameters (block (expression_statement (assignment (identifier_parts) identifier_parts (call (attribute (identifier_name) identifier_name (identifier_split) identifier_split )attribute (argument_list (string_"_") string_"_" )argument_list )call )assignment )expression_statement (if_statement (identifier_singularize) identifier_singularize (block (return_statement (call (attribute (string_"") string_"" (identifier_join) identifier_join )attribute (generator_expression (conditional_expression (call (attribute (identifier_p) identifier_p (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call (comparison_operator (identifier_p) identifier_p (identifier__ALL_CAPS) identifier__ALL_CAPS )comparison_operator (call (identifier_to_singular) identifier_to_singular (argument_list (call (attribute (identifier_p) identifier_p (identifier_title) identifier_title )attribute (argument_list )argument_list )call )argument_list )call )conditional_expression (for_in_clause (identifier_p) identifier_p (identifier_parts) identifier_parts )for_in_clause )generator_expression )call )return_statement )block (else_clause (block (return_statement (call (attribute (string_"") string_"" (identifier_join) identifier_join )attribute (generator_expression (conditional_expression (call (attribute (identifier_p) identifier_p (identifier_upper) identifier_upper )attribute (argument_list )argument_list )call (comparison_operator (identifier_p) identifier_p (identifier__ALL_CAPS) identifier__ALL_CAPS )comparison_operator (call (attribute (identifier_p) identifier_p (identifier_title) identifier_title )attribute (argument_list )argument_list )call )conditional_expression (for_in_clause (identifier_p) identifier_p (identifier_parts) identifier_parts )for_in_clause )generator_expression )call )return_statement )block )else_clause )if_statement )block )function_definition )module
Converts snake_case to PascalCase. If singularize is True, an attempt is made at singularizing each part of the resulting name.
(module (function_definition (function_name_yaml_str_join) function_name_yaml_str_join (parameters (identifier_l) identifier_l (identifier_n) identifier_n )parameters (block (import_from_statement (dotted_name (identifier_photon) identifier_photon (identifier_util) identifier_util (identifier_system) identifier_system )dotted_name (dotted_name (identifier_get_hostname) identifier_get_hostname )dotted_name (dotted_name (identifier_get_timestamp) identifier_get_timestamp )dotted_name )import_from_statement (expression_statement (assignment (identifier_s) identifier_s (call (attribute (identifier_l) identifier_l (identifier_construct_sequence) identifier_construct_sequence )attribute (argument_list (identifier_n) identifier_n )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_num) identifier_num (identifier_seq) identifier_seq )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (identifier_s) identifier_s )argument_list )call (block (if_statement (comparison_operator (identifier_seq) identifier_seq (string_'hostname') string_'hostname' )comparison_operator (block (expression_statement (assignment (subscript (identifier_s) identifier_s (identifier_num) identifier_num )subscript (binary_operator (string_'%s') string_'%s' (parenthesized_expression (call (identifier_get_hostname) identifier_get_hostname (argument_list )argument_list )call )parenthesized_expression )binary_operator )assignment )expression_statement )block (elif_clause (comparison_operator (identifier_seq) identifier_seq (string_'timestamp') string_'timestamp' )comparison_operator (block (expression_statement (assignment (subscript (identifier_s) identifier_s (identifier_num) identifier_num )subscript (binary_operator (string_'%s') string_'%s' (parenthesized_expression (call (identifier_get_timestamp) identifier_get_timestamp (argument_list )argument_list )call )parenthesized_expression )binary_operator )assignment )expression_statement )block )elif_clause )if_statement )block )for_statement (return_statement (call (attribute (string_'') string_'' (identifier_join) identifier_join )attribute (argument_list (list_comprehension (call (identifier_str) identifier_str (argument_list (identifier_i) identifier_i )argument_list )call (for_in_clause (identifier_i) identifier_i (identifier_s) identifier_s )for_in_clause )list_comprehension )argument_list )call )return_statement )block )function_definition )module
YAML loader to join strings The keywords are as following: * `hostname`: Your hostname (from :func:`util.system.get_hostname`) * `timestamp`: Current timestamp (from :func:`util.system.get_timestamp`) :returns: A `non character` joined string |yaml_loader_returns| .. note:: Be careful with timestamps when using a `config` in :ref:`settings`. .. seealso:: |yaml_loader_seealso|
(module (function_definition (function_name_ldap_login) function_name_ldap_login (parameters (identifier_self) identifier_self (identifier_username) identifier_username (identifier_password) identifier_password )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_connect) identifier_connect )attribute (argument_list )argument_list )call )expression_statement (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_config) identifier_config )attribute (identifier_get) identifier_get )attribute (argument_list (string_'USER_SEARCH') string_'USER_SEARCH' )argument_list )call (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_self) identifier_self (identifier_bind_search) identifier_bind_search )attribute (argument_list (identifier_username) identifier_username (identifier_password) identifier_password )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_result) identifier_result (call (attribute (identifier_self) identifier_self (identifier_direct_bind) identifier_direct_bind )attribute (argument_list (identifier_username) identifier_username (identifier_password) identifier_password )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Authenticate a user using ldap. This will return a userdata dict if successfull. ldap_login will return None if the user does not exist or if the credentials are invalid
(module (function_definition (function_name_prepare_spec) function_name_prepare_spec (parameters (identifier_self) identifier_self (identifier_spec) identifier_spec (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_prepare_spec_debug_flag) identifier_prepare_spec_debug_flag )attribute (argument_list (identifier_spec) identifier_spec (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier_prepare_spec_export_target_checks) identifier_prepare_spec_export_target_checks )attribute (argument_list (identifier_spec) identifier_spec (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement (expression_statement (call (attribute (identifier_spec) identifier_spec (identifier_advise) identifier_advise )attribute (argument_list (identifier_SETUP) identifier_SETUP (attribute (identifier_self) identifier_self (identifier_prepare_spec_advice_packages) identifier_prepare_spec_advice_packages )attribute (identifier_spec) identifier_spec (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )expression_statement )block )function_definition )module
Prepare a spec for usage with the generic ToolchainRuntime. Subclasses should avoid overriding this; override create_spec instead.
(module (function_definition (function_name_bures_distance) function_name_bures_distance (parameters (typed_parameter (identifier_rho0) identifier_rho0 (type (identifier_Density) identifier_Density )type )typed_parameter (typed_parameter (identifier_rho1) identifier_rho1 (type (identifier_Density) identifier_Density )type )typed_parameter )parameters (type (identifier_float) identifier_float )type (block (expression_statement (assignment (identifier_fid) identifier_fid (call (identifier_fidelity) identifier_fidelity (argument_list (identifier_rho0) identifier_rho0 (identifier_rho1) identifier_rho1 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_op0) identifier_op0 (call (identifier_asarray) identifier_asarray (argument_list (call (attribute (identifier_rho0) identifier_rho0 (identifier_asoperator) identifier_asoperator )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_op1) identifier_op1 (call (identifier_asarray) identifier_asarray (argument_list (call (attribute (identifier_rho1) identifier_rho1 (identifier_asoperator) identifier_asoperator )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tr0) identifier_tr0 (call (attribute (identifier_np) identifier_np (identifier_trace) identifier_trace )attribute (argument_list (identifier_op0) identifier_op0 )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_tr1) identifier_tr1 (call (attribute (identifier_np) identifier_np (identifier_trace) identifier_trace )attribute (argument_list (identifier_op1) identifier_op1 )argument_list )call )assignment )expression_statement (return_statement (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (binary_operator (binary_operator (identifier_tr0) identifier_tr0 (identifier_tr1) identifier_tr1 )binary_operator (binary_operator (float_2.) float_2. (call (attribute (identifier_np) identifier_np (identifier_sqrt) identifier_sqrt )attribute (argument_list (identifier_fid) identifier_fid )argument_list )call )binary_operator )binary_operator )argument_list )call )return_statement )block )function_definition )module
Return the Bures distance between mixed quantum states Note: Bures distance cannot be calculated within the tensor backend.
(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_UsageRecordInstance) identifier_UsageRecordInstance (argument_list (attribute (identifier_self) identifier_self (identifier__version) identifier__version )attribute (identifier_payload) identifier_payload (keyword_argument (identifier_sim_sid) identifier_sim_sid (subscript (attribute (identifier_self) identifier_self (identifier__solution) identifier__solution )attribute (string_'sim_sid') string_'sim_sid' )subscript )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Build an instance of UsageRecordInstance :param dict payload: Payload response from the API :returns: twilio.rest.wireless.v1.sim.usage_record.UsageRecordInstance :rtype: twilio.rest.wireless.v1.sim.usage_record.UsageRecordInstance
(module (function_definition (function_name_add_file_filters) function_name_add_file_filters (parameters (identifier_self) identifier_self (identifier_file_filters) identifier_file_filters )parameters (block (expression_statement (assignment (identifier_file_filters) identifier_file_filters (call (attribute (identifier_util) identifier_util (identifier_return_list) identifier_return_list )attribute (argument_list (identifier_file_filters) identifier_file_filters )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_file_filters) identifier_file_filters )attribute (identifier_extend) identifier_extend )attribute (argument_list (identifier_file_filters) identifier_file_filters )argument_list )call )expression_statement )block )function_definition )module
Adds `file_filters` to the internal file filters. `file_filters` can be single object or iterable.
(module (function_definition (function_name_TLV_PUT) function_name_TLV_PUT (parameters (identifier_attrs) identifier_attrs (identifier_attrNum) identifier_attrNum (identifier_format) identifier_format (identifier_value) identifier_value )parameters (block (expression_statement (assignment (identifier_attrView) identifier_attrView (subscript (identifier_attrs) identifier_attrs (identifier_attrNum) identifier_attrNum )subscript )assignment )expression_statement (if_statement (comparison_operator (identifier_format) identifier_format (string_'s') string_'s' )comparison_operator (block (expression_statement (assignment (identifier_format) identifier_format (binary_operator (call (identifier_str) identifier_str (argument_list (attribute (identifier_attrView) identifier_attrView (identifier_len) identifier_len )attribute )argument_list )call (identifier_format) identifier_format )binary_operator )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_struct) identifier_struct (identifier_pack_into) identifier_pack_into )attribute (argument_list (identifier_format) identifier_format (attribute (identifier_attrView) identifier_attrView (identifier_buf) identifier_buf )attribute (attribute (identifier_attrView) identifier_attrView (identifier_offset) identifier_offset )attribute (identifier_value) identifier_value )argument_list )call )expression_statement )block )function_definition )module
Put a tag-length-value encoded attribute.
(module (function_definition (function_name_hash_opensubtitles) function_name_hash_opensubtitles (parameters (identifier_video_path) identifier_video_path )parameters (block (expression_statement (assignment (identifier_bytesize) identifier_bytesize (call (attribute (identifier_struct) identifier_struct (identifier_calcsize) identifier_calcsize )attribute (argument_list (string_b'<q') string_b'<q' )argument_list )call )assignment )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_video_path) identifier_video_path (string_'rb') string_'rb' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_filesize) identifier_filesize (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_getsize) identifier_getsize )attribute (argument_list (identifier_video_path) identifier_video_path )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_filehash) identifier_filehash (identifier_filesize) identifier_filesize )assignment )expression_statement (if_statement (comparison_operator (identifier_filesize) identifier_filesize (binary_operator (integer_65536) integer_65536 (integer_2) integer_2 )binary_operator )comparison_operator (block (return_statement )return_statement )block )if_statement (for_statement (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (binary_operator (integer_65536) integer_65536 (identifier_bytesize) identifier_bytesize )binary_operator )argument_list )call (block (expression_statement (assignment (identifier_filebuffer) identifier_filebuffer (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list (identifier_bytesize) identifier_bytesize )argument_list )call )assignment )expression_statement (expression_statement (assignment (tuple_pattern (identifier_l_value) identifier_l_value )tuple_pattern (call (attribute (identifier_struct) identifier_struct (identifier_unpack) identifier_unpack )attribute (argument_list (string_b'<q') string_b'<q' (identifier_filebuffer) identifier_filebuffer )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_filehash) identifier_filehash (identifier_l_value) identifier_l_value )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_filehash) identifier_filehash (integer_0xFFFFFFFFFFFFFFFF) integer_0xFFFFFFFFFFFFFFFF )augmented_assignment )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_f) identifier_f (identifier_seek) identifier_seek )attribute (argument_list (call (identifier_max) identifier_max (argument_list (integer_0) integer_0 (binary_operator (identifier_filesize) identifier_filesize (integer_65536) integer_65536 )binary_operator )argument_list )call (integer_0) integer_0 )argument_list )call )expression_statement (for_statement (identifier__) identifier__ (call (identifier_range) identifier_range (argument_list (binary_operator (integer_65536) integer_65536 (identifier_bytesize) identifier_bytesize )binary_operator )argument_list )call (block (expression_statement (assignment (identifier_filebuffer) identifier_filebuffer (call (attribute (identifier_f) identifier_f (identifier_read) identifier_read )attribute (argument_list (identifier_bytesize) identifier_bytesize )argument_list )call )assignment )expression_statement (expression_statement (assignment (tuple_pattern (identifier_l_value) identifier_l_value )tuple_pattern (call (attribute (identifier_struct) identifier_struct (identifier_unpack) identifier_unpack )attribute (argument_list (string_b'<q') string_b'<q' (identifier_filebuffer) identifier_filebuffer )argument_list )call )assignment )expression_statement (expression_statement (augmented_assignment (identifier_filehash) identifier_filehash (identifier_l_value) identifier_l_value )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_filehash) identifier_filehash (integer_0xFFFFFFFFFFFFFFFF) integer_0xFFFFFFFFFFFFFFFF )augmented_assignment )expression_statement )block )for_statement )block )with_statement (expression_statement (assignment (identifier_returnedhash) identifier_returnedhash (binary_operator (string_'%016x') string_'%016x' (identifier_filehash) identifier_filehash )binary_operator )assignment )expression_statement (return_statement (identifier_returnedhash) identifier_returnedhash )return_statement )block )function_definition )module
Compute a hash using OpenSubtitles' algorithm. :param str video_path: path of the video. :return: the hash. :rtype: str
(module (function_definition (function_name__get_environ) function_name__get_environ (parameters (identifier_environ) identifier_environ )parameters (block (expression_statement (assignment (identifier_keys) identifier_keys (list (string_"SERVER_NAME") string_"SERVER_NAME" (string_"SERVER_PORT") string_"SERVER_PORT" )list )assignment )expression_statement (if_statement (call (identifier__should_send_default_pii) identifier__should_send_default_pii (argument_list )argument_list )call (block (expression_statement (augmented_assignment (identifier_keys) identifier_keys (list (string_"REMOTE_ADDR") string_"REMOTE_ADDR" (string_"HTTP_X_FORWARDED_FOR") string_"HTTP_X_FORWARDED_FOR" (string_"HTTP_X_REAL_IP") string_"HTTP_X_REAL_IP" )list )augmented_assignment )expression_statement )block )if_statement (for_statement (identifier_key) identifier_key (identifier_keys) identifier_keys (block (if_statement (comparison_operator (identifier_key) identifier_key (identifier_environ) identifier_environ )comparison_operator (block (expression_statement (yield (expression_list (identifier_key) identifier_key (subscript (identifier_environ) identifier_environ (identifier_key) identifier_key )subscript )expression_list )yield )expression_statement )block )if_statement )block )for_statement )block )function_definition )module
Returns our whitelisted environment variables.
(module (function_definition (function_name_file_name) function_name_file_name (parameters (identifier_self) identifier_self (typed_default_parameter (identifier_file_type) identifier_file_type (type (generic_type (identifier_Optional) identifier_Optional (type_parameter (type (identifier_FileType) identifier_FileType )type )type_parameter )generic_type )type (None) None )typed_default_parameter )parameters (type (identifier_str) identifier_str )type (block (expression_statement (assignment (identifier_name) identifier_name (call (attribute (attribute (identifier_self) identifier_self (identifier___text) identifier___text )attribute (identifier_word) identifier_word )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_ext) identifier_ext (call (attribute (identifier_self) identifier_self (identifier_extension) identifier_extension )attribute (argument_list (identifier_file_type) identifier_file_type )argument_list )call )assignment )expression_statement (return_statement (call (attribute (string_'{name}{ext}') string_'{name}{ext}' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_name) identifier_name (call (attribute (identifier_self) identifier_self (identifier___sub) identifier___sub )attribute (argument_list (identifier_name) identifier_name )argument_list )call )keyword_argument (keyword_argument (identifier_ext) identifier_ext (identifier_ext) identifier_ext )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Get a random file name with some extension. :param file_type: Enum object FileType :return: File name. :Example: legislative.txt
(module (function_definition (function_name_generate_dags) function_name_generate_dags (parameters (identifier_self) identifier_self (typed_parameter (identifier_globals) identifier_globals (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_dag_configs) identifier_dag_configs (type (generic_type (identifier_Dict) identifier_Dict (type_parameter (type (identifier_str) identifier_str )type (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 )type_parameter )generic_type )type (call (attribute (identifier_self) identifier_self (identifier_get_dag_configs) identifier_get_dag_configs )attribute (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_default_config) identifier_default_config (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 (call (attribute (identifier_self) identifier_self (identifier_get_default_config) identifier_get_default_config )attribute (argument_list )argument_list )call )assignment )expression_statement (for_statement (pattern_list (identifier_dag_name) identifier_dag_name (identifier_dag_config) identifier_dag_config )pattern_list (call (attribute (identifier_dag_configs) identifier_dag_configs (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (expression_statement (assignment (identifier_dag_builder) identifier_dag_builder (type (identifier_DagBuilder) identifier_DagBuilder )type (call (identifier_DagBuilder) identifier_DagBuilder (argument_list (keyword_argument (identifier_dag_name) identifier_dag_name (identifier_dag_name) identifier_dag_name )keyword_argument (keyword_argument (identifier_dag_config) identifier_dag_config (identifier_dag_config) identifier_dag_config )keyword_argument (keyword_argument (identifier_default_config) identifier_default_config (identifier_default_config) identifier_default_config )keyword_argument )argument_list )call )assignment )expression_statement (try_statement (block (expression_statement (assignment (identifier_dag) identifier_dag (type (generic_type (identifier_Dict) identifier_Dict (type_parameter (type (identifier_str) identifier_str )type (type (generic_type (identifier_Union) identifier_Union (type_parameter (type (identifier_str) identifier_str )type (type (identifier_DAG) identifier_DAG )type )type_parameter )generic_type )type )type_parameter )generic_type )type (call (attribute (identifier_dag_builder) identifier_dag_builder (identifier_build) identifier_build )attribute (argument_list )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (identifier_Exception) identifier_Exception (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_f"Failed to generate dag {dag_name}. make sure config is properly populated. err:{e}") string_f"Failed to generate dag {dag_name}. make sure config is properly populated. err:{e}" )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (subscript (identifier_globals) identifier_globals (subscript (identifier_dag) identifier_dag (string_"dag_id") string_"dag_id" )subscript )subscript (type (identifier_DAG) identifier_DAG )type (subscript (identifier_dag) identifier_dag (string_"dag") string_"dag" )subscript )assignment )expression_statement )block )for_statement )block )function_definition )module
Generates DAGs from YAML config :param globals: The globals() from the file used to generate DAGs. The dag_id must be passed into globals() for Airflow to import
(module (function_definition (function_name_cookie_name_check) function_name_cookie_name_check (parameters (identifier_cookie_name) identifier_cookie_name )parameters (block (expression_statement (assignment (identifier_cookie_match) identifier_cookie_match (call (attribute (attribute (identifier_WHTTPCookie) identifier_WHTTPCookie (identifier_cookie_name_non_compliance_re) identifier_cookie_name_non_compliance_re )attribute (identifier_match) identifier_match )attribute (argument_list (call (attribute (identifier_cookie_name) identifier_cookie_name (identifier_encode) identifier_encode )attribute (argument_list (string_'us-ascii') string_'us-ascii' )argument_list )call )argument_list )call )assignment )expression_statement (return_statement (boolean_operator (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_cookie_name) identifier_cookie_name )argument_list )call (integer_0) integer_0 )comparison_operator (comparison_operator (identifier_cookie_match) identifier_cookie_match (None) None )comparison_operator )boolean_operator )return_statement )block )function_definition )module
Check cookie name for validity. Return True if name is valid :param cookie_name: name to check :return: bool
(module (function_definition (function_name_get_tasks) function_name_get_tasks (parameters (identifier_self) identifier_self (identifier_list_id) identifier_list_id (default_parameter (identifier_completed) identifier_completed (False) False )default_parameter )parameters (block (return_statement (call (attribute (identifier_tasks_endpoint) identifier_tasks_endpoint (identifier_get_tasks) identifier_get_tasks )attribute (argument_list (identifier_self) identifier_self (identifier_list_id) identifier_list_id (keyword_argument (identifier_completed) identifier_completed (identifier_completed) identifier_completed )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Gets tasks for the list with the given ID, filtered by the given completion flag
(module (function_definition (function_name_count_mapped_reads) function_name_count_mapped_reads (parameters (identifier_self) identifier_self (identifier_file_name) identifier_file_name (identifier_paired_end) identifier_paired_end )parameters (block (if_statement (call (attribute (identifier_file_name) identifier_file_name (identifier_endswith) identifier_endswith )attribute (argument_list (string_"bam") string_"bam" )argument_list )call (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_samtools_view) identifier_samtools_view )attribute (argument_list (identifier_file_name) identifier_file_name (keyword_argument (identifier_param) identifier_param (string_"-c -F4") string_"-c -F4" )keyword_argument )argument_list )call )return_statement )block )if_statement (if_statement (call (attribute (identifier_file_name) identifier_file_name (identifier_endswith) identifier_endswith )attribute (argument_list (string_"sam") string_"sam" )argument_list )call (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_samtools_view) identifier_samtools_view )attribute (argument_list (identifier_file_name) identifier_file_name (keyword_argument (identifier_param) identifier_param (string_"-c -F4 -S") string_"-c -F4 -S" )keyword_argument )argument_list )call )return_statement )block )if_statement (return_statement (unary_operator (integer_1) integer_1 )unary_operator )return_statement )block )function_definition )module
Mapped_reads are not in fastq format, so this one doesn't need to accommodate fastq, and therefore, doesn't require a paired-end parameter because it only uses samtools view. Therefore, it's ok that it has a default parameter, since this is discarded. :param str file_name: File for which to count mapped reads. :param bool paired_end: This parameter is ignored; samtools automatically correctly responds depending on the data in the bamfile. We leave the option here just for consistency, since all the other counting functions require the parameter. This makes it easier to swap counting functions during pipeline development. :return int: Either return code from samtools view command, or -1 to indicate an error state.
(module (function_definition (function_name_remove) function_name_remove (parameters (identifier_self) identifier_self (identifier_id) identifier_id )parameters (block (expression_statement (assignment (identifier_p) identifier_p (call (attribute (identifier_Pool) identifier_Pool (identifier_get) identifier_get )attribute (argument_list (call (identifier_int) identifier_int (argument_list (identifier_id) identifier_id )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_p) identifier_p (identifier_remove) identifier_remove )attribute (argument_list )argument_list )call )expression_statement (expression_statement (call (identifier_redirect) identifier_redirect (argument_list (call (identifier_url) identifier_url (argument_list (keyword_argument (identifier_controller) identifier_controller (string_'pool') string_'pool' )keyword_argument (keyword_argument (identifier_action) identifier_action (string_'list') string_'list' )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )function_definition )module
Remove pool.
(module (function_definition (function_name__validate_partition_boundary) function_name__validate_partition_boundary (parameters (identifier_boundary) identifier_boundary )parameters (block (expression_statement (assignment (identifier_boundary) identifier_boundary (call (attribute (identifier_six) identifier_six (identifier_text_type) identifier_text_type )attribute (argument_list (identifier_boundary) identifier_boundary )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_match) identifier_match (call (attribute (identifier_re) identifier_re (identifier_search) identifier_search )attribute (argument_list (string_r'^([\d.]+)(\D*)$') string_r'^([\d.]+)(\D*)$' (identifier_boundary) identifier_boundary )argument_list )call )assignment )expression_statement (if_statement (identifier_match) identifier_match (block (expression_statement (assignment (identifier_unit) identifier_unit (call (attribute (identifier_match) identifier_match (identifier_group) identifier_group )attribute (argument_list (integer_2) integer_2 )argument_list )call )assignment )expression_statement (if_statement (boolean_operator (not_operator (identifier_unit) identifier_unit )not_operator (comparison_operator (identifier_unit) identifier_unit (identifier_VALID_UNITS) identifier_VALID_UNITS )comparison_operator )boolean_operator (block (return_statement )return_statement )block )if_statement )block )if_statement (raise_statement (call (identifier_CommandExecutionError) identifier_CommandExecutionError (argument_list (call (attribute (string_'Invalid partition boundary passed: "{0}"') string_'Invalid partition boundary passed: "{0}"' (identifier_format) identifier_format )attribute (argument_list (identifier_boundary) identifier_boundary )argument_list )call )argument_list )call )raise_statement )block )function_definition )module
Ensure valid partition boundaries are supplied.
(module (function_definition (function_name_systemd) function_name_systemd (parameters (identifier_service) identifier_service (default_parameter (identifier_start) identifier_start (True) True )default_parameter (default_parameter (identifier_enabled) identifier_enabled (True) True )default_parameter (default_parameter (identifier_unmask) identifier_unmask (False) False )default_parameter (default_parameter (identifier_restart) identifier_restart (False) False )default_parameter )parameters (block (with_statement (with_clause (with_item (call (identifier_settings) identifier_settings (argument_list (call (identifier_hide) identifier_hide (argument_list (string_'warnings') string_'warnings' (string_'running') string_'running' (string_'stdout') string_'stdout' (string_'stderr') string_'stderr' )argument_list )call (keyword_argument (identifier_warn_only) identifier_warn_only (True) True )keyword_argument (keyword_argument (identifier_capture) identifier_capture (True) True )keyword_argument )argument_list )call )with_item )with_clause (block (if_statement (identifier_restart) identifier_restart (block (expression_statement (call (identifier_sudo) identifier_sudo (argument_list (binary_operator (string_'systemctl restart %s') string_'systemctl restart %s' (identifier_service) identifier_service )binary_operator )argument_list )call )expression_statement )block (else_clause (block (if_statement (identifier_start) identifier_start (block (expression_statement (call (identifier_sudo) identifier_sudo (argument_list (binary_operator (string_'systemctl start %s') string_'systemctl start %s' (identifier_service) identifier_service )binary_operator )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_sudo) identifier_sudo (argument_list (binary_operator (string_'systemctl stop %s') string_'systemctl stop %s' (identifier_service) identifier_service )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement )block )else_clause )if_statement (if_statement (identifier_enabled) identifier_enabled (block (expression_statement (call (identifier_sudo) identifier_sudo (argument_list (binary_operator (string_'systemctl enable %s') string_'systemctl enable %s' (identifier_service) identifier_service )binary_operator )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (identifier_sudo) identifier_sudo (argument_list (binary_operator (string_'systemctl disable %s') string_'systemctl disable %s' (identifier_service) identifier_service )binary_operator )argument_list )call )expression_statement )block )else_clause )if_statement (if_statement (identifier_unmask) identifier_unmask (block (expression_statement (call (identifier_sudo) identifier_sudo (argument_list (binary_operator (string_'systemctl unmask %s') string_'systemctl unmask %s' (identifier_service) identifier_service )binary_operator )argument_list )call )expression_statement )block )if_statement )block )with_statement )block )function_definition )module
manipulates systemd services
(module (function_definition (function_name_get_filename) function_name_get_filename (parameters (identifier_self) identifier_self (default_parameter (identifier_renew) identifier_renew (False) False )default_parameter )parameters (block (if_statement (boolean_operator (comparison_operator (attribute (identifier_self) identifier_self (identifier__fname) identifier__fname )attribute (None) None )comparison_operator (identifier_renew) identifier_renew )boolean_operator (block (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier__fname) identifier__fname )attribute (binary_operator (string_'%s.%s') string_'%s.%s' (tuple (attribute (identifier_self) identifier_self (identifier__id) identifier__id )attribute (attribute (identifier_self) identifier_self (identifier__format) identifier__format )attribute )tuple )binary_operator )assignment )expression_statement )block )if_statement (return_statement (attribute (identifier_self) identifier_self (identifier__fname) identifier__fname )attribute )return_statement )block )function_definition )module
Get the filename of this content. If the file name doesn't already exist, we created it as {id}.{format}.
(module (function_definition (function_name_copyfile) function_name_copyfile (parameters (identifier_source) identifier_source (identifier_destination) identifier_destination (default_parameter (identifier_force) identifier_force (True) True )default_parameter )parameters (block (if_statement (boolean_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_exists) identifier_exists )attribute (argument_list (identifier_destination) identifier_destination )argument_list )call (comparison_operator (identifier_force) identifier_force (True) True )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_os) identifier_os (identifier_remove) identifier_remove )attribute (argument_list (identifier_destination) identifier_destination )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_shutil) identifier_shutil (identifier_copyfile) identifier_copyfile )attribute (argument_list (identifier_source) identifier_source (identifier_destination) identifier_destination )argument_list )call )expression_statement (return_statement (identifier_destination) identifier_destination )return_statement )block )function_definition )module
copy a file from a source to its destination.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_self) identifier_self (identifier_key) identifier_key )parameters (block (expression_statement (assignment (identifier_o) identifier_o (call (subscript (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_key) identifier_key )subscript (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_o) identifier_o (None) None )comparison_operator (block (delete_statement (subscript (attribute (identifier_self) identifier_self (identifier_data) identifier_data )attribute (identifier_key) identifier_key )subscript )delete_statement (raise_statement (call (identifier_CacheFault) identifier_CacheFault (argument_list (binary_operator (string_"FinalizingCache has %r but its value is no more.") string_"FinalizingCache has %r but its value is no more." (tuple (identifier_key) identifier_key )tuple )binary_operator )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (identifier_log) identifier_log (identifier_msg) identifier_msg )attribute (argument_list (keyword_argument (identifier_interface) identifier_interface (attribute (identifier_iaxiom) identifier_iaxiom (identifier_IStatEvent) identifier_IStatEvent )attribute )keyword_argument (keyword_argument (identifier_stat_cache_hits) identifier_stat_cache_hits (integer_1) integer_1 )keyword_argument (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument )argument_list )call )expression_statement (return_statement (identifier_o) identifier_o )return_statement )block )function_definition )module
Get an entry from the cache by key. @raise KeyError: if the given key is not present in the cache. @raise CacheFault: (a L{KeyError} subclass) if the given key is present in the cache, but the value it points to is gone.
(module (function_definition (function_name_copy) function_name_copy (parameters (typed_parameter (identifier_copy_entry) identifier_copy_entry (type (identifier_FILE_COPY_ENTRY) identifier_FILE_COPY_ENTRY )type )typed_parameter )parameters (block (expression_statement (assignment (identifier_source_path) identifier_source_path (call (attribute (attribute (identifier_environ) identifier_environ (identifier_paths) identifier_paths )attribute (identifier_clean) identifier_clean )attribute (argument_list (attribute (identifier_copy_entry) identifier_copy_entry (identifier_source) identifier_source )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_output_path) identifier_output_path (call (attribute (attribute (identifier_environ) identifier_environ (identifier_paths) identifier_paths )attribute (identifier_clean) identifier_clean )attribute (argument_list (attribute (identifier_copy_entry) identifier_copy_entry (identifier_destination) identifier_destination )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_copier) identifier_copier (conditional_expression (attribute (identifier_shutil) identifier_shutil (identifier_copy2) identifier_copy2 )attribute (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (identifier_source_path) identifier_source_path )argument_list )call (attribute (identifier_shutil) identifier_shutil (identifier_copytree) identifier_copytree )attribute )conditional_expression )assignment )expression_statement (expression_statement (call (identifier_make_output_directory) identifier_make_output_directory (argument_list (identifier_output_path) identifier_output_path )argument_list )call )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (integer_3) integer_3 )argument_list )call (block (try_statement (block (expression_statement (call (identifier_copier) identifier_copier (argument_list (identifier_source_path) identifier_source_path (identifier_output_path) identifier_output_path )argument_list )call )expression_statement (return_statement )return_statement )block (except_clause (identifier_Exception) identifier_Exception (block (expression_statement (call (attribute (identifier_time) identifier_time (identifier_sleep) identifier_sleep )attribute (argument_list (float_0.5) float_0.5 )argument_list )call )expression_statement )block )except_clause )try_statement )block )for_statement (raise_statement (call (identifier_IOError) identifier_IOError (argument_list (call (attribute (string_'Unable to copy "{source}" to "{destination}"') string_'Unable to copy "{source}" to "{destination}"' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_source) identifier_source (identifier_source_path) identifier_source_path )keyword_argument (keyword_argument (identifier_destination) identifier_destination (identifier_output_path) identifier_output_path )keyword_argument )argument_list )call )argument_list )call )raise_statement )block )function_definition )module
Copies the specified file from its source location to its destination location.
(module (function_definition (function_name_find_base_path_and_format) function_name_find_base_path_and_format (parameters (identifier_main_path) identifier_main_path (identifier_formats) identifier_formats )parameters (block (for_statement (identifier_fmt) identifier_fmt (identifier_formats) identifier_formats (block (try_statement (block (return_statement (expression_list (call (identifier_base_path) identifier_base_path (argument_list (identifier_main_path) identifier_main_path (identifier_fmt) identifier_fmt )argument_list )call (identifier_fmt) identifier_fmt )expression_list )return_statement )block (except_clause (identifier_InconsistentPath) identifier_InconsistentPath (block (continue_statement )continue_statement )block )except_clause )try_statement )block )for_statement (raise_statement (call (identifier_InconsistentPath) identifier_InconsistentPath (argument_list (call (attribute (concatenated_string (string_u"Path '{}' matches none of the export formats. ") string_u"Path '{}' matches none of the export formats. " (string_"Please make sure that jupytext.formats covers the current file ") string_"Please make sure that jupytext.formats covers the current file " (string_"(e.g. add '{}' to the export formats)") string_"(e.g. add '{}' to the export formats)" )concatenated_string (identifier_format) identifier_format )attribute (argument_list (identifier_main_path) identifier_main_path (subscript (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (identifier_main_path) identifier_main_path )argument_list )call (integer_1) integer_1 )subscript (slice (integer_1) integer_1 (colon) colon )slice )subscript )argument_list )call )argument_list )call )raise_statement )block )function_definition )module
Return the base path and the format corresponding to the given path
(module (function_definition (function_name_from_list) function_name_from_list (parameters (identifier_cls) identifier_cls (identifier_terms_list) identifier_terms_list (default_parameter (identifier_coefficient) identifier_coefficient (float_1.0) float_1.0 )default_parameter )parameters (block (if_statement (not_operator (call (identifier_all) identifier_all (argument_list (list_comprehension (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_op) identifier_op (identifier_tuple) identifier_tuple )argument_list )call (for_in_clause (identifier_op) identifier_op (identifier_terms_list) identifier_terms_list )for_in_clause )list_comprehension )argument_list )call )not_operator (block (raise_statement (call (identifier_TypeError) identifier_TypeError (argument_list (concatenated_string (string_"The type of terms_list should be a list of (name, index) ") string_"The type of terms_list should be a list of (name, index) " (string_"tuples suitable for PauliTerm().") string_"tuples suitable for PauliTerm()." )concatenated_string )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_pterm) identifier_pterm (call (identifier_PauliTerm) identifier_PauliTerm (argument_list (string_"I") string_"I" (integer_0) integer_0 )argument_list )call )assignment )expression_statement (assert_statement (call (identifier_all) identifier_all (argument_list (list_comprehension (comparison_operator (subscript (identifier_op) identifier_op (integer_0) integer_0 )subscript (identifier_PAULI_OPS) identifier_PAULI_OPS )comparison_operator (for_in_clause (identifier_op) identifier_op (identifier_terms_list) identifier_terms_list )for_in_clause )list_comprehension )argument_list )call )assert_statement (expression_statement (assignment (identifier_indices) identifier_indices (list_comprehension (subscript (identifier_op) identifier_op (integer_1) integer_1 )subscript (for_in_clause (identifier_op) identifier_op (identifier_terms_list) identifier_terms_list )for_in_clause )list_comprehension )assignment )expression_statement (assert_statement (call (identifier_all) identifier_all (generator_expression (call (identifier__valid_qubit) identifier__valid_qubit (argument_list (identifier_index) identifier_index )argument_list )call (for_in_clause (identifier_index) identifier_index (identifier_indices) identifier_indices )for_in_clause )generator_expression )call )assert_statement (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (call (identifier_set) identifier_set (argument_list (identifier_indices) identifier_indices )argument_list )call )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_indices) identifier_indices )argument_list )call )comparison_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_"Elements of PauliTerm that are allocated using from_list must ") string_"Elements of PauliTerm that are allocated using from_list must " (string_"be on disjoint qubits. Use PauliTerm multiplication to simplify ") string_"be on disjoint qubits. Use PauliTerm multiplication to simplify " (string_"terms instead.") string_"terms instead." )concatenated_string )argument_list )call )raise_statement )block )if_statement (for_statement (pattern_list (identifier_op) identifier_op (identifier_index) identifier_index )pattern_list (identifier_terms_list) identifier_terms_list (block (if_statement (comparison_operator (identifier_op) identifier_op (string_"I") string_"I" )comparison_operator (block (expression_statement (assignment (subscript (attribute (identifier_pterm) identifier_pterm (identifier__ops) identifier__ops )attribute (identifier_index) identifier_index )subscript (identifier_op) identifier_op )assignment )expression_statement )block )if_statement )block )for_statement (if_statement (not_operator (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_coefficient) identifier_coefficient (identifier_Number) identifier_Number )argument_list )call )not_operator (block (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (string_"coefficient of PauliTerm must be a Number.") string_"coefficient of PauliTerm must be a Number." )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (attribute (identifier_pterm) identifier_pterm (identifier_coefficient) identifier_coefficient )attribute (call (identifier_complex) identifier_complex (argument_list (identifier_coefficient) identifier_coefficient )argument_list )call )assignment )expression_statement (return_statement (identifier_pterm) identifier_pterm )return_statement )block )function_definition )module
Allocates a Pauli Term from a list of operators and indices. This is more efficient than multiplying together individual terms. :param list terms_list: A list of tuples, e.g. [("X", 0), ("Y", 1)] :return: PauliTerm
(module (function_definition (function_name_drawPoints) function_name_drawPoints (parameters (identifier_self) identifier_self (identifier_pointPen) identifier_pointPen (default_parameter (identifier_filterRedundantPoints) identifier_filterRedundantPoints (False) False )default_parameter )parameters (block (if_statement (identifier_filterRedundantPoints) identifier_filterRedundantPoints (block (expression_statement (assignment (identifier_pointPen) identifier_pointPen (call (identifier_FilterRedundantPointPen) identifier_FilterRedundantPointPen (argument_list (identifier_pointPen) identifier_pointPen )argument_list )call )assignment )expression_statement )block )if_statement (for_statement (identifier_contour) identifier_contour (attribute (identifier_self) identifier_self (identifier_contours) identifier_contours )attribute (block (expression_statement (call (attribute (identifier_pointPen) identifier_pointPen (identifier_beginPath) identifier_beginPath )attribute (argument_list (keyword_argument (identifier_identifier) identifier_identifier (subscript (identifier_contour) identifier_contour (string_"identifier") string_"identifier" )subscript )keyword_argument )argument_list )call )expression_statement (for_statement (pattern_list (identifier_segmentType) identifier_segmentType (identifier_pt) identifier_pt (identifier_smooth) identifier_smooth (identifier_name) identifier_name (identifier_identifier) identifier_identifier )pattern_list (subscript (identifier_contour) identifier_contour (string_"points") string_"points" )subscript (block (expression_statement (call (attribute (identifier_pointPen) identifier_pointPen (identifier_addPoint) identifier_addPoint )attribute (argument_list (keyword_argument (identifier_pt) identifier_pt (identifier_pt) identifier_pt )keyword_argument (keyword_argument (identifier_segmentType) identifier_segmentType (identifier_segmentType) identifier_segmentType )keyword_argument (keyword_argument (identifier_smooth) identifier_smooth (identifier_smooth) identifier_smooth )keyword_argument (keyword_argument (identifier_name) identifier_name (identifier_name) identifier_name )keyword_argument (keyword_argument (identifier_identifier) identifier_identifier (identifier_identifier) identifier_identifier )keyword_argument )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_pointPen) identifier_pointPen (identifier_endPath) identifier_endPath )attribute (argument_list )argument_list )call )expression_statement )block )for_statement (for_statement (identifier_component) identifier_component (attribute (identifier_self) identifier_self (identifier_components) identifier_components )attribute (block (expression_statement (call (attribute (identifier_pointPen) identifier_pointPen (identifier_addComponent) identifier_addComponent )attribute (argument_list (subscript (identifier_component) identifier_component (string_"baseGlyph") string_"baseGlyph" )subscript (subscript (identifier_component) identifier_component (string_"transformation") string_"transformation" )subscript (keyword_argument (identifier_identifier) identifier_identifier (subscript (identifier_component) identifier_component (string_"identifier") string_"identifier" )subscript )keyword_argument )argument_list )call )expression_statement )block )for_statement )block )function_definition )module
draw self using pointPen
(module (function_definition (function_name_petl) function_name_petl (parameters (identifier_self) identifier_self (list_splat_pattern (identifier_args) identifier_args )list_splat_pattern (dictionary_splat_pattern (identifier_kwargs) identifier_kwargs )dictionary_splat_pattern )parameters (block (import_statement (dotted_name (identifier_petl) identifier_petl )dotted_name )import_statement (expression_statement (assignment (identifier_t) identifier_t (call (attribute (call (attribute (attribute (identifier_self) identifier_self (identifier_resolved_url) identifier_resolved_url )attribute (identifier_get_resource) identifier_get_resource )attribute (argument_list )argument_list )call (identifier_get_target) identifier_get_target )attribute (argument_list )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_t) identifier_t (identifier_target_format) identifier_target_format )attribute (string_'txt') string_'txt' )comparison_operator (block (return_statement (call (attribute (identifier_petl) identifier_petl (identifier_fromtext) identifier_fromtext )attribute (argument_list (call (identifier_str) identifier_str (argument_list (attribute (identifier_t) identifier_t (identifier_fspath) identifier_fspath )attribute )argument_list )call (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block (elif_clause (comparison_operator (attribute (identifier_t) identifier_t (identifier_target_format) identifier_target_format )attribute (string_'csv') string_'csv' )comparison_operator (block (return_statement (call (attribute (identifier_petl) identifier_petl (identifier_fromcsv) identifier_fromcsv )attribute (argument_list (call (identifier_str) identifier_str (argument_list (attribute (identifier_t) identifier_t (identifier_fspath) identifier_fspath )attribute )argument_list )call (list_splat (identifier_args) identifier_args )list_splat (dictionary_splat (identifier_kwargs) identifier_kwargs )dictionary_splat )argument_list )call )return_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_Exception) identifier_Exception (argument_list (string_"Can't handle") string_"Can't handle" )argument_list )call )raise_statement )block )else_clause )if_statement )block )function_definition )module
Return a PETL source object
(module (function_definition (function_name_from_Z) function_name_from_Z (parameters (typed_parameter (identifier_z) identifier_z (type (identifier_int) identifier_int )type )typed_parameter )parameters (block (for_statement (pattern_list (identifier_sym) identifier_sym (identifier_data) identifier_data )pattern_list (call (attribute (identifier__pt_data) identifier__pt_data (identifier_items) identifier_items )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (subscript (identifier_data) identifier_data (string_"Atomic no") string_"Atomic no" )subscript (identifier_z) identifier_z )comparison_operator (block (return_statement (call (identifier_Element) identifier_Element (argument_list (identifier_sym) identifier_sym )argument_list )call )return_statement )block )if_statement )block )for_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (binary_operator (string_"No element with this atomic number %s") string_"No element with this atomic number %s" (identifier_z) identifier_z )binary_operator )argument_list )call )raise_statement )block )function_definition )module
Get an element from an atomic number. Args: z (int): Atomic number Returns: Element with atomic number z.
(module (function_definition (function_name_dotproduct) function_name_dotproduct (parameters (identifier_a) identifier_a (identifier_b) identifier_b )parameters (block (expression_statement (string_"Calculates the dotproduct between two vecors") string_"Calculates the dotproduct between two vecors" )expression_statement (assert_statement (parenthesized_expression (comparison_operator (call (identifier_len) identifier_len (argument_list (identifier_a) identifier_a )argument_list )call (call (identifier_len) identifier_len (argument_list (identifier_b) identifier_b )argument_list )call )comparison_operator )parenthesized_expression )assert_statement (expression_statement (assignment (identifier_out) identifier_out (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_i) identifier_i (call (identifier_range) identifier_range (argument_list (call (identifier_len) identifier_len (argument_list (identifier_a) identifier_a )argument_list )call )argument_list )call (block (expression_statement (augmented_assignment (identifier_out) identifier_out (binary_operator (subscript (identifier_a) identifier_a (identifier_i) identifier_i )subscript (subscript (identifier_b) identifier_b (identifier_i) identifier_i )subscript )binary_operator )augmented_assignment )expression_statement )block )for_statement (return_statement (identifier_out) identifier_out )return_statement )block )function_definition )module
Calculates the dotproduct between two vecors
(module (function_definition (function_name_getVariable) function_name_getVariable (parameters (identifier_self) identifier_self (identifier_name) identifier_name )parameters (block (return_statement (call (identifier_lock_and_call) identifier_lock_and_call (argument_list (lambda (call (identifier_Variable) identifier_Variable (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier__impl) identifier__impl )attribute (identifier_getVariable) identifier_getVariable )attribute (argument_list (identifier_name) identifier_name )argument_list )call )argument_list )call )lambda (attribute (identifier_self) identifier_self (identifier__lock) identifier__lock )attribute )argument_list )call )return_statement )block )function_definition )module
Get the variable with the corresponding name. Args: name: Name of the variable to be found. Raises: TypeError: if the specified variable does not exist.
(module (function_definition (function_name__parse_directory) function_name__parse_directory (parameters (identifier_self) identifier_self )parameters (block (if_statement (call (attribute (attribute (identifier_self) identifier_self (identifier__parser) identifier__parser )attribute (identifier_has_option) identifier_has_option )attribute (argument_list (string_'storage') string_'storage' (string_'directory') string_'directory' )argument_list )call (block (expression_statement (assignment (identifier_directory) identifier_directory (call (attribute (attribute (identifier_self) identifier_self (identifier__parser) identifier__parser )attribute (identifier_get) identifier_get )attribute (argument_list (string_'storage') string_'storage' (string_'directory') string_'directory' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_directory) identifier_directory (identifier_CUSTOM_APPS_DIR) identifier_CUSTOM_APPS_DIR )comparison_operator (block (raise_statement (call (identifier_ConfigError) identifier_ConfigError (argument_list (call (attribute (string_"{} cannot be used as a storage directory.") string_"{} cannot be used as a storage directory." (identifier_format) identifier_format )attribute (argument_list (identifier_CUSTOM_APPS_DIR) identifier_CUSTOM_APPS_DIR )argument_list )call )argument_list )call )raise_statement )block )if_statement )block (else_clause (block (expression_statement (assignment (identifier_directory) identifier_directory (identifier_MACKUP_BACKUP_PATH) identifier_MACKUP_BACKUP_PATH )assignment )expression_statement )block )else_clause )if_statement (return_statement (call (identifier_str) identifier_str (argument_list (identifier_directory) identifier_directory )argument_list )call )return_statement )block )function_definition )module
Parse the storage directory in the config. Returns: str
(module (function_definition (function_name_names) function_name_names (parameters (identifier_cls) identifier_cls )parameters (block (if_statement (not_operator (attribute (identifier_cls) identifier_cls (identifier__files) identifier__files )attribute )not_operator (block (for_statement (identifier_f) identifier_f (call (attribute (identifier_os) identifier_os (identifier_listdir) identifier_listdir )attribute (argument_list (attribute (identifier_cls) identifier_cls (identifier__image_path) identifier__image_path )attribute )argument_list )call (block (if_statement (parenthesized_expression (boolean_operator (not_operator (call (attribute (identifier_f) identifier_f (identifier_startswith) identifier_startswith )attribute (argument_list (string_'.') string_'.' )argument_list )call )not_operator (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_isfile) identifier_isfile )attribute (argument_list (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_join) identifier_join )attribute (argument_list (attribute (identifier_cls) identifier_cls (identifier__image_path) identifier__image_path )attribute (identifier_f) identifier_f )argument_list )call )argument_list )call )boolean_operator )parenthesized_expression (block (expression_statement (call (attribute (attribute (identifier_cls) identifier_cls (identifier__files) identifier__files )attribute (identifier_append) identifier_append )attribute (argument_list (subscript (call (attribute (attribute (identifier_os) identifier_os (identifier_path) identifier_path )attribute (identifier_splitext) identifier_splitext )attribute (argument_list (identifier_f) identifier_f )argument_list )call (integer_0) integer_0 )subscript )argument_list )call )expression_statement )block )if_statement )block )for_statement )block )if_statement (return_statement (attribute (identifier_cls) identifier_cls (identifier__files) identifier__files )attribute )return_statement )block )function_definition )module
A list of all emoji names without file extension.
(module (function_definition (function_name__base_placeholder) function_name__base_placeholder (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_notes_master) identifier_notes_master (attribute (attribute (identifier_self) identifier_self (identifier_part) identifier_part )attribute (identifier_notes_master) identifier_notes_master )attribute )assignment )expression_statement (expression_statement (assignment (identifier_ph_type) identifier_ph_type (attribute (attribute (identifier_self) identifier_self (identifier_element) identifier_element )attribute (identifier_ph_type) identifier_ph_type )attribute )assignment )expression_statement (return_statement (call (attribute (attribute (identifier_notes_master) identifier_notes_master (identifier_placeholders) identifier_placeholders )attribute (identifier_get) identifier_get )attribute (argument_list (keyword_argument (identifier_ph_type) identifier_ph_type (identifier_ph_type) identifier_ph_type )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return the notes master placeholder this notes slide placeholder inherits from, or |None| if no placeholder of the matching type is present.
(module (function_definition (function_name_cost) function_name_cost (parameters (identifier_self) identifier_self (identifier_i) identifier_i (identifier_j) identifier_j )parameters (block (return_statement (call (identifier_dist) identifier_dist (argument_list (subscript (subscript (attribute (identifier_self) identifier_self (identifier_endpoints) identifier_endpoints )attribute (identifier_i) identifier_i )subscript (integer_1) integer_1 )subscript (subscript (subscript (attribute (identifier_self) identifier_self (identifier_endpoints) identifier_endpoints )attribute (identifier_j) identifier_j )subscript (integer_0) integer_0 )subscript )argument_list )call )return_statement )block )function_definition )module
Returns the distance between the end of path i and the start of path j.
(module (function_definition (function_name_set_last_component_continued) function_name_set_last_component_continued (parameters (identifier_self) identifier_self )parameters (block (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier__initialized) identifier__initialized )attribute )not_operator (block (raise_statement (call (attribute (identifier_pycdlibexception) identifier_pycdlibexception (identifier_PyCdlibInternalError) identifier_PyCdlibInternalError )attribute (argument_list (string_'SL record not yet initialized!') string_'SL record not yet initialized!' )argument_list )call )raise_statement )block )if_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_symlink_components) identifier_symlink_components )attribute )not_operator (block (raise_statement (call (attribute (identifier_pycdlibexception) identifier_pycdlibexception (identifier_PyCdlibInternalError) identifier_PyCdlibInternalError )attribute (argument_list (string_'Trying to set continued on a non-existent component!') string_'Trying to set continued on a non-existent component!' )argument_list )call )raise_statement )block )if_statement (expression_statement (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_symlink_components) identifier_symlink_components )attribute (unary_operator (integer_1) integer_1 )unary_operator )subscript (identifier_set_continued) identifier_set_continued )attribute (argument_list )argument_list )call )expression_statement )block )function_definition )module
Set the previous component of this SL record to continued. Parameters: None. Returns: Nothing.
(module (function_definition (function_name__get_bank_keys_redis_key) function_name__get_bank_keys_redis_key (parameters (identifier_bank) identifier_bank )parameters (block (expression_statement (assignment (identifier_opts) identifier_opts (call (identifier__get_redis_keys_opts) identifier__get_redis_keys_opts (argument_list )argument_list )call )assignment )expression_statement (return_statement (call (attribute (string_'{prefix}{separator}{bank}') string_'{prefix}{separator}{bank}' (identifier_format) identifier_format )attribute (argument_list (keyword_argument (identifier_prefix) identifier_prefix (subscript (identifier_opts) identifier_opts (string_'bank_keys_prefix') string_'bank_keys_prefix' )subscript )keyword_argument (keyword_argument (identifier_separator) identifier_separator (subscript (identifier_opts) identifier_opts (string_'separator') string_'separator' )subscript )keyword_argument (keyword_argument (identifier_bank) identifier_bank (identifier_bank) identifier_bank )keyword_argument )argument_list )call )return_statement )block )function_definition )module
Return the Redis key for the SET of keys under a certain bank, given the bank name.
(module (function_definition (function_name_selection_paste_data_gen) function_name_selection_paste_data_gen (parameters (identifier_self) identifier_self (identifier_selection) identifier_selection (identifier_data) identifier_data (default_parameter (identifier_freq) identifier_freq (None) None )default_parameter )parameters (block (expression_statement (assignment (pattern_list (tuple_pattern (identifier_bb_top) identifier_bb_top (identifier_bb_left) identifier_bb_left )tuple_pattern (tuple_pattern (identifier_bb_bottom) identifier_bb_bottom (identifier_bb_right) identifier_bb_right )tuple_pattern )pattern_list (line_continuation_\) line_continuation_\ (call (attribute (identifier_selection) identifier_selection (identifier_get_grid_bbox) identifier_get_grid_bbox )attribute (argument_list (attribute (attribute (attribute (identifier_self) identifier_self (identifier_grid) identifier_grid )attribute (identifier_code_array) identifier_code_array )attribute (identifier_shape) identifier_shape )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_bbox_height) identifier_bbox_height (binary_operator (binary_operator (identifier_bb_bottom) identifier_bb_bottom (identifier_bb_top) identifier_bb_top )binary_operator (integer_1) integer_1 )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_bbox_width) identifier_bbox_width (binary_operator (binary_operator (identifier_bb_right) identifier_bb_right (identifier_bb_left) identifier_bb_left )binary_operator (integer_1) integer_1 )binary_operator )assignment )expression_statement (for_statement (pattern_list (identifier_row) identifier_row (identifier_row_data) identifier_row_data )pattern_list (call (identifier_enumerate) identifier_enumerate (argument_list (call (attribute (identifier_itertools) identifier_itertools (identifier_cycle) identifier_cycle )attribute (argument_list (identifier_data) identifier_data )argument_list )call )argument_list )call (block (if_statement (comparison_operator (identifier_row) identifier_row (identifier_bbox_height) identifier_bbox_height )comparison_operator (block (break_statement )break_statement )block )if_statement (expression_statement (assignment (identifier_row_data) identifier_row_data (call (identifier_list) identifier_list (argument_list (identifier_row_data) identifier_row_data )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_duplicated_row_data) identifier_duplicated_row_data (binary_operator (identifier_row_data) identifier_row_data (parenthesized_expression (binary_operator (binary_operator (identifier_bbox_width) identifier_bbox_width (call (identifier_len) identifier_len (argument_list (identifier_row_data) identifier_row_data )argument_list )call )binary_operator (integer_1) integer_1 )binary_operator )parenthesized_expression )binary_operator )assignment )expression_statement (expression_statement (assignment (identifier_duplicated_row_data) identifier_duplicated_row_data (subscript (identifier_duplicated_row_data) identifier_duplicated_row_data (slice (colon) colon (identifier_bbox_width) identifier_bbox_width )slice )subscript )assignment )expression_statement (for_statement (identifier_col) identifier_col (call (identifier_xrange) identifier_xrange (argument_list (call (identifier_len) identifier_len (argument_list (identifier_duplicated_row_data) identifier_duplicated_row_data )argument_list )call )argument_list )call (block (if_statement (comparison_operator (tuple (identifier_bb_top) identifier_bb_top (binary_operator (identifier_bb_left) identifier_bb_left (identifier_col) identifier_col )binary_operator )tuple (identifier_selection) identifier_selection )comparison_operator (block (expression_statement (assignment (subscript (identifier_duplicated_row_data) identifier_duplicated_row_data (identifier_col) identifier_col )subscript (None) None )assignment )expression_statement )block )if_statement )block )for_statement (expression_statement (yield (identifier_duplicated_row_data) identifier_duplicated_row_data )yield )expression_statement )block )for_statement )block )function_definition )module
Generator that yields data for selection paste
(module (function_definition (function_name_remove_additional_model) function_name_remove_additional_model (parameters (identifier_self) identifier_self (identifier_model_list_or_dict) identifier_model_list_or_dict (identifier_core_objects_dict) identifier_core_objects_dict (identifier_model_name) identifier_model_name (identifier_model_key) identifier_model_key (default_parameter (identifier_destroy) identifier_destroy (True) True )default_parameter )parameters (block (if_statement (comparison_operator (identifier_model_name) identifier_model_name (string_"income") string_"income" )comparison_operator (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_income) identifier_income )attribute (identifier_prepare_destruction) identifier_prepare_destruction )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (attribute (identifier_self) identifier_self (identifier_income) identifier_income )attribute (None) None )assignment )expression_statement (return_statement )return_statement )block )if_statement (for_statement (identifier_model_or_key) identifier_model_or_key (identifier_model_list_or_dict) identifier_model_list_or_dict (block (expression_statement (assignment (identifier_model) identifier_model (conditional_expression (identifier_model_or_key) identifier_model_or_key (comparison_operator (identifier_model_key) identifier_model_key (None) None )comparison_operator (subscript (identifier_model_list_or_dict) identifier_model_list_or_dict (identifier_model_or_key) identifier_model_or_key )subscript )conditional_expression )assignment )expression_statement (expression_statement (assignment (identifier_found) identifier_found (False) False )assignment )expression_statement (for_statement (identifier_core_object) identifier_core_object (call (attribute (identifier_core_objects_dict) identifier_core_objects_dict (identifier_values) identifier_values )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_core_object) identifier_core_object (call (identifier_getattr) identifier_getattr (argument_list (identifier_model) identifier_model (identifier_model_name) identifier_model_name )argument_list )call )comparison_operator (block (expression_statement (assignment (identifier_found) identifier_found (True) True )assignment )expression_statement (break_statement )break_statement )block )if_statement )block )for_statement (if_statement (not_operator (identifier_found) identifier_found )not_operator (block (if_statement (comparison_operator (identifier_model_key) identifier_model_key (None) None )comparison_operator (block (if_statement (identifier_destroy) identifier_destroy (block (expression_statement (call (attribute (identifier_model) identifier_model (identifier_prepare_destruction) identifier_prepare_destruction )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_model_list_or_dict) identifier_model_list_or_dict (identifier_remove) identifier_remove )attribute (argument_list (identifier_model) identifier_model )argument_list )call )expression_statement )block (else_clause (block (if_statement (identifier_destroy) identifier_destroy (block (expression_statement (call (attribute (subscript (identifier_model_list_or_dict) identifier_model_list_or_dict (identifier_model_or_key) identifier_model_or_key )subscript (identifier_prepare_destruction) identifier_prepare_destruction )attribute (argument_list )argument_list )call )expression_statement )block )if_statement (delete_statement (subscript (identifier_model_list_or_dict) identifier_model_list_or_dict (identifier_model_or_key) identifier_model_or_key )subscript )delete_statement )block )else_clause )if_statement (return_statement )return_statement )block )if_statement )block )for_statement )block )function_definition )module
Remove one unnecessary model The method will search for the first model-object out of model_list_or_dict that represents no core-object in the dictionary of core-objects handed by core_objects_dict, remove it and return without continue to search for more model-objects which maybe are unnecessary, too. :param model_list_or_dict: could be a list or dictionary of one model type :param core_objects_dict: dictionary of one type of core-elements (rafcon.core) :param model_name: prop_name for the core-element hold by the model, this core-element is covered by the model :param model_key: if model_list_or_dict is a dictionary the key is the id of the respective element (e.g. 'state_id') :return:
(module (function_definition (function_name_getHeadingLevel) function_name_getHeadingLevel (parameters (identifier_ts) identifier_ts (default_parameter (identifier_hierarchy) identifier_hierarchy (identifier_default_hierarchy) identifier_default_hierarchy )default_parameter )parameters (block (try_statement (block (return_statement (binary_operator (call (attribute (identifier_hierarchy) identifier_hierarchy (identifier_index) identifier_index )attribute (argument_list (attribute (identifier_ts) identifier_ts (identifier_name) identifier_name )attribute )argument_list )call (integer_1) integer_1 )binary_operator )return_statement )block (except_clause (identifier_ValueError) identifier_ValueError (block (if_statement (call (attribute (attribute (identifier_ts) identifier_ts (identifier_name) identifier_name )attribute (identifier_endswith) identifier_endswith )attribute (argument_list (string_'section') string_'section' )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_i) identifier_i (identifier_name) identifier_name )pattern_list (expression_list (integer_0) integer_0 (attribute (identifier_ts) identifier_ts (identifier_name) identifier_name )attribute )expression_list )assignment )expression_statement (while_statement (call (attribute (identifier_name) identifier_name (identifier_startswith) identifier_startswith )attribute (argument_list (string_'sub') string_'sub' )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_name) identifier_name (identifier_i) identifier_i )pattern_list (expression_list (subscript (identifier_name) identifier_name (slice (integer_3) integer_3 (colon) colon )slice )subscript (binary_operator (identifier_i) identifier_i (integer_1) integer_1 )binary_operator )expression_list )assignment )expression_statement )block )while_statement (if_statement (comparison_operator (identifier_name) identifier_name (string_'section') string_'section' )comparison_operator (block (return_statement (binary_operator (identifier_i) identifier_i (integer_2) integer_2 )binary_operator )return_statement )block )if_statement )block )if_statement (return_statement (call (identifier_float) identifier_float (argument_list (string_'inf') string_'inf' )argument_list )call )return_statement )block )except_clause (except_clause (tuple (identifier_AttributeError) identifier_AttributeError (identifier_TypeError) identifier_TypeError )tuple (block (return_statement (call (identifier_float) identifier_float (argument_list (string_'inf') string_'inf' )argument_list )call )return_statement )block )except_clause )try_statement )block )function_definition )module
Extract heading level for a particular Tex element, given a specified hierarchy. >>> ts = TexSoup(r'\section{Hello}').section >>> TOC.getHeadingLevel(ts) 2 >>> ts2 = TexSoup(r'\chapter{hello again}').chapter >>> TOC.getHeadingLevel(ts2) 1 >>> ts3 = TexSoup(r'\subsubsubsubsection{Hello}').subsubsubsubsection >>> TOC.getHeadingLevel(ts3) 6
(module (function_definition (function_name_write_document) function_name_write_document (parameters (identifier_doc) identifier_doc (identifier_fnm) identifier_fnm )parameters (block (with_statement (with_clause (with_item (as_pattern (call (attribute (identifier_codecs) identifier_codecs (identifier_open) identifier_open )attribute (argument_list (identifier_fnm) identifier_fnm (string_'wb') string_'wb' (string_'ascii') string_'ascii' )argument_list )call (as_pattern_target (identifier_f) identifier_f )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_f) identifier_f (identifier_write) identifier_write )attribute (argument_list (call (attribute (identifier_json) identifier_json (identifier_dumps) identifier_dumps )attribute (argument_list (identifier_doc) identifier_doc (keyword_argument (identifier_indent) identifier_indent (integer_2) integer_2 )keyword_argument )argument_list )call )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Write a Text document to file. Parameters ---------- doc: Text The document to save. fnm: str The filename to save the document
(module (function_definition (function_name_waypoint_count_send) function_name_waypoint_count_send (parameters (identifier_self) identifier_self (identifier_seq) identifier_seq )parameters (block (if_statement (call (attribute (identifier_self) identifier_self (identifier_mavlink10) identifier_mavlink10 )attribute (argument_list )argument_list )call (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_mav) identifier_mav )attribute (identifier_mission_count_send) identifier_mission_count_send )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_target_system) identifier_target_system )attribute (attribute (identifier_self) identifier_self (identifier_target_component) identifier_target_component )attribute (identifier_seq) identifier_seq )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (attribute (identifier_self) identifier_self (identifier_mav) identifier_mav )attribute (identifier_waypoint_count_send) identifier_waypoint_count_send )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_target_system) identifier_target_system )attribute (attribute (identifier_self) identifier_self (identifier_target_component) identifier_target_component )attribute (identifier_seq) identifier_seq )argument_list )call )expression_statement )block )else_clause )if_statement )block )function_definition )module
wrapper for waypoint_count_send
(module (function_definition (function_name_has_signature) function_name_has_signature (parameters (identifier_body) identifier_body (identifier_sender) identifier_sender )parameters (block (expression_statement (assignment (identifier_non_empty) identifier_non_empty (list_comprehension (identifier_line) identifier_line (for_in_clause (identifier_line) identifier_line (call (attribute (identifier_body) identifier_body (identifier_splitlines) identifier_splitlines )attribute (argument_list )argument_list )call )for_in_clause (if_clause (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )if_clause )list_comprehension )assignment )expression_statement (expression_statement (assignment (identifier_candidate) identifier_candidate (subscript (identifier_non_empty) identifier_non_empty (slice (unary_operator (identifier_SIGNATURE_MAX_LINES) identifier_SIGNATURE_MAX_LINES )unary_operator (colon) colon )slice )subscript )assignment )expression_statement (expression_statement (assignment (identifier_upvotes) identifier_upvotes (integer_0) integer_0 )assignment )expression_statement (for_statement (identifier_line) identifier_line (identifier_candidate) identifier_candidate (block (if_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (call (attribute (identifier_line) identifier_line (identifier_strip) identifier_strip )attribute (argument_list )argument_list )call )argument_list )call (integer_27) integer_27 )comparison_operator (block (continue_statement )continue_statement )block (elif_clause (call (call (identifier_contains_sender_names) identifier_contains_sender_names (argument_list (identifier_sender) identifier_sender )argument_list )call (argument_list (identifier_line) identifier_line )argument_list )call (block (return_statement (True) True )return_statement )block )elif_clause (elif_clause (parenthesized_expression (comparison_operator (binary_operator (binary_operator (call (call (identifier_binary_regex_search) identifier_binary_regex_search (argument_list (identifier_RE_RELAX_PHONE) identifier_RE_RELAX_PHONE )argument_list )call (argument_list (identifier_line) identifier_line )argument_list )call (call (call (identifier_binary_regex_search) identifier_binary_regex_search (argument_list (identifier_RE_EMAIL) identifier_RE_EMAIL )argument_list )call (argument_list (identifier_line) identifier_line )argument_list )call )binary_operator (call (call (identifier_binary_regex_search) identifier_binary_regex_search (argument_list (identifier_RE_URL) identifier_RE_URL )argument_list )call (argument_list (identifier_line) identifier_line )argument_list )call )binary_operator (integer_1) integer_1 )comparison_operator )parenthesized_expression (block (expression_statement (augmented_assignment (identifier_upvotes) identifier_upvotes (integer_1) integer_1 )augmented_assignment )expression_statement )block )elif_clause )if_statement )block )for_statement (if_statement (comparison_operator (identifier_upvotes) identifier_upvotes (integer_1) integer_1 )comparison_operator (block (return_statement (True) True )return_statement )block )if_statement )block )function_definition )module
Checks if the body has signature. Returns True or False.
(module (function_definition (function_name_process_route_spec_config) function_name_process_route_spec_config (parameters (identifier_con) identifier_con (identifier_vpc_info) identifier_vpc_info (identifier_route_spec) identifier_route_spec (identifier_failed_ips) identifier_failed_ips (identifier_questionable_ips) identifier_questionable_ips )parameters (block (if_statement (attribute (identifier_CURRENT_STATE) identifier_CURRENT_STATE (identifier__stop_all) identifier__stop_all )attribute (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (string_"Routespec processing. Stop requested, abort operation") string_"Routespec processing. Stop requested, abort operation" )argument_list )call )expression_statement (return_statement )return_statement )block )if_statement (if_statement (identifier_failed_ips) identifier_failed_ips (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (binary_operator (string_"Route spec processing. Failed IPs: %s") string_"Route spec processing. Failed IPs: %s" (call (attribute (string_",") string_"," (identifier_join) identifier_join )attribute (argument_list (identifier_failed_ips) identifier_failed_ips )argument_list )call )binary_operator )argument_list )call )expression_statement )block (else_clause (block (expression_statement (call (attribute (identifier_logging) identifier_logging (identifier_debug) identifier_debug )attribute (argument_list (string_"Route spec processing. No failed IPs.") string_"Route spec processing. No failed IPs." )argument_list )call )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_routes_in_rts) identifier_routes_in_rts (dictionary )dictionary )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_CURRENT_STATE) identifier_CURRENT_STATE (identifier_vpc_state) identifier_vpc_state )attribute (identifier_setdefault) identifier_setdefault )attribute (argument_list (string_"time") string_"time" (call (attribute (call (attribute (attribute (identifier_datetime) identifier_datetime (identifier_datetime) identifier_datetime )attribute (identifier_now) identifier_now )attribute (argument_list )argument_list )call (identifier_isoformat) identifier_isoformat )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_chosen_routers) identifier_chosen_routers (call (identifier__update_existing_routes) identifier__update_existing_routes (argument_list (identifier_route_spec) identifier_route_spec (identifier_failed_ips) identifier_failed_ips (identifier_questionable_ips) identifier_questionable_ips (identifier_vpc_info) identifier_vpc_info (identifier_con) identifier_con (identifier_routes_in_rts) identifier_routes_in_rts )argument_list )call )assignment )expression_statement (expression_statement (call (identifier__add_missing_routes) identifier__add_missing_routes (argument_list (identifier_route_spec) identifier_route_spec (identifier_failed_ips) identifier_failed_ips (identifier_questionable_ips) identifier_questionable_ips (identifier_chosen_routers) identifier_chosen_routers (identifier_vpc_info) identifier_vpc_info (identifier_con) identifier_con (identifier_routes_in_rts) identifier_routes_in_rts )argument_list )call )expression_statement )block )function_definition )module
Look through the route spec and update routes accordingly. Idea: Make sure we have a route for each CIDR. If we have a route to any of the IP addresses for a given CIDR then we are good. Otherwise, pick one (usually the first) IP and create a route to that IP. If a route points at a failed or questionable IP then a new candidate is chosen, if possible.
(module (function_definition (function_name_iterscrapers) function_name_iterscrapers (parameters (identifier_self) identifier_self (identifier_method) identifier_method (default_parameter (identifier_mode) identifier_mode (None) None )default_parameter )parameters (block (global_statement (identifier_discovered) identifier_discovered )global_statement (if_statement (boolean_operator (call (attribute (identifier_discovered) identifier_discovered (identifier_has_key) identifier_has_key )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_language) identifier_language )attribute )argument_list )call (call (attribute (subscript (identifier_discovered) identifier_discovered (attribute (identifier_self) identifier_self (identifier_language) identifier_language )attribute )subscript (identifier_has_key) identifier_has_key )attribute (argument_list (identifier_method) identifier_method )argument_list )call )boolean_operator (block (for_statement (identifier_Scraper) identifier_Scraper (subscript (subscript (identifier_discovered) identifier_discovered (attribute (identifier_self) identifier_self (identifier_language) identifier_language )attribute )subscript (identifier_method) identifier_method )subscript (block (expression_statement (yield (identifier_Scraper) identifier_Scraper )yield )expression_statement )block )for_statement )block )if_statement )block )function_definition )module
Iterates over all available scrapers.
(module (function_definition (function_name_get_valid_build_systems) function_name_get_valid_build_systems (parameters (identifier_working_dir) identifier_working_dir (default_parameter (identifier_package) identifier_package (None) None )default_parameter )parameters (block (import_from_statement (dotted_name (identifier_rez) identifier_rez (identifier_plugin_managers) identifier_plugin_managers )dotted_name (dotted_name (identifier_plugin_manager) identifier_plugin_manager )dotted_name )import_from_statement (import_from_statement (dotted_name (identifier_rez) identifier_rez (identifier_exceptions) identifier_exceptions )dotted_name (dotted_name (identifier_PackageMetadataError) identifier_PackageMetadataError )dotted_name )import_from_statement (try_statement (block (expression_statement (assignment (identifier_package) identifier_package (boolean_operator (identifier_package) identifier_package (call (identifier_get_developer_package) identifier_get_developer_package (argument_list (identifier_working_dir) identifier_working_dir )argument_list )call )boolean_operator )assignment )expression_statement )block (except_clause (identifier_PackageMetadataError) identifier_PackageMetadataError (block (pass_statement )pass_statement )block )except_clause )try_statement (if_statement (identifier_package) identifier_package (block (if_statement (comparison_operator (call (identifier_getattr) identifier_getattr (argument_list (identifier_package) identifier_package (string_"build_command") string_"build_command" (None) None )argument_list )call (None) None )comparison_operator (block (expression_statement (assignment (identifier_buildsys_name) identifier_buildsys_name (string_"custom") string_"custom" )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_buildsys_name) identifier_buildsys_name (call (identifier_getattr) identifier_getattr (argument_list (identifier_package) identifier_package (string_"build_system") string_"build_system" (None) None )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (if_statement (identifier_buildsys_name) identifier_buildsys_name (block (expression_statement (assignment (identifier_cls) identifier_cls (call (attribute (identifier_plugin_manager) identifier_plugin_manager (identifier_get_plugin_class) identifier_get_plugin_class )attribute (argument_list (string_'build_system') string_'build_system' (identifier_buildsys_name) identifier_buildsys_name )argument_list )call )assignment )expression_statement (return_statement (list (identifier_cls) identifier_cls )list )return_statement )block )if_statement )block )if_statement (expression_statement (assignment (identifier_clss) identifier_clss (list )list )assignment )expression_statement (for_statement (identifier_buildsys_name) identifier_buildsys_name (call (identifier_get_buildsys_types) identifier_get_buildsys_types (argument_list )argument_list )call (block (expression_statement (assignment (identifier_cls) identifier_cls (call (attribute (identifier_plugin_manager) identifier_plugin_manager (identifier_get_plugin_class) identifier_get_plugin_class )attribute (argument_list (string_'build_system') string_'build_system' (identifier_buildsys_name) identifier_buildsys_name )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_cls) identifier_cls (identifier_is_valid_root) identifier_is_valid_root )attribute (argument_list (identifier_working_dir) identifier_working_dir (keyword_argument (identifier_package) identifier_package (identifier_package) identifier_package )keyword_argument )argument_list )call (block (expression_statement (call (attribute (identifier_clss) identifier_clss (identifier_append) identifier_append )attribute (argument_list (identifier_cls) identifier_cls )argument_list )call )expression_statement )block )if_statement )block )for_statement (expression_statement (assignment (identifier_child_clss) identifier_child_clss (call (identifier_set) identifier_set (generator_expression (call (attribute (identifier_x) identifier_x (identifier_child_build_system) identifier_child_build_system )attribute (argument_list )argument_list )call (for_in_clause (identifier_x) identifier_x (identifier_clss) identifier_clss )for_in_clause )generator_expression )call )assignment )expression_statement (expression_statement (assignment (identifier_clss) identifier_clss (call (identifier_list) identifier_list (argument_list (binary_operator (call (identifier_set) identifier_set (argument_list (identifier_clss) identifier_clss )argument_list )call (identifier_child_clss) identifier_child_clss )binary_operator )argument_list )call )assignment )expression_statement (return_statement (identifier_clss) identifier_clss )return_statement )block )function_definition )module
Returns the build system classes that could build the source in given dir. Args: working_dir (str): Dir containing the package definition and potentially build files. package (`Package`): Package to be built. This may or may not be needed to determine the build system. For eg, cmake just has to look for a CMakeLists.txt file, whereas the 'build_command' package field must be present for the 'custom' build system type. Returns: List of class: Valid build system class types.
(module (function_definition (function_name_make_type) function_name_make_type (parameters (identifier_cls) identifier_cls (identifier_basename) identifier_basename (identifier_cardinality) identifier_cardinality )parameters (block (if_statement (comparison_operator (identifier_cardinality) identifier_cardinality (attribute (identifier_Cardinality) identifier_Cardinality (identifier_one) identifier_one )attribute )comparison_operator (block (return_statement (identifier_basename) identifier_basename )return_statement )block )if_statement (expression_statement (assignment (identifier_type_name) identifier_type_name (binary_operator (string_"%s%s") string_"%s%s" (tuple (identifier_basename) identifier_basename (subscript (attribute (identifier_cls) identifier_cls (identifier_to_char_map) identifier_to_char_map )attribute (identifier_cardinality) identifier_cardinality )subscript )tuple )binary_operator )assignment )expression_statement (return_statement (identifier_type_name) identifier_type_name )return_statement )block )function_definition )module
Build new type name according to CardinalityField naming scheme. :param basename: Type basename of primary type (as string). :param cardinality: Cardinality of the new type (as Cardinality item). :return: Type name with CardinalityField suffix (if needed)
(module (function_definition (function_name_load_file) function_name_load_file (parameters (identifier_self) identifier_self (identifier_cursor) identifier_cursor (identifier_target) identifier_target (identifier_fname) identifier_fname (identifier_options) identifier_options )parameters (block (expression_statement (string_"Parses and loads a single file into the target table.") string_"Parses and loads a single file into the target table." )expression_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_fname) identifier_fname )argument_list )call (as_pattern_target (identifier_fin) identifier_fin )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_debug) identifier_debug )attribute (argument_list (call (attribute (string_"opening {0} in {1} load_file") string_"opening {0} in {1} load_file" (identifier_format) identifier_format )attribute (argument_list (identifier_fname) identifier_fname (identifier___name__) identifier___name__ )argument_list )call )argument_list )call )expression_statement (expression_statement (assignment (identifier_encoding) identifier_encoding (call (attribute (identifier_options) identifier_options (identifier_get) identifier_get )attribute (argument_list (string_'encoding') string_'encoding' (string_'utf-8') string_'utf-8' )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (identifier_target) identifier_target (attribute (identifier_self) identifier_self (identifier_processors) identifier_processors )attribute )comparison_operator (block (expression_statement (assignment (identifier_reader) identifier_reader (call (subscript (attribute (identifier_self) identifier_self (identifier_processors) identifier_processors )attribute (identifier_target) identifier_target )subscript (argument_list (identifier_fin) identifier_fin (keyword_argument (identifier_encoding) identifier_encoding (identifier_encoding) identifier_encoding )keyword_argument )argument_list )call )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_reader) identifier_reader (call (attribute (identifier_self) identifier_self (identifier_default_processor) identifier_default_processor )attribute (argument_list (identifier_fin) identifier_fin (keyword_argument (identifier_encoding) identifier_encoding (identifier_encoding) identifier_encoding )keyword_argument )argument_list )call )assignment )expression_statement )block )else_clause )if_statement (expression_statement (assignment (identifier_columns) identifier_columns (call (identifier_getattr) identifier_getattr (argument_list (identifier_reader) identifier_reader (string_'output_columns') string_'output_columns' (None) None )argument_list )call )assignment )expression_statement (for_statement (identifier__) identifier__ (call (identifier_xrange) identifier_xrange (argument_list (call (identifier_int) identifier_int (argument_list (call (attribute (identifier_options) identifier_options (identifier_get) identifier_get )attribute (argument_list (string_'skip-lines') string_'skip-lines' (integer_0) integer_0 )argument_list )call )argument_list )call )argument_list )call (block (expression_statement (call (attribute (identifier_fin) identifier_fin (identifier_readline) identifier_readline )attribute (argument_list )argument_list )call )expression_statement )block )for_statement (expression_statement (call (attribute (identifier_cursor) identifier_cursor (identifier_copy_from) identifier_copy_from )attribute (argument_list (identifier_reader) identifier_reader (subscript (attribute (identifier_self) identifier_self (identifier_qualified_names) identifier_qualified_names )attribute (identifier_target) identifier_target )subscript (keyword_argument (identifier_columns) identifier_columns (identifier_columns) identifier_columns )keyword_argument )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Parses and loads a single file into the target table.
(module (function_definition (function_name_get) function_name_get (parameters (identifier_filename) identifier_filename (default_parameter (identifier_ignore_fields) identifier_ignore_fields (None) None )default_parameter )parameters (block (if_statement (comparison_operator (identifier_ignore_fields) identifier_ignore_fields (None) None )comparison_operator (block (expression_statement (assignment (identifier_ignore_fields) identifier_ignore_fields (list )list )assignment )expression_statement )block )if_statement (with_statement (with_clause (with_item (as_pattern (call (identifier_open) identifier_open (argument_list (identifier_filename) identifier_filename (string_'r') string_'r' )argument_list )call (as_pattern_target (identifier_fh) identifier_fh )as_pattern_target )as_pattern )with_item )with_clause (block (expression_statement (assignment (identifier_bibtex) identifier_bibtex (call (attribute (identifier_bibtexparser) identifier_bibtexparser (identifier_load) identifier_load )attribute (argument_list (identifier_fh) identifier_fh )argument_list )call )assignment )expression_statement )block )with_statement (expression_statement (assignment (attribute (identifier_bibtex) identifier_bibtex (identifier_entries) identifier_entries )attribute (list_comprehension (dictionary_comprehension (pair (identifier_k) identifier_k (subscript (identifier_entry) identifier_entry (identifier_k) identifier_k )subscript )pair (for_in_clause (identifier_k) identifier_k (identifier_entry) identifier_entry )for_in_clause (if_clause (comparison_operator (identifier_k) identifier_k (identifier_ignore_fields) identifier_ignore_fields )comparison_operator )if_clause )dictionary_comprehension (for_in_clause (identifier_entry) identifier_entry (attribute (identifier_bibtex) identifier_bibtex (identifier_entries) identifier_entries )attribute )for_in_clause )list_comprehension )assignment )expression_statement (return_statement (identifier_bibtex) identifier_bibtex )return_statement )block )function_definition )module
Get all entries from a BibTeX file. :param filename: The name of the BibTeX file. :param ignore_fields: An optional list of fields to strip from the BibTeX \ file. :returns: A ``bibtexparser.BibDatabase`` object representing the fetched \ entries.
(module (function_definition (function_name__antisymm_12) function_name__antisymm_12 (parameters (identifier_C) identifier_C )parameters (block (expression_statement (assignment (identifier_nans) identifier_nans (call (attribute (identifier_np) identifier_np (identifier_isnan) identifier_isnan )attribute (argument_list (identifier_C) identifier_C )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (identifier_C) identifier_C (identifier_nans) identifier_nans )subscript (unary_operator (subscript (call (attribute (identifier_np) identifier_np (identifier_einsum) identifier_einsum )attribute (argument_list (string_'jikl') string_'jikl' (identifier_C) identifier_C )argument_list )call (identifier_nans) identifier_nans )subscript )unary_operator )assignment )expression_statement (return_statement (identifier_C) identifier_C )return_statement )block )function_definition )module
To get rid of NaNs produced by _scalar2array, antisymmetrize the first two indices of operators where C_ijkl = -C_jikl
(module (function_definition (function_name_reset) function_name_reset (parameters )parameters (block (global_statement (identifier__handlers) identifier__handlers (identifier_python_signal) identifier_python_signal )global_statement (for_statement (pattern_list (identifier_sig) identifier_sig (tuple_pattern (identifier_previous) identifier_previous (identifier__) identifier__ )tuple_pattern )pattern_list (call (attribute (identifier__handlers) identifier__handlers (identifier_iteritems) identifier_iteritems )attribute (argument_list )argument_list )call (block (if_statement (not_operator (identifier_previous) identifier_previous )not_operator (block (expression_statement (assignment (identifier_previous) identifier_previous (identifier_SIG_DFL) identifier_SIG_DFL )assignment )expression_statement )block )if_statement (expression_statement (call (attribute (identifier_python_signal) identifier_python_signal (identifier_signal) identifier_signal )attribute (argument_list (identifier_sig) identifier_sig (identifier_previous) identifier_previous )argument_list )call )expression_statement )block )for_statement (expression_statement (assignment (identifier__handlers) identifier__handlers (call (identifier_dict) identifier_dict (argument_list )argument_list )call )assignment )expression_statement )block )function_definition )module
Clear global data and remove the handlers. CAUSION! This method sets as a signal handlers the ones which it has noticed on initialization time. If there has been another handler installed on top of us it will get removed by this method call.
(module (function_definition (function_name_start_serving) function_name_start_serving (parameters (identifier_self) identifier_self (default_parameter (identifier_address) identifier_address (None) None )default_parameter (default_parameter (identifier_sockets) identifier_sockets (None) None )default_parameter (dictionary_splat_pattern (identifier_kw) identifier_kw )dictionary_splat_pattern )parameters (block (if_statement (attribute (identifier_self) identifier_self (identifier__server) identifier__server )attribute (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_'Already serving') string_'Already serving' )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_server) identifier_server (call (identifier_DGServer) identifier_DGServer (argument_list (attribute (identifier_self) identifier_self (identifier__loop) identifier__loop )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_loop) identifier_loop (attribute (identifier_self) identifier_self (identifier__loop) identifier__loop )attribute )assignment )expression_statement (if_statement (identifier_sockets) identifier_sockets (block (for_statement (identifier_sock) identifier_sock (identifier_sockets) identifier_sockets (block (expression_statement (assignment (pattern_list (identifier_transport) identifier_transport (identifier__) identifier__ )pattern_list (await (call (attribute (identifier_loop) identifier_loop (identifier_create_datagram_endpoint) identifier_create_datagram_endpoint )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_create_protocol) identifier_create_protocol )attribute (keyword_argument (identifier_sock) identifier_sock (identifier_sock) identifier_sock )keyword_argument )argument_list )call )await )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_server) identifier_server (identifier_transports) identifier_transports )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_transport) identifier_transport )argument_list )call )expression_statement )block )for_statement )block (elif_clause (call (identifier_isinstance) identifier_isinstance (argument_list (identifier_address) identifier_address (identifier_tuple) identifier_tuple )argument_list )call (block (expression_statement (assignment (pattern_list (identifier_transport) identifier_transport (identifier__) identifier__ )pattern_list (await (call (attribute (identifier_loop) identifier_loop (identifier_create_datagram_endpoint) identifier_create_datagram_endpoint )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_create_protocol) identifier_create_protocol )attribute (keyword_argument (identifier_local_addr) identifier_local_addr (identifier_address) identifier_address )keyword_argument )argument_list )call )await )assignment )expression_statement (expression_statement (call (attribute (attribute (identifier_server) identifier_server (identifier_transports) identifier_transports )attribute (identifier_append) identifier_append )attribute (argument_list (identifier_transport) identifier_transport )argument_list )call )expression_statement )block )elif_clause (else_clause (block (raise_statement (call (identifier_RuntimeError) identifier_RuntimeError (argument_list (string_'sockets or address must be supplied') string_'sockets or address must be supplied' )argument_list )call )raise_statement )block )else_clause )if_statement (expression_statement (call (attribute (identifier_self) identifier_self (identifier__set_server) identifier__set_server )attribute (argument_list (identifier_server) identifier_server )argument_list )call )expression_statement )block )function_definition )module
create the server endpoint.
(module (function_definition (function_name_record_corrected_value) function_name_record_corrected_value (parameters (identifier_self) identifier_self (identifier_value) identifier_value (identifier_expected_interval) identifier_expected_interval (default_parameter (identifier_count) identifier_count (integer_1) integer_1 )default_parameter )parameters (block (while_statement (True) True (block (if_statement (not_operator (call (attribute (identifier_self) identifier_self (identifier_record_value) identifier_record_value )attribute (argument_list (identifier_value) identifier_value (identifier_count) identifier_count )argument_list )call )not_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (boolean_operator (comparison_operator (identifier_value) identifier_value (identifier_expected_interval) identifier_expected_interval )comparison_operator (comparison_operator (identifier_expected_interval) identifier_expected_interval (integer_0) integer_0 )comparison_operator )boolean_operator (block (return_statement (True) True )return_statement )block )if_statement (expression_statement (augmented_assignment (identifier_value) identifier_value (identifier_expected_interval) identifier_expected_interval )augmented_assignment )expression_statement )block )while_statement )block )function_definition )module
Record a new value into the histogram and correct for coordinated omission if needed Args: value: the value to record (must be in the valid range) expected_interval: the expected interval between 2 value samples count: incremental count (defaults to 1)
(module (function_definition (function_name_ParseYAMLAuthorizationsList) function_name_ParseYAMLAuthorizationsList (parameters (identifier_yaml_data) identifier_yaml_data )parameters (block (try_statement (block (expression_statement (assignment (identifier_raw_list) identifier_raw_list (call (attribute (identifier_yaml) identifier_yaml (identifier_ParseMany) identifier_ParseMany )attribute (argument_list (identifier_yaml_data) identifier_yaml_data )argument_list )call )assignment )expression_statement )block (except_clause (as_pattern (tuple (identifier_ValueError) identifier_ValueError (attribute (identifier_pyyaml) identifier_pyyaml (identifier_YAMLError) identifier_YAMLError )attribute )tuple (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (raise_statement (call (identifier_InvalidAPIAuthorization) identifier_InvalidAPIAuthorization (argument_list (binary_operator (string_"Invalid YAML: %s") string_"Invalid YAML: %s" (identifier_e) identifier_e )binary_operator )argument_list )call )raise_statement )block )except_clause )try_statement (expression_statement (assignment (identifier_result) identifier_result (list )list )assignment )expression_statement (for_statement (identifier_auth_src) identifier_auth_src (identifier_raw_list) identifier_raw_list (block (expression_statement (assignment (identifier_auth) identifier_auth (call (identifier_APIAuthorization) identifier_APIAuthorization (argument_list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_auth) identifier_auth (identifier_router_cls) identifier_router_cls )attribute (call (identifier__GetRouterClass) identifier__GetRouterClass (argument_list (subscript (identifier_auth_src) identifier_auth_src (string_"router") string_"router" )subscript )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_auth) identifier_auth (identifier_users) identifier_users )attribute (call (attribute (identifier_auth_src) identifier_auth_src (identifier_get) identifier_get )attribute (argument_list (string_"users") string_"users" (list )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_auth) identifier_auth (identifier_groups) identifier_groups )attribute (call (attribute (identifier_auth_src) identifier_auth_src (identifier_get) identifier_get )attribute (argument_list (string_"groups") string_"groups" (list )list )argument_list )call )assignment )expression_statement (expression_statement (assignment (attribute (identifier_auth) identifier_auth (identifier_router_params) identifier_router_params )attribute (call (attribute (identifier_auth_src) identifier_auth_src (identifier_get) identifier_get )attribute (argument_list (string_"router_params") string_"router_params" (dictionary )dictionary )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_result) identifier_result (identifier_append) identifier_append )attribute (argument_list (identifier_auth) identifier_auth )argument_list )call )expression_statement )block )for_statement (return_statement (identifier_result) identifier_result )return_statement )block )function_definition )module
Parses YAML data into a list of APIAuthorization objects.
(module (function_definition (function_name_edit) function_name_edit (parameters (identifier_self) identifier_self (identifier_id) identifier_id (identifier_seq) identifier_seq (identifier_resource) identifier_resource )parameters (block (return_statement (call (attribute (identifier_self) identifier_self (identifier_create_or_edit) identifier_create_or_edit )attribute (argument_list (identifier_id) identifier_id (identifier_seq) identifier_seq (identifier_resource) identifier_resource )argument_list )call )return_statement )block )function_definition )module
Edit a highlight. :param id: Result ID as an int. :param seq: TestResult sequence ID as an int. :param resource: :class:`highlights.Highlight <highlights.Highlight>` object :return: :class:`highlights.Highlight <highlights.Highlight>` object :rtype: highlights.Highlight
(module (function_definition (function_name_person) function_name_person (parameters (identifier_self) identifier_self (identifier_person_id) identifier_person_id )parameters (block (if_statement (not_operator (call (attribute (subscript (attribute (identifier_self) identifier_self (identifier_cache) identifier_cache )attribute (string_'persons') string_'persons' )subscript (identifier_get) identifier_get )attribute (argument_list (identifier_person_id) identifier_person_id (None) None )argument_list )call )not_operator (block (try_statement (block (expression_statement (assignment (identifier_person_xml) identifier_person_xml (call (attribute (attribute (identifier_self) identifier_self (identifier_bc) identifier_bc )attribute (identifier_person) identifier_person )attribute (argument_list (identifier_person_id) identifier_person_id )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_p) identifier_p (call (identifier_Person) identifier_Person (argument_list (identifier_person_xml) identifier_person_xml )argument_list )call )assignment )expression_statement (expression_statement (assignment (subscript (subscript (attribute (identifier_self) identifier_self (identifier_cache) identifier_cache )attribute (string_'persons') string_'persons' )subscript (identifier_person_id) identifier_person_id )subscript (identifier_p) identifier_p )assignment )expression_statement )block (except_clause (identifier_HTTPError) identifier_HTTPError (block (return_statement (None) None )return_statement )block )except_clause )try_statement )block )if_statement (return_statement (subscript (subscript (attribute (identifier_self) identifier_self (identifier_cache) identifier_cache )attribute (string_'persons') string_'persons' )subscript (identifier_person_id) identifier_person_id )subscript )return_statement )block )function_definition )module
Access a Person object by id
(module (function_definition (function_name__get_signature) function_name__get_signature (parameters (identifier_self) identifier_self )parameters (block (expression_statement (assignment (identifier_keys) identifier_keys (call (identifier_list) identifier_list (argument_list (call (attribute (attribute (identifier_self) identifier_self (identifier_params) identifier_params )attribute (identifier_keys) identifier_keys )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement (expression_statement (call (attribute (identifier_keys) identifier_keys (identifier_sort) identifier_sort )attribute (argument_list )argument_list )call )expression_statement (expression_statement (assignment (identifier_string) identifier_string (string_"") string_"" )assignment )expression_statement (for_statement (identifier_name) identifier_name (identifier_keys) identifier_keys (block (expression_statement (augmented_assignment (identifier_string) identifier_string (identifier_name) identifier_name )augmented_assignment )expression_statement (expression_statement (augmented_assignment (identifier_string) identifier_string (subscript (attribute (identifier_self) identifier_self (identifier_params) identifier_params )attribute (identifier_name) identifier_name )subscript )augmented_assignment )expression_statement )block )for_statement (expression_statement (augmented_assignment (identifier_string) identifier_string (attribute (identifier_self) identifier_self (identifier_api_secret) identifier_api_secret )attribute )augmented_assignment )expression_statement (return_statement (call (identifier_md5) identifier_md5 (argument_list (identifier_string) identifier_string )argument_list )call )return_statement )block )function_definition )module
Returns a 32-character hexadecimal md5 hash of the signature string.
(module (function_definition (function_name__flatten_up_to_token) function_name__flatten_up_to_token (parameters (identifier_self) identifier_self (identifier_token) identifier_token )parameters (block (if_statement (attribute (identifier_token) identifier_token (identifier_is_group) identifier_is_group )attribute (block (expression_statement (assignment (identifier_token) identifier_token (call (identifier_next) identifier_next (argument_list (call (attribute (identifier_token) identifier_token (identifier_flatten) identifier_flatten )attribute (argument_list )argument_list )call )argument_list )call )assignment )expression_statement )block )if_statement (for_statement (identifier_t) identifier_t (call (attribute (attribute (identifier_self) identifier_self (identifier__curr_stmt) identifier__curr_stmt )attribute (identifier_flatten) identifier_flatten )attribute (argument_list )argument_list )call (block (if_statement (comparison_operator (identifier_t) identifier_t (identifier_token) identifier_token )comparison_operator (block (break_statement )break_statement )block )if_statement (expression_statement (yield (identifier_t) identifier_t )yield )expression_statement )block )for_statement )block )function_definition )module
Yields all tokens up to token but excluding current.
(module (function_definition (function_name_change_domain) function_name_change_domain (parameters (identifier_self) identifier_self (identifier_domain) identifier_domain )parameters (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_info) identifier_info )attribute (argument_list (string_'Running %(name)s.change_domain() with new domain range:[%(ymin)s, %(ymax)s]') string_'Running %(name)s.change_domain() with new domain range:[%(ymin)s, %(ymax)s]' (dictionary (pair (string_"name") string_"name" (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute )pair (pair (string_"ymin") string_"ymin" (call (attribute (identifier_np) identifier_np (identifier_min) identifier_min )attribute (argument_list (identifier_domain) identifier_domain )argument_list )call )pair (pair (string_"ymax") string_"ymax" (call (attribute (identifier_np) identifier_np (identifier_max) identifier_max )attribute (argument_list (identifier_domain) identifier_domain )argument_list )call )pair )dictionary )argument_list )call )expression_statement (if_statement (boolean_operator (comparison_operator (call (attribute (identifier_np) identifier_np (identifier_max) identifier_max )attribute (argument_list (identifier_domain) identifier_domain )argument_list )call (call (attribute (identifier_np) identifier_np (identifier_max) identifier_max )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute )argument_list )call )comparison_operator (comparison_operator (call (attribute (identifier_np) identifier_np (identifier_min) identifier_min )attribute (argument_list (identifier_domain) identifier_domain )argument_list )call (call (attribute (identifier_np) identifier_np (identifier_min) identifier_min )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute )argument_list )call )comparison_operator )boolean_operator (block (expression_statement (call (attribute (identifier_logger) identifier_logger (identifier_error) identifier_error )attribute (argument_list (concatenated_string (string_'Old domain range: [%(xmin)s, %(xmax)s] does not include new domain range:') string_'Old domain range: [%(xmin)s, %(xmax)s] does not include new domain range:' (string_'[%(ymin)s, %(ymax)s]') string_'[%(ymin)s, %(ymax)s]' )concatenated_string (dictionary (pair (string_"xmin") string_"xmin" (call (attribute (identifier_np) identifier_np (identifier_min) identifier_min )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute )argument_list )call )pair (pair (string_"xmax") string_"xmax" (call (attribute (identifier_np) identifier_np (identifier_max) identifier_max )attribute (argument_list (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute )argument_list )call )pair (pair (string_"ymin") string_"ymin" (call (attribute (identifier_np) identifier_np (identifier_min) identifier_min )attribute (argument_list (identifier_domain) identifier_domain )argument_list )call )pair (pair (string_"ymax") string_"ymax" (call (attribute (identifier_np) identifier_np (identifier_max) identifier_max )attribute (argument_list (identifier_domain) identifier_domain )argument_list )call )pair )dictionary )argument_list )call )expression_statement (raise_statement (call (identifier_ValueError) identifier_ValueError (argument_list (concatenated_string (string_'in change_domain():') string_'in change_domain():' (string_'the old domain does not include the new one') string_'the old domain does not include the new one' )concatenated_string )argument_list )call )raise_statement )block )if_statement (expression_statement (assignment (identifier_y) identifier_y (call (attribute (identifier_np) identifier_np (identifier_interp) identifier_interp )attribute (argument_list (identifier_domain) identifier_domain (attribute (identifier_self) identifier_self (identifier_x) identifier_x )attribute (attribute (identifier_self) identifier_self (identifier_y) identifier_y )attribute )argument_list )call )assignment )expression_statement (expression_statement (assignment (identifier_obj) identifier_obj (call (attribute (identifier_self) identifier_self (identifier___class__) identifier___class__ )attribute (argument_list (subscript (call (attribute (identifier_np) identifier_np (identifier_dstack) identifier_dstack )attribute (argument_list (tuple (identifier_domain) identifier_domain (identifier_y) identifier_y )tuple )argument_list )call (integer_0) integer_0 )subscript (dictionary_splat (subscript (attribute (identifier_self) identifier_self (identifier___dict__) identifier___dict__ )attribute (string_'metadata') string_'metadata' )subscript )dictionary_splat )argument_list )call )assignment )expression_statement (return_statement (identifier_obj) identifier_obj )return_statement )block )function_definition )module
Creating new Curve object in memory with domain passed as a parameter. New domain must include in the original domain. Copies values from original curve and uses interpolation to calculate values for new points in domain. Calculate y - values of example curve with changed domain: >>> print(Curve([[0,0], [5, 5], [10, 0]])\ .change_domain([1, 2, 8, 9]).y) [1. 2. 2. 1.] :param domain: set of points representing new domain. Might be a list or np.array. :return: new Curve object with domain set by 'domain' parameter
(module (function_definition (function_name_wait_for_completion) function_name_wait_for_completion (parameters (identifier_self) identifier_self (identifier_job_id) identifier_job_id (default_parameter (identifier_timeout) identifier_timeout (None) None )default_parameter )parameters (block (while_statement (integer_1) integer_1 (block (expression_statement (assignment (identifier_job) identifier_job (call (attribute (identifier_self) identifier_self (identifier_wait) identifier_wait )attribute (argument_list (identifier_job_id) identifier_job_id (keyword_argument (identifier_timeout) identifier_timeout (identifier_timeout) identifier_timeout )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (comparison_operator (attribute (identifier_job) identifier_job (identifier_state) identifier_state )attribute (list (attribute (identifier_State) identifier_State (identifier_COMPLETED) identifier_COMPLETED )attribute (attribute (identifier_State) identifier_State (identifier_FAILED) identifier_FAILED )attribute (attribute (identifier_State) identifier_State (identifier_CANCELED) identifier_CANCELED )attribute )list )comparison_operator (block (return_statement (identifier_job) identifier_job )return_statement )block (else_clause (block (continue_statement )continue_statement )block )else_clause )if_statement )block )while_statement )block )function_definition )module
Wait for the job given by job_id to change to COMPLETED or CANCELED. Raises a iceqube.exceptions.TimeoutError if timeout is exceeded before each job change. :param job_id: the id of the job to wait for. :param timeout: how long to wait for a job state change before timing out.
(module (function_definition (function_name_lock) function_name_lock (parameters (identifier_cls) identifier_cls (identifier_pid) identifier_pid (identifier_connection) identifier_connection (identifier_session) identifier_session )parameters (block (with_statement (with_clause (with_item (attribute (identifier_cls) identifier_cls (identifier__lock) identifier__lock )attribute )with_item )with_clause (block (expression_statement (call (attribute (identifier_cls) identifier_cls (identifier__ensure_pool_exists) identifier__ensure_pool_exists )attribute (argument_list (identifier_pid) identifier_pid )argument_list )call )expression_statement (expression_statement (call (attribute (subscript (attribute (identifier_cls) identifier_cls (identifier__pools) identifier__pools )attribute (identifier_pid) identifier_pid )subscript (identifier_lock) identifier_lock )attribute (argument_list (identifier_connection) identifier_connection (identifier_session) identifier_session )argument_list )call )expression_statement )block )with_statement )block )function_definition )module
Explicitly lock the specified connection in the pool :param str pid: The pool id :type connection: psycopg2.extensions.connection :param connection: The connection to add to the pool :param queries.Session session: The session to hold the lock
(module (function_definition (function_name_can_user_approve_this_page) function_name_can_user_approve_this_page (parameters (identifier_self) identifier_self (identifier_user) identifier_user )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_ensure_one) identifier_ensure_one )attribute (argument_list )argument_list )call )expression_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_is_approval_required) identifier_is_approval_required )attribute )not_operator (block (return_statement (True) True )return_statement )block )if_statement (if_statement (call (attribute (identifier_user) identifier_user (identifier_has_group) identifier_has_group )attribute (argument_list (string_'document_page.group_document_manager') string_'document_page.group_document_manager' )argument_list )call (block (return_statement (True) True )return_statement )block )if_statement (if_statement (not_operator (call (attribute (identifier_user) identifier_user (identifier_has_group) identifier_has_group )attribute (argument_list (string_'document_page_approval.group_document_approver_user') string_'document_page_approval.group_document_approver_user' )argument_list )call )not_operator (block (return_statement (False) False )return_statement )block )if_statement (if_statement (not_operator (attribute (identifier_self) identifier_self (identifier_approver_group_ids) identifier_approver_group_ids )attribute )not_operator (block (return_statement (True) True )return_statement )block )if_statement (return_statement (comparison_operator (call (identifier_len) identifier_len (argument_list (binary_operator (attribute (identifier_user) identifier_user (identifier_groups_id) identifier_groups_id )attribute (attribute (identifier_self) identifier_self (identifier_approver_group_ids) identifier_approver_group_ids )attribute )binary_operator )argument_list )call (integer_0) integer_0 )comparison_operator )return_statement )block )function_definition )module
Check if a user can approve this page.
(module (function_definition (function_name_maxEntropy) function_name_maxEntropy (parameters (identifier_n) identifier_n (identifier_k) identifier_k )parameters (block (expression_statement (assignment (identifier_s) identifier_s (binary_operator (call (identifier_float) identifier_float (argument_list (identifier_k) identifier_k )argument_list )call (identifier_n) identifier_n )binary_operator )assignment )expression_statement (if_statement (boolean_operator (comparison_operator (identifier_s) identifier_s (float_0.0) float_0.0 )comparison_operator (comparison_operator (identifier_s) identifier_s (float_1.0) float_1.0 )comparison_operator )boolean_operator (block (expression_statement (assignment (identifier_entropy) identifier_entropy (binary_operator (binary_operator (unary_operator (identifier_s) identifier_s )unary_operator (call (attribute (identifier_math) identifier_math (identifier_log) identifier_log )attribute (argument_list (identifier_s) identifier_s (integer_2) integer_2 )argument_list )call )binary_operator (binary_operator (parenthesized_expression (binary_operator (integer_1) integer_1 (identifier_s) identifier_s )binary_operator )parenthesized_expression (call (attribute (identifier_math) identifier_math (identifier_log) identifier_log )attribute (argument_list (binary_operator (integer_1) integer_1 (identifier_s) identifier_s )binary_operator (integer_2) integer_2 )argument_list )call )binary_operator )binary_operator )assignment )expression_statement )block (else_clause (block (expression_statement (assignment (identifier_entropy) identifier_entropy (integer_0) integer_0 )assignment )expression_statement )block )else_clause )if_statement (return_statement (binary_operator (identifier_n) identifier_n (identifier_entropy) identifier_entropy )binary_operator )return_statement )block )function_definition )module
The maximum enropy we could get with n units and k winners
(module (function_definition (function_name_save) function_name_save (parameters (identifier_self) identifier_self (identifier_file_or_wfs) identifier_file_or_wfs (identifier_filename) identifier_filename (default_parameter (identifier_overwrite) identifier_overwrite (False) False )default_parameter )parameters (block (expression_statement (call (attribute (identifier_self) identifier_self (identifier_write) identifier_write )attribute (argument_list (identifier_filename) identifier_filename (call (attribute (identifier_file_or_wfs) identifier_file_or_wfs (identifier_read) identifier_read )attribute (argument_list )argument_list )call )argument_list )call )expression_statement (return_statement (identifier_filename) identifier_filename )return_statement )block )function_definition )module
Save a file-like object or a `werkzeug.FileStorage` with the specified filename. :param storage: The file or the storage to be saved. :param filename: The destination in the storage. :param overwrite: if `False`, raise an exception if file exists in storage :raises FileExists: when file exists and overwrite is `False`
(module (function_definition (function_name_associate_dhcp_options_to_vpc) function_name_associate_dhcp_options_to_vpc (parameters (identifier_dhcp_options_id) identifier_dhcp_options_id (default_parameter (identifier_vpc_id) identifier_vpc_id (None) None )default_parameter (default_parameter (identifier_vpc_name) identifier_vpc_name (None) None )default_parameter (default_parameter (identifier_region) identifier_region (None) None )default_parameter (default_parameter (identifier_key) identifier_key (None) None )default_parameter (default_parameter (identifier_keyid) identifier_keyid (None) None )default_parameter (default_parameter (identifier_profile) identifier_profile (None) None )default_parameter )parameters (block (try_statement (block (expression_statement (assignment (identifier_vpc_id) identifier_vpc_id (call (identifier_check_vpc) identifier_check_vpc (argument_list (identifier_vpc_id) identifier_vpc_id (identifier_vpc_name) identifier_vpc_name (identifier_region) identifier_region (identifier_key) identifier_key (identifier_keyid) identifier_keyid (identifier_profile) identifier_profile )argument_list )call )assignment )expression_statement (if_statement (not_operator (identifier_vpc_id) identifier_vpc_id )not_operator (block (return_statement (dictionary (pair (string_'associated') string_'associated' (False) False )pair (pair (string_'error') string_'error' (dictionary (pair (string_'message') string_'message' (call (attribute (string_'VPC {0} does not exist.') string_'VPC {0} does not exist.' (identifier_format) identifier_format )attribute (argument_list (boolean_operator (identifier_vpc_name) identifier_vpc_name (identifier_vpc_id) identifier_vpc_id )boolean_operator )argument_list )call )pair )dictionary )pair )dictionary )return_statement )block )if_statement (expression_statement (assignment (identifier_conn) identifier_conn (call (identifier__get_conn) identifier__get_conn (argument_list (keyword_argument (identifier_region) identifier_region (identifier_region) identifier_region )keyword_argument (keyword_argument (identifier_key) identifier_key (identifier_key) identifier_key )keyword_argument (keyword_argument (identifier_keyid) identifier_keyid (identifier_keyid) identifier_keyid )keyword_argument (keyword_argument (identifier_profile) identifier_profile (identifier_profile) identifier_profile )keyword_argument )argument_list )call )assignment )expression_statement (if_statement (call (attribute (identifier_conn) identifier_conn (identifier_associate_dhcp_options) identifier_associate_dhcp_options )attribute (argument_list (identifier_dhcp_options_id) identifier_dhcp_options_id (identifier_vpc_id) identifier_vpc_id )argument_list )call (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_info) identifier_info )attribute (argument_list (string_'DHCP options with id %s were associated with VPC %s') string_'DHCP options with id %s were associated with VPC %s' (identifier_dhcp_options_id) identifier_dhcp_options_id (identifier_vpc_id) identifier_vpc_id )argument_list )call )expression_statement (return_statement (dictionary (pair (string_'associated') string_'associated' (True) True )pair )dictionary )return_statement )block (else_clause (block (expression_statement (call (attribute (identifier_log) identifier_log (identifier_warning) identifier_warning )attribute (argument_list (string_'DHCP options with id %s were not associated with VPC %s') string_'DHCP options with id %s were not associated with VPC %s' (identifier_dhcp_options_id) identifier_dhcp_options_id (identifier_vpc_id) identifier_vpc_id )argument_list )call )expression_statement (return_statement (dictionary (pair (string_'associated') string_'associated' (False) False )pair (pair (string_'error') string_'error' (dictionary (pair (string_'message') string_'message' (string_'DHCP options could not be associated.') string_'DHCP options could not be associated.' )pair )dictionary )pair )dictionary )return_statement )block )else_clause )if_statement )block (except_clause (as_pattern (identifier_BotoServerError) identifier_BotoServerError (as_pattern_target (identifier_e) identifier_e )as_pattern_target )as_pattern (block (return_statement (dictionary (pair (string_'associated') string_'associated' (False) False )pair (pair (string_'error') string_'error' (call (subscript (identifier___utils__) identifier___utils__ (string_'boto.get_error') string_'boto.get_error' )subscript (argument_list (identifier_e) identifier_e )argument_list )call )pair )dictionary )return_statement )block )except_clause )try_statement )block )function_definition )module
Given valid DHCP options id and a valid VPC id, associate the DHCP options record with the VPC. Returns True if the DHCP options record were associated and returns False if the DHCP options record was not associated. CLI Example: .. code-block:: bash salt myminion boto_vpc.associate_dhcp_options_to_vpc 'dhcp-a0bl34pp' 'vpc-6b1fe402'
(module (function_definition (function_name_meta) function_name_meta (parameters (identifier_self) identifier_self )parameters (block (if_statement (boolean_operator (not_operator (attribute (attribute (identifier_self) identifier_self (identifier__pv) identifier__pv )attribute (identifier_meta_data_property) identifier_meta_data_property )attribute )not_operator (not_operator (attribute (identifier_self) identifier_self (identifier__meta_target) identifier__meta_target )attribute )not_operator )boolean_operator (block (return_statement (dictionary )dictionary )return_statement )block )if_statement (return_statement (call (identifier_getattr) identifier_getattr (argument_list (attribute (identifier_self) identifier_self (identifier__meta_target) identifier__meta_target )attribute (attribute (attribute (identifier_self) identifier_self (identifier__pv) identifier__pv )attribute (identifier_meta_data_property) identifier_meta_data_property )attribute )argument_list )call )return_statement )block )function_definition )module
Value of the bound meta-property on the target.